@opengeni/worker-bundle 0.28.1-canary.0 → 0.28.3
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/dist/activities/agent-turn/model-usage.d.ts +1 -1
- package/dist/{activities-control-VVK7RA7F.js → activities-control-UXGPMDL3.js} +2 -2
- package/dist/{activities-turn-FOIZYY56.js → activities-turn-NOYDE7PX.js} +10 -5
- package/dist/activities-turn-NOYDE7PX.js.map +1 -0
- package/dist/{chunk-AKP6BKM2.js → chunk-NNXLW6V7.js} +3 -1
- package/dist/chunk-NNXLW6V7.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +17 -17
- package/src/activities/agent-turn/model-usage.ts +10 -1
- package/src/activities/agent-turn/stream-attempt.ts +2 -1
- package/src/activities/goals.ts +2 -0
- package/dist/activities-turn-FOIZYY56.js.map +0 -1
- package/dist/chunk-AKP6BKM2.js.map +0 -1
- /package/dist/{activities-control-VVK7RA7F.js.map → activities-control-UXGPMDL3.js.map} +0 -0
|
@@ -48,7 +48,7 @@ export type CompactionModelUsageEventState = {
|
|
|
48
48
|
export declare function createModelResponseEventState(claimedSourceKeys?: Set<string>): ModelResponseEventState;
|
|
49
49
|
export declare function createCompactionModelUsageEventState(claimedSourceKeys?: Set<string>): CompactionModelUsageEventState;
|
|
50
50
|
export declare const createSessionTitleModelUsageEventState: typeof createCompactionModelUsageEventState;
|
|
51
|
-
export declare function modelResponseContextSignal(state: ModelResponseEventState): {
|
|
51
|
+
export declare function modelResponseContextSignal(state: ModelResponseEventState, responseCountBeforeStream?: number): {
|
|
52
52
|
revision: number;
|
|
53
53
|
totalTokens: number;
|
|
54
54
|
} | null;
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
scheduledUserMessagePayload,
|
|
34
34
|
withFirstPartyTools,
|
|
35
35
|
workflowIdForSession
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-NNXLW6V7.js";
|
|
37
37
|
import {
|
|
38
38
|
inspectOpenSandboxKubernetesInventory,
|
|
39
39
|
recordCreditBalanceGauges,
|
|
@@ -10350,4 +10350,4 @@ export {
|
|
|
10350
10350
|
createControlActivities,
|
|
10351
10351
|
createControlActivitiesFromServices
|
|
10352
10352
|
};
|
|
10353
|
-
//# sourceMappingURL=activities-control-
|
|
10353
|
+
//# sourceMappingURL=activities-control-UXGPMDL3.js.map
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
withFirstPartyTools,
|
|
87
87
|
wrapLazyTurnBoxWithRouting,
|
|
88
88
|
wrapTurnBoxWithRouting
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-NNXLW6V7.js";
|
|
90
90
|
import {
|
|
91
91
|
StreamTimingMetrics,
|
|
92
92
|
makeMachineOpObserver,
|
|
@@ -5006,8 +5006,13 @@ function createCompactionModelUsageEventState(claimedSourceKeys = /* @__PURE__ *
|
|
|
5006
5006
|
return { usageCount: 0, claimedSourceKeys };
|
|
5007
5007
|
}
|
|
5008
5008
|
var createSessionTitleModelUsageEventState = createCompactionModelUsageEventState;
|
|
5009
|
-
function modelResponseContextSignal(state) {
|
|
5010
|
-
|
|
5009
|
+
function modelResponseContextSignal(state, responseCountBeforeStream = 0) {
|
|
5010
|
+
const signal = state.contextSignal;
|
|
5011
|
+
if (!signal || signal.revision <= responseCountBeforeStream) return null;
|
|
5012
|
+
return {
|
|
5013
|
+
revision: signal.revision - responseCountBeforeStream,
|
|
5014
|
+
totalTokens: signal.totalTokens
|
|
5015
|
+
};
|
|
5011
5016
|
}
|
|
5012
5017
|
function assertModelResponseLatencyMode(input) {
|
|
5013
5018
|
if (input.requested === "standard") {
|
|
@@ -8261,7 +8266,7 @@ async function runTurnStreamAttempt(deps) {
|
|
|
8261
8266
|
await toolResultSpill.materializeDeferred();
|
|
8262
8267
|
}
|
|
8263
8268
|
} : {},
|
|
8264
|
-
contextCompactionSignal: () => modelResponseContextSignal(modelResponseState),
|
|
8269
|
+
contextCompactionSignal: () => modelResponseContextSignal(modelResponseState, responseCountBeforeStream),
|
|
8265
8270
|
contextCompactionRequested: () => isSessionCompactionRequested(db, input.workspaceId, input.sessionId),
|
|
8266
8271
|
onModelPreparationPhase: (measurement) => {
|
|
8267
8272
|
recordTurnStartupPhase(observability, {
|
|
@@ -22046,4 +22051,4 @@ export {
|
|
|
22046
22051
|
createTurnActivities,
|
|
22047
22052
|
createTurnActivitiesFromServices
|
|
22048
22053
|
};
|
|
22049
|
-
//# sourceMappingURL=activities-turn-
|
|
22054
|
+
//# sourceMappingURL=activities-turn-NOYDE7PX.js.map
|