@agents24/node 0.5.37 → 0.5.39

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 (35) hide show
  1. package/compatibility.json +7 -7
  2. package/dist/bff.cjs +5 -0
  3. package/dist/bff.cjs.map +1 -1
  4. package/dist/bff.d.cts +10 -1
  5. package/dist/bff.d.ts +10 -1
  6. package/dist/bff.js +5 -0
  7. package/dist/bff.js.map +1 -1
  8. package/dist/{client-YSS2tctB.d.cts → client-nGaq0BDQ.d.cts} +131 -2
  9. package/dist/{client-YSS2tctB.d.ts → client-nGaq0BDQ.d.ts} +131 -2
  10. package/dist/index.cjs +68 -1
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +3 -3
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +68 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/types/bff-agent-resolution.d.ts +9 -0
  17. package/dist/types/bff-agent-resolution.d.ts.map +1 -1
  18. package/dist/types/bff-conversation-submission.d.ts.map +1 -1
  19. package/dist/types/builders.d.ts.map +1 -1
  20. package/dist/types/embed-types.d.ts +2 -0
  21. package/dist/types/embed-types.d.ts.map +1 -1
  22. package/dist/types/embed.d.ts.map +1 -1
  23. package/dist/types/generated/ingestion-types.d.ts +101 -0
  24. package/dist/types/generated/ingestion-types.d.ts.map +1 -1
  25. package/dist/types/generated/knowledgeStores.d.ts +8 -1
  26. package/dist/types/generated/knowledgeStores.d.ts.map +1 -1
  27. package/dist/types/generated/manifest.d.ts +1 -1
  28. package/dist/types/generated/manifest.d.ts.map +1 -1
  29. package/dist/types/generated/model-capabilities.d.ts +8 -1
  30. package/dist/types/generated/model-capabilities.d.ts.map +1 -1
  31. package/dist/types/generated/personal-skills.d.ts +7 -0
  32. package/dist/types/generated/personal-skills.d.ts.map +1 -1
  33. package/dist/types/types.d.ts +5 -0
  34. package/dist/types/types.d.ts.map +1 -1
  35. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -386,6 +386,8 @@ function toolsetAttachments(options) {
386
386
  return [normalized];
387
387
  });
388
388
  }
