@tangle-network/agent-interface 0.47.0 → 0.49.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/README.md +4 -0
- package/dist/agent-candidate-execution-plan-schema.d.ts +4 -0
- package/dist/agent-candidate-execution-plan-schema.js +1 -0
- package/dist/agent-candidate-outcome-schema.d.ts +7 -0
- package/dist/agent-candidate-outcome-schema.js +20 -1
- package/dist/agent-candidate-profile-schema.d.ts +3 -0
- package/dist/agent-candidate-profile-schema.js +4 -3
- package/dist/agent-candidate-promotion-schema.d.ts +58 -0
- package/dist/agent-candidate-receipt-schema.d.ts +6 -0
- package/dist/agent-candidate-schema-common.js +10 -1
- package/dist/agent-candidate-schema.d.ts +3 -0
- package/dist/agent-candidate-task-schema.d.ts +4 -0
- package/dist/agent-candidate.d.ts +7 -0
- package/dist/agent-execution-limits.js +10 -0
- package/dist/agent-profile-improvement-schema.d.ts +10 -0
- package/dist/agent-profile.d.ts +18 -0
- package/dist/environment-observation.d.ts +1076 -0
- package/dist/environment-observation.js +306 -0
- package/dist/environment-provider.d.ts +2 -0
- package/dist/environment-provider.js +2 -0
- package/dist/environment-runtime.d.ts +50 -0
- package/dist/environment-runtime.js +31 -0
- package/dist/environment-terminal.d.ts +172 -0
- package/dist/environment-terminal.js +162 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction-data.js +21 -2
- package/dist/interaction-fields.d.ts +7 -0
- package/dist/interaction-fields.js +12 -2
- package/dist/interaction-response-validation.js +2 -2
- package/dist/profile-schema.d.ts +34 -0
- package/dist/profile-schema.js +33 -1
- package/package.json +36 -1
|
@@ -150,6 +150,7 @@ export declare const agentCandidateBenchmarkTaskMaterialSchema: z.ZodObject<{
|
|
|
150
150
|
maxModelCalls: z.ZodNumber;
|
|
151
151
|
maxInputTokens: z.ZodNumber;
|
|
152
152
|
maxOutputTokens: z.ZodNumber;
|
|
153
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
153
154
|
maxCostUsd: z.ZodNumber;
|
|
154
155
|
}, z.core.$strict>;
|
|
155
156
|
}, z.core.$strict>;
|
|
@@ -304,6 +305,7 @@ export declare const agentCandidateBenchmarkTaskSchema: z.ZodObject<{
|
|
|
304
305
|
maxModelCalls: z.ZodNumber;
|
|
305
306
|
maxInputTokens: z.ZodNumber;
|
|
306
307
|
maxOutputTokens: z.ZodNumber;
|
|
308
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
307
309
|
maxCostUsd: z.ZodNumber;
|
|
308
310
|
}, z.core.$strict>;
|
|
309
311
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -482,6 +484,7 @@ export declare const agentCandidateBenchmarkSuiteInputsSchema: z.ZodObject<{
|
|
|
482
484
|
maxModelCalls: z.ZodNumber;
|
|
483
485
|
maxInputTokens: z.ZodNumber;
|
|
484
486
|
maxOutputTokens: z.ZodNumber;
|
|
487
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
485
488
|
maxCostUsd: z.ZodNumber;
|
|
486
489
|
}, z.core.$strict>;
|
|
487
490
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -635,6 +638,7 @@ export declare const agentCandidateBenchmarkSuiteInputsSchema: z.ZodObject<{
|
|
|
635
638
|
maxModelCalls: z.ZodNumber;
|
|
636
639
|
maxInputTokens: z.ZodNumber;
|
|
637
640
|
maxOutputTokens: z.ZodNumber;
|
|
641
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
638
642
|
maxCostUsd: z.ZodNumber;
|
|
639
643
|
}, z.core.$strict>;
|
|
640
644
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -402,6 +402,8 @@ export interface AgentCandidateExecutionLimits {
|
|
|
402
402
|
maxModelCalls: number;
|
|
403
403
|
maxInputTokens: number;
|
|
404
404
|
maxOutputTokens: number;
|
|
405
|
+
/** Optional aggregate cap over accounted input and output tokens. */
|
|
406
|
+
maxTotalTokens?: number;
|
|
405
407
|
/** Total agent plus grading spend for one complete arm. */
|
|
406
408
|
maxCostUsd: number;
|
|
407
409
|
}
|
|
@@ -924,6 +926,8 @@ export interface AgentCandidateModelSettlementCall {
|
|
|
924
926
|
startedAtMs: number;
|
|
925
927
|
endedAtMs: number;
|
|
926
928
|
inputTokens: number;
|
|
929
|
+
/** Input plus cache units charged against the frozen input cap. */
|
|
930
|
+
accountedInputTokens: number;
|
|
927
931
|
outputTokens: number;
|
|
928
932
|
cachedInputTokens: number;
|
|
929
933
|
reasoningTokens: number;
|
|
@@ -937,8 +941,11 @@ export interface AgentCandidateModelSettlementMaterial {
|
|
|
937
941
|
preparationId: string;
|
|
938
942
|
grantDigest: Sha256Digest;
|
|
939
943
|
closed: true;
|
|
944
|
+
/** Router's terminal check over the frozen model limits. */
|
|
945
|
+
usageWithinLimits: boolean;
|
|
940
946
|
resolved: AgentCandidateResolvedModel;
|
|
941
947
|
calls: AgentCandidateModelSettlementCall[];
|
|
948
|
+
/** `inputTokens` is the sum of each call's accounted input tokens. */
|
|
942
949
|
usage: AgentCandidateFixedSpend;
|
|
943
950
|
}
|
|
944
951
|
export interface AgentCandidateModelSettlementEvidence {
|
|
@@ -66,6 +66,16 @@ function executionLimitViolations(limits, observation) {
|
|
|
66
66
|
actual: observation.usage.outputTokens,
|
|
67
67
|
maximum: limits.maxOutputTokens,
|
|
68
68
|
},
|
|
69
|
+
...(limits.maxTotalTokens === undefined
|
|
70
|
+
? []
|
|
71
|
+
: [
|
|
72
|
+
{
|
|
73
|
+
path: ["usage", "totalTokens"],
|
|
74
|
+
label: "totalTokens",
|
|
75
|
+
actual: observation.usage.inputTokens + observation.usage.outputTokens,
|
|
76
|
+
maximum: limits.maxTotalTokens,
|
|
77
|
+
},
|
|
78
|
+
]),
|
|
69
79
|
{
|
|
70
80
|
path: ["usage", "costUsdNanos"],
|
|
71
81
|
label: "costUsd",
|
|
@@ -49,6 +49,7 @@ export declare const agentProfileImprovementTaskSchema: z.ZodObject<{
|
|
|
49
49
|
maxModelCalls: z.ZodNumber;
|
|
50
50
|
maxInputTokens: z.ZodNumber;
|
|
51
51
|
maxOutputTokens: z.ZodNumber;
|
|
52
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
52
53
|
maxCostUsd: z.ZodNumber;
|
|
53
54
|
}, z.core.$strict>;
|
|
54
55
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -120,6 +121,7 @@ export declare const agentProfileImprovementSuiteInputsSchema: z.ZodObject<{
|
|
|
120
121
|
maxModelCalls: z.ZodNumber;
|
|
121
122
|
maxInputTokens: z.ZodNumber;
|
|
122
123
|
maxOutputTokens: z.ZodNumber;
|
|
124
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
123
125
|
maxCostUsd: z.ZodNumber;
|
|
124
126
|
}, z.core.$strict>;
|
|
125
127
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -171,6 +173,7 @@ export declare const agentProfileImprovementSuiteInputsSchema: z.ZodObject<{
|
|
|
171
173
|
maxModelCalls: z.ZodNumber;
|
|
172
174
|
maxInputTokens: z.ZodNumber;
|
|
173
175
|
maxOutputTokens: z.ZodNumber;
|
|
176
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
174
177
|
maxCostUsd: z.ZodNumber;
|
|
175
178
|
}, z.core.$strict>;
|
|
176
179
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -301,6 +304,7 @@ export declare const agentProfileImprovementExperimentSchema: z.ZodObject<{
|
|
|
301
304
|
maxModelCalls: z.ZodNumber;
|
|
302
305
|
maxInputTokens: z.ZodNumber;
|
|
303
306
|
maxOutputTokens: z.ZodNumber;
|
|
307
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
304
308
|
maxCostUsd: z.ZodNumber;
|
|
305
309
|
}, z.core.$strict>;
|
|
306
310
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -352,6 +356,7 @@ export declare const agentProfileImprovementExperimentSchema: z.ZodObject<{
|
|
|
352
356
|
maxModelCalls: z.ZodNumber;
|
|
353
357
|
maxInputTokens: z.ZodNumber;
|
|
354
358
|
maxOutputTokens: z.ZodNumber;
|
|
359
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
355
360
|
maxCostUsd: z.ZodNumber;
|
|
356
361
|
}, z.core.$strict>;
|
|
357
362
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -451,6 +456,7 @@ export declare const agentProfileImprovementRunReceiptSchema: z.ZodObject<{
|
|
|
451
456
|
maxModelCalls: z.ZodNumber;
|
|
452
457
|
maxInputTokens: z.ZodNumber;
|
|
453
458
|
maxOutputTokens: z.ZodNumber;
|
|
459
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
454
460
|
maxCostUsd: z.ZodNumber;
|
|
455
461
|
}, z.core.$strict>;
|
|
456
462
|
usage: z.ZodObject<{
|
|
@@ -830,6 +836,7 @@ export declare const agentProfileImprovementMeasuredComparisonSchema: z.ZodObjec
|
|
|
830
836
|
maxModelCalls: z.ZodNumber;
|
|
831
837
|
maxInputTokens: z.ZodNumber;
|
|
832
838
|
maxOutputTokens: z.ZodNumber;
|
|
839
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
833
840
|
maxCostUsd: z.ZodNumber;
|
|
834
841
|
}, z.core.$strict>;
|
|
835
842
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -881,6 +888,7 @@ export declare const agentProfileImprovementMeasuredComparisonSchema: z.ZodObjec
|
|
|
881
888
|
maxModelCalls: z.ZodNumber;
|
|
882
889
|
maxInputTokens: z.ZodNumber;
|
|
883
890
|
maxOutputTokens: z.ZodNumber;
|
|
891
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
884
892
|
maxCostUsd: z.ZodNumber;
|
|
885
893
|
}, z.core.$strict>;
|
|
886
894
|
digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
@@ -965,6 +973,7 @@ export declare const agentProfileImprovementMeasuredComparisonSchema: z.ZodObjec
|
|
|
965
973
|
maxModelCalls: z.ZodNumber;
|
|
966
974
|
maxInputTokens: z.ZodNumber;
|
|
967
975
|
maxOutputTokens: z.ZodNumber;
|
|
976
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
968
977
|
maxCostUsd: z.ZodNumber;
|
|
969
978
|
}, z.core.$strict>;
|
|
970
979
|
usage: z.ZodObject<{
|
|
@@ -1117,6 +1126,7 @@ export declare const agentProfileImprovementMeasuredComparisonSchema: z.ZodObjec
|
|
|
1117
1126
|
maxModelCalls: z.ZodNumber;
|
|
1118
1127
|
maxInputTokens: z.ZodNumber;
|
|
1119
1128
|
maxOutputTokens: z.ZodNumber;
|
|
1129
|
+
maxTotalTokens: z.ZodOptional<z.ZodNumber>;
|
|
1120
1130
|
maxCostUsd: z.ZodNumber;
|
|
1121
1131
|
}, z.core.$strict>;
|
|
1122
1132
|
usage: z.ZodObject<{
|
package/dist/agent-profile.d.ts
CHANGED
|
@@ -122,8 +122,26 @@ export interface AgentProfileModelHints {
|
|
|
122
122
|
/**
|
|
123
123
|
* Reasoning/thinking effort hint — a first-class, portable model dimension (not buried in
|
|
124
124
|
* `extensions`). Backends map it to their native control at materialization.
|
|
125
|
+
*
|
|
126
|
+
* This is a quality dial, not a spend limit. It never bounds token count.
|
|
125
127
|
*/
|
|
126
128
|
reasoningEffort?: ReasoningEffort;
|
|
129
|
+
/**
|
|
130
|
+
* Maximum visible answer tokens a backend may bill for one completion.
|
|
131
|
+
* A positive integer. Independent of the reasoning and total ceilings.
|
|
132
|
+
*/
|
|
133
|
+
maxVisibleOutputTokens?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Maximum hidden reasoning tokens a backend may bill for one completion.
|
|
136
|
+
* A positive integer, separate from visible answer tokens.
|
|
137
|
+
*/
|
|
138
|
+
maxReasoningTokens?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Maximum total billed completion tokens for visible answer and hidden
|
|
141
|
+
* reasoning tokens together. A positive integer. When it is set with either
|
|
142
|
+
* single ceiling, that single ceiling must not exceed it.
|
|
143
|
+
*/
|
|
144
|
+
maxTotalOutputTokens?: number;
|
|
127
145
|
/**
|
|
128
146
|
* Backend-agnostic model metadata/hints.
|
|
129
147
|
*/
|