mavenagi 1.2.63 → 1.2.64

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 (83) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +13 -1
  3. package/api/resources/agents/types/Agent.d.ts +6 -0
  4. package/api/resources/agents/types/AgentPrompting.d.ts +2 -0
  5. package/api/resources/capabilities/client/Client.d.ts +35 -0
  6. package/api/resources/capabilities/client/Client.js +117 -0
  7. package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +4 -1
  8. package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +36 -0
  9. package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +3 -0
  10. package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +4 -1
  11. package/api/resources/capabilities/client/requests/index.d.ts +1 -0
  12. package/api/resources/capabilities/types/CapabilityExecution.d.ts +14 -0
  13. package/api/resources/capabilities/types/CapabilityExecution.js +3 -0
  14. package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +32 -0
  15. package/api/resources/capabilities/types/CapabilityExecutionBase.js +3 -0
  16. package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +36 -0
  17. package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.js +39 -0
  18. package/api/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +17 -0
  19. package/api/resources/capabilities/types/CapabilityExecutionRetryability.js +20 -0
  20. package/api/resources/capabilities/types/CapabilityExecutionStatus.d.ts +10 -0
  21. package/api/resources/capabilities/types/CapabilityExecutionStatus.js +13 -0
  22. package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +62 -0
  23. package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +3 -0
  24. package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +7 -0
  25. package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +3 -0
  26. package/api/resources/capabilities/types/TriggerCapabilityExecution.d.ts +19 -0
  27. package/api/resources/capabilities/types/TriggerCapabilityExecution.js +3 -0
  28. package/api/resources/capabilities/types/index.d.ts +8 -0
  29. package/api/resources/capabilities/types/index.js +8 -0
  30. package/api/resources/charters/client/Client.js +3 -1
  31. package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +6 -6
  32. package/api/resources/charters/client/requests/CharterGetAncestorsRequest.d.ts +12 -0
  33. package/api/resources/charters/client/requests/CharterGetRequest.d.ts +9 -1
  34. package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +5 -6
  35. package/api/resources/charters/types/CharterBase.d.ts +4 -3
  36. package/api/resources/charters/types/CharterListChildrenRequest.d.ts +10 -0
  37. package/api/resources/charters/types/CharterSearchFilter.d.ts +9 -1
  38. package/api/resources/commons/types/BotLogicCharterDetail.d.ts +1 -1
  39. package/api/resources/commons/types/BotLogicSegmentsItem.d.ts +3 -0
  40. package/api/resources/commons/types/ConversationAnalysis.d.ts +1 -1
  41. package/api/resources/commons/types/ErrorReason.d.ts +3 -0
  42. package/api/resources/commons/types/ErrorReason.js +3 -0
  43. package/api/resources/conversation/client/Client.d.ts +6 -2
  44. package/api/resources/conversation/client/Client.js +6 -2
  45. package/api/resources/customers/types/CustomerFilter.d.ts +14 -1
  46. package/api/resources/intelligentFields/client/Client.d.ts +1 -1
  47. package/api/resources/intelligentFields/client/Client.js +1 -1
  48. package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +9 -1
  49. package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +5 -4
  50. package/package.json +1 -1
  51. package/reference.md +85 -2
  52. package/serialization/resources/agents/client/requests/AgentPatchRequest.d.ts +2 -0
  53. package/serialization/resources/agents/client/requests/AgentPatchRequest.js +2 -0
  54. package/serialization/resources/agents/types/Agent.d.ts +2 -0
  55. package/serialization/resources/agents/types/Agent.js +2 -0
  56. package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +16 -0
  57. package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +50 -0
  58. package/serialization/resources/capabilities/client/requests/index.d.ts +1 -0
  59. package/serialization/resources/capabilities/client/requests/index.js +3 -1
  60. package/serialization/resources/capabilities/types/CapabilityExecution.d.ts +15 -0
  61. package/serialization/resources/capabilities/types/CapabilityExecution.js +49 -0
  62. package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +20 -0
  63. package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +52 -0
  64. package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +7 -0
  65. package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.js +50 -0
  66. package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +7 -0
  67. package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.js +39 -0
  68. package/serialization/resources/capabilities/types/CapabilityExecutionStatus.d.ts +7 -0
  69. package/serialization/resources/capabilities/types/CapabilityExecutionStatus.js +39 -0
  70. package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +11 -0
  71. package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +45 -0
  72. package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +9 -0
  73. package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +40 -0
  74. package/serialization/resources/capabilities/types/TriggerCapabilityExecution.d.ts +15 -0
  75. package/serialization/resources/capabilities/types/TriggerCapabilityExecution.js +49 -0
  76. package/serialization/resources/capabilities/types/index.d.ts +8 -0
  77. package/serialization/resources/capabilities/types/index.js +8 -0
  78. package/serialization/resources/charters/types/CharterListChildrenRequest.d.ts +2 -0
  79. package/serialization/resources/charters/types/CharterListChildrenRequest.js +2 -0
  80. package/serialization/resources/commons/types/ErrorReason.d.ts +1 -1
  81. package/serialization/resources/commons/types/ErrorReason.js +1 -0
  82. package/version.d.ts +1 -1
  83. package/version.js +1 -1
