mavenagi 1.2.70 → 1.2.72

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 (118) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/capabilities/client/Client.d.ts +3 -3
  3. package/api/resources/capabilities/client/Client.js +3 -3
  4. package/api/resources/commons/types/AbsoluteTimeWindow.d.ts +5 -2
  5. package/api/resources/commons/types/ActionEffects.d.ts +18 -0
  6. package/api/resources/commons/types/ActionEffects.js +3 -0
  7. package/api/resources/commons/types/AllUsersConversationAudience.d.ts +1 -0
  8. package/api/resources/commons/types/AllUsersConversationAudience.js +3 -0
  9. package/api/resources/commons/types/ChangeAuthor.d.ts +18 -0
  10. package/api/resources/commons/types/ChangeAuthor.js +3 -0
  11. package/api/resources/commons/types/ConversationAudience.d.ts +19 -0
  12. package/api/resources/commons/types/ConversationAudience.js +3 -0
  13. package/api/resources/commons/types/ConversationAudienceResponse.d.ts +16 -0
  14. package/api/resources/commons/types/ConversationAudienceResponse.js +3 -0
  15. package/api/resources/commons/types/ConversationResponse.d.ts +8 -0
  16. package/api/resources/commons/types/ConversationSetupFields.d.ts +21 -0
  17. package/api/resources/commons/types/ConversationSetupFields.js +3 -0
  18. package/api/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +7 -0
  19. package/api/resources/commons/types/CrossOrganizationLevelEntityId.js +3 -0
  20. package/api/resources/commons/types/FieldCondition.d.ts +3 -2
  21. package/api/resources/commons/types/InitializeConversationResponse.d.ts +3 -0
  22. package/api/resources/commons/types/LeveledEntityId.d.ts +28 -0
  23. package/api/resources/commons/types/LeveledEntityId.js +3 -0
  24. package/api/resources/commons/types/MetadataPrecondition.d.ts +27 -3
  25. package/api/resources/commons/types/OrganizationLevelEntityId.d.ts +9 -0
  26. package/api/resources/commons/types/OrganizationLevelEntityId.js +3 -0
  27. package/api/resources/commons/types/PresenceOperator.d.ts +2 -1
  28. package/api/resources/commons/types/PresenceOperator.js +2 -1
  29. package/api/resources/commons/types/ResolutionStatus.d.ts +9 -5
  30. package/api/resources/commons/types/ResolutionStatus.js +9 -5
  31. package/api/resources/commons/types/SimulationActionBehavior.d.ts +1 -1
  32. package/api/resources/commons/types/SimulationContext.d.ts +6 -24
  33. package/api/resources/commons/types/SimulationFixedResponse.d.ts +14 -0
  34. package/api/resources/commons/types/SimulationFixedResponse.js +3 -0
  35. package/api/resources/commons/types/SimulationSetupFields.d.ts +29 -0
  36. package/api/resources/commons/types/SimulationSetupFields.js +3 -0
  37. package/api/resources/commons/types/TagsPrecondition.d.ts +12 -1
  38. package/api/resources/commons/types/TimePrecondition.d.ts +1 -0
  39. package/api/resources/commons/types/UserDataEffect.d.ts +10 -0
  40. package/api/resources/commons/types/UserDataEffect.js +3 -0
  41. package/api/resources/commons/types/UserDataPatch.d.ts +10 -0
  42. package/api/resources/commons/types/UserDataPatch.js +3 -0
  43. package/api/resources/commons/types/UsersConversationAudience.d.ts +8 -0
  44. package/api/resources/commons/types/UsersConversationAudience.js +3 -0
  45. package/api/resources/commons/types/UsersConversationAudienceResponse.d.ts +9 -0
  46. package/api/resources/commons/types/UsersConversationAudienceResponse.js +3 -0
  47. package/api/resources/commons/types/index.d.ts +15 -0
  48. package/api/resources/commons/types/index.js +15 -0
  49. package/api/resources/conversation/client/Client.d.ts +35 -1
  50. package/api/resources/conversation/client/Client.js +35 -1
  51. package/api/resources/conversation/types/AskRequest.d.ts +4 -1
  52. package/api/resources/conversation/types/BillableFilterField.d.ts +1 -1
  53. package/api/resources/conversation/types/BillableFilterField.js +1 -1
  54. package/api/resources/conversation/types/ConversationRequest.d.ts +26 -16
  55. package/api/resources/conversation/types/DeliverMessageResponse.d.ts +5 -0
  56. package/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +20 -0
  57. package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +4 -0
  58. package/api/resources/knowledge/client/Client.d.ts +14 -0
  59. package/api/resources/knowledge/client/Client.js +14 -0
  60. package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
  61. package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
  62. package/api/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
  63. package/package.json +1 -1
  64. package/reference.md +29 -4
  65. package/serialization/resources/commons/types/AbsoluteTimeWindow.d.ts +1 -0
  66. package/serialization/resources/commons/types/AbsoluteTimeWindow.js +1 -0
  67. package/serialization/resources/commons/types/ActionEffects.d.ts +11 -0
  68. package/serialization/resources/commons/types/ActionEffects.js +45 -0
  69. package/serialization/resources/commons/types/AllUsersConversationAudience.d.ts +7 -0
  70. package/serialization/resources/commons/types/AllUsersConversationAudience.js +39 -0
  71. package/serialization/resources/commons/types/ChangeAuthor.d.ts +12 -0
  72. package/serialization/resources/commons/types/ChangeAuthor.js +44 -0
  73. package/serialization/resources/commons/types/ConversationAudience.d.ts +15 -0
  74. package/serialization/resources/commons/types/ConversationAudience.js +49 -0
  75. package/serialization/resources/commons/types/ConversationAudienceResponse.d.ts +15 -0
  76. package/serialization/resources/commons/types/ConversationAudienceResponse.js +49 -0
  77. package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
  78. package/serialization/resources/commons/types/ConversationResponse.js +2 -0
  79. package/serialization/resources/commons/types/ConversationSetupFields.d.ts +12 -0
  80. package/serialization/resources/commons/types/ConversationSetupFields.js +44 -0
  81. package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +9 -0
  82. package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.js +40 -0
  83. package/serialization/resources/commons/types/LeveledEntityId.d.ts +19 -0
  84. package/serialization/resources/commons/types/LeveledEntityId.js +51 -0
  85. package/serialization/resources/commons/types/MetadataPrecondition.d.ts +2 -0
  86. package/serialization/resources/commons/types/MetadataPrecondition.js +2 -0
  87. package/serialization/resources/commons/types/OrganizationLevelEntityId.d.ts +10 -0
  88. package/serialization/resources/commons/types/OrganizationLevelEntityId.js +44 -0
  89. package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +2 -2
  90. package/serialization/resources/commons/types/SimulationActionBehavior.js +2 -2
  91. package/serialization/resources/commons/types/SimulationContext.d.ts +2 -6
  92. package/serialization/resources/commons/types/SimulationContext.js +5 -7
  93. package/serialization/resources/commons/types/SimulationFixedResponse.d.ts +11 -0
  94. package/serialization/resources/commons/types/SimulationFixedResponse.js +45 -0
  95. package/serialization/resources/commons/types/SimulationSetupFields.d.ts +13 -0
  96. package/serialization/resources/commons/types/SimulationSetupFields.js +45 -0
  97. package/serialization/resources/commons/types/UserDataEffect.d.ts +11 -0
  98. package/serialization/resources/commons/types/UserDataEffect.js +43 -0
  99. package/serialization/resources/commons/types/UserDataPatch.d.ts +11 -0
  100. package/serialization/resources/commons/types/UserDataPatch.js +43 -0
  101. package/serialization/resources/commons/types/UsersConversationAudience.d.ts +10 -0
  102. package/serialization/resources/commons/types/UsersConversationAudience.js +42 -0
  103. package/serialization/resources/commons/types/UsersConversationAudienceResponse.d.ts +10 -0
  104. package/serialization/resources/commons/types/UsersConversationAudienceResponse.js +42 -0
  105. package/serialization/resources/commons/types/index.d.ts +15 -0
  106. package/serialization/resources/commons/types/index.js +15 -0
  107. package/serialization/resources/conversation/types/ConversationRequest.d.ts +4 -5
  108. package/serialization/resources/conversation/types/ConversationRequest.js +7 -6
  109. package/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +2 -0
  110. package/serialization/resources/conversation/types/DeliverMessageResponse.js +2 -0
  111. package/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +1 -0
  112. package/serialization/resources/conversation/types/DeliverUserMessageRequest.js +1 -0
  113. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +3 -0
  114. package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
  115. package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
  116. package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.js +2 -0
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
package/BaseClient.js CHANGED
@@ -46,8 +46,8 @@ function normalizeClientOptions(options) {
46
46
  const headers = (0, headers_1.mergeHeaders)({
47
47
  "X-Fern-Language": "JavaScript",
48
48
  "X-Fern-SDK-Name": "mavenagi",
49
- "X-Fern-SDK-Version": "1.2.70",
50
- "User-Agent": "mavenagi/1.2.70",
49
+ "X-Fern-SDK-Version": "1.2.72",
50
+ "User-Agent": "mavenagi/1.2.72",
51
51
  "X-Fern-Runtime": core.RUNTIME.type,
52
52
  "X-Fern-Runtime-Version": core.RUNTIME.version,
53
53
  "X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
@@ -98,9 +98,9 @@ export declare class CapabilitiesClient {
98
98
  * Run one of an agent's capabilities once, as a simulation, and return what it produced.
99
99
  *
100
100
  * The caller supplies everything the capability reads, so it runs in isolation: no
101
- * conversation or agent user has to exist first. The capability is told its mode is
102
- * `SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
103
- * effects in real systems. Nothing here runs a capability live.
101
+ * conversation or agent user has to exist first. The capability's app is called with mode
102
+ * `SIMULATION`. What the app does in that mode is up to the app, and the platform does not
103
+ * stop it from acting on real systems.
104
104
  *
105
105
  * A simulated run is not recorded. It returns its result here and never appears in
106
106
  * capability execution search.
@@ -418,9 +418,9 @@ class CapabilitiesClient {
418
418
  * Run one of an agent's capabilities once, as a simulation, and return what it produced.
419
419
  *
420
420
  * The caller supplies everything the capability reads, so it runs in isolation: no
421
- * conversation or agent user has to exist first. The capability is told its mode is
422
- * `SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
423
- * effects in real systems. Nothing here runs a capability live.
421
+ * conversation or agent user has to exist first. The capability's app is called with mode
422
+ * `SIMULATION`. What the app does in that mode is up to the app, and the platform does not
423
+ * stop it from acting on real systems.
424
424
  *
425
425
  * A simulated run is not recorded. It returns its result here and never appears in
426
426
  * capability execution search.
@@ -4,10 +4,13 @@
4
4
  * before `end` when both are set.
5
5
  *
6
6
  * Both ends are instants with an offset, so a client converts a local date to an instant
7
- * before sending it; the server applies no timezone. The server keeps only the instant, so
8
- * a window reads back in UTC.
7
+ * before sending it; matching compares instants and applies no timezone. The server keeps
8
+ * each end's instant but not the offset it was sent with, so each end reads back at
9
+ * `timezone`'s offset on that date, or in UTC without one.
9
10
  */
10
11
  export interface AbsoluteTimeWindow {
12
+ /** The IANA timezone the window was written in (e.g. "America/New_York"), kept so an editor can show the ends in it again. It does not change which instants match. Fixed offsets (e.g. "-08:00") and legacy IDs (e.g. "EST") are accepted, but the ends then read back at a fixed offset that ignores daylight saving. Clients can prefill it from the agent's `defaultTimezone`. */
13
+ timezone?: string;
11
14
  /** The first instant inside the window. Omit to leave the window open at the start. */
12
15
  start?: Date;
13
16
  /** The first instant after the window. Omit to leave the window open at the end. */
@@ -0,0 +1,18 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * State an action changes: metadata on its conversation, and data on the user whose message
4
+ * triggered it. Must set at least one of `conversationMetadata` or `userData`, and an empty
5
+ * map counts as unset.
6
+ */
7
+ export interface ActionEffects {
8
+ /**
9
+ * Merged into the conversation's metadata. Keys and values are at most 500 characters
10
+ * each.
11
+ */
12
+ conversationMetadata?: Record<string, string>;
13
+ /**
14
+ * A patch to the user's data. Keys may not start with `maven.`, which the platform
15
+ * reserves.
16
+ */
17
+ userData?: MavenAGI.UserDataEffect;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type AllUsersConversationAudience = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Who made a change, as recorded when it was made.
4
+ */
5
+ export interface ChangeAuthor {
6
+ /**
7
+ * The mavenUser ID of the person the change was made for, the same as `MavenUser.id`: one ID
8
+ * for the person in every organization. The mavenUsers API gives their current name. It answers
9
+ * 404 for someone the caller can no longer read, such as a person who left the organization, so
10
+ * fall back to `name` then. Absent when no person was recorded: an app that acted for no one, a
11
+ * change made with no signed-in caller, and older changes.
12
+ */
13
+ mavenUserId?: MavenAGI.LeveledEntityId;
14
+ /** Who made the change, as their name read at the time; it does not change if they rename later. When an app acted for a person signed in to Maven, their name (absent if they have no name on record). When an app acted for no person, the app's ID. Changes recorded before people were tracked usually name the app. A change made with no signed-in caller, such as background setup work, reads "Anonymous", and some older changes name a dashboard user. */
15
+ name?: string;
16
+ /** The ID of the app that made the change. Absent when no app made it, such as a change with no signed-in caller, and for older changes where no app was recorded. */
17
+ actingAppId?: string;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export type ConversationAudience =
3
+ /**
4
+ * Any of the agent's users may take part in the conversation. Equivalent to omitting `audience`. */
5
+ MavenAGI.ConversationAudience.AllUsers
6
+ /**
7
+ * Only the listed users may take part in the conversation. A `USER` message from anyone else is
8
+ * rejected with a 400 on `ask`, `askStream` and `appendNewMessages`, and on the `initialize` that
9
+ * creates the conversation; a repeat `initialize` saves no messages. Messages from human agents and
10
+ * external systems are not checked, and voice caller messages are not checked yet. */
11
+ | MavenAGI.ConversationAudience.Users;
12
+ export declare namespace ConversationAudience {
13
+ interface AllUsers extends MavenAGI.AllUsersConversationAudience {
14
+ type: "allUsers";
15
+ }
16
+ interface Users extends MavenAGI.UsersConversationAudience {
17
+ type: "users";
18
+ }
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export type ConversationAudienceResponse =
3
+ /**
4
+ * Any of the agent's users may take part in the conversation. */
5
+ MavenAGI.ConversationAudienceResponse.AllUsers
6
+ /**
7
+ * Only the listed users may take part in the conversation. */
8
+ | MavenAGI.ConversationAudienceResponse.Users;
9
+ export declare namespace ConversationAudienceResponse {
10
+ interface AllUsers extends MavenAGI.AllUsersConversationAudience {
11
+ type: "allUsers";
12
+ }
13
+ interface Users extends MavenAGI.UsersConversationAudienceResponse {
14
+ type: "users";
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,9 @@ import type * as MavenAGI from "../../../index";
9
9
  * agentId: "support",
10
10
  * type: MavenAGI.EntityType.Conversation
11
11
  * },
12
+ * audience: {
13
+ * type: "allUsers"
14
+ * },
12
15
  * deleted: false,
13
16
  * open: false,
14
17
  * llmEnabled: true,
@@ -92,4 +95,9 @@ export interface ConversationResponse extends MavenAGI.BaseConversationResponse
92
95
  * Message attachments are included in LLM context, conversation attachments are not.
93
96
  */
94
97
  attachments: MavenAGI.AttachmentResponse[];
98
+ /**
99
+ * Who the conversation is for, as set when it was initialized. `allUsers` for a conversation
100
+ * initialized without an audience or created by an ask.
101
+ */
102
+ audience: MavenAGI.ConversationAudienceResponse;
95
103
  }
@@ -0,0 +1,21 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * The settings a conversation is created with.
4
+ */
5
+ export interface ConversationSetupFields {
6
+ /** Optional configurations for responses to this conversation */
7
+ responseConfig?: MavenAGI.ResponseConfig;
8
+ /** The tags of the conversation. Used for filtering in Agent Designer. */
9
+ tags?: Set<string>;
10
+ /**
11
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
12
+ * additional information about the object in a structured format, and querying for objects
13
+ * via API or the dashboard.
14
+ *
15
+ * Keys are strings with a maximum length of 500 characters. Values are strings with a maximum
16
+ * length of 512 characters.
17
+ *
18
+ * The metadata of the conversation supplied by the app which created the conversation.
19
+ */
20
+ metadata?: Record<string, string>;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * The ID of an object above the organization level. It has no `organizationId` or `agentId`, and
4
+ * none is inferred: the ID is unique within one residency zone and environment.
5
+ */
6
+ export interface CrossOrganizationLevelEntityId extends MavenAGI.EntityIdWithoutAgent {
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,8 +2,9 @@ import type * as MavenAGI from "../../../index";
2
2
  /**
3
3
  * A condition on a single value, discriminated by the type the value is
4
4
  * validated as. Used wherever a value needs testing regardless of where it
5
- * came from: an intelligent field's computed value, or a value addressed by
6
- * path inside data an action returned.
5
+ * came from: an intelligent field's computed value, a value addressed by
6
+ * path inside data an action returned, or the value under a metadata
7
+ * precondition's `key`.
7
8
  *
8
9
  * Pick the variant by type:
9
10
  * - `string`: For STRING and MULTILINE values
@@ -13,6 +13,9 @@ import type * as MavenAGI from "../../../index";
13
13
  * agentId: "support",
14
14
  * type: MavenAGI.EntityType.Conversation
15
15
  * },
16
+ * audience: {
17
+ * type: "allUsers"
18
+ * },
16
19
  * deleted: false,
17
20
  * open: true,
18
21
  * llmEnabled: true,
@@ -0,0 +1,28 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * An object ID that states the level its object lives at: `AGENT` (it belongs to an agent),
4
+ * `ORGANIZATION` (it belongs to an organization and to none of its agents), or `CROSS_ORGANIZATION` (it
5
+ * is above the organization level). An `AGENT` ID has the same fields as `EntityId`, plus `level`. An ID
6
+ * sent without `level` is read as `AGENT`.
7
+ */
8
+ export type LeveledEntityId =
9
+ /**
10
+ * An object that belongs to an agent. */
11
+ MavenAGI.LeveledEntityId.Agent
12
+ /**
13
+ * An object that belongs to an organization and to none of its agents. */
14
+ | MavenAGI.LeveledEntityId.Organization
15
+ /**
16
+ * An object above the organization level. */
17
+ | MavenAGI.LeveledEntityId.CrossOrganization;
18
+ export declare namespace LeveledEntityId {
19
+ interface Agent extends MavenAGI.EntityId {
20
+ level: "AGENT";
21
+ }
22
+ interface Organization extends MavenAGI.OrganizationLevelEntityId {
23
+ level: "ORGANIZATION";
24
+ }
25
+ interface CrossOrganization extends MavenAGI.CrossOrganizationLevelEntityId {
26
+ level: "CROSS_ORGANIZATION";
27
+ }
28
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,33 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface MetadataPrecondition extends MavenAGI.PreconditionBase {
3
- /** The key that must be present in the metadata for a precondition to be met */
3
+ /** The metadata key the precondition reads. Without a `fieldCondition`, a missing key fails the precondition, or meets it when `operator` is `NOT`. With a `fieldCondition`, a missing key is undetermined: it meets only `IS_UNDETERMINED`. */
4
4
  key: string;
5
- /** Single value for CONTAINS operator or exact match */
5
+ /** Single value for CONTAINS operator or exact match. Superseded by `fieldCondition`, which carries its own value; this field and the inherited `operator` apply only without one. Keep using it until `fieldCondition` is generally available. */
6
6
  value?: string;
7
- /** Multiple values for CONTAINS_ANY and CONTAINS_ALL operators */
7
+ /** Multiple values for CONTAINS_ANY and CONTAINS_ALL operators. Superseded by `fieldCondition`, which carries its own values; this field and the inherited `operator` apply only without one. Keep using it until `fieldCondition` is generally available. */
8
8
  values?: string[];
9
+ /**
10
+ * A typed condition on the value stored under `key`, used instead of `operator`, `value`
11
+ * and `values`. On charters, segments and knowledge bases, setting it together with
12
+ * `operator`, `value` or a non-empty `values` is a 400.
13
+ *
14
+ * Pick the arm by how the value is stored: `string` for a plain string, such as a prefix
15
+ * or suffix match, and `set` for a JSON array of strings, such as `["us-east","eu-west"]`.
16
+ * `numeric` and `boolean` read a value written as a number or `true`/`false`.
17
+ *
18
+ * A missing key meets only `universal` `IS_UNDETERMINED`. Every other condition is unmet,
19
+ * negated ones such as `NOT_STARTS_WITH` and `NEQ` included, unlike `operator: NOT`,
20
+ * which a missing key meets. To also match a conversation without the key, put the
21
+ * condition in an `OR` group with `IS_UNDETERMINED`.
22
+ *
23
+ * A `string` condition compares the stored text, unwrapping a JSON-quoted string first, so
24
+ * a JSON array or number is compared as its raw text. An empty comparison value matches
25
+ * every value for `STARTS_WITH`, `ENDS_WITH` and `CONTAINS_SUBSTRING`. A `numeric` or
26
+ * `boolean` condition is unmet when the value cannot be read as that type. A `set`
27
+ * condition reads a value that is not a JSON array as a one-element set, and skips `null`
28
+ * elements, so `[null]` is an empty set. A `numeric` `comparison` or `boolean` condition
29
+ * without a `value` is saved with `0` or `false`, so `{"opType": "comparison",
30
+ * "operator": "GT"}` means greater than 0.
31
+ */
32
+ fieldCondition?: MavenAGI.FieldCondition;
9
33
  }
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * The ID of an object that belongs to an organization and to none of its agents. It has no `agentId`,
4
+ * and none is inferred.
5
+ */
6
+ export interface OrganizationLevelEntityId extends MavenAGI.EntityIdWithoutAgent {
7
+ /** The ID of the organization that this object belongs to */
8
+ organizationId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,7 +6,8 @@ export declare const PresenceOperator: {
6
6
  /**
7
7
  * The field has no determined value — the LLM could not determine one, the
8
8
  * computation failed, is still running, or has not run. Surfaced to authors as
9
- * the special "Undetermined" value. */
9
+ * the special "Undetermined" value. For a metadata precondition, the key is
10
+ * absent. */
10
11
  readonly IsUndetermined: "IS_UNDETERMINED";
11
12
  /**
12
13
  * The field has a determined (non-null) value. */
@@ -10,7 +10,8 @@ exports.PresenceOperator = {
10
10
  /**
11
11
  * The field has no determined value — the LLM could not determine one, the
12
12
  * computation failed, is still running, or has not run. Surfaced to authors as
13
- * the special "Undetermined" value. */
13
+ * the special "Undetermined" value. For a metadata precondition, the key is
14
+ * absent. */
14
15
  IsUndetermined: "IS_UNDETERMINED",
15
16
  /**
16
17
  * The field has a determined (non-null) value. */
@@ -38,8 +38,10 @@ export declare const ResolutionStatus: {
38
38
  * The conversation was handed off to a human agent. Either an AI analysis of the
39
39
  * transcript found a handoff, or a handoff action that Maven recognizes ran successfully.
40
40
  * The AI analysis can be wrong. Once escalation is detected, later messages do not undo
41
- * it, but the earlier checks, such as `NEGATIVE_FEEDBACK`, still take precedence. Copilot
42
- * conversations are never `ESCALATED`. Billing status: not billable. Shown in Agent
41
+ * it, but the earlier checks, such as `NEGATIVE_FEEDBACK`, still take precedence. Agent
42
+ * Assist copilot conversations are never `ESCALATED`, in any mode: those tagged `copilot`
43
+ * or `copilot-research` count as `RESOLVED` instead, and copilot chat and Advice
44
+ * conversations are `INELIGIBLE`. Billing status: not billable. Shown in Agent
43
45
  * Designer as "Escalated". */
44
46
  readonly Escalated: "ESCALATED";
45
47
  /**
@@ -64,9 +66,11 @@ export declare const ResolutionStatus: {
64
66
  * status: not eligible. Shown in Agent Designer as "Hangup". */
65
67
  readonly Hangup: "HANGUP";
66
68
  /**
67
- * A copilot chat conversation. Billing status: not eligible. Shown in Agent Designer as
68
- * "Ineligible". Not the same as the `INELIGIBLE` billing status, which covers every not
69
- * eligible status. */
69
+ * A copilot chat or Advice conversation (tagged `copilot-chat` or `copilot-advice`). Other
70
+ * Agent Assist copilot conversations, such as those tagged `copilot` or `copilot-research`,
71
+ * keep the normal statuses but are never `ESCALATED`. Billing status: not eligible. Shown in
72
+ * Agent Designer as "Ineligible". Not the same as the `INELIGIBLE` billing status, which
73
+ * covers every not eligible status. */
70
74
  readonly Ineligible: "INELIGIBLE";
71
75
  };
72
76
  export type ResolutionStatus = (typeof ResolutionStatus)[keyof typeof ResolutionStatus] | string;
@@ -42,8 +42,10 @@ exports.ResolutionStatus = {
42
42
  * The conversation was handed off to a human agent. Either an AI analysis of the
43
43
  * transcript found a handoff, or a handoff action that Maven recognizes ran successfully.
44
44
  * The AI analysis can be wrong. Once escalation is detected, later messages do not undo
45
- * it, but the earlier checks, such as `NEGATIVE_FEEDBACK`, still take precedence. Copilot
46
- * conversations are never `ESCALATED`. Billing status: not billable. Shown in Agent
45
+ * it, but the earlier checks, such as `NEGATIVE_FEEDBACK`, still take precedence. Agent
46
+ * Assist copilot conversations are never `ESCALATED`, in any mode: those tagged `copilot`
47
+ * or `copilot-research` count as `RESOLVED` instead, and copilot chat and Advice
48
+ * conversations are `INELIGIBLE`. Billing status: not billable. Shown in Agent
47
49
  * Designer as "Escalated". */
48
50
  Escalated: "ESCALATED",
49
51
  /**
@@ -68,8 +70,10 @@ exports.ResolutionStatus = {
68
70
  * status: not eligible. Shown in Agent Designer as "Hangup". */
69
71
  Hangup: "HANGUP",
70
72
  /**
71
- * A copilot chat conversation. Billing status: not eligible. Shown in Agent Designer as
72
- * "Ineligible". Not the same as the `INELIGIBLE` billing status, which covers every not
73
- * eligible status. */
73
+ * A copilot chat or Advice conversation (tagged `copilot-chat` or `copilot-advice`). Other
74
+ * Agent Assist copilot conversations, such as those tagged `copilot` or `copilot-research`,
75
+ * keep the normal statuses but are never `ESCALATED`. Billing status: not eligible. Shown in
76
+ * Agent Designer as "Ineligible". Not the same as the `INELIGIBLE` billing status, which
77
+ * covers every not eligible status. */
74
78
  Ineligible: "INELIGIBLE",
75
79
  };
@@ -10,7 +10,7 @@ MavenAGI.SimulationActionBehavior.FixedResponse
10
10
  * The platform calls the action's app instead of returning a mocked result. */
11
11
  | MavenAGI.SimulationActionBehavior.CallApp;
12
12
  export declare namespace SimulationActionBehavior {
13
- interface FixedResponse extends MavenAGI.ExecuteActionResponse {
13
+ interface FixedResponse extends MavenAGI.SimulationFixedResponse {
14
14
  type: "fixedResponse";
15
15
  }
16
16
  interface CallApp extends MavenAGI.SimulationActionCallApp {
@@ -1,8 +1,13 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  /**
3
3
  * Conversations with a simulation context are the runs on the Agent Designer "Simulator" page.
4
+ *
5
+ * By default, an action the agent executes in a simulation calls its app, with mode
6
+ * `SIMULATION`, and the app may act on real systems. To keep an action's app from being called, give it an
7
+ * `actionMocks` entry with a `fixedResponse`, or set `defaultActionBehavior` to a
8
+ * `fixedResponse`.
4
9
  */
5
- export interface SimulationContext {
10
+ export interface SimulationContext extends MavenAGI.SimulationSetupFields {
6
11
  /**
7
12
  * Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters.
8
13
  *
@@ -27,27 +32,4 @@ export interface SimulationContext {
27
32
  * keeps the variant it was created with.
28
33
  */
29
34
  variantId?: MavenAGI.EntityIdWithoutAgent;
30
- /**
31
- * When true, the simulation evaluates the agent's charters even if charter evaluation is
32
- * turned off for the agent. When absent or false, the simulation follows the agent's own
33
- * charter evaluation setting, like any other conversation. While charters are evaluated,
34
- * `additionalPromptText` has no effect. Not yet enabled for every agent: until it is, the
35
- * value is stored and returned, and the agent's own setting applies. A conversation that
36
- * already exists keeps the value it was created with.
37
- */
38
- evaluateWithCharters?: boolean;
39
- /**
40
- * What the platform does when the agent executes each action during this simulation. At
41
- * most one entry per action; a request that names an action twice is rejected. An action
42
- * with no entry follows `defaultActionBehavior`. A conversation that already exists keeps
43
- * the mocks and default it was created with.
44
- */
45
- actionMocks?: MavenAGI.SimulationActionMock[];
46
- /**
47
- * What the platform does when the agent executes an action that has no `actionMocks`
48
- * entry. When absent, the action's app is called as usual. A `fixedResponse` here keeps the
49
- * simulation from calling any action's app that `actionMocks` doesn't name with `callApp`;
50
- * its templates are rendered over the parameters of whichever action was called.
51
- */
52
- defaultActionBehavior?: MavenAGI.SimulationActionBehavior;
53
35
  }
@@ -0,0 +1,14 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface SimulationFixedResponse extends MavenAGI.ExecuteActionResponse {
3
+ /**
4
+ * State the action would have changed. The platform writes it each time this mock answers,
5
+ * under the app that initialized the conversation; the mocked app is not called. Both
6
+ * writes are attempted; if either fails, the action's result is an error and the other
7
+ * write stays applied. `userData` patches the initializing app's profile of the user who
8
+ * sent the message that triggered the action: that user must be a `SIMULATION` user with a
9
+ * profile under that app. Allowed on an `actionMocks` entry, not on
10
+ * `defaultActionBehavior`, and not with an `ERROR` status: a failed action changes no
11
+ * state.
12
+ */
13
+ effects?: MavenAGI.ActionEffects;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * How a simulation evaluates charters and handles the actions the agent executes.
4
+ */
5
+ export interface SimulationSetupFields {
6
+ /**
7
+ * When true, the simulation evaluates the agent's charters even if charter evaluation is
8
+ * turned off for the agent. When absent or false, the simulation follows the agent's own
9
+ * charter evaluation setting, like any other conversation. While charters are evaluated,
10
+ * `additionalPromptText` has no effect. Not yet enabled for every agent: until it is, the
11
+ * value is stored and returned, and the agent's own setting applies. A conversation that
12
+ * already exists keeps the value it was created with.
13
+ */
14
+ evaluateWithCharters?: boolean;
15
+ /**
16
+ * What the platform does when the agent executes each action during this simulation. At
17
+ * most one entry per action; a request that names an action twice is rejected. An action
18
+ * with no entry follows `defaultActionBehavior`. A conversation that already exists keeps
19
+ * the mocks and default it was created with.
20
+ */
21
+ actionMocks?: MavenAGI.SimulationActionMock[];
22
+ /**
23
+ * What the platform does when the agent executes an action that has no `actionMocks`
24
+ * entry. When absent, the action's app is called as usual. A `fixedResponse` here keeps the
25
+ * simulation from calling any action's app that `actionMocks` doesn't name with `callApp`;
26
+ * its templates are rendered over the parameters of whichever action was called.
27
+ */
28
+ defaultActionBehavior?: MavenAGI.SimulationActionBehavior;
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,16 @@
1
1
  import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Checks the conversation's tags against `tags`. The `operator` decides how:
4
+ *
5
+ * - None: every listed tag must be present.
6
+ * - `CONTAINS` or `CONTAINS_ANY`: at least one listed tag must be present.
7
+ * - `NOT_CONTAINS` or `NOT_CONTAINS_ANY`: none of the listed tags may be present.
8
+ * - `CONTAINS_ALL`: every listed tag must be present.
9
+ * - `NOT_CONTAINS_ALL`: at least one listed tag must be missing.
10
+ * - `NOT`: met unless every listed tag is present. To require that none are present, use
11
+ * `NOT_CONTAINS_ANY`.
12
+ */
2
13
  export interface TagsPrecondition extends MavenAGI.PreconditionBase {
3
- /** The tags that must be present in the conversation context for the precondition to be met */
14
+ /** The tags the `operator` checks the conversation's tags against. */
4
15
  tags: Set<string>;
5
16
  }
@@ -57,6 +57,7 @@ import type * as MavenAGI from "../../../index";
57
57
  * {
58
58
  * window: {
59
59
  * windowType: "absolute",
60
+ * timezone: "America/Los_Angeles",
60
61
  * start: new Date("2026-11-27T08:00:00.000Z"),
61
62
  * end: new Date("2026-11-28T08:00:00.000Z")
62
63
  * }
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface UserDataEffect {
3
+ /** Keys to set. Keys not named are left as they are. */
4
+ data?: Record<string, MavenAGI.UserDataPatch>;
5
+ /**
6
+ * Keys to clear. Each is set to an empty string with `VISIBLE` visibility; there is no
7
+ * delete. A key may not also appear in `data`.
8
+ */
9
+ removeKeys?: string[];
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Not `UserData`, which requires `visibility`; a patch can leave it out.
4
+ */
5
+ export interface UserDataPatch {
6
+ /** The value to store. */
7
+ value: string;
8
+ /** Defaults to `VISIBLE`. */
9
+ visibility?: MavenAGI.VisibilityType;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface UsersConversationAudience {
3
+ /**
4
+ * The users the conversation is for, identified the same way as a message's `userId`: by
5
+ * reference ID within the calling app. Must list between 1 and 100 users.
6
+ */
7
+ userIds: MavenAGI.EntityIdBase[];
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ export interface UsersConversationAudienceResponse {
3
+ /**
4
+ * The users the conversation is for, as `initialize` named them: each is a user ID (`type` `USER`) with
5
+ * the app and reference ID it was given under, the same ID a message's `userId` names. These identify
6
+ * users of the agent, not `mavenUserId`s.
7
+ */
8
+ userIds: MavenAGI.EntityId[];
9
+ }