@alicloud/agentloop20260520 2.3.8 → 2.3.9

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 (51) hide show
  1. package/dist/client.d.ts +2 -2
  2. package/dist/client.js +19 -2
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/CreateContextStoreRequest.d.ts +364 -2
  5. package/dist/models/CreateContextStoreRequest.js +365 -1
  6. package/dist/models/CreateContextStoreRequest.js.map +1 -1
  7. package/dist/models/CreateContextStoreResponseBody.d.ts +5 -0
  8. package/dist/models/CreateContextStoreResponseBody.js +2 -0
  9. package/dist/models/CreateContextStoreResponseBody.js.map +1 -1
  10. package/dist/models/DeleteContextStoreRequest.d.ts +8 -0
  11. package/dist/models/DeleteContextStoreRequest.js +6 -2
  12. package/dist/models/DeleteContextStoreRequest.js.map +1 -1
  13. package/dist/models/DeleteContextStoreResponseBody.d.ts +1 -1
  14. package/dist/models/GetContextStoreResponseBody.d.ts +489 -0
  15. package/dist/models/GetContextStoreResponseBody.js +486 -1
  16. package/dist/models/GetContextStoreResponseBody.js.map +1 -1
  17. package/dist/models/ListContextStoresRequest.d.ts +5 -0
  18. package/dist/models/ListContextStoresRequest.js +2 -0
  19. package/dist/models/ListContextStoresRequest.js.map +1 -1
  20. package/dist/models/ListContextStoresResponseBody.d.ts +10 -0
  21. package/dist/models/ListContextStoresResponseBody.js +4 -0
  22. package/dist/models/ListContextStoresResponseBody.js.map +1 -1
  23. package/dist/models/SearchContextRequest.d.ts +38 -0
  24. package/dist/models/SearchContextRequest.js +33 -1
  25. package/dist/models/SearchContextRequest.js.map +1 -1
  26. package/dist/models/SearchContextResponseBody.d.ts +10 -0
  27. package/dist/models/SearchContextResponseBody.js +4 -0
  28. package/dist/models/SearchContextResponseBody.js.map +1 -1
  29. package/dist/models/UpdateContextStoreRequest.d.ts +479 -9
  30. package/dist/models/UpdateContextStoreRequest.js +331 -1
  31. package/dist/models/UpdateContextStoreRequest.js.map +1 -1
  32. package/dist/models/UpdateContextStoreResponseBody.d.ts +8 -0
  33. package/dist/models/UpdateContextStoreResponseBody.js +2 -0
  34. package/dist/models/UpdateContextStoreResponseBody.js.map +1 -1
  35. package/dist/models/model.d.ts +40 -0
  36. package/dist/models/model.js +102 -21
  37. package/dist/models/model.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/client.ts +24 -2
  40. package/src/models/CreateContextStoreRequest.ts +620 -2
  41. package/src/models/CreateContextStoreResponseBody.ts +7 -0
  42. package/src/models/DeleteContextStoreRequest.ts +10 -0
  43. package/src/models/DeleteContextStoreResponseBody.ts +1 -1
  44. package/src/models/GetContextStoreResponseBody.ts +828 -0
  45. package/src/models/ListContextStoresRequest.ts +7 -0
  46. package/src/models/ListContextStoresResponseBody.ts +14 -0
  47. package/src/models/SearchContextRequest.ts +61 -0
  48. package/src/models/SearchContextResponseBody.ts +14 -0
  49. package/src/models/UpdateContextStoreRequest.ts +710 -9
  50. package/src/models/UpdateContextStoreResponseBody.ts +10 -0
  51. package/src/models/model.ts +40 -0
@@ -1,13 +1,379 @@
1
1
  import * as $dara from '@darabonba/typescript';
