@opengeni/worker-bundle 0.22.0-canary.0 → 0.22.4-canary.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/dist/activities/agent-turn/agent-build.d.ts +1 -0
- package/dist/activities/agent-turn/sandbox-establish.d.ts +1 -0
- package/dist/activities/agent-turn/session-title.d.ts +24 -0
- package/dist/activities/agent-turn/tool-environment.d.ts +1 -0
- package/dist/activities/agent-turn/tool-policy.d.ts +2 -1
- package/dist/activities/incident-telemetry-authority.d.ts +1 -0
- package/dist/activities/parent-wake.d.ts +25 -2
- package/dist/activities/rig-verification.d.ts +22 -7
- package/dist/activities/scheduled-tasks.d.ts +49 -3
- package/dist/{activities-control-DKG22ONJ.js → activities-control-4XVBA3Q5.js} +168 -70
- package/dist/activities-control-4XVBA3Q5.js.map +1 -0
- package/dist/activities-control.d.ts +16 -12
- package/dist/{activities-turn-4IMC3MAA.js → activities-turn-J3CR27E6.js} +164 -44
- package/dist/activities-turn-J3CR27E6.js.map +1 -0
- package/dist/activities.d.ts +16 -12
- package/dist/{chunk-CE7TPKBS.js → chunk-FA35XBBC.js} +3 -3
- package/dist/{chunk-CE7TPKBS.js.map → chunk-FA35XBBC.js.map} +1 -1
- package/dist/{chunk-CNYGVRKF.js → chunk-XWQPS6GG.js} +76 -17
- package/dist/chunk-XWQPS6GG.js.map +1 -0
- package/dist/http.d.ts +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +17 -17
- package/src/activities/agent-turn/agent-build.ts +8 -6
- package/src/activities/agent-turn/governance-model.ts +13 -15
- package/src/activities/agent-turn/run.ts +3 -0
- package/src/activities/agent-turn/sandbox-establish.ts +6 -1
- package/src/activities/agent-turn/session-title.ts +106 -0
- package/src/activities/agent-turn/tool-environment.ts +68 -19
- package/src/activities/agent-turn/tool-policy.ts +5 -2
- package/src/activities/incident-telemetry-authority.ts +7 -0
- package/src/activities/parent-wake.ts +65 -1
- package/src/activities/rig-verification.ts +156 -47
- package/src/activities/scheduled-tasks.ts +38 -35
- package/src/activities/workflow-wake.ts +30 -9
- package/src/http.ts +2 -1
- package/src/index.ts +6 -1
- package/src/observability-metrics.ts +2 -2
- package/src/pr-review-credentials.ts +42 -14
- package/dist/activities-control-DKG22ONJ.js.map +0 -1
- package/dist/activities-turn-4IMC3MAA.js.map +0 -1
- package/dist/chunk-CNYGVRKF.js.map +0 -1
package/dist/http.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Settings } from "@opengeni/config";
|
|
2
2
|
import { type Database, type RuntimeDatabasePostureOptions } from "@opengeni/db";
|
|
3
|
-
import type
|
|
3
|
+
import { type EventBus } from "@opengeni/events";
|
|
4
4
|
import type { Observability } from "@opengeni/observability";
|
|
5
5
|
export type ReadinessCheckName = "db" | "nats" | "temporal";
|
|
6
6
|
export type ReadinessChecks = Record<ReadinessCheckName, () => Promise<void> | void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -123,6 +123,12 @@ export declare function createDefaultWorkerActivities(role: OpenGeniWorkerRole,
|
|
|
123
123
|
startedAt?: string | undefined;
|
|
124
124
|
finishedAt?: string | undefined;
|
|
125
125
|
log?: string | undefined;
|
|
126
|
+
platformCheckResults?: {
|
|
127
|
+
name: string;
|
|
128
|
+
command: string;
|
|
129
|
+
exitCode: number | null;
|
|
130
|
+
output?: string | undefined;
|
|
131
|
+
}[] | undefined;
|
|
126
132
|
checkResults?: {
|
|
127
133
|
name: string;
|
|
128
134
|
command: string;
|
|
@@ -140,12 +146,8 @@ export declare function createDefaultWorkerActivities(role: OpenGeniWorkerRole,
|
|
|
140
146
|
}) => Promise<{
|
|
141
147
|
versionId: string;
|
|
142
148
|
passed: boolean;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
output: string;
|
|
146
|
-
name: string;
|
|
147
|
-
command: string;
|
|
148
|
-
}[];
|
|
149
|
+
platformCheckResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
150
|
+
checkResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
149
151
|
providerImage: {
|
|
150
152
|
backend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "opensandbox" | "runloop" | "selfhosted" | "vercel";
|
|
151
153
|
provider: string;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
normalizeTurnTaskQueueStats,
|
|
16
16
|
observabilityEventLogger,
|
|
17
17
|
startTurnCapacityMonitor
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FA35XBBC.js";
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
import {
|
|
@@ -31,7 +31,10 @@ import {
|
|
|
31
31
|
createDb,
|
|
32
32
|
markSessionWorkflowWakeDelivered
|
|
33
33
|
} from "@opengeni/db";
|
|
34
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
createNatsEventBus,
|
|
36
|
+
requireSessionEventDurableFanoutCapability as requireSessionEventDurableFanoutCapability2
|
|
37
|
+
} from "@opengeni/events";
|
|
35
38
|
import {
|
|
36
39
|
createObservability,
|
|
37
40
|
logStartupDependencyRetry
|
|
@@ -116,6 +119,7 @@ import {
|
|
|
116
119
|
assertRuntimeDatabasePosture,
|
|
117
120
|
dbSql
|
|
118
121
|
} from "@opengeni/db";
|
|
122
|
+
import { requireSessionEventDurableFanoutCapability } from "@opengeni/events";
|
|
119
123
|
function createWorkerHttpHandler(input) {
|
|
120
124
|
const { settings, observability, checks, lifecycle } = input;
|
|
121
125
|
const timeoutMs = input.timeoutMs ?? 2e3;
|
|
@@ -205,6 +209,7 @@ function dbReadyCheck(db, posture) {
|
|
|
205
209
|
}
|
|
206
210
|
function natsReadyCheck(bus) {
|
|
207
211
|
return () => {
|
|
212
|
+
requireSessionEventDurableFanoutCapability(bus);
|
|
208
213
|
if (bus.isConnected && !bus.isConnected()) {
|
|
209
214
|
throw new Error("NATS is not connected");
|
|
210
215
|
}
|
|
@@ -735,7 +740,7 @@ function temporalWorkflowExecutionNotFound(error) {
|
|
|
735
740
|
return isGrpcServiceError(error) && error.code === 5;
|
|
736
741
|
}
|
|
737
742
|
async function createDefaultWorkerActivities(role, dependencies = {}) {
|
|
738
|
-
return role === "control" ? (await import("./activities-control-
|
|
743
|
+
return role === "control" ? (await import("./activities-control-4XVBA3Q5.js")).createControlActivities(dependencies) : (await import("./activities-turn-J3CR27E6.js")).createTurnActivities(dependencies);
|
|
739
744
|
}
|
|
740
745
|
function resolveOpenGeniWorkflowDefinition(moduleUrl = import.meta.url) {
|
|
741
746
|
const modulePath = fileURLToPath(moduleUrl).replaceAll("\\", "/");
|
|
@@ -1175,6 +1180,7 @@ function workerOwnsInternalSchedules(role, policy = "role-default") {
|
|
|
1175
1180
|
return role === "control" && policy !== "none";
|
|
1176
1181
|
}
|
|
1177
1182
|
async function createOpenGeniWorkerService(options) {
|
|
1183
|
+
requireSessionEventDurableFanoutCapability2(options.activityDependencies.bus);
|
|
1178
1184
|
const settings = options.settings ?? getSettings();
|
|
1179
1185
|
const observability = options.activityDependencies.observability ?? createObservability(settings, { component: `worker-${options.role}` });
|
|
1180
1186
|
const retryOptions = startupRetryOptions(settings);
|