@@ -687,9 +687,11 @@ class ChartersClient {
687
687
  __getAncestors(charterReferenceId_1) {
688
688
  return __awaiter(this, arguments, void 0, function* (charterReferenceId, request = {}, requestOptions) {
689
689
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
690
- const { appId } = request;
690
+ const { appId, variantReferenceId, variantAppId } = request;
691
691
  const _queryParams = {
692
692
  appId,
693
+ variantReferenceId,
694
+ variantAppId,
693
695
  };
694
696
  const _authRequest = yield this._options.authProvider.getAuthRequest();
695
697
  const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
@@ -6,13 +6,13 @@ export interface CharterDeleteRequest {
6
6
  /** The App ID of the charter to delete. If not provided, the ID of the calling app will be used. */
7
7
  appId?: string;
8
8
  /**
9
- * The reference ID of the agent variant this delete is scoped to. When set, the
10
- * deletion is staged in that variant's working set instead of being applied to the
11
- * agent's live configuration.
9
+ * The reference ID of the agent variant this delete is scoped to. While charters are
10
+ * versioned for the agent, the deletion is staged in that variant's working set
11
+ * instead of being applied to the agent's live configuration, and a delete that names
12
+ * no variant is rejected with `VARIANT_REQUIRED`.
12
13
  *
13
- * Omit this parameter to delete directly from the agent. Variant scoping is not
14
- * active yet: a variant supplied today is validated but not applied, and the delete applies
15
- * to the agent.
14
+ * While they aren't, omit this parameter to delete directly from the agent; naming a
15
+ * variant then is rejected.
16
16
  */
17
17
  variantReferenceId?: string;
18
18
  /** The App ID of the agent variant named by `variantReferenceId`. If not provided, the ID of the calling app will be used. */
@@ -5,4 +5,16 @@
5
5
  export interface CharterGetAncestorsRequest {
6
6
  /** The App ID of the charter. If not provided, the ID of the calling app will be used. */
7
7
  appId?: string;
8
+ /**
9
+ * The agent variant reference ID to read the ancestors through. Its staged edits are
10
+ * included: a charter with a staged edit is read at that edit, a charter created in the
11
+ * variant is included, and a charter deleted in the variant, whether the delete is
12
+ * staged or already in its snapshot, is a 404, as is one the variant doesn't carry. If
13
+ * not provided, the request is rejected with `VARIANT_REQUIRED` while charters are
14
+ * versioned for the agent, and otherwise reads through the agent's single variant, as
15
+ * its snapshot has it, or the published charters while variant reads are off.
16
+ */
17
+ variantReferenceId?: string;
18
+ /** The App ID of the agent variant reference. If not provided, the ID of the calling app will be used. */
19
+ variantAppId?: string;
8
20
  }
@@ -5,7 +5,15 @@
5
5
  export interface CharterGetRequest {
6
6
  /** The App ID of the charter to get. If not provided, the ID of the calling app will be used. */
7
7
  appId?: string;
8
- /** The agent variant reference ID to resolve the charter's version through. If not provided, defaults to the agent's production variant. Currently, validated but not applied. */
8
+ /**
9
+ * The agent variant reference ID to read the charter through. Its staged edits are
10
+ * included: a charter with a staged edit is read at that edit, a charter created in the
11
+ * variant is included, and a charter deleted in the variant, whether the delete is
12
+ * staged or already in its snapshot, is a 404, as is one the variant doesn't carry. If
13
+ * not provided, the request is rejected with `VARIANT_REQUIRED` while charters are
14
+ * versioned for the agent, and otherwise reads through the agent's single variant, as
15
+ * its snapshot has it, or the published charters while variant reads are off.
16
+ */
9
17
  variantReferenceId?: string;
10
18
  /** The App ID of the agent variant reference. If not provided, the ID of the calling app will be used. */
11
19
  variantAppId?: string;
@@ -56,12 +56,11 @@ export interface CharterPatchRequest {
56
56
  */
57
57
  references?: MavenAGI.CharterPatchReferences;
58
58
  /**
59
- * The agent variant this patch is scoped to. When set, the patch is staged in that
60
- * variant's working set instead of being applied to the agent's live configuration.
61
- *
62
- * Omit this field to patch the agent directly. Variant scoping is not active yet:
63
- * a variant supplied today is validated but not applied, and the patch applies to the
64
- * agent.
59
+ * The agent variant this patch is scoped to. While charters are versioned for the
60
+ * agent, the patch is applied to the charter as this variant sees it and staged in
61
+ * its working set rather than applied to the agent's live configuration, and a patch
62
+ * that names no variant is rejected with `VARIANT_REQUIRED`. While they aren't, a
63
+ * patch that names a variant is rejected. An unknown variant is a 404.
65
64
  */
66
65
  variantId?: MavenAGI.EntityIdWithoutAgent;
67
66
  }
@@ -5,9 +5,10 @@ export interface CharterBase {
5
5
  /**
6
6
  * ID of the agent variant this charter belongs to, if applicable.
7
7
  *
8
- * On a write this is validated -- an unknown variant is rejected, as is any
9
- * variant while variant scoping is off for charters -- but not yet applied: the
10
- * write reaches the agent's live configuration either way.
8
+ * While charters are versioned for the agent, a write is staged in this variant's
9
+ * working set rather than applied to the agent's live configuration, and a write that
10
+ * names no variant is rejected with `VARIANT_REQUIRED`. While they aren't, a write that
11
+ * names a variant is rejected. An unknown variant is a 404.
11
12
  */
12
13
  variantId?: MavenAGI.EntityIdWithoutAgent;
13
14
  /** A plain text description of this charter. If not set, existing description is preserved if present. */
@@ -15,4 +15,14 @@ export interface CharterListChildrenRequest extends MavenAGI.BaseCappedPaginated
15
15
  * Maximum 50 parent IDs per request.
16
16
  */
17
17
  parentIds: MavenAGI.EntityId[];
18
+ /**
19
+ * List the charters as this agent variant sees them, parents and children alike. Its staged
20
+ * edits are included: a charter with a staged edit is read at that edit, a charter created
21
+ * in the variant is included, and a charter deleted in the variant, whether the delete is
22
+ * staged or already in its snapshot, is left out; naming one as a parent is rejected with a
23
+ * 400. A parent the variant doesn't carry has no children. If not provided, the request is rejected with `VARIANT_REQUIRED` while charters
24
+ * are versioned for the agent, and otherwise reads through the agent's single variant, as
25
+ * its snapshot has it, or the published charters while variant reads are off.
26
+ */
27
+ variantId?: MavenAGI.EntityIdWithoutAgent;
18
28
  }
@@ -15,6 +15,14 @@ export interface CharterSearchFilter {
15
15
  * directly the way it does an action or a knowledge base.
16
16
  */
17
17
  intelligentFieldIds?: MavenAGI.EntityId[];
18
- /** Filter to values generated by a specific agent variant. If not provided, returns values from all variants. */
18
+ /**
19
+ * Search the charters as this agent variant sees them. Its staged edits are included: a
20
+ * charter with a staged edit is read at that edit, a charter created in the variant is
21
+ * included, and a charter deleted in the variant, whether the delete is staged or already in
22
+ * its snapshot, is left out. If not provided, the request is rejected with
23
+ * `VARIANT_REQUIRED` while charters are versioned for the agent, and otherwise reads through
24
+ * the agent's single variant, as its snapshot has it, or the published charters while
25
+ * variant reads are off.
26
+ */
19
27
  variantId?: MavenAGI.EntityIdWithoutAgent;
20
28
  }
@@ -7,7 +7,7 @@ export interface BotLogicCharterDetail {
7
7
  charterId: MavenAGI.EntityIdWithoutAgent;
8
8
  /** Human-readable charter name at the time of evaluation. */
9
9
  name: string;
10
- /** The segment that gates this charter, if any. Absent for wildcard charters. */
10
+ /** Deprecated, read the charter's `precondition` from the charters API instead. */
11
11
  segmentId?: MavenAGI.EntityIdWithoutAgent;
12
12
  /** The parent charter in the hierarchy, if any. Absent for root-level charters. */
13
13
  parentId?: MavenAGI.EntityIdWithoutAgent;
@@ -1,4 +1,7 @@
1
1
  import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Segments that matched this bot response. Omitted when the agent is in charter mode.
4
+ */
2
5
  export interface BotLogicSegmentsItem {
3
6
  matchingSegmentIds: MavenAGI.EntityId[];
4
7
  }
@@ -6,7 +6,7 @@ export interface ConversationAnalysis {
6
6
  agentResponse?: string;
7
7
  /** Generated resolution status of the conversation */
8
8
  resolutionStatus?: MavenAGI.ResolutionStatus;
9
- /** Generated category of the conversation */
9
+ /** Generated category of the conversation. For agents with a `categoryIntelligentFieldId`, this is that intelligent field's value. New agents without one have no category. */
10
10
  category?: string;
11
11
  /** Generated sentiment of the conversation */
12
12
  sentiment?: MavenAGI.Sentiment;
@@ -30,5 +30,8 @@ export declare const ErrorReason: {
30
30
  /**
31
31
  * The write would change an intelligent field's `validationType` in an agent variant. A field keeps its type across variants; to use a different type, create a new field. */
32
32
  readonly IntelligentFieldTypeChanged: "INTELLIGENT_FIELD_TYPE_CHANGED";
33
+ /**
34
+ * The working set holds staged edits of an entity type that isn't versioned for the agentw now (see `agents.getVersionedEntityTypes`), left from before its versioning was turned off - note that this can only happen in case of a reverted rollout. Committing would publish them. Discard them with `discardWorkingSetEdits`'`entityType`, then retry. */
35
+ readonly WorkingSetHasUnversionedEdits: "WORKING_SET_HAS_UNVERSIONED_EDITS";
33
36
  };
34
37
  export type ErrorReason = (typeof ErrorReason)[keyof typeof ErrorReason] | string;
@@ -34,4 +34,7 @@ exports.ErrorReason = {
34
34
  /**
35
35
  * The write would change an intelligent field's `validationType` in an agent variant. A field keeps its type across variants; to use a different type, create a new field. */
36
36
  IntelligentFieldTypeChanged: "INTELLIGENT_FIELD_TYPE_CHANGED",
37
+ /**
38
+ * The working set holds staged edits of an entity type that isn't versioned for the agentw now (see `agents.getVersionedEntityTypes`), left from before its versioning was turned off - note that this can only happen in case of a reverted rollout. Committing would publish them. Discard them with `discardWorkingSetEdits`'`entityType`, then retry. */
39
+ WorkingSetHasUnversionedEdits: "WORKING_SET_HAS_UNVERSIONED_EDITS",
37
40
  };
@@ -246,9 +246,13 @@ export declare class ConversationClient {
246
246
  askStream(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<core.Stream<MavenAGI.StreamResponse>>;
247
247
  private __askStream;
248
248
  /**
249
- * @beta This endpoint is in pre-release and may change.
249
+ * @deprecated
250
+ *
251
+ * Deprecated. Set the agent's `categoryIntelligentFieldId` and read that intelligent field's value instead.
252
+ *
253
+ * Uses an LLM flow to categorize the conversation.
250
254
  *
251
- * Uses an LLM flow to categorize the conversation. Experimental.
255
+ * Returns a 400 for new agents and for any agent with a `categoryIntelligentFieldId`. Their conversation categories come only from that intelligent field: read the field's value, or react to it changing with an `EVENT_CREATED` trigger on the `INTELLIGENT_FIELD_VALUE_CHANGED` system event.
252
256
  *
253
257
  * @param {string} conversationId - The ID of the conversation to categorize
254
258
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -884,9 +884,13 @@ class ConversationClient {
884
884
  });
885
885
  }
886
886
  /**
887
- * @beta This endpoint is in pre-release and may change.
887
+ * @deprecated
888
+ *
889
+ * Deprecated. Set the agent's `categoryIntelligentFieldId` and read that intelligent field's value instead.
890
+ *
891
+ * Uses an LLM flow to categorize the conversation.
888
892
  *
889
- * Uses an LLM flow to categorize the conversation. Experimental.
893
+ * Returns a 400 for new agents and for any agent with a `categoryIntelligentFieldId`. Their conversation categories come only from that intelligent field: read the field's value, or react to it changing with an `EVENT_CREATED` trigger on the `INTELLIGENT_FIELD_VALUE_CHANGED` system event.
890
894
  *
891
895
  * @param {string} conversationId - The ID of the conversation to categorize
892
896
  * @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,6 +1,19 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface CustomerFilter {
3
- /** The search query to apply to the customers' name and description. */
3
+ /**
4
+ * The search query to apply to the customers. Matches any part of a customer's name or
5
+ * description.
6
+ *
7
+ * This field also supports a syntax for advanced filtering the `metadata` field.
8
+ *
9
+ * Metadata examples:
10
+ * - `metadata:myvalue` - matches customers with any metadata field set to `myvalue`
11
+ * - `metadata.mykey:myvalue` - matches customers with a metadata field `mykey` set to `myvalue`
12
+ * - `metadata.mykey:(myvalue OR anothervalue)` - matches customers with a metadata field `mykey` set to `myvalue` or `anothervalue`
13
+ * - `metadata.mykey:*` - matches customers with a metadata field `mykey`
14
+ * - `-metadata:myvalue` - matches customers that do not have any metadata field set to `myvalue`
15
+ * - `_exists_:metadata` - matches customers that have any metadata field set
16
+ */
4
17
  search?: string;
5
18
  /** The statuses to filter the customers by. */
6
19
  statuses?: MavenAGI.CustomerStatus[];
@@ -128,7 +128,7 @@ export declare class IntelligentFieldsClient {
128
128
  *
129
129
  * Soft delete an intelligent field. Only INACTIVE fields can be deleted.
130
130
  *
131
- * Deleted fields are excluded from search results but can still be retrieved by ID.
131
+ * Deleted fields are excluded from search results, and getting one by ID returns 404.
132
132
  * Creating a new field with the same referenceId as a deleted field will overwrite
133
133
  * the deleted field and restore it with the status a new field gets.
134
134
  *
@@ -428,7 +428,7 @@ class IntelligentFieldsClient {
428
428
  *
429
429
  * Soft delete an intelligent field. Only INACTIVE fields can be deleted.
430
430
  *
431
- * Deleted fields are excluded from search results but can still be retrieved by ID.
431
+ * Deleted fields are excluded from search results, and getting one by ID returns 404.
432
432
  * Creating a new field with the same referenceId as a deleted field will overwrite
433
433
  * the deleted field and restore it with the status a new field gets.
434
434
  *
@@ -5,7 +5,15 @@
5
5
  export interface IntelligentFieldGetRequest {
6
6
  /** The App ID of the intelligent field to get. If not provided the ID of the calling app will be used. */
7
7
  appId?: string;
8
- /** The agent variant reference ID to resolve the intelligent field's version through. Required on an agent with versioned intelligent fields; a request that omits it there is rejected with reason `VARIANT_REQUIRED`. Otherwise, if omitted, the agent's only variant is used. */
8
+ /**
9
+ * The agent variant reference ID to resolve the intelligent field's version through.
10
+ * Required on an agent with versioned intelligent fields; a request that omits it there
11
+ * is rejected with reason `VARIANT_REQUIRED`. Otherwise, if omitted, the agent's only
12
+ * variant is used, as its snapshot has it. When a variant is named, its staged edits
13
+ * are included: a field with a staged edit is returned at that edit, a field created in
14
+ * the variant is returned, and a field deleted in the variant, whether the delete is
15
+ * staged or already in its snapshot, returns 404.
16
+ */
9
17
  variantReferenceId?: string;
10
18
  /** The App ID of the agent variant reference. If not provided, the ID of the calling app will be used. */
11
19
  variantAppId?: string;
@@ -13,10 +13,11 @@ export interface IntelligentFieldValueSearchRequest extends MavenAGI.BaseCappedP
13
13
  /** Field to sort by. Defaults to CREATED_AT. */
14
14
  sort?: MavenAGI.IntelligentFieldValueSortField;
15
15
  /**
16
- * Returns values of the fields in this agent variant's scope: its published snapshot plus
17
- * its staged edits, matched by field. A value is included whichever variant's conversation
18
- * produced it, and is named as this variant names the field. If not provided, returns
19
- * values from all variants.
16
+ * Returns values of the fields in this agent variant's scope: its snapshot with its staged
17
+ * edits applied, matched by field, so a field deleted in the variant, by a staged edit or in
18
+ * its snapshot, is left out. A
19
+ * value is included whichever variant's conversation produced it, and is named as this
20
+ * variant names the field. If not provided, returns values from all variants.
20
21
  *
21
22
  * To see values from the conversations pinned to a variant, filter conversations by
22
23
  * `variantIds` in conversation search or the analytics APIs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.63",
3
+ "version": "1.2.64",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -2444,6 +2444,85 @@ await client.capabilities.searchCapabilities();
2444
2444
  </dl>
2445
2445
 
2446
2446
 
2447
+ </dd>
2448
+ </dl>
2449
+ </details>
2450
+
2451
+ <details><summary><code>client.capabilities.<a href="/src/api/resources/capabilities/client/Client.ts">searchCapabilityExecutions</a>({ ...params }) -> MavenAGI.CapabilityExecutionsSearchResponse</code></summary>
2452
+ <dl>
2453
+ <dd>
2454
+
2455
+ #### 📝 Description
2456
+
2457
+ <dl>
2458
+ <dd>
2459
+
2460
+ <dl>
2461
+ <dd>
2462
+
2463
+ Search the recorded runs of an agent's capabilities, newest first by default. An execution
2464
+ is one run of one capability for one subject, with its outcome and timing: an Event
2465
+ Trigger notifying its app, or a Conversation Kickoff running when a conversation started.
2466
+
2467
+ Pass a conversation in `subjectIds` to get the executions recorded against it. An
2468
+ `EVENT_CREATED` trigger records the event as its subject, so pass the event's ID to find
2469
+ those.
2470
+
2471
+ Results can trail a run by a few seconds. Executions are searchable for 90 days.
2472
+ </dd>
2473
+ </dl>
2474
+ </dd>
2475
+ </dl>
2476
+
2477
+ #### 🔌 Usage
2478
+
2479
+ <dl>
2480
+ <dd>
2481
+
2482
+ <dl>
2483
+ <dd>
2484
+
2485
+ ```typescript
2486
+ await client.capabilities.searchCapabilityExecutions({
2487
+ subjectIds: [{
2488
+ referenceId: "conversation-123",
2489
+ appId: "zendesk",
2490
+ organizationId: "acme",
2491
+ agentId: "support",
2492
+ type: "CONVERSATION"
2493
+ }]
2494
+ });
2495
+
2496
+ ```
2497
+ </dd>
2498
+ </dl>
2499
+ </dd>
2500
+ </dl>
2501
+
2502
+ #### ⚙️ Parameters
2503
+
2504
+ <dl>
2505
+ <dd>
2506
+
2507
+ <dl>
2508
+ <dd>
2509
+
2510
+ **request:** `MavenAGI.CapabilityExecutionsSearchRequest`
2511
+
2512
+ </dd>
2513
+ </dl>
2514
+
2515
+ <dl>
2516
+ <dd>
2517
+
2518
+ **requestOptions:** `CapabilitiesClient.RequestOptions`
2519
+
2520
+ </dd>
2521
+ </dl>
2522
+ </dd>
2523
+ </dl>
2524
+
2525
+
2447
2526
  </dd>
2448
2527
  </dl>
2449
2528
  </details>
@@ -3727,7 +3806,11 @@ for await (const item of response) {
3727
3806
  <dl>
3728
3807
  <dd>
3729
3808
 
3730
- Uses an LLM flow to categorize the conversation. Experimental.
3809
+ Deprecated. Set the agent's `categoryIntelligentFieldId` and read that intelligent field's value instead.
3810
+
3811
+ Uses an LLM flow to categorize the conversation.
3812
+
3813
+ Returns a 400 for new agents and for any agent with a `categoryIntelligentFieldId`. Their conversation categories come only from that intelligent field: read the field's value, or react to it changing with an `EVENT_CREATED` trigger on the `INTELLIGENT_FIELD_VALUE_CHANGED` system event.
3731
3814
  </dd>
3732
3815
  </dl>
3733
3816
  </dd>
@@ -5880,7 +5963,7 @@ deletes any kind of capability the same way. That endpoint returns no body.
5880
5963
 
5881
5964
  Soft delete an intelligent field. Only INACTIVE fields can be deleted.
5882
5965
 
5883
- Deleted fields are excluded from search results but can still be retrieved by ID.
5966
+ Deleted fields are excluded from search results, and getting one by ID returns 404.
5884
5967
  Creating a new field with the same referenceId as a deleted field will overwrite
5885
5968
  the deleted field and restore it with the status a new field gets.
5886
5969
 
@@ -1,6 +1,7 @@
1
1
  import type * as MavenAGI from "../../../../../api/index";
2
2
  import * as core from "../../../../../core";
3
3
  import type * as serializers from "../../../../index";
4
+ import { EntityIdWithoutAgent } from "../../../commons/types/EntityIdWithoutAgent";
4
5
  import { LlmPersona } from "../../../commons/types/LlmPersona";
5
6
  import { PiiCategory } from "../../../commons/types/PiiCategory";
6
7
  import { AgentEnvironment } from "../../types/AgentEnvironment";
@@ -15,6 +16,7 @@ export declare namespace AgentPatchRequest {
15
16
  persona?: LlmPersona.Raw | null;
16
17
  additionalPromptText?: (string | null | undefined) | null;
17
18
  categoryGenerationPromptText?: (string | null | undefined) | null;
19
+ categoryIntelligentFieldId?: (EntityIdWithoutAgent.Raw | null | undefined) | null;
18
20
  contentSafetyViolationResponsePromptText?: (string | null | undefined) | null;
19
21
  rejectQuestionsWithoutKnowledge?: boolean | null;
20
22
  }
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.AgentPatchRequest = void 0;
38
38
  const core = __importStar(require("../../../../../core"));
39
+ const EntityIdWithoutAgent_1 = require("../../../commons/types/EntityIdWithoutAgent");
39
40
  const LlmPersona_1 = require("../../../commons/types/LlmPersona");
40
41
  const PiiCategory_1 = require("../../../commons/types/PiiCategory");
41
42
  const AgentEnvironment_1 = require("../../types/AgentEnvironment");
@@ -48,6 +49,7 @@ exports.AgentPatchRequest = core.serialization.object({
48
49
  persona: LlmPersona_1.LlmPersona.optional(),
49
50
  additionalPromptText: core.serialization.string().optionalNullable(),
50
51
  categoryGenerationPromptText: core.serialization.string().optionalNullable(),
52
+ categoryIntelligentFieldId: EntityIdWithoutAgent_1.EntityIdWithoutAgent.optionalNullable(),
51
53
  contentSafetyViolationResponsePromptText: core.serialization.string().optionalNullable(),
52
54
  rejectQuestionsWithoutKnowledge: core.serialization.boolean().optional(),
53
55
  });
@@ -2,6 +2,7 @@ import type * as MavenAGI from "../../../../api/index";
2
2
  import * as core from "../../../../core";
3
3
  import type * as serializers from "../../../index";
4
4
  import { EntityId } from "../../commons/types/EntityId";
5
+ import { EntityIdWithoutAgent } from "../../commons/types/EntityIdWithoutAgent";
5
6
  import { PiiCategory } from "../../commons/types/PiiCategory";
6
7
  import { AgentEnvironment } from "./AgentEnvironment";
7
8
  import { AgentPrompting } from "./AgentPrompting";
@@ -16,5 +17,6 @@ export declare namespace Agent {
16
17
  enabledPiiCategories: PiiCategory.Raw[];
17
18
  systemFallbackMessage?: string | null;
18
19
  prompting: AgentPrompting.Raw;
20
+ categoryIntelligentFieldId?: EntityIdWithoutAgent.Raw | null;
19
21
  }
20
22
  }
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.Agent = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
39
  const EntityId_1 = require("../../commons/types/EntityId");
40
+ const EntityIdWithoutAgent_1 = require("../../commons/types/EntityIdWithoutAgent");
40
41
  const PiiCategory_1 = require("../../commons/types/PiiCategory");
41
42
  const AgentEnvironment_1 = require("./AgentEnvironment");
42
43
  const AgentPrompting_1 = require("./AgentPrompting");
@@ -49,4 +50,5 @@ exports.Agent = core.serialization.object({
49
50
  enabledPiiCategories: core.serialization.set(PiiCategory_1.PiiCategory),
50
51
  systemFallbackMessage: core.serialization.string().optional(),
51
52
  prompting: AgentPrompting_1.AgentPrompting,
53
+ categoryIntelligentFieldId: EntityIdWithoutAgent_1.EntityIdWithoutAgent.optional(),
52
54
  });
@@ -0,0 +1,16 @@
1
+ import type * as MavenAGI from "../../../../../api/index";
2
+ import * as core from "../../../../../core";
3
+ import type * as serializers from "../../../../index";
4
+ import { BaseCappedPaginatedRequest } from "../../../commons/types/BaseCappedPaginatedRequest";
5
+ import { CapabilityType } from "../../../commons/types/CapabilityType";
6
+ import { EntityId } from "../../../commons/types/EntityId";
7
+ import { CapabilityExecutionStatus } from "../../types/CapabilityExecutionStatus";
8
+ export declare const CapabilityExecutionsSearchRequest: core.serialization.Schema<serializers.CapabilityExecutionsSearchRequest.Raw, MavenAGI.CapabilityExecutionsSearchRequest>;
9
+ export declare namespace CapabilityExecutionsSearchRequest {
10
+ interface Raw extends BaseCappedPaginatedRequest.Raw {
11
+ subjectIds?: EntityId.Raw[] | null;
12
+ capabilityTypes?: CapabilityType.Raw[] | null;
13
+ capabilityIds?: EntityId.Raw[] | null;
14
+ statuses?: CapabilityExecutionStatus.Raw[] | null;
15
+ }
16
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.CapabilityExecutionsSearchRequest = void 0;
38
+ const core = __importStar(require("../../../../../core"));
39
+ const BaseCappedPaginatedRequest_1 = require("../../../commons/types/BaseCappedPaginatedRequest");
40
+ const CapabilityType_1 = require("../../../commons/types/CapabilityType");
41
+ const EntityId_1 = require("../../../commons/types/EntityId");
42
+ const CapabilityExecutionStatus_1 = require("../../types/CapabilityExecutionStatus");
43
+ exports.CapabilityExecutionsSearchRequest = core.serialization
44
+ .object({
45
+ subjectIds: core.serialization.list(EntityId_1.EntityId).optional(),
46
+ capabilityTypes: core.serialization.list(CapabilityType_1.CapabilityType).optional(),
47
+ capabilityIds: core.serialization.list(EntityId_1.EntityId).optional(),
48
+ statuses: core.serialization.list(CapabilityExecutionStatus_1.CapabilityExecutionStatus).optional(),
49
+ })
50
+ .extend(BaseCappedPaginatedRequest_1.BaseCappedPaginatedRequest);
@@ -1,2 +1,3 @@
1
1
  export { CapabilitiesSearchRequest } from "./CapabilitiesSearchRequest";
2
+ export { CapabilityExecutionsSearchRequest } from "./CapabilityExecutionsSearchRequest";
2
3
  export { PatchCapabilityByTypeRequest } from "./PatchCapabilityByTypeRequest";
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PatchCapabilityByTypeRequest = exports.CapabilitiesSearchRequest = void 0;
3
+ exports.PatchCapabilityByTypeRequest = exports.CapabilityExecutionsSearchRequest = exports.CapabilitiesSearchRequest = void 0;
4
4
  var CapabilitiesSearchRequest_1 = require("./CapabilitiesSearchRequest");
5
5
  Object.defineProperty(exports, "CapabilitiesSearchRequest", { enumerable: true, get: function () { return CapabilitiesSearchRequest_1.CapabilitiesSearchRequest; } });
6
+ var CapabilityExecutionsSearchRequest_1 = require("./CapabilityExecutionsSearchRequest");
7
+ Object.defineProperty(exports, "CapabilityExecutionsSearchRequest", { enumerable: true, get: function () { return CapabilityExecutionsSearchRequest_1.CapabilityExecutionsSearchRequest; } });
6
8
  var PatchCapabilityByTypeRequest_1 = require("./PatchCapabilityByTypeRequest");
7
9
  Object.defineProperty(exports, "PatchCapabilityByTypeRequest", { enumerable: true, get: function () { return PatchCapabilityByTypeRequest_1.PatchCapabilityByTypeRequest; } });
@@ -0,0 +1,15 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { ConversationKickoffCapabilityExecution } from "./ConversationKickoffCapabilityExecution";
5
+ import { TriggerCapabilityExecution } from "./TriggerCapabilityExecution";
6
+ export declare const CapabilityExecution: core.serialization.Schema<serializers.CapabilityExecution.Raw, MavenAGI.CapabilityExecution>;
7
+ export declare namespace CapabilityExecution {
8
+ type Raw = CapabilityExecution.Trigger | CapabilityExecution.ConversationKickoff;
9
+ interface Trigger extends TriggerCapabilityExecution.Raw {
10
+ capabilityType: "TRIGGER";
11
+ }
12
+ interface ConversationKickoff extends ConversationKickoffCapabilityExecution.Raw {
13
+ capabilityType: "CONVERSATION_KICKOFF";
14
+ }
15
+ }