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.
Files changed (57) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +9 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs +9 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/beta/beta.d.mts +4 -0
  10. package/resources/beta/beta.d.mts.map +1 -1
  11. package/resources/beta/beta.d.ts +4 -0
  12. package/resources/beta/beta.d.ts.map +1 -1
  13. package/resources/beta/beta.js +4 -0
  14. package/resources/beta/beta.js.map +1 -1
  15. package/resources/beta/beta.mjs +4 -0
  16. package/resources/beta/beta.mjs.map +1 -1
  17. package/resources/beta/findall.d.mts +14 -2
  18. package/resources/beta/findall.d.mts.map +1 -1
  19. package/resources/beta/findall.d.ts +14 -2
  20. package/resources/beta/findall.d.ts.map +1 -1
  21. package/resources/beta/index.d.mts +1 -0
  22. package/resources/beta/index.d.mts.map +1 -1
  23. package/resources/beta/index.d.ts +1 -0
  24. package/resources/beta/index.d.ts.map +1 -1
  25. package/resources/beta/index.js +3 -1
  26. package/resources/beta/index.js.map +1 -1
  27. package/resources/beta/index.mjs +1 -0
  28. package/resources/beta/index.mjs.map +1 -1
  29. package/resources/beta/memory.d.mts +220 -0
  30. package/resources/beta/memory.d.mts.map +1 -0
  31. package/resources/beta/memory.d.ts +220 -0
  32. package/resources/beta/memory.d.ts.map +1 -0
  33. package/resources/beta/memory.js +68 -0
  34. package/resources/beta/memory.js.map +1 -0
  35. package/resources/beta/memory.mjs +64 -0
  36. package/resources/beta/memory.mjs.map +1 -0
  37. package/resources/monitor.d.mts +10 -0
  38. package/resources/monitor.d.mts.map +1 -1
  39. package/resources/monitor.d.ts +10 -0
  40. package/resources/monitor.d.ts.map +1 -1
  41. package/resources/task-run.d.mts +10 -0
  42. package/resources/task-run.d.mts.map +1 -1
  43. package/resources/task-run.d.ts +10 -0
  44. package/resources/task-run.d.ts.map +1 -1
  45. package/src/client.ts +9 -1
  46. package/src/resources/beta/api.md +19 -0
  47. package/src/resources/beta/beta.ts +32 -0
  48. package/src/resources/beta/findall.ts +16 -2
  49. package/src/resources/beta/index.ts +14 -0
  50. package/src/resources/beta/memory.ts +301 -0
  51. package/src/resources/monitor.ts +12 -0
  52. package/src/resources/task-run.ts +12 -0
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -1,3 +1,4 @@
1
1
  export { Beta } from "./beta.mjs";
2
2
  export { FindAll, type FindAllCandidate, type FindAllCandidateMatchStatusEvent, type FindAllCandidateMetrics, type FindAllEnrichInput, type FindAllEntitySearchRequest, type FindAllEntitySearchResponse, type FindAllExtendInput, type FindAllRun, type FindAllRunInput, type FindAllRunResult, type FindAllRunStatus, type FindAllRunStatusEvent, type FindAllSchema, type FindAllSchemaUpdatedEvent, type IngestInput, type MatchCondition, type ParallelBeta, type FindAllEventsResponse, type FindAllCreateParams, type FindAllRetrieveParams, type FindAllCancelParams, type FindAllEnrichParams, type FindAllEntitySearchParams, type FindAllEventsParams, type FindAllExtendParams, type FindAllIngestParams, type FindAllResultParams, type FindAllSchemaParams, } from "./findall.mjs";
3
+ export { Memory, type FindAllMemoryResult, type MemoryClearRequest, type MemoryEvictRequest, type MemoryRetrieveRequest, type MemoryRetrieveResponse, type MonitorMemoryEvent, type MonitorMemoryResult, type TaskMemoryResult, type MemoryRetrieveParams, type MemoryClearParams, type MemoryEvictParams, } from "./memory.mjs";
3
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,sBAAkB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,sBAAkB;AACnB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,qBAAiB"}
@@ -1,3 +1,4 @@
1
1
  export { Beta } from "./beta.js";
