@theokit/sdk 2.1.0 → 2.2.0
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.
- package/CHANGELOG.md +10 -0
- package/dist/a2a/index.cjs +29 -3
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +29 -3
- package/dist/a2a/index.js.map +1 -1
- package/dist/{cron-CSTqNZp9.d.cts → cron-Aksw2Hy4.d.ts} +9 -1
- package/dist/{cron-Da6vF_2y.d.ts → cron-JSPSFczQ.d.cts} +9 -1
- package/dist/cron.cjs +31 -3
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +31 -3
- package/dist/cron.js.map +1 -1
- package/dist/{errors--VP2qrGc.d.ts → errors-Bcw_Pakm.d.ts} +1 -1
- package/dist/{errors-C9xkhNEF.d.cts → errors-Vhg6ZV4o.d.cts} +1 -1
- package/dist/errors.d.cts +2 -2
- package/dist/eval.cjs +31 -3
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +31 -3
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +31 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/agent-loop/loop-types.d.ts +6 -0
- package/dist/internal/runtime/budget/budget-tracker.d.ts +8 -0
- package/dist/{run-DrwUpFxZ.d.cts → run-ekGKZlmg.d.cts} +20 -0
- package/dist/{run-DrwUpFxZ.d.ts → run-ekGKZlmg.d.ts} +20 -0
- package/dist/types/run.d.ts +20 -0
- package/package.json +1 -1
|
@@ -26,4 +26,10 @@ export interface AgentLoopOutput {
|
|
|
26
26
|
* message (the previous bug — sdk-error-packaging-fix-plan).
|
|
27
27
|
*/
|
|
28
28
|
error?: AgentLoopErrorDetail;
|
|
29
|
+
/**
|
|
30
|
+
* M1-2 (T2.2): true when the loop stopped at its iteration ceiling with the
|
|
31
|
+
* model still wanting to call tools (silent truncation). Copied verbatim onto
|
|
32
|
+
* `RunResult.stoppedAtIterationLimit`.
|
|
33
|
+
*/
|
|
34
|
+
stoppedAtIterationLimit?: boolean;
|
|
29
35
|
}
|
|
@@ -70,4 +70,12 @@ export interface BudgetTracker {
|
|
|
70
70
|
check(): BudgetCheck;
|
|
71
71
|
/** Snapshot of accumulated totals (for telemetry / final reporting). */
|
|
72
72
|
getTotal(): BudgetTotal;
|
|
73
|
+
/**
|
|
74
|
+
* Advance the iteration counter by one. Called by the agent loop ONCE per
|
|
75
|
+
* completed turn (M1-1) so that trackers which gate on `maxIterations`
|
|
76
|
+
* (e.g. `createCounterBudgetTracker`) actually halt. OPTIONAL: trackers that
|
|
77
|
+
* only gate on tokens/USD omit it and the loop no-ops via optional chaining.
|
|
78
|
+
* MUST be synchronous and non-throwing.
|
|
79
|
+
*/
|
|
80
|
+
nextIteration?(): void;
|
|
73
81
|
}
|
|
@@ -677,6 +677,16 @@ interface RunResult {
|
|
|
677
677
|
* @public
|
|
678
678
|
*/
|
|
679
679
|
cost?: CostBreakdown;
|
|
680
|
+
/**
|
|
681
|
+
* M1-2: `true` when the run stopped because the agent loop hit its iteration
|
|
682
|
+
* ceiling (`SendOptions.maxIterations` or the default of 8) while the model
|
|
683
|
+
* still wanted to call tools — i.e. the work was silently truncated rather
|
|
684
|
+
* than finished. `undefined`/absent on a clean finish. A continuation driver
|
|
685
|
+
* (or a careful caller) inspects this to decide whether to send again.
|
|
686
|
+
*
|
|
687
|
+
* @public
|
|
688
|
+
*/
|
|
689
|
+
stoppedAtIterationLimit?: boolean;
|
|
680
690
|
}
|
|
681
691
|
/**
|
|
682
692
|
* Structured error attached to a {@link RunResult} when the underlying run
|
|
@@ -789,6 +799,16 @@ interface SendOptions {
|
|
|
789
799
|
id?: string;
|
|
790
800
|
meta?: Record<string, unknown>;
|
|
791
801
|
};
|
|
802
|
+
/**
|
|
803
|
+
* Per-send ceiling on the agent loop's tool-calling turns (M1-2). Raises (or
|
|
804
|
+
* lowers) the default cap of 8 for this single send — useful when one heavy
|
|
805
|
+
* task needs more rounds than the agent's default. Must be a positive
|
|
806
|
+
* integer; invalid values throw `ConfigurationError` at the boundary. When
|
|
807
|
+
* unset, the loop uses the default of 8.
|
|
808
|
+
*
|
|
809
|
+
* @public
|
|
810
|
+
*/
|
|
811
|
+
maxIterations?: number;
|
|
792
812
|
}
|
|
793
813
|
/**
|
|
794
814
|
* Handle to a single prompt submission.
|
|
@@ -677,6 +677,16 @@ interface RunResult {
|
|
|
677
677
|
* @public
|
|
678
678
|
*/
|
|
679
679
|
cost?: CostBreakdown;
|
|
680
|
+
/**
|
|
681
|
+
* M1-2: `true` when the run stopped because the agent loop hit its iteration
|
|
682
|
+
* ceiling (`SendOptions.maxIterations` or the default of 8) while the model
|
|
683
|
+
* still wanted to call tools — i.e. the work was silently truncated rather
|
|
684
|
+
* than finished. `undefined`/absent on a clean finish. A continuation driver
|
|
685
|
+
* (or a careful caller) inspects this to decide whether to send again.
|
|
686
|
+
*
|
|
687
|
+
* @public
|
|
688
|
+
*/
|
|
689
|
+
stoppedAtIterationLimit?: boolean;
|
|
680
690
|
}
|
|
681
691
|
/**
|
|
682
692
|
* Structured error attached to a {@link RunResult} when the underlying run
|
|
@@ -789,6 +799,16 @@ interface SendOptions {
|
|
|
789
799
|
id?: string;
|
|
790
800
|
meta?: Record<string, unknown>;
|
|
791
801
|
};
|
|
802
|
+
/**
|
|
803
|
+
* Per-send ceiling on the agent loop's tool-calling turns (M1-2). Raises (or
|
|
804
|
+
* lowers) the default cap of 8 for this single send — useful when one heavy
|
|
805
|
+
* task needs more rounds than the agent's default. Must be a positive
|
|
806
|
+
* integer; invalid values throw `ConfigurationError` at the boundary. When
|
|
807
|
+
* unset, the loop uses the default of 8.
|
|
808
|
+
*
|
|
809
|
+
* @public
|
|
810
|
+
*/
|
|
811
|
+
maxIterations?: number;
|
|
792
812
|
}
|
|
793
813
|
/**
|
|
794
814
|
* Handle to a single prompt submission.
|
package/dist/types/run.d.ts
CHANGED
|
@@ -71,6 +71,16 @@ export interface RunResult {
|
|
|
71
71
|
* @public
|
|
72
72
|
*/
|
|
73
73
|
cost?: CostBreakdown;
|
|
74
|
+
/**
|
|
75
|
+
* M1-2: `true` when the run stopped because the agent loop hit its iteration
|
|
76
|
+
* ceiling (`SendOptions.maxIterations` or the default of 8) while the model
|
|
77
|
+
* still wanted to call tools — i.e. the work was silently truncated rather
|
|
78
|
+
* than finished. `undefined`/absent on a clean finish. A continuation driver
|
|
79
|
+
* (or a careful caller) inspects this to decide whether to send again.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
stoppedAtIterationLimit?: boolean;
|
|
74
84
|
}
|
|
75
85
|
/**
|
|
76
86
|
* Structured error attached to a {@link RunResult} when the underlying run
|
|
@@ -183,6 +193,16 @@ export interface SendOptions {
|
|
|
183
193
|
id?: string;
|
|
184
194
|
meta?: Record<string, unknown>;
|
|
185
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Per-send ceiling on the agent loop's tool-calling turns (M1-2). Raises (or
|
|
198
|
+
* lowers) the default cap of 8 for this single send — useful when one heavy
|
|
199
|
+
* task needs more rounds than the agent's default. Must be a positive
|
|
200
|
+
* integer; invalid values throw `ConfigurationError` at the boundary. When
|
|
201
|
+
* unset, the loop uses the default of 8.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
maxIterations?: number;
|
|
186
206
|
}
|
|
187
207
|
/**
|
|
188
208
|
* Handle to a single prompt submission.
|
package/package.json
CHANGED