2
+ export declare class UpdateContextStoreRequestConfigAudit extends $dara.Model {
3
+ /**
4
+ * @remarks
5
+ * Specifies whether to write item events for dropped recall candidates. Default value: false.
6
+ *
7
+ * @example
8
+ * false
9
+ */
10
+ droppedCandidates?: boolean;
11
+ /**
12
+ * @remarks
13
+ * The recording mode for recall queries. Valid values: raw (plaintext) and hash (HMAC only). Default value: raw.
14
+ *
15
+ * @example
16
+ * raw
17
+ */
18
+ queryMode?: string;
19
+ /**
20
+ * @remarks
21
+ * The number of days to retain audit logs. Valid values: 1 to 180. Default value: 30.
22
+ *
23
+ * @example
24
+ * 30
25
+ */
26
+ retentionDays?: number;
27
+ static names(): {
28
+ [key: string]: string;
29
+ };
30
+ static types(): {
31
+ [key: string]: any;
32
+ };
33
+ validate(): void;
34
+ constructor(map?: {
35
+ [key: string]: any;
36
+ });
37
+ }
38
+ export declare class UpdateContextStoreRequestConfigExtractionPolicyModel extends $dara.Model {
39
+ /**
40
+ * @remarks
41
+ * The name of the extraction model. Currently, only qwen3.8-flash is supported, which uses internal platform credentials.
42
+ *
43
+ * @example
44
+ * qwen3.8-flash
45
+ */
46
+ name?: string;
47
+ static names(): {
48
+ [key: string]: string;
49
+ };
50
+ static types(): {
51
+ [key: string]: any;
52
+ };
53
+ validate(): void;
54
+ constructor(map?: {
55
+ [key: string]: any;
56
+ });
57
+ }
58
+ export declare class UpdateContextStoreRequestConfigExtractionPolicy extends $dara.Model {
59
+ /**
60
+ * @remarks
61
+ * The list of memory categories.
62
+ *
63
+ * @example
64
+ * ["preference","profile"]
65
+ */
66
+ categories?: string[];
67
+ /**
68
+ * @remarks
69
+ * The custom extraction instructions. This parameter is required when preset is set to custom. Length: 1 to 8000 characters.
70
+ *
71
+ * @example
72
+ * Extract only user product preferences
73
+ */
74
+ customInstructions?: string;
75
+ /**
76
+ * @remarks
77
+ * The list of exclusion rules. Content that matches these rules is not extracted.
78
+ *
79
+ * @example
80
+ * ["Password","ID number"]
81
+ */
82
+ excludeRules?: string[];
83
+ /**
84
+ * @remarks
85
+ * The extraction model configuration.
86
+ */
87
+ model?: UpdateContextStoreRequestConfigExtractionPolicyModel;
88
+ /**
89
+ * @remarks
90
+ * The preset policy. Valid values: fact, toc-profile, tob-digital-twin, and custom. Default value: fact.
91
+ *
92
+ * @example
93
+ * fact
94
+ */
95
+ preset?: string;
96
+ static names(): {
97
+ [key: string]: string;
98
+ };
99
+ static types(): {
100
+ [key: string]: any;
101
+ };
102
+ validate(): void;
103
+ constructor(map?: {
104
+ [key: string]: any;
105
+ });
106
+ }
107
+ export declare class UpdateContextStoreRequestConfigScopePolicy extends $dara.Model {
108
+ /**
109
+ * @remarks
110
+ * The list of scope fields where at least one must be non-empty. Valid element values: userId, agentId, appId, and runId.
111
+ *
112
+ * @example
113
+ * ["userId"]
114
+ */
115
+ requiredAnyOf?: string[];
116
+ static names(): {
117
+ [key: string]: string;
118
+ };
119
+ static types(): {
120
+ [key: string]: any;
121
+ };
122
+ validate(): void;
123
+ constructor(map?: {
124
+ [key: string]: any;
125
+ });
126
+ }
127
+ export declare class UpdateContextStoreRequestConfigSourceDatasetCustomFields extends $dara.Model {
128
+ /**
129
+ * @remarks
130
+ * The description of the field. This parameter is required when usage is set to extraction-input.
131
+ *
132
+ * @example
133
+ * Customer tier
134
+ */
135
+ description?: string;
136
+ /**
137
+ * @remarks
138
+ * Specifies whether the field is a sensitive field.
139
+ *
140
+ * @example
141
+ * false
142
+ */
143
+ sensitive?: boolean;
144
+ /**
145
+ * @remarks
146
+ * The name of the source field.
147
+ *
148
+ * @example
149
+ * customerTier
150
+ */
151
+ sourceField?: string;
152
+ /**
153
+ * @remarks
154
+ * The target write path, such as metadata.customerTier.
155
+ *
156
+ * @example
157
+ * metadata.customerTier
158
+ */
159
+ target?: string;
160
+ /**
161
+ * @remarks
162
+ * The usage of the field. Valid values: extraction-input (participates in extraction) and ignore (ignored).
163
+ *
164
+ * @example
165
+ * extraction-input
166
+ */
167
+ usage?: string;
168
+ static names(): {
169
+ [key: string]: string;
170
+ };
171
+ static types(): {
172
+ [key: string]: any;
173
+ };
174
+ validate(): void;
175
+ constructor(map?: {
176
+ [key: string]: any;
177
+ });
178
+ }
179
+ export declare class UpdateContextStoreRequestConfigSourceDatasetFilter extends $dara.Model {
180
+ /**
181
+ * @remarks
182
+ * The subset of the Pipeline where clause, which is pushed down to SQL.
183
+ *
184
+ * @example
185
+ * appId = \\"crm-service\\"
186
+ */
187
+ where?: string;
188
+ static names(): {
189
+ [key: string]: string;
190
+ };
191
+ static types(): {
192
+ [key: string]: any;
193
+ };
194
+ validate(): void;
195
+ constructor(map?: {
196
+ [key: string]: any;
197
+ });
198
+ }
199
+ export declare class UpdateContextStoreRequestConfigSourceDataset extends $dara.Model {
200
+ /**
201
+ * @remarks
202
+ * The list of custom field declarations. If provided, it fully overwrites the existing declarations.
203
+ */
204
+ customFields?: UpdateContextStoreRequestConfigSourceDatasetCustomFields[];
205
+ /**
206
+ * @remarks
207
+ * The row filter conditions.
208
+ */
209
+ filter?: UpdateContextStoreRequestConfigSourceDatasetFilter;
210
+ /**
211
+ * @remarks
212
+ * The polling interval in seconds. Valid values: 60 to 3600.
213
+ *
214
+ * @example
215
+ * 300
216
+ */
217
+ pollIntervalSeconds?: number;
218
+ static names(): {
219
+ [key: string]: string;
220
+ };
221
+ static types(): {
222
+ [key: string]: any;
223
+ };
224
+ validate(): void;
225
+ constructor(map?: {
226
+ [key: string]: any;
227
+ });
228
+ }
229
+ export declare class UpdateContextStoreRequestConfigSourceTrajectoryFilter extends $dara.Model {
230
+ /**
231
+ * @remarks
232
+ * The list of agent names. An explicitly empty list returns a 400 error.
233
+ *
234
+ * @example
235
+ * ["sales-copilot"]
236
+ */
237
+ agentNames?: string[];
238
+ /**
239
+ * @remarks
240
+ * Specifies whether to exclude degraded trajectories. Default value: false (degraded trajectories are included).
241
+ *
242
+ * @example
243
+ * false
244
+ */
245
+ excludeDegraded?: boolean;
246
+ /**
247
+ * @remarks
248
+ * The minimum number of steps, which must be greater than or equal to 0.
249
+ *
250
+ * @example
251
+ * 2
252
+ */
253
+ minStepCount?: number;
254
+ /**
255
+ * @remarks
256
+ * The native SLS query statement. This statement is combined with the preceding conditions by using the AND operator.
257
+ *
258
+ * @example
259
+ * tool_names:"search_order"
260
+ */
261
+ query?: string;
262
+ /**
263
+ * @remarks
264
+ * The list of service names. A single trailing asterisk (*) is supported. Specifying an explicitly empty list returns a 400 error.
265
+ *
266
+ * @example
267
+ * ["crm-service","app-*"]
268
+ */
269
+ serviceNames?: string[];
270
+ static names(): {
271
+ [key: string]: string;
272
+ };
273
+ static types(): {
274
+ [key: string]: any;
275
+ };
276
+ validate(): void;
277
+ constructor(map?: {
278
+ [key: string]: any;
279
+ });
280
+ }
281
+ export declare class UpdateContextStoreRequestConfigSourceTrajectoryScopeMapping extends $dara.Model {
282
+ /**
283
+ * @remarks
284
+ * The JSONPath expression for the agentId field. Default value: $.agent_name.
285
+ *
286
+ * @example
287
+ * $.agent_name
288
+ */
289
+ agentId?: string;
290
+ /**
291
+ * @remarks
292
+ * The JSONPath expression for the appId field. Default value: $.service_names[0].
293
+ *
294
+ * @example
295
+ * $.service_names[0]
296
+ */
297
+ appId?: string;
298
+ /**
299
+ * @remarks
300
+ * The JSONPath expression for the runId field. Default value: $.trajectory_id.
301
+ *
302
+ * @example
303
+ * $.trajectory_id
304
+ */
305
+ runId?: string;
306
+ /**
307
+ * @remarks
308
+ * The JSONPath expression for the userId field. By default, this field is not mapped.
309
+ *
310
+ * @example
311
+ * $.trajectory_extensions.user_id
312
+ */
313
+ userId?: string;
314
+ static names(): {
315
+ [key: string]: string;
316
+ };
317
+ static types(): {
318
+ [key: string]: any;
319
+ };
320
+ validate(): void;
321
+ constructor(map?: {
322
+ [key: string]: any;
323
+ });
324
+ }
325
+ export declare class UpdateContextStoreRequestConfigSourceTrajectory extends $dara.Model {
326
+ /**
327
+ * @remarks
328
+ * The trajectory filter conditions. Conditions are combined with AND, while items within a list are combined with OR.
329
+ */
330
+ filter?: UpdateContextStoreRequestConfigSourceTrajectoryFilter;
331
+ /**
332
+ * @remarks
333
+ * The name of the trajectory Logstore. Default value: agent-trajectory. This parameter cannot be modified after creation.
334
+ *
335
+ * @example
336
+ * agent-trajectory
337
+ */
338
+ logstore?: string;
339
+ /**
340
+ * @remarks
341
+ * The polling interval in seconds. Valid values: 60 to 3600.
342
+ *
343
+ * @example
344
+ * 300
345
+ */
346
+ pollIntervalSeconds?: number;
347
+ /**
348
+ * @remarks
349
+ * The scope field mapping. The value must be a JSONPath expression. Only the $.a.b and $.a[0] formats are supported.
350
+ */
351
+ scopeMapping?: UpdateContextStoreRequestConfigSourceTrajectoryScopeMapping;
352
+ static names(): {
353
+ [key: string]: string;
354
+ };
355
+ static types(): {
356
+ [key: string]: any;
357
+ };
358
+ validate(): void;
359
+ constructor(map?: {
360
+ [key: string]: any;
361
+ });
362
+ }
2
363
  export declare class UpdateContextStoreRequestConfigSource extends $dara.Model {
3
364
  /**
4
365
  * @remarks
5
- * The AgentSpace where the trace data source resides. Cross-AgentSpace access is not supported. If specified, the value must be the same as the path AgentSpace. Otherwise, a 400 parameter error is returned. The AgentSpace cannot be changed after creation.
366
+ * The AgentSpace where the trace data source is located. Cross-AgentSpace is not supported in the current phase. If provided, it must be equal to the path AgentSpace. Otherwise, a 400 parameter error is returned. The AgentSpace cannot be changed after creation.
6
367
  *
7
368
  * @example
8
369
  * my-agent-space
9
370
  */
10
371
  agentSpace?: string;
372
+ /**
373
+ * @remarks
374
+ * The updatable items for the Dataset data source. The datasetName cannot be changed after creation.
375
+ */
376
+ dataset?: UpdateContextStoreRequestConfigSourceDataset;
11
377
  /**
12
378
  * @remarks
13
379
  * The start time for data backfill, in ISO 8601 UTC format.
@@ -16,6 +382,79 @@ export declare class UpdateContextStoreRequestConfigSource extends $dara.Model {
16
382
  * 2026-01-01T00:00:00Z
17
383
  */
18
384
  startTime?: string;
385
+ /**
386
+ * @remarks
387
+ * The updatable items for the trajectory data source. The source.type cannot be changed after creation.
388
+ */
389
+ trajectory?: UpdateContextStoreRequestConfigSourceTrajectory;
390
+ static names(): {
391
+ [key: string]: string;
392
+ };
393
+ static types(): {
394
+ [key: string]: any;
395
+ };
396
+ validate(): void;
397
+ constructor(map?: {
398
+ [key: string]: any;
399
+ });
400
+ }
401
+ export declare class UpdateContextStoreRequestConfigStoragePolicy extends $dara.Model {
402
+ /**
403
+ * @remarks
404
+ * The allowed storage actions. By default, all actions are allowed: ADD, UPDATE, MERGE, and DELETE.
405
+ *
406
+ * @example
407
+ * ["ADD","UPDATE","MERGE","DELETE"]
408
+ */
409
+ allowedActions?: string[];
410
+ /**
411
+ * @remarks
412
+ * Specifies whether to deduplicate events in event mode. Default value: true.
413
+ *
414
+ * @example
415
+ * true
416
+ */
417
+ dedupe?: boolean;
418
+ /**
419
+ * @remarks
420
+ * Specifies whether to enable human edit protection. Default value: true. When this feature is enabled, automatic extraction does not overwrite manually modified memories.
421
+ *
422
+ * @example
423
+ * true
424
+ */
425
+ humanEditProtection?: boolean;
426
+ /**
427
+ * @remarks
428
+ * The merge key for upsert operations. Valid values: factKey, semantic, and both. Default value: semantic.
429
+ *
430
+ * @example
431
+ * semantic
432
+ */
433
+ mergeKey?: string;
434
+ /**
435
+ * @remarks
436
+ * The storage mode. Valid values: event (append events) and upsert (merge and update). Default value: upsert.
437
+ *
438
+ * @example
439
+ * upsert
440
+ */
441
+ mode?: string;
442
+ /**
443
+ * @remarks
444
+ * The similarity threshold for semantic merging. Valid values: 0 to 1. Default value: 0.4.
445
+ *
446
+ * @example
447
+ * 0.4
448
+ */
449
+ similarityThreshold?: number;
450
+ /**
451
+ * @remarks
452
+ * The number of days before the memory expires. A value of 0 indicates that the memory never expires.
453
+ *
454
+ * @example
455
+ * 0
456
+ */
457
+ ttlDays?: number;
19
458
  static names(): {
20
459
  [key: string]: string;
21
460
  };
@@ -30,7 +469,17 @@ export declare class UpdateContextStoreRequestConfigSource extends $dara.Model {
30
469
  export declare class UpdateContextStoreRequestConfig extends $dara.Model {
31
470
  /**
32
471
  * @remarks
33
- * The metadata field mapping. The key is the business field and the value is the storage field.
472
+ * The audit configuration.
473
+ */
474
+ audit?: UpdateContextStoreRequestConfigAudit;
475
+ /**
476
+ * @remarks
477
+ * The extraction policy for the memory type.
478
+ */
479
+ extractionPolicy?: UpdateContextStoreRequestConfigExtractionPolicy;
480
+ /**
481
+ * @remarks
482
+ * The metadata field mapping. The key is the business field, and the value is the storage field.
34
483
  *
35
484
  * @example
36
485
  * {"userId":"user_id","sessionId":"session_id"}
@@ -40,9 +489,19 @@ export declare class UpdateContextStoreRequestConfig extends $dara.Model {
40
489
  };
41
490
  /**
42
491
  * @remarks
43
- * The datasource config, which serves only as the root identifier of the data source.
492
+ * The scope constraint policy.
493
+ */
494
+ scopePolicy?: UpdateContextStoreRequestConfigScopePolicy;
495
+ /**
496
+ * @remarks
497
+ * The datasource config, which serves only as the root identity for the data source.
44
498
  */
45
499
  source?: UpdateContextStoreRequestConfigSource;
500
+ /**
501
+ * @remarks
502
+ * The storage policy for the memory type.
503
+ */
504
+ storagePolicy?: UpdateContextStoreRequestConfigStoragePolicy;
46
505
  static names(): {
47
506
  [key: string]: string;
48
507
  };
@@ -57,12 +516,20 @@ export declare class UpdateContextStoreRequestConfig extends $dara.Model {
57
516
  export declare class UpdateContextStoreRequest extends $dara.Model {
58
517
  /**
59
518
  * @remarks
60
- * The context store configuration. If specified, the entire configuration is overwritten. If not specified, the existing configuration is retained.
519
+ * The description of the policy change. A new policy version is created when policy fields in the configuration are modified.
520
+ *
521
+ * @example
522
+ * Relax similarity threshold
523
+ */
524
+ changeNote?: string;
525
+ /**
526
+ * @remarks
527
+ * The context library configuration. If provided, it fully overwrites the existing configuration. If omitted, the original configuration is retained.
61
528
  */
62
529
  config?: UpdateContextStoreRequestConfig;
63
530
  /**
64
531
  * @remarks
65
- * The type of the context store. This value typically cannot be changed after creation. This field is provided only for exception correction.
532
+ * The context library type. This field is typically immutable after creation and is provided only for exception correction.
66
533
  *
67
534
  * @example
68
535
  * experience
@@ -70,20 +537,23 @@ export declare class UpdateContextStoreRequest extends $dara.Model {
70
537
  contextType?: string;
71
538
  /**
72
539
  * @remarks
73
- * The description of the context store, which helps business users understand its purpose.
540
+ * The description of the context library, which helps business users understand its purpose.
74
541
  *
75
542
  * @example
76
- * 我的上下文库
543
+ * My context library
77
544
  */
78
545
  description?: string;
79
546
  /**
547
+ * @remarks
548
+ * The running status. For the memory type, valid values are Active (running) and Paused (data source consumption and extraction paused). For the experience type, it indicates the mining status of the experience library. The specific valid values and combination constraints are defined by the server.
549
+ *
80
550
  * @example
81
- * Paused
551
+ * Active
82
552
  */
83
553
  status?: string;
84
554
  /**
85
555
  * @remarks
86
- * The idempotency token. A unique string generated by the client to ensure that the update operation is idempotent.
556
+ * The idempotency token. It is a unique string generated by the client to ensure the idempotence of the update operation.
87
557
  *
88
558
  * @example
89
559
  * a1b2c3d4-1234-5678-90ab-cdef12345678