parallel-web 1.1.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 +23 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +4 -0
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +4 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/findall.d.mts +14 -2
- package/resources/beta/findall.d.mts.map +1 -1
- package/resources/beta/findall.d.ts +14 -2
- package/resources/beta/findall.d.ts.map +1 -1
- package/resources/beta/index.d.mts +1 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +3 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory.d.mts +220 -0
- package/resources/beta/memory.d.mts.map +1 -0
- package/resources/beta/memory.d.ts +220 -0
- package/resources/beta/memory.d.ts.map +1 -0
- package/resources/beta/memory.js +68 -0
- package/resources/beta/memory.js.map +1 -0
- package/resources/beta/memory.mjs +64 -0
- package/resources/beta/memory.mjs.map +1 -0
- package/resources/monitor.d.mts +10 -0
- package/resources/monitor.d.mts.map +1 -1
- package/resources/monitor.d.ts +10 -0
- package/resources/monitor.d.ts.map +1 -1
- package/resources/task-run.d.mts +10 -0
- package/resources/task-run.d.mts.map +1 -1
- package/resources/task-run.d.ts +10 -0
- package/resources/task-run.d.ts.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/beta/api.md +19 -0
- package/src/resources/beta/beta.ts +32 -0
- package/src/resources/beta/findall.ts +16 -2
- package/src/resources/beta/index.ts +14 -0
- package/src/resources/beta/memory.ts +301 -0
- package/src/resources/monitor.ts +12 -0
- package/src/resources/task-run.ts +12 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The Memory API retrieves and manages memories created by Tasks, Monitors, and FindAll runs. Memories can be personal or isolated with a `memory_scope_key`.
|
|
10
|
+
*/
|
|
11
|
+
export class Memory extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves relevant or recent runs from the selected memory. Provide a query to
|
|
14
|
+
* rank results by relevance; leave it empty to return the most recent runs.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const memoryRetrieveResponse =
|
|
19
|
+
* await client.beta.memory.retrieve();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(body: MemoryRetrieveParams, options?: RequestOptions): APIPromise<MemoryRetrieveResponse> {
|
|
23
|
+
return this._client.post('/v1beta/memory/retrieve', {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
headers: buildHeaders([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Clears all entries from the selected memory without deleting the underlying
|
|
32
|
+
* tasks, monitors, or FindAll runs.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* await client.beta.memory.clear();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
clear(body: MemoryClearParams, options?: RequestOptions): APIPromise<void> {
|
|
40
|
+
return this._client.post('/v1beta/memory/clear', {
|
|
41
|
+
body,
|
|
42
|
+
...options,
|
|
43
|
+
headers: buildHeaders([
|
|
44
|
+
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
|
|
45
|
+
options?.headers,
|
|
46
|
+
]),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Removes a task run, monitor, or FindAll run from the selected memory without
|
|
52
|
+
* deleting the original resource.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* await client.beta.memory.evict({ id: 'id', kind: 'task' });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
evict(body: MemoryEvictParams, options?: RequestOptions): APIPromise<void> {
|
|
60
|
+
return this._client.post('/v1beta/memory/evict', {
|
|
61
|
+
body,
|
|
62
|
+
...options,
|
|
63
|
+
headers: buildHeaders([
|
|
64
|
+
{ 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
|
|
65
|
+
options?.headers,
|
|
66
|
+
]),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface FindAllMemoryResult {
|
|
72
|
+
/**
|
|
73
|
+
* ID of the FindAll run.
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Preview of the run's objective. May be truncated.
|
|
79
|
+
*/
|
|
80
|
+
input_excerpt: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Current number of matched entities.
|
|
84
|
+
*/
|
|
85
|
+
matched_count: number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* When the FindAll result was last updated, as an RFC 3339 timestamp.
|
|
89
|
+
*/
|
|
90
|
+
updated_at: string;
|
|
91
|
+
|
|
92
|
+
kind?: 'findall';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface MemoryClearRequest {
|
|
96
|
+
/**
|
|
97
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
98
|
+
* memory, if available.
|
|
99
|
+
*/
|
|
100
|
+
memory_scope_key?: string | null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface MemoryEvictRequest {
|
|
104
|
+
/**
|
|
105
|
+
* ID of the task run, monitor, or FindAll run to evict.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Kind of source to evict: `task`, `monitor`, or `findall`.
|
|
111
|
+
*/
|
|
112
|
+
kind: 'task' | 'monitor' | 'findall';
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
116
|
+
* memory, if available.
|
|
117
|
+
*/
|
|
118
|
+
memory_scope_key?: string | null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface MemoryRetrieveRequest {
|
|
122
|
+
/**
|
|
123
|
+
* Filter memories by kind: `task`, `monitor`, or `findall`.
|
|
124
|
+
*/
|
|
125
|
+
kind?: 'task' | 'monitor' | 'findall' | null;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Maximum number of memories to return.
|
|
129
|
+
*/
|
|
130
|
+
limit?: number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
134
|
+
* memory, if available.
|
|
135
|
+
*/
|
|
136
|
+
memory_scope_key?: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Concise query describing the memories to retrieve. Empty queries return the most
|
|
140
|
+
* recent memories.
|
|
141
|
+
*/
|
|
142
|
+
query?: string | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Only return memories sourced from task, monitor, or FindAll runs completed at or
|
|
146
|
+
* after this RFC 3339 timestamp.
|
|
147
|
+
*/
|
|
148
|
+
since?: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface MemoryRetrieveResponse {
|
|
152
|
+
results: Array<TaskMemoryResult | MonitorMemoryResult | FindAllMemoryResult>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface MonitorMemoryEvent {
|
|
156
|
+
/**
|
|
157
|
+
* When the event was detected, as an RFC 3339 timestamp.
|
|
158
|
+
*/
|
|
159
|
+
detected_at: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* ID of the execution that produced this event.
|
|
163
|
+
*/
|
|
164
|
+
event_group_id: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* ID of the monitor event.
|
|
168
|
+
*/
|
|
169
|
+
event_id: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Excerpt of the monitor event. May be truncated.
|
|
173
|
+
*/
|
|
174
|
+
excerpt: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface MonitorMemoryResult {
|
|
178
|
+
/**
|
|
179
|
+
* ID of the monitor.
|
|
180
|
+
*/
|
|
181
|
+
id: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Preview of the monitor's query. May be truncated.
|
|
185
|
+
*/
|
|
186
|
+
input_excerpt: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Current status of the monitor.
|
|
190
|
+
*/
|
|
191
|
+
status: 'active' | 'cancelled';
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* When the monitor last ran, as an RFC 3339 timestamp.
|
|
195
|
+
*/
|
|
196
|
+
updated_at: string;
|
|
197
|
+
|
|
198
|
+
kind?: 'monitor';
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Detected events matching the retrieval query, ordered by relevance with more
|
|
202
|
+
* recent events favored. For an empty query, events are ordered by recency.
|
|
203
|
+
*/
|
|
204
|
+
matched_events?: Array<MonitorMemoryEvent>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface TaskMemoryResult {
|
|
208
|
+
/**
|
|
209
|
+
* ID of the task run.
|
|
210
|
+
*/
|
|
211
|
+
id: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Preview of the run's input. May be truncated.
|
|
215
|
+
*/
|
|
216
|
+
input_excerpt: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Preview of the run's output. May be truncated.
|
|
220
|
+
*/
|
|
221
|
+
output_excerpt: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* When the run completed, as an RFC 3339 timestamp.
|
|
225
|
+
*/
|
|
226
|
+
updated_at: string;
|
|
227
|
+
|
|
228
|
+
kind?: 'task';
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface MemoryRetrieveParams {
|
|
232
|
+
/**
|
|
233
|
+
* Filter memories by kind: `task`, `monitor`, or `findall`.
|
|
234
|
+
*/
|
|
235
|
+
kind?: 'task' | 'monitor' | 'findall' | null;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Maximum number of memories to return.
|
|
239
|
+
*/
|
|
240
|
+
limit?: number;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
244
|
+
* memory, if available.
|
|
245
|
+
*/
|
|
246
|
+
memory_scope_key?: string | null;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Concise query describing the memories to retrieve. Empty queries return the most
|
|
250
|
+
* recent memories.
|
|
251
|
+
*/
|
|
252
|
+
query?: string | null;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Only return memories sourced from task, monitor, or FindAll runs completed at or
|
|
256
|
+
* after this RFC 3339 timestamp.
|
|
257
|
+
*/
|
|
258
|
+
since?: string | null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface MemoryClearParams {
|
|
262
|
+
/**
|
|
263
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
264
|
+
* memory, if available.
|
|
265
|
+
*/
|
|
266
|
+
memory_scope_key?: string | null;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface MemoryEvictParams {
|
|
270
|
+
/**
|
|
271
|
+
* ID of the task run, monitor, or FindAll run to evict.
|
|
272
|
+
*/
|
|
273
|
+
id: string;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Kind of source to evict: `task`, `monitor`, or `findall`.
|
|
277
|
+
*/
|
|
278
|
+
kind: 'task' | 'monitor' | 'findall';
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
282
|
+
* memory, if available.
|
|
283
|
+
*/
|
|
284
|
+
memory_scope_key?: string | null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export declare namespace Memory {
|
|
288
|
+
export {
|
|
289
|
+
type FindAllMemoryResult as FindAllMemoryResult,
|
|
290
|
+
type MemoryClearRequest as MemoryClearRequest,
|
|
291
|
+
type MemoryEvictRequest as MemoryEvictRequest,
|
|
292
|
+
type MemoryRetrieveRequest as MemoryRetrieveRequest,
|
|
293
|
+
type MemoryRetrieveResponse as MemoryRetrieveResponse,
|
|
294
|
+
type MonitorMemoryEvent as MonitorMemoryEvent,
|
|
295
|
+
type MonitorMemoryResult as MonitorMemoryResult,
|
|
296
|
+
type TaskMemoryResult as TaskMemoryResult,
|
|
297
|
+
type MemoryRetrieveParams as MemoryRetrieveParams,
|
|
298
|
+
type MemoryClearParams as MemoryClearParams,
|
|
299
|
+
type MemoryEvictParams as MemoryEvictParams,
|
|
300
|
+
};
|
|
301
|
+
}
|
package/src/resources/monitor.ts
CHANGED
|
@@ -198,6 +198,12 @@ export interface CreateMonitorRequest {
|
|
|
198
198
|
*/
|
|
199
199
|
type: 'event_stream' | 'snapshot';
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
203
|
+
* memory, if available.
|
|
204
|
+
*/
|
|
205
|
+
memory_scope_key?: string | null;
|
|
206
|
+
|
|
201
207
|
/**
|
|
202
208
|
* User-provided metadata stored with the monitor and echoed back in webhook
|
|
203
209
|
* notifications and GET responses, so you can map events to objects in your
|
|
@@ -636,6 +642,12 @@ export interface MonitorCreateParams {
|
|
|
636
642
|
*/
|
|
637
643
|
type: 'event_stream' | 'snapshot';
|
|
638
644
|
|
|
645
|
+
/**
|
|
646
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
647
|
+
* memory, if available.
|
|
648
|
+
*/
|
|
649
|
+
memory_scope_key?: string | null;
|
|
650
|
+
|
|
639
651
|
/**
|
|
640
652
|
* User-provided metadata stored with the monitor and echoed back in webhook
|
|
641
653
|
* notifications and GET responses, so you can map events to objects in your
|
|
@@ -309,6 +309,12 @@ export interface RunInput {
|
|
|
309
309
|
*/
|
|
310
310
|
mcp_servers?: Array<McpServer> | null;
|
|
311
311
|
|
|
312
|
+
/**
|
|
313
|
+
* User-provided key identifying the memory scope to use. Omit to use personal
|
|
314
|
+
* memory, if available.
|
|
315
|
+
*/
|
|
316
|
+
memory_scope_key?: string | null;
|
|
317
|
+
|
|
312
318
|
/**
|
|
313
319
|
* User-provided metadata stored with the run. Keys and values must be strings with
|
|
314
320
|
* a maximum length of 16 and 512 characters respectively.
|
|
@@ -695,6 +701,12 @@ export interface TaskRunCreateParams {
|
|
|
695
701
|
*/
|
|
696
702
|
mcp_servers?: Array<McpServer> | null;
|
|
697
703
|
|
|
704
|
+
/**
|
|
705
|
+
* Body param: User-provided key identifying the memory scope to use. Omit to use
|
|
706
|
+
* personal memory, if available.
|
|
707
|
+
*/
|
|
708
|
+
memory_scope_key?: string | null;
|
|
709
|
+
|
|
698
710
|
/**
|
|
699
711
|
* Body param: User-provided metadata stored with the run. Keys and values must be
|
|
700
712
|
* strings with a maximum length of 16 and 512 characters respectively.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.2.0'; // x-release-please-version
|
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
|