@opengeni/worker-bundle 1.0.1-canary.0 → 1.0.1-canary.2
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/sandbox-lease.d.ts +2 -1
- package/dist/{activities-control-O5U6OLT2.js → activities-control-FNC52DPR.js} +22 -9
- package/dist/activities-control-FNC52DPR.js.map +1 -0
- package/dist/{activities-turn-OAPNO2IH.js → activities-turn-TQ3D6UE2.js} +2 -2
- package/dist/{chunk-GENYJQ5B.js → chunk-ECDL2TV4.js} +2 -1
- package/dist/chunk-ECDL2TV4.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +19 -19
- package/src/activities/goals.ts +1 -0
- package/src/activities/sandbox-lease.ts +32 -7
- package/dist/activities-control-O5U6OLT2.js.map +0 -1
- package/dist/chunk-GENYJQ5B.js.map +0 -1
- /package/dist/{activities-turn-OAPNO2IH.js.map → activities-turn-TQ3D6UE2.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -784,7 +784,7 @@ function temporalWorkflowExecutionNotFound(error) {
|
|
|
784
784
|
return isGrpcServiceError(error) && error.code === 5;
|
|
785
785
|
}
|
|
786
786
|
async function createDefaultWorkerActivities(role, dependencies = {}) {
|
|
787
|
-
return role === "control" ? (await import("./activities-control-
|
|
787
|
+
return role === "control" ? (await import("./activities-control-FNC52DPR.js")).createControlActivities(dependencies) : (await import("./activities-turn-TQ3D6UE2.js")).createTurnActivities(dependencies);
|
|
788
788
|
}
|
|
789
789
|
function resolveOpenGeniWorkflowDefinition(moduleUrl = import.meta.url) {
|
|
790
790
|
const modulePath = fileURLToPath(moduleUrl).replaceAll("\\", "/");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/worker-bundle",
|
|
3
|
-
"version": "1.0.1-canary.
|
|
3
|
+
"version": "1.0.1-canary.2",
|
|
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,24 +54,24 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@llamaindex/liteparse": "2.14.2",
|
|
57
|
-
"@opengeni/agent-proto": "^0.6.0-canary.
|
|
58
|
-
"@opengeni/capabilities": "^0.3.4-canary.
|
|
59
|
-
"@opengeni/codemode": "^0.5.9-canary.
|
|
60
|
-
"@opengeni/codex": "^0.2.23-canary.
|
|
61
|
-
"@opengeni/config": "^1.2.2-canary.
|
|
62
|
-
"@opengeni/contracts": "^4.1.0-canary.
|
|
63
|
-
"@opengeni/core": "^3.0.1-canary.
|
|
64
|
-
"@opengeni/db": "^5.0.1-canary.
|
|
65
|
-
"@opengeni/documents": "^0.8.30-canary.
|
|
66
|
-
"@opengeni/events": "^0.4.28-canary.
|
|
67
|
-
"@opengeni/github": "^0.7.13-canary.
|
|
68
|
-
"@opengeni/network": "^0.3.1-canary.
|
|
69
|
-
"@opengeni/observability": "^0.8.29-canary.
|
|
70
|
-
"@opengeni/runtime": "^3.0.1-canary.
|
|
71
|
-
"@opengeni/sdk": "^6.1.0-canary.
|
|
72
|
-
"@opengeni/storage": "^0.2.130-canary.
|
|
73
|
-
"@opengeni/tool-gateway": "^0.1.10-canary.
|
|
74
|
-
"@opengeni/xai-subscription": "^0.1.4-canary.
|
|
57
|
+
"@opengeni/agent-proto": "^0.6.0-canary.7",
|
|
58
|
+
"@opengeni/capabilities": "^0.3.4-canary.2",
|
|
59
|
+
"@opengeni/codemode": "^0.5.9-canary.2",
|
|
60
|
+
"@opengeni/codex": "^0.2.23-canary.4",
|
|
61
|
+
"@opengeni/config": "^1.2.2-canary.2",
|
|
62
|
+
"@opengeni/contracts": "^4.1.0-canary.2",
|
|
63
|
+
"@opengeni/core": "^3.0.1-canary.2",
|
|
64
|
+
"@opengeni/db": "^5.0.1-canary.2",
|
|
65
|
+
"@opengeni/documents": "^0.8.30-canary.2",
|
|
66
|
+
"@opengeni/events": "^0.4.28-canary.2",
|
|
67
|
+
"@opengeni/github": "^0.7.13-canary.2",
|
|
68
|
+
"@opengeni/network": "^0.3.1-canary.19",
|
|
69
|
+
"@opengeni/observability": "^0.8.29-canary.2",
|
|
70
|
+
"@opengeni/runtime": "^3.0.1-canary.2",
|
|
71
|
+
"@opengeni/sdk": "^6.1.0-canary.2",
|
|
72
|
+
"@opengeni/storage": "^0.2.130-canary.2",
|
|
73
|
+
"@opengeni/tool-gateway": "^0.1.10-canary.2",
|
|
74
|
+
"@opengeni/xai-subscription": "^0.1.4-canary.19",
|
|
75
75
|
"@temporalio/activity": "^1.17.0",
|
|
76
76
|
"@temporalio/client": "^1.17.0",
|
|
77
77
|
"@temporalio/worker": "^1.17.0",
|
package/src/activities/goals.ts
CHANGED
|
@@ -308,6 +308,7 @@ export function goalContinuationPrompt(
|
|
|
308
308
|
"- For every explicit requirement, named artifact, command, test, gate, invariant, and deliverable, identify and inspect the authoritative evidence that would prove it.",
|
|
309
309
|
"- Match verification scope to requirement scope. Treat uncertain, indirect, incomplete, or missing evidence as not achieved and continue working.",
|
|
310
310
|
"- The audit must prove completion, not merely fail to find obvious remaining work.",
|
|
311
|
+
"- For user-facing report deliverables, including reports produced during another task, follow the Documents Skill: create the durable native document first, inspect its relevant final head after the last edit, and provide the returned artifact reference. Declare report requirements through the available goal tools before authoring and satisfy every persisted report requirement with verified artifact delivery evidence before completion. Sandbox paths and raw file IDs do not prove report delivery. If artifact tooling or access is unavailable, keep that deliverable incomplete and state the blocker; never invent proof or silently substitute a local report. Ordinary chat answers, short progress updates, source-code links, and explicitly requested local-file work remain outside this report contract.",
|
|
311
312
|
"",
|
|
312
313
|
"Do not rely on intent, partial progress, memory of earlier work, or a plausible final answer as proof of completion. Call opengeni__goal_complete with concrete evidence only when the full objective is actually achieved and no required work remains.",
|
|
313
314
|
"",
|
|
@@ -1160,18 +1160,14 @@ export async function reconcileConnectedMachineBackgroundCommands(
|
|
|
1160
1160
|
retryClock: defaultSelfhostedRetryClock,
|
|
1161
1161
|
journal: { attachGeneration: () => String(Date.now()), persistSettled: () => {} },
|
|
1162
1162
|
});
|
|
1163
|
-
|
|
1163
|
+
await replayConnectedCommandOutput(
|
|
1164
|
+
client,
|
|
1164
1165
|
claim.opId,
|
|
1165
|
-
proof
|
|
1166
|
+
Boolean(proof),
|
|
1166
1167
|
async (frames) => {
|
|
1167
1168
|
await captureConnectedCommandOutput(db, claim, bus)(claim.commandId, frames);
|
|
1168
1169
|
},
|
|
1169
1170
|
);
|
|
1170
|
-
if (proof && replay.status !== "completed" && !replay.terminal) {
|
|
1171
|
-
throw new Error(
|
|
1172
|
-
"Connected command terminal output replay has not reached its exit frontier",
|
|
1173
|
-
);
|
|
1174
|
-
}
|
|
1175
1171
|
}
|
|
1176
1172
|
if (!proof) {
|
|
1177
1173
|
await deferConnectedCommandClaim(
|
|
@@ -1250,6 +1246,35 @@ export async function reconcileConnectedMachineBackgroundCommands(
|
|
|
1250
1246
|
} while (Date.now() < deadline);
|
|
1251
1247
|
}
|
|
1252
1248
|
|
|
1249
|
+
export async function replayConnectedCommandOutput(
|
|
1250
|
+
client: Pick<OpStreamExecClient, "readExisting">,
|
|
1251
|
+
opId: string,
|
|
1252
|
+
terminalKnown: boolean,
|
|
1253
|
+
capture: Parameters<OpStreamExecClient["readExisting"]>[2],
|
|
1254
|
+
): Promise<void> {
|
|
1255
|
+
// A completed operation can need several bounded reads to replay its retained
|
|
1256
|
+
// frames. Keep the reader's integrity checkpoint until the exit is verified;
|
|
1257
|
+
// replacing it after each partial read would restart forever at frame one.
|
|
1258
|
+
let capturedThrough = 0n;
|
|
1259
|
+
while (true) {
|
|
1260
|
+
const before = capturedThrough;
|
|
1261
|
+
const replay = await client.readExisting(opId, terminalKnown ? 5_000 : 250, async (frames) => {
|
|
1262
|
+
await capture(frames);
|
|
1263
|
+
for (const frame of frames) {
|
|
1264
|
+
const sequence = BigInt(frame.sequence);
|
|
1265
|
+
if (sequence > capturedThrough) capturedThrough = sequence;
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
if (!terminalKnown || replay.status === "completed" || replay.terminal) return;
|
|
1269
|
+
// This is a finite terminal drain, not a poller for a running command.
|
|
1270
|
+
// Failed persistence, transport/integrity errors, and no-progress reads
|
|
1271
|
+
// return control to normal reconciliation without licensing settlement.
|
|
1272
|
+
if (capturedThrough === before) {
|
|
1273
|
+
throw new Error("Connected command terminal output replay has not reached its exit frontier");
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1253
1278
|
export async function probeConnectedMachineBackgroundCommand(
|
|
1254
1279
|
claim: ConnectedMachineBackgroundCommandClaim,
|
|
1255
1280
|
controlRpc: ControlRpc,
|