@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
package/dist/index.js
CHANGED
|
@@ -781,7 +781,7 @@ function temporalWorkflowExecutionNotFound(error) {
|
|
|
781
781
|
return isGrpcServiceError(error) && error.code === 5;
|
|
782
782
|
}
|
|
783
783
|
async function createDefaultWorkerActivities(role, dependencies = {}) {
|
|
784
|
-
return role === "control" ? (await import("./activities-control-
|
|
784
|
+
return role === "control" ? (await import("./activities-control-UXGPMDL3.js")).createControlActivities(dependencies) : (await import("./activities-turn-NOYDE7PX.js")).createTurnActivities(dependencies);
|
|
785
785
|
}
|
|
786
786
|
function resolveOpenGeniWorkflowDefinition(moduleUrl = import.meta.url) {
|
|
787
787
|
const modulePath = fileURLToPath(moduleUrl).replaceAll("\\", "/");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/worker-bundle",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "OpenGeni worker entry and reusable embedded lifecycle, shipped with a release-coherent pre-bundled Temporal workflow artifact.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -54,22 +54,22 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@llamaindex/liteparse": "2.14.2",
|
|
57
|
-
"@opengeni/agent-proto": "^0.5.1
|
|
58
|
-
"@opengeni/capabilities": "^0.3.3
|
|
59
|
-
"@opengeni/codemode": "^0.5.
|
|
60
|
-
"@opengeni/codex": "^0.2.22
|
|
61
|
-
"@opengeni/config": "^1.1.
|
|
62
|
-
"@opengeni/contracts": "^3.0.
|
|
63
|
-
"@opengeni/core": "^2.9.
|
|
64
|
-
"@opengeni/db": "^4.3.
|
|
65
|
-
"@opengeni/documents": "^0.8.
|
|
66
|
-
"@opengeni/events": "^0.4.
|
|
67
|
-
"@opengeni/github": "^0.7.
|
|
68
|
-
"@opengeni/network": "^0.3.1
|
|
69
|
-
"@opengeni/observability": "^0.8.
|
|
70
|
-
"@opengeni/runtime": "^2.5.
|
|
71
|
-
"@opengeni/storage": "^0.2.
|
|
72
|
-
"@opengeni/xai-subscription": "^0.1.4
|
|
57
|
+
"@opengeni/agent-proto": "^0.5.1",
|
|
58
|
+
"@opengeni/capabilities": "^0.3.3",
|
|
59
|
+
"@opengeni/codemode": "^0.5.5",
|
|
60
|
+
"@opengeni/codex": "^0.2.22",
|
|
61
|
+
"@opengeni/config": "^1.1.1",
|
|
62
|
+
"@opengeni/contracts": "^3.0.1",
|
|
63
|
+
"@opengeni/core": "^2.9.3",
|
|
64
|
+
"@opengeni/db": "^4.3.2",
|
|
65
|
+
"@opengeni/documents": "^0.8.26",
|
|
66
|
+
"@opengeni/events": "^0.4.24",
|
|
67
|
+
"@opengeni/github": "^0.7.9",
|
|
68
|
+
"@opengeni/network": "^0.3.1",
|
|
69
|
+
"@opengeni/observability": "^0.8.25",
|
|
70
|
+
"@opengeni/runtime": "^2.5.2",
|
|
71
|
+
"@opengeni/storage": "^0.2.126",
|
|
72
|
+
"@opengeni/xai-subscription": "^0.1.4",
|
|
73
73
|
"@temporalio/activity": "^1.17.0",
|
|
74
74
|
"@temporalio/client": "^1.17.0",
|
|
75
75
|
"@temporalio/worker": "^1.17.0",
|
|
@@ -129,8 +129,17 @@ export const createSessionTitleModelUsageEventState = createCompactionModelUsage
|
|
|
129
129
|
|
|
130
130
|
export function modelResponseContextSignal(
|
|
131
131
|
state: ModelResponseEventState,
|
|
132
|
+
responseCountBeforeStream = 0,
|
|
132
133
|
): { revision: number; totalTokens: number } | null {
|
|
133
|
-
|
|
134
|
+
const signal = state.contextSignal;
|
|
135
|
+
// A compaction retry creates a new SDK request counter, but usage identities
|
|
136
|
+
// remain activity-wide. Never bind a pre-stream report to a reused request
|
|
137
|
+
// ordinal; translate only this stream's reports without mutating usage state.
|
|
138
|
+
if (!signal || signal.revision <= responseCountBeforeStream) return null;
|
|
139
|
+
return {
|
|
140
|
+
revision: signal.revision - responseCountBeforeStream,
|
|
141
|
+
totalTokens: signal.totalTokens,
|
|
142
|
+
};
|
|
134
143
|
}
|
|
135
144
|
|
|
136
145
|
export function assertModelResponseLatencyMode(input: {
|
|
@@ -865,7 +865,8 @@ export async function runTurnStreamAttempt(
|
|
|
865
865
|
},
|
|
866
866
|
}
|
|
867
867
|
: {}),
|
|
868
|
-
contextCompactionSignal: () =>
|
|
868
|
+
contextCompactionSignal: () =>
|
|
869
|
+
modelResponseContextSignal(modelResponseState, responseCountBeforeStream),
|
|
869
870
|
contextCompactionRequested: () =>
|
|
870
871
|
isSessionCompactionRequested(db, input.workspaceId, input.sessionId),
|
|
871
872
|
onModelPreparationPhase: (measurement) => {
|
package/src/activities/goals.ts
CHANGED
|
@@ -286,6 +286,8 @@ export function goalContinuationPrompt(
|
|
|
286
286
|
"Continuation behavior:",
|
|
287
287
|
"- This goal persists across turns. A runtime boundary can end one turn without shrinking the objective; the next continuation resumes the same full objective.",
|
|
288
288
|
"- Keep working until the requested end state is true and verified. Do not end the turn merely because one useful action completed, and do not redefine success around a smaller or easier task.",
|
|
289
|
+
"- An incomplete-status report is not a substitute for continuing the work. If the remaining problem can be investigated or addressed within your current authority, continue that work in this turn rather than returning another equivalent status-only final.",
|
|
290
|
+
"- Distinguish unfinished work from a blocker that actually requires human input or external change; use the existing waiting and blocked audits only when their conditions hold.",
|
|
289
291
|
"- Temporary rough edges are acceptable while the work is moving in the right direction. Completion still requires the requested end state to be true and verified.",
|
|
290
292
|
"",
|
|
291
293
|
"Work from evidence:",
|