2
2
  export { FindAll, type FindAllCandidate, type FindAllCandidateMatchStatusEvent, type FindAllCandidateMetrics, type FindAllEnrichInput, type FindAllEntitySearchRequest, type FindAllEntitySearchResponse, type FindAllExtendInput, type FindAllRun, type FindAllRunInput, type FindAllRunResult, type FindAllRunStatus, type FindAllRunStatusEvent, type FindAllSchema, type FindAllSchemaUpdatedEvent, type IngestInput, type MatchCondition, type ParallelBeta, type FindAllEventsResponse, type FindAllCreateParams, type FindAllRetrieveParams, type FindAllCancelParams, type FindAllEnrichParams, type FindAllEntitySearchParams, type FindAllEventsParams, type FindAllExtendParams, type FindAllIngestParams, type FindAllResultParams, type FindAllSchemaParams, } from "./findall.js";
3
+ export { Memory, type FindAllMemoryResult, type MemoryClearRequest, type MemoryEvictRequest, type MemoryRetrieveRequest, type MemoryRetrieveResponse, type MonitorMemoryEvent, type MonitorMemoryResult, type TaskMemoryResult, type MemoryRetrieveParams, type MemoryClearParams, type MemoryEvictParams, } from "./memory.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,kBAAe;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,qBAAkB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,kBAAe;AAC9B,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,qBAAkB;AACnB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,oBAAiB"}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.FindAll = exports.Beta = void 0;
4
+ exports.Memory = exports.FindAll = exports.Beta = void 0;
5
5
  var beta_1 = require("./beta.js");
6
6
  Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } });
7
7
  var findall_1 = require("./findall.js");
8
8
  Object.defineProperty(exports, "FindAll", { enumerable: true, get: function () { return findall_1.FindAll; } });
9
+ var memory_1 = require("./memory.js");
10
+ Object.defineProperty(exports, "Memory", { enumerable: true, get: function () { return memory_1.Memory; } });
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,wCA8BmB;AA7BjB,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,wCA8BmB;AA7BjB,kGAAA,OAAO,OAAA;AA8BT,sCAakB;AAZhB,gGAAA,MAAM,OAAA"}
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export { Beta } from "./beta.mjs";
3
3
  export { FindAll, } from "./findall.mjs";
