@athenaintel/sdk 4.3.2161 → 4.3.2163

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@athenaintel/sdk",
46
- "X-Fern-SDK-Version": "4.3.2161",
47
- "User-Agent": "@athenaintel/sdk/4.3.2161",
46
+ "X-Fern-SDK-Version": "4.3.2163",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2163",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -52,6 +52,10 @@ export declare class AopClient {
52
52
  * @example
53
53
  * await client.aop.execute({
54
54
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
55
+ * run_budget: {
56
+ * max_cost_usd: 30,
57
+ * max_model_calls: 80
58
+ * },
55
59
  * user_inputs: {
56
60
  * "company": "Acme Corp",
57
61
  * "quarter": "Q1 2024"
@@ -75,6 +79,10 @@ export declare class AopClient {
75
79
  * @example
76
80
  * await client.aop.executeAsync({
77
81
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
82
+ * run_budget: {
83
+ * max_cost_usd: 30,
84
+ * max_model_calls: 80
85
+ * },
78
86
  * user_inputs: {
79
87
  * "company": "Acme Corp",
80
88
  * "quarter": "Q1 2024"
@@ -174,6 +174,10 @@ class AopClient {
174
174
  * @example
175
175
  * await client.aop.execute({
176
176
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
177
+ * run_budget: {
178
+ * max_cost_usd: 30,
179
+ * max_model_calls: 80
180
+ * },
177
181
  * user_inputs: {
178
182
  * "company": "Acme Corp",
179
183
  * "quarter": "Q1 2024"
@@ -265,6 +269,10 @@ class AopClient {
265
269
  * @example
266
270
  * await client.aop.executeAsync({
267
271
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
272
+ * run_budget: {
273
+ * max_cost_usd: 30,
274
+ * max_model_calls: 80
275
+ * },
268
276
  * user_inputs: {
269
277
  * "company": "Acme Corp",
270
278
  * "quarter": "Q1 2024"
@@ -1,3 +1,4 @@
1
+ import type * as AthenaIntelligence from "../index.js";
1
2
  /**
2
3
  * Request model for executing an AOP (Agent Operating Procedure).
3
4
  */
@@ -6,6 +7,8 @@ export interface AopExecuteRequestIn {
6
7
  asset_id: string;
7
8
  /** Execute the AOP in dry-run mode: the agent runs with its real prompt, config, and read-only tools, but side-effectful tool calls (emails, external writes) are validated and captured instead of executed. The session remains visible and is marked with athena_metadata.is_dry_run for UI badging. */
8
9
  dry_run?: boolean;
10
+ /** Optional spend cap for this execution: max_model_calls (top-level and sub-agent model calls) and/or max_cost_usd (provider cost at Athena's model pricing). When a limit is reached the run stops before the next model call, ends with athena_termination_reason=run_budget, and the AOP execution settles as not succeeded. Absent = no cap beyond the agent's step limit. */
11
+ run_budget?: AthenaIntelligence.RunBudget | null;
9
12
  /** Optional user inputs to append to the AOP's prompt as key-value pairs */
10
13
  user_inputs?: Record<string, string | null> | null;
11
14
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The most one execution may spend before the runtime stops it.
3
+ *
4
+ * Both limits are optional individually; at least one must be set. A limit
5
+ * that is reached ends the run: the model call that would exceed
6
+ * ``max_model_calls`` is never made, and neither is the first call after
7
+ * accumulated provider cost reaches ``max_cost_usd`` — or the call projected
8
+ * to cross it (a cost cap can be overshot by at most one call's variance,
9
+ * since the provider bills after the fact).
10
+ */
11
+ export interface RunBudget {
12
+ /** Maximum provider cost in USD this execution may accumulate, at Athena's in-house model pricing. The run stops before the model call that has reached, or is projected to cross, this amount; a single call can overshoot it by at most that call's cost. */
13
+ max_cost_usd?: number | null;
14
+ /** Maximum number of model calls (top-level and sub-agent) this execution may make. The run stops before the call that would exceed it. */
15
+ max_model_calls?: number | null;
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 });
@@ -88,6 +88,7 @@ export * from "./ReadCapabilitiesOut.js";
88
88
  export * from "./RedactedThinkingContent.js";
89
89
  export * from "./RenameAssetResponseOut.js";
90
90
  export * from "./RevokeSshAccessResponseOut.js";
91
+ export * from "./RunBudget.js";
91
92
  export * from "./RunTaskResponse.js";
92
93
  export * from "./SaveAssetRequestOut.js";
93
94
  export * from "./SemanticModelMetaResponseOut.js";
@@ -104,6 +104,7 @@ __exportStar(require("./ReadCapabilitiesOut.js"), exports);
104
104
  __exportStar(require("./RedactedThinkingContent.js"), exports);
105
105
  __exportStar(require("./RenameAssetResponseOut.js"), exports);
106
106
  __exportStar(require("./RevokeSshAccessResponseOut.js"), exports);
107
+ __exportStar(require("./RunBudget.js"), exports);
107
108
  __exportStar(require("./RunTaskResponse.js"), exports);
108
109
  __exportStar(require("./SaveAssetRequestOut.js"), exports);
109
110
  __exportStar(require("./SemanticModelMetaResponseOut.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2161";
1
+ export declare const SDK_VERSION = "4.3.2163";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.2161";
4
+ exports.SDK_VERSION = "4.3.2163";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@athenaintel/sdk",
9
- "X-Fern-SDK-Version": "4.3.2161",
10
- "User-Agent": "@athenaintel/sdk/4.3.2161",
9
+ "X-Fern-SDK-Version": "4.3.2163",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2163",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -52,6 +52,10 @@ export declare class AopClient {
52
52
  * @example
53
53
  * await client.aop.execute({
54
54
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
55
+ * run_budget: {
56
+ * max_cost_usd: 30,
57
+ * max_model_calls: 80
58
+ * },
55
59
  * user_inputs: {
56
60
  * "company": "Acme Corp",
57
61
  * "quarter": "Q1 2024"
@@ -75,6 +79,10 @@ export declare class AopClient {
75
79
  * @example
76
80
  * await client.aop.executeAsync({
77
81
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
82
+ * run_budget: {
83
+ * max_cost_usd: 30,
84
+ * max_model_calls: 80
85
+ * },
78
86
  * user_inputs: {
79
87
  * "company": "Acme Corp",
80
88
  * "quarter": "Q1 2024"
@@ -138,6 +138,10 @@ export class AopClient {
138
138
  * @example
139
139
  * await client.aop.execute({
140
140
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
141
+ * run_budget: {
142
+ * max_cost_usd: 30,
143
+ * max_model_calls: 80
144
+ * },
141
145
  * user_inputs: {
142
146
  * "company": "Acme Corp",
143
147
  * "quarter": "Q1 2024"
@@ -229,6 +233,10 @@ export class AopClient {
229
233
  * @example
230
234
  * await client.aop.executeAsync({
231
235
  * asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
236
+ * run_budget: {
237
+ * max_cost_usd: 30,
238
+ * max_model_calls: 80
239
+ * },
232
240
  * user_inputs: {
233
241
  * "company": "Acme Corp",
234
242
  * "quarter": "Q1 2024"
@@ -1,3 +1,4 @@
1
+ import type * as AthenaIntelligence from "../index.mjs";
1
2
  /**
2
3
  * Request model for executing an AOP (Agent Operating Procedure).
3
4
  */
@@ -6,6 +7,8 @@ export interface AopExecuteRequestIn {
6
7
  asset_id: string;
7
8
  /** Execute the AOP in dry-run mode: the agent runs with its real prompt, config, and read-only tools, but side-effectful tool calls (emails, external writes) are validated and captured instead of executed. The session remains visible and is marked with athena_metadata.is_dry_run for UI badging. */
8
9
  dry_run?: boolean;
10
+ /** Optional spend cap for this execution: max_model_calls (top-level and sub-agent model calls) and/or max_cost_usd (provider cost at Athena's model pricing). When a limit is reached the run stops before the next model call, ends with athena_termination_reason=run_budget, and the AOP execution settles as not succeeded. Absent = no cap beyond the agent's step limit. */
11
+ run_budget?: AthenaIntelligence.RunBudget | null;
9
12
  /** Optional user inputs to append to the AOP's prompt as key-value pairs */
10
13
  user_inputs?: Record<string, string | null> | null;
11
14
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The most one execution may spend before the runtime stops it.
3
+ *
4
+ * Both limits are optional individually; at least one must be set. A limit
5
+ * that is reached ends the run: the model call that would exceed
6
+ * ``max_model_calls`` is never made, and neither is the first call after
7
+ * accumulated provider cost reaches ``max_cost_usd`` — or the call projected
8
+ * to cross it (a cost cap can be overshot by at most one call's variance,
9
+ * since the provider bills after the fact).
10
+ */
11
+ export interface RunBudget {
12
+ /** Maximum provider cost in USD this execution may accumulate, at Athena's in-house model pricing. The run stops before the model call that has reached, or is projected to cross, this amount; a single call can overshoot it by at most that call's cost. */
13
+ max_cost_usd?: number | null;
14
+ /** Maximum number of model calls (top-level and sub-agent) this execution may make. The run stops before the call that would exceed it. */
15
+ max_model_calls?: number | null;
16
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -88,6 +88,7 @@ export * from "./ReadCapabilitiesOut.mjs";
88
88
  export * from "./RedactedThinkingContent.mjs";
89
89
  export * from "./RenameAssetResponseOut.mjs";
90
90
  export * from "./RevokeSshAccessResponseOut.mjs";
91
+ export * from "./RunBudget.mjs";
91
92
  export * from "./RunTaskResponse.mjs";
92
93
  export * from "./SaveAssetRequestOut.mjs";
93
94
  export * from "./SemanticModelMetaResponseOut.mjs";
@@ -88,6 +88,7 @@ export * from "./ReadCapabilitiesOut.mjs";
88
88
  export * from "./RedactedThinkingContent.mjs";
89
89
  export * from "./RenameAssetResponseOut.mjs";
90
90
  export * from "./RevokeSshAccessResponseOut.mjs";
91
+ export * from "./RunBudget.mjs";
91
92
  export * from "./RunTaskResponse.mjs";
92
93
  export * from "./SaveAssetRequestOut.mjs";
93
94
  export * from "./SemanticModelMetaResponseOut.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2161";
1
+ export declare const SDK_VERSION = "4.3.2163";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2161";
1
+ export const SDK_VERSION = "4.3.2163";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2161",
3
+ "version": "4.3.2163",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -101,6 +101,10 @@ DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead f
101
101
  ```typescript
102
102
  await client.aop.execute({
103
103
  asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
104
+ run_budget: {
105
+ max_cost_usd: 30,
106
+ max_model_calls: 80
107
+ },
104
108
  user_inputs: {
105
109
  "company": "Acme Corp",
106
110
  "quarter": "Q1 2024"
@@ -170,6 +174,10 @@ Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Retu
170
174
  ```typescript
171
175
  await client.aop.executeAsync({
172
176
  asset_id: "asset_9249292-d118-42d3-95b4-00eccfe0754f",
177
+ run_budget: {
178
+ max_cost_usd: 30,
179
+ max_model_calls: 80
180
+ },
173
181
  user_inputs: {
174
182
  "company": "Acme Corp",
175
183
  "quarter": "Q1 2024"