389
+ var REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high"];
390
+ var MINIMUM_COMPACTION_WINDOW_TOKENS = 8192;
389
391
  var AgentDefinitionBuilder = class {
390
392
  constructor(agents, options) {
391
393
  this.agents = agents;
@@ -407,6 +409,19 @@ var AgentDefinitionBuilder = class {
407
409
  }
408
410
  agentConfig.tool_schema_budget_bytes = budget;
409
411
  }
412
+ if (this.options.reasoningEffort !== void 0) {
413
+ if (!REASONING_EFFORTS.includes(this.options.reasoningEffort)) {
414
+ throw new TypeError(`reasoningEffort must be one of ${REASONING_EFFORTS.join(", ")}`);
415
+ }
416
+ agentConfig.reasoning_effort = this.options.reasoningEffort;
417
+ }
418
+ if (this.options.contextCompactionWindowTokens !== void 0) {
419
+ const window = this.options.contextCompactionWindowTokens;
420
+ if (window !== null && (!Number.isSafeInteger(window) || window < MINIMUM_COMPACTION_WINDOW_TOKENS)) {
421
+ throw new TypeError(`contextCompactionWindowTokens must be an integer of at least ${MINIMUM_COMPACTION_WINDOW_TOKENS} or null`);
422
+ }
423
+ agentConfig.context_compaction_window_tokens = window;
424
+ }
410
425
  if (this.options.model) agentConfig.model_id = refId(this.options.model);
411
426
  return {
412
427
  spec_version: "4.0",
@@ -873,13 +888,14 @@ var EmbedNamespace2 = class extends EmbedNamespace {
873
888
  }
874
889
  namespacePayload(payload) {
875
890
  if (!payload || typeof payload !== "object") return payload;
876
- const { knowledgeNamespaces, chatScope, customerTenant, requestedOutputs, dictationSessionId, ...wire } = payload;
891
+ const { knowledgeNamespaces, knowledgeAccessScopes, chatScope, customerTenant, requestedOutputs, dictationSessionId, ...wire } = payload;
877
892
  return {
878
893
  ...wire,
879
894
  ...dictationSessionId === void 0 ? {} : { dictation_session_id: dictationSessionId },
880
895
  ...requestedOutputs === void 0 ? {} : { requested_outputs: requestedOutputs },
881
896
  ...customerTenant === void 0 ? {} : { customer_tenant: customerTenant },
882
897
  ...knowledgeNamespaces === void 0 ? {} : { knowledge_namespaces: knowledgeNamespaces },
898
+ ...knowledgeAccessScopes === void 0 ? {} : { knowledge_access_scopes: knowledgeAccessScopes },
883
899
  ...chatScope === void 0 ? {} : { chat_scope: chatScope }
884
900
  };
885
901
  }
@@ -1015,6 +1031,7 @@ var EmbedNamespace2 = class extends EmbedNamespace {
1015
1031
  attachment_ids: payload.attachmentIds ?? [],
1016
1032
  requested_model_id: payload.requestedModelId,
1017
1033
  knowledge_namespaces: payload.knowledgeNamespaces,
1034
+ knowledge_access_scopes: payload.knowledgeAccessScopes,
1018
1035
  customer_tenant: payload.customerTenant,
1019
1036
  ...payload.trustedContext === void 0 ? {} : { trusted_context: payload.trustedContext },
1020
1037
  execution_limits: payload.executionLimits,
@@ -2158,6 +2175,49 @@ var KnowledgeStoresNamespace = class {
2158
2175
  body: request
2159
2176
  });
2160
2177
  }
2178
+ listAccessScopes(storeId, options) {
2179
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/access-scopes`, {
2180
+ query: {
2181
+ namespace: options.namespace
2182
+ }
2183
+ });
2184
+ }
2185
+ createAccessScope(storeId, request) {
2186
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/access-scopes`, {
2187
+ method: "POST",
2188
+ body: request
2189
+ });
2190
+ }
2191
+ adoptAccessScope(storeId, scopeId) {
2192
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/access-scopes/${encodeURIComponent(scopeId)}/adopt`, {
2193
+ method: "POST"
2194
+ });
2195
+ }
2196
+ updateAccessScope(storeId, scopeId, request) {
2197
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/access-scopes/${encodeURIComponent(scopeId)}`, {
2198
+ method: "PATCH",
2199
+ body: request
2200
+ });
2201
+ }
2202
+ deleteAccessScope(storeId, scopeId) {
2203
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/access-scopes/${encodeURIComponent(scopeId)}`, {
2204
+ method: "DELETE"
2205
+ });
2206
+ }
2207
+ contentScopes(storeId, options) {
2208
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/content-scopes`, {
2209
+ query: {
2210
+ namespace: options.namespace,
2211
+ content_id: options.contentId
2212
+ }
2213
+ });
2214
+ }
2215
+ assignContentScopes(storeId, request) {
2216
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/content-scopes`, {
2217
+ method: "PUT",
2218
+ body: request
2219
+ });
2220
+ }
2161
2221
  listRecordPages(storeId, request) {
2162
2222
  return recordPages(this, storeId, request);
2163
2223
  }
@@ -2375,9 +2435,14 @@ var SDK_OPERATION_IDS = [
2375
2435
  "ingestionJobs.start",
2376
2436
  "ingestionJobs.upload_input",
2377
2437
  "instructions.publish",
2438
+ "knowledgeStores.adoptAccessScope",
2378
2439
  "knowledgeStores.archive",
2440
+ "knowledgeStores.assignContentScopes",
2379
2441
  "knowledgeStores.cancel_cleanup_job",
2442
+ "knowledgeStores.contentScopes",
2380
2443
  "knowledgeStores.create",
2444
+ "knowledgeStores.createAccessScope",
2445
+ "knowledgeStores.deleteAccessScope",
2381
2446
  "knowledgeStores.delete_indexed_content",
2382
2447
  "knowledgeStores.delete_records",
2383
2448
  "knowledgeStores.fetch_records",
@@ -2385,6 +2450,7 @@ var SDK_OPERATION_IDS = [
2385
2450
  "knowledgeStores.get_cleanup_job",
2386
2451
  "knowledgeStores.get_indexed_content",
2387
2452
  "knowledgeStores.list",
2453
+ "knowledgeStores.listAccessScopes",
2388
2454
  "knowledgeStores.list_indexed_content",
2389
2455
  "knowledgeStores.list_indexed_record_ids",
2390
2456
  "knowledgeStores.list_namespaces",
@@ -2394,6 +2460,7 @@ var SDK_OPERATION_IDS = [
2394
2460
  "knowledgeStores.resume_cleanup_job",
2395
2461
  "knowledgeStores.stats",
2396
2462
  "knowledgeStores.update",
2463
+ "knowledgeStores.updateAccessScope",
2397
2464
  "knowledgeStores.update_record",
2398
2465
  "knowledgeStores.upsert_records",
2399
2466
  "pipelines.get",