4
+ export { Memory, } from "./memory.mjs";
4
5
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,OAAO,GA6BR,sBAAkB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,OAAO,EACL,OAAO,GA6BR,sBAAkB;AACnB,OAAO,EACL,MAAM,GAYP,qBAAiB"}
@@ -0,0 +1,220 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../internal/request-options.mjs";
4
+ /**
5
+ * 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`.
6
+ */
7
+ export declare class Memory extends APIResource {
8
+ /**
9
+ * Retrieves relevant or recent runs from the selected memory. Provide a query to
10
+ * rank results by relevance; leave it empty to return the most recent runs.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const memoryRetrieveResponse =
15
+ * await client.beta.memory.retrieve();
16
+ * ```
17
+ */
18
+ retrieve(body: MemoryRetrieveParams, options?: RequestOptions): APIPromise<MemoryRetrieveResponse>;
19
+ /**
20
+ * Clears all entries from the selected memory without deleting the underlying
21
+ * tasks, monitors, or FindAll runs.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * await client.beta.memory.clear();
26
+ * ```
27
+ */
28
+ clear(body: MemoryClearParams, options?: RequestOptions): APIPromise<void>;
29
+ /**
30
+ * Removes a task run, monitor, or FindAll run from the selected memory without
31
+ * deleting the original resource.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * await client.beta.memory.evict({ id: 'id', kind: 'task' });
36
+ * ```
37
+ */
38
+ evict(body: MemoryEvictParams, options?: RequestOptions): APIPromise<void>;
39
+ }
40
+ export interface FindAllMemoryResult {
41
+ /**
42
+ * ID of the FindAll run.
43
+ */
44
+ id: string;
45
+ /**
46
+ * Preview of the run's objective. May be truncated.
47
+ */
48
+ input_excerpt: string;
49
+ /**
50
+ * Current number of matched entities.
51
+ */
52
+ matched_count: number;
53
+ /**
54
+ * When the FindAll result was last updated, as an RFC 3339 timestamp.
55
+ */
56
+ updated_at: string;
57
+ kind?: 'findall';
58
+ }
59
+ export interface MemoryClearRequest {
60
+ /**
61
+ * User-provided key identifying the memory scope to use. Omit to use personal
62
+ * memory, if available.
63
+ */
64
+ memory_scope_key?: string | null;
65
+ }
66
+ export interface MemoryEvictRequest {
67
+ /**
68
+ * ID of the task run, monitor, or FindAll run to evict.
69
+ */
70
+ id: string;
71
+ /**
72
+ * Kind of source to evict: `task`, `monitor`, or `findall`.
73
+ */
74
+ kind: 'task' | 'monitor' | 'findall';
75
+ /**
76
+ * User-provided key identifying the memory scope to use. Omit to use personal
77
+ * memory, if available.
78
+ */
79
+ memory_scope_key?: string | null;
80
+ }
81
+ export interface MemoryRetrieveRequest {
82
+ /**
83
+ * Filter memories by kind: `task`, `monitor`, or `findall`.
84
+ */
85
+ kind?: 'task' | 'monitor' | 'findall' | null;
86
+ /**
87
+ * Maximum number of memories to return.
88
+ */
89
+ limit?: number;
90
+ /**
91
+ * User-provided key identifying the memory scope to use. Omit to use personal
92
+ * memory, if available.
93
+ */
94
+ memory_scope_key?: string | null;
95
+ /**
96
+ * Concise query describing the memories to retrieve. Empty queries return the most
97
+ * recent memories.
98
+ */
99
+ query?: string | null;
100
+ /**
101
+ * Only return memories sourced from task, monitor, or FindAll runs completed at or
102
+ * after this RFC 3339 timestamp.
103
+ */
104
+ since?: string | null;
105
+ }
106
+ export interface MemoryRetrieveResponse {
107
+ results: Array<TaskMemoryResult | MonitorMemoryResult | FindAllMemoryResult>;
108
+ }
109
+ export interface MonitorMemoryEvent {
110
+ /**
111
+ * When the event was detected, as an RFC 3339 timestamp.
112
+ */
113
+ detected_at: string;
114
+ /**
115
+ * ID of the execution that produced this event.
116
+ */
117
+ event_group_id: string;
118
+ /**
119
+ * ID of the monitor event.
120
+ */
121
+ event_id: string;
122
+ /**
123
+ * Excerpt of the monitor event. May be truncated.
124
+ */
125
+ excerpt: string;
126
+ }
127
+ export interface MonitorMemoryResult {
128
+ /**
129
+ * ID of the monitor.
130
+ */
131
+ id: string;
132
+ /**
133
+ * Preview of the monitor's query. May be truncated.
134
+ */
135
+ input_excerpt: string;
136
+ /**
137
+ * Current status of the monitor.
138
+ */
139
+ status: 'active' | 'cancelled';
140
+ /**
141
+ * When the monitor last ran, as an RFC 3339 timestamp.
142
+ */
143
+ updated_at: string;
144
+ kind?: 'monitor';
145
+ /**
146
+ * Detected events matching the retrieval query, ordered by relevance with more
147
+ * recent events favored. For an empty query, events are ordered by recency.
148
+ */
149
+ matched_events?: Array<MonitorMemoryEvent>;
150
+ }
151
+ export interface TaskMemoryResult {
152
+ /**
153
+ * ID of the task run.
154
+ */
155
+ id: string;
156
+ /**
157
+ * Preview of the run's input. May be truncated.
158
+ */
159
+ input_excerpt: string;
160
+ /**
161
+ * Preview of the run's output. May be truncated.
162
+ */
163
+ output_excerpt: string;
164
+ /**
165
+ * When the run completed, as an RFC 3339 timestamp.
166
+ */
167
+ updated_at: string;
168
+ kind?: 'task';
169
+ }
170
+ export interface MemoryRetrieveParams {
171
+ /**
172
+ * Filter memories by kind: `task`, `monitor`, or `findall`.
173
+ */
174
+ kind?: 'task' | 'monitor' | 'findall' | null;
175
+ /**
176
+ * Maximum number of memories to return.
177
+ */
178
+ limit?: number;
179
+ /**
180
+ * User-provided key identifying the memory scope to use. Omit to use personal
181
+ * memory, if available.
182
+ */
183
+ memory_scope_key?: string | null;
184
+ /**
185
+ * Concise query describing the memories to retrieve. Empty queries return the most
186
+ * recent memories.
187
+ */
188
+ query?: string | null;
189
+ /**
190
+ * Only return memories sourced from task, monitor, or FindAll runs completed at or
191
+ * after this RFC 3339 timestamp.
192
+ */
193
+ since?: string | null;
194
+ }
195
+ export interface MemoryClearParams {
196
+ /**
197
+ * User-provided key identifying the memory scope to use. Omit to use personal
198
+ * memory, if available.
199
+ */
200
+ memory_scope_key?: string | null;
201
+ }
202
+ export interface MemoryEvictParams {
203
+ /**
204
+ * ID of the task run, monitor, or FindAll run to evict.
205
+ */
206
+ id: string;
207
+ /**
208
+ * Kind of source to evict: `task`, `monitor`, or `findall`.
209
+ */
210
+ kind: 'task' | 'monitor' | 'findall';
211
+ /**
212
+ * User-provided key identifying the memory scope to use. Omit to use personal
213
+ * memory, if available.
214
+ */
215
+ memory_scope_key?: string | null;
216
+ }
217
+ export declare namespace Memory {
218
+ export { type FindAllMemoryResult as FindAllMemoryResult, type MemoryClearRequest as MemoryClearRequest, type MemoryEvictRequest as MemoryEvictRequest, type MemoryRetrieveRequest as MemoryRetrieveRequest, type MemoryRetrieveResponse as MemoryRetrieveResponse, type MonitorMemoryEvent as MonitorMemoryEvent, type MonitorMemoryResult as MonitorMemoryResult, type TaskMemoryResult as TaskMemoryResult, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryClearParams as MemoryClearParams, type MemoryEvictParams as MemoryEvictParams, };
219
+ }
220
+ //# sourceMappingURL=memory.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.mts","sourceRoot":"","sources":["../../src/resources/beta/memory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAQlG;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,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,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,220 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import { APIPromise } from "../../core/api-promise.js";
3
+ import { RequestOptions } from "../../internal/request-options.js";
4
+ /**
5
+ * 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`.
6
+ */
7
+ export declare class Memory extends APIResource {
8
+ /**
9
+ * Retrieves relevant or recent runs from the selected memory. Provide a query to
10
+ * rank results by relevance; leave it empty to return the most recent runs.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const memoryRetrieveResponse =
15
+ * await client.beta.memory.retrieve();
16
+ * ```
17
+ */
18
+ retrieve(body: MemoryRetrieveParams, options?: RequestOptions): APIPromise<MemoryRetrieveResponse>;
19
+ /**
20
+ * Clears all entries from the selected memory without deleting the underlying
21
+ * tasks, monitors, or FindAll runs.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * await client.beta.memory.clear();
26
+ * ```
27
+ */
28
+ clear(body: MemoryClearParams, options?: RequestOptions): APIPromise<void>;
29
+ /**
30
+ * Removes a task run, monitor, or FindAll run from the selected memory without
31
+ * deleting the original resource.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * await client.beta.memory.evict({ id: 'id', kind: 'task' });
36
+ * ```
37
+ */
38
+ evict(body: MemoryEvictParams, options?: RequestOptions): APIPromise<void>;
39
+ }
40
+ export interface FindAllMemoryResult {
41
+ /**
42
+ * ID of the FindAll run.
43
+ */
44
+ id: string;
45
+ /**
46
+ * Preview of the run's objective. May be truncated.
47
+ */
48
+ input_excerpt: string;
49
+ /**
50
+ * Current number of matched entities.
51
+ */
52
+ matched_count: number;
53
+ /**
54
+ * When the FindAll result was last updated, as an RFC 3339 timestamp.
55
+ */
56
+ updated_at: string;
57
+ kind?: 'findall';
58
+ }
59
+ export interface MemoryClearRequest {
60
+ /**
61
+ * User-provided key identifying the memory scope to use. Omit to use personal
62
+ * memory, if available.
63
+ */
64
+ memory_scope_key?: string | null;
65
+ }
66
+ export interface MemoryEvictRequest {
67
+ /**
68
+ * ID of the task run, monitor, or FindAll run to evict.
69
+ */
70
+ id: string;
71
+ /**
72
+ * Kind of source to evict: `task`, `monitor`, or `findall`.
73
+ */
74
+ kind: 'task' | 'monitor' | 'findall';
75
+ /**
76
+ * User-provided key identifying the memory scope to use. Omit to use personal
77
+ * memory, if available.
78
+ */
79
+ memory_scope_key?: string | null;
80
+ }
81
+ export interface MemoryRetrieveRequest {
82
+ /**
83
+ * Filter memories by kind: `task`, `monitor`, or `findall`.
84
+ */
85
+ kind?: 'task' | 'monitor' | 'findall' | null;
86
+ /**
87
+ * Maximum number of memories to return.
88
+ */
89
+ limit?: number;
90
+ /**
91
+ * User-provided key identifying the memory scope to use. Omit to use personal
92
+ * memory, if available.
93
+ */
94
+ memory_scope_key?: string | null;
95
+ /**
96
+ * Concise query describing the memories to retrieve. Empty queries return the most
97
+ * recent memories.
98
+ */
99
+ query?: string | null;
100
+ /**
101
+ * Only return memories sourced from task, monitor, or FindAll runs completed at or
102
+ * after this RFC 3339 timestamp.
103
+ */
104
+ since?: string | null;
105
+ }
106
+ export interface MemoryRetrieveResponse {
107
+ results: Array<TaskMemoryResult | MonitorMemoryResult | FindAllMemoryResult>;
108
+ }
109
+ export interface MonitorMemoryEvent {
110
+ /**
111
+ * When the event was detected, as an RFC 3339 timestamp.
112
+ */
113
+ detected_at: string;
114
+ /**
115
+ * ID of the execution that produced this event.
116
+ */
117
+ event_group_id: string;
118
+ /**
119
+ * ID of the monitor event.
120
+ */
121
+ event_id: string;
122
+ /**
123
+ * Excerpt of the monitor event. May be truncated.
124
+ */
125
+ excerpt: string;
126
+ }
127
+ export interface MonitorMemoryResult {
128
+ /**
129
+ * ID of the monitor.
130
+ */
131
+ id: string;
132
+ /**
133
+ * Preview of the monitor's query. May be truncated.
134
+ */
135
+ input_excerpt: string;
136
+ /**
137
+ * Current status of the monitor.
138
+ */
139
+ status: 'active' | 'cancelled';
140
+ /**
141
+ * When the monitor last ran, as an RFC 3339 timestamp.
142
+ */
143
+ updated_at: string;
144
+ kind?: 'monitor';
145
+ /**
146
+ * Detected events matching the retrieval query, ordered by relevance with more
147
+ * recent events favored. For an empty query, events are ordered by recency.
148
+ */
149
+ matched_events?: Array<MonitorMemoryEvent>;
150
+ }
151
+ export interface TaskMemoryResult {
152
+ /**
153
+ * ID of the task run.
154
+ */
155
+ id: string;
156
+ /**
157
+ * Preview of the run's input. May be truncated.
158
+ */
159
+ input_excerpt: string;
160
+ /**
161
+ * Preview of the run's output. May be truncated.
162
+ */
163
+ output_excerpt: string;
164
+ /**
165
+ * When the run completed, as an RFC 3339 timestamp.
166
+ */
167
+ updated_at: string;
168
+ kind?: 'task';
169
+ }
170
+ export interface MemoryRetrieveParams {
171
+ /**
172
+ * Filter memories by kind: `task`, `monitor`, or `findall`.
173
+ */
174
+ kind?: 'task' | 'monitor' | 'findall' | null;
175
+ /**
176
+ * Maximum number of memories to return.
177
+ */
178
+ limit?: number;
179
+ /**
180
+ * User-provided key identifying the memory scope to use. Omit to use personal
181
+ * memory, if available.
182
+ */
183
+ memory_scope_key?: string | null;
184
+ /**
185
+ * Concise query describing the memories to retrieve. Empty queries return the most
186
+ * recent memories.
187
+ */
188
+ query?: string | null;
189
+ /**
190
+ * Only return memories sourced from task, monitor, or FindAll runs completed at or
191
+ * after this RFC 3339 timestamp.
192
+ */
193
+ since?: string | null;
194
+ }
195
+ export interface MemoryClearParams {
196
+ /**
197
+ * User-provided key identifying the memory scope to use. Omit to use personal
198
+ * memory, if available.
199
+ */
200
+ memory_scope_key?: string | null;
201
+ }
202
+ export interface MemoryEvictParams {
203
+ /**
204
+ * ID of the task run, monitor, or FindAll run to evict.
205
+ */
206
+ id: string;
207
+ /**
208
+ * Kind of source to evict: `task`, `monitor`, or `findall`.
209
+ */
210
+ kind: 'task' | 'monitor' | 'findall';
211
+ /**
212
+ * User-provided key identifying the memory scope to use. Omit to use personal
213
+ * memory, if available.
214
+ */
215
+ memory_scope_key?: string | null;
216
+ }
217
+ export declare namespace Memory {
218
+ export { type FindAllMemoryResult as FindAllMemoryResult, type MemoryClearRequest as MemoryClearRequest, type MemoryEvictRequest as MemoryEvictRequest, type MemoryRetrieveRequest as MemoryRetrieveRequest, type MemoryRetrieveResponse as MemoryRetrieveResponse, type MonitorMemoryEvent as MonitorMemoryEvent, type MonitorMemoryResult as MonitorMemoryResult, type TaskMemoryResult as TaskMemoryResult, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryClearParams as MemoryClearParams, type MemoryEvictParams as MemoryEvictParams, };
219
+ }
220
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/resources/beta/memory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBA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ACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Memory = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
7
+ /**
8
+ * 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`.
9
+ */
10
+ class Memory extends resource_1.APIResource {
11
+ /**
12
+ * Retrieves relevant or recent runs from the selected memory. Provide a query to
13
+ * rank results by relevance; leave it empty to return the most recent runs.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const memoryRetrieveResponse =
18
+ * await client.beta.memory.retrieve();
19
+ * ```
20
+ */
21
+ retrieve(body, options) {
22
+ return this._client.post('/v1beta/memory/retrieve', {
23
+ body,
24
+ ...options,
25
+ headers: (0, headers_1.buildHeaders)([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
26
+ });
27
+ }
28
+ /**
29
+ * Clears all entries from the selected memory without deleting the underlying
30
+ * tasks, monitors, or FindAll runs.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * await client.beta.memory.clear();
35
+ * ```
36
+ */
37
+ clear(body, options) {
38
+ return this._client.post('/v1beta/memory/clear', {
39
+ body,
40
+ ...options,
41
+ headers: (0, headers_1.buildHeaders)([
42
+ { 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
43
+ options?.headers,
44
+ ]),
45
+ });
46
+ }
47
+ /**
48
+ * Removes a task run, monitor, or FindAll run from the selected memory without
49
+ * deleting the original resource.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * await client.beta.memory.evict({ id: 'id', kind: 'task' });
54
+ * ```
55
+ */
56
+ evict(body, options) {
57
+ return this._client.post('/v1beta/memory/evict', {
58
+ body,
59
+ ...options,
60
+ headers: (0, headers_1.buildHeaders)([
61
+ { 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
62
+ options?.headers,
63
+ ]),
64
+ });
65
+ }
66
+ }
67
+ exports.Memory = Memory;
68
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/resources/beta/memory.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAGtD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAClD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,2BAA2B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAuB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC/D,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAuB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC/D,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1DD,wBA0DC"}
@@ -0,0 +1,64 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
4
+ /**
5
+ * 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`.
6
+ */
7
+ export class Memory extends APIResource {
8
+ /**
9
+ * Retrieves relevant or recent runs from the selected memory. Provide a query to
10
+ * rank results by relevance; leave it empty to return the most recent runs.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const memoryRetrieveResponse =
15
+ * await client.beta.memory.retrieve();
16
+ * ```
17
+ */
18
+ retrieve(body, options) {
19
+ return this._client.post('/v1beta/memory/retrieve', {
20
+ body,
21
+ ...options,
22
+ headers: buildHeaders([{ 'parallel-beta': 'search-extract-2025-10-10' }, options?.headers]),
23
+ });
24
+ }
25
+ /**
26
+ * Clears all entries from the selected memory without deleting the underlying
27
+ * tasks, monitors, or FindAll runs.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * await client.beta.memory.clear();
32
+ * ```
33
+ */
34
+ clear(body, options) {
35
+ return this._client.post('/v1beta/memory/clear', {
36
+ body,
37
+ ...options,
38
+ headers: buildHeaders([
39
+ { 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
40
+ options?.headers,
41
+ ]),
42
+ });
43
+ }
44
+ /**
45
+ * Removes a task run, monitor, or FindAll run from the selected memory without
46
+ * deleting the original resource.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * await client.beta.memory.evict({ id: 'id', kind: 'task' });
51
+ * ```
52
+ */
53
+ evict(body, options) {
54
+ return this._client.post('/v1beta/memory/evict', {
55
+ body,
56
+ ...options,
57
+ headers: buildHeaders([
58
+ { 'parallel-beta': 'search-extract-2025-10-10', Accept: '*/*' },
59
+ options?.headers,
60
+ ]),
61
+ });
62
+ }
63
+ }
64
+ //# sourceMappingURL=memory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.mjs","sourceRoot":"","sources":["../../src/resources/beta/memory.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAGtD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAClD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,2BAA2B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5F,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAuB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC/D,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAuB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC/D,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}