@opengeni/worker-bundle 3.2.2 → 3.3.1-canary.38922642121001
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/admission.d.ts +1 -1
- package/dist/{activities-control-LC7WXEIX.js → activities-control-G2W4FEFP.js} +4 -4
- package/dist/{activities-turn-PEDPUZI4.js → activities-turn-CE2VIWIS.js} +4 -3
- package/dist/{activities-turn-PEDPUZI4.js.map → activities-turn-CE2VIWIS.js.map} +1 -1
- package/dist/artifact-materializer-entry.js +0 -0
- package/dist/artifact-outbox-entry.js +0 -0
- package/dist/{chunk-NQDVJ6RI.js → chunk-5DF4V5RD.js} +4 -2
- package/dist/{chunk-NQDVJ6RI.js.map → chunk-5DF4V5RD.js.map} +1 -1
- package/dist/{chunk-436TOEBL.js → chunk-R5BHILMQ.js} +2 -2
- package/dist/{chunk-O7HT4LHX.js → chunk-RSI63RZG.js} +2 -2
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/dist/internal-maintenance.d.ts +3 -1
- package/dist/{sandbox-lease-F47EDHHY.js → sandbox-lease-2IV3DNXR.js} +3 -3
- package/dist/sandbox-routing.d.ts +1 -0
- package/dist/workflow-bundle.js +1 -1
- package/package.json +26 -26
- package/src/activities/agent-turn/sandbox-establish.ts +2 -0
- package/src/internal-maintenance.ts +24 -0
- package/src/sandbox-routing.ts +3 -0
- /package/dist/{activities-control-LC7WXEIX.js.map → activities-control-G2W4FEFP.js.map} +0 -0
- /package/dist/{chunk-436TOEBL.js.map → chunk-R5BHILMQ.js.map} +0 -0
- /package/dist/{chunk-O7HT4LHX.js.map → chunk-RSI63RZG.js.map} +0 -0
- /package/dist/{sandbox-lease-F47EDHHY.js.map → sandbox-lease-2IV3DNXR.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/worker-bundle",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1-canary.38922642121001",
|
|
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": {
|
|
@@ -56,31 +56,31 @@
|
|
|
56
56
|
"@1password/sdk": "0.5.0",
|
|
57
57
|
"@keeper-security/secrets-manager-core": "17.6.0",
|
|
58
58
|
"@llamaindex/liteparse": "2.14.2",
|
|
59
|
-
"@opengeni/agent-proto": "3.
|
|
60
|
-
"@opengeni/capabilities": "3.
|
|
61
|
-
"@opengeni/codemode": "3.
|
|
62
|
-
"@opengeni/codex": "3.
|
|
63
|
-
"@opengeni/config": "3.
|
|
64
|
-
"@opengeni/contracts": "3.
|
|
65
|
-
"@opengeni/core": "3.
|
|
66
|
-
"@opengeni/db": "3.
|
|
67
|
-
"@opengeni/documents": "3.
|
|
68
|
-
"@opengeni/events": "3.
|
|
69
|
-
"@opengeni/github": "3.
|
|
70
|
-
"@opengeni/interaction": "3.
|
|
71
|
-
"@opengeni/jev": "3.
|
|
72
|
-
"@opengeni/network": "3.
|
|
73
|
-
"@opengeni/observability": "3.
|
|
74
|
-
"@opengeni/runtime": "3.
|
|
75
|
-
"@opengeni/sdk": "3.
|
|
76
|
-
"@opengeni/storage": "3.
|
|
77
|
-
"@opengeni/subscriptions": "3.
|
|
78
|
-
"@opengeni/tool-gateway": "3.
|
|
79
|
-
"@opengeni/vaults": "3.
|
|
80
|
-
"@opengeni/vaults-keeper": "3.
|
|
81
|
-
"@opengeni/vaults-onepassword": "3.
|
|
82
|
-
"@opengeni/vaults-protonpass": "3.
|
|
83
|
-
"@opengeni/xai-subscription": "3.
|
|
59
|
+
"@opengeni/agent-proto": "3.3.1-canary.38922642121001",
|
|
60
|
+
"@opengeni/capabilities": "3.3.1-canary.38922642121001",
|
|
61
|
+
"@opengeni/codemode": "3.3.1-canary.38922642121001",
|
|
62
|
+
"@opengeni/codex": "3.3.1-canary.38922642121001",
|
|
63
|
+
"@opengeni/config": "3.3.1-canary.38922642121001",
|
|
64
|
+
"@opengeni/contracts": "3.3.1-canary.38922642121001",
|
|
65
|
+
"@opengeni/core": "3.3.1-canary.38922642121001",
|
|
66
|
+
"@opengeni/db": "3.3.1-canary.38922642121001",
|
|
67
|
+
"@opengeni/documents": "3.3.1-canary.38922642121001",
|
|
68
|
+
"@opengeni/events": "3.3.1-canary.38922642121001",
|
|
69
|
+
"@opengeni/github": "3.3.1-canary.38922642121001",
|
|
70
|
+
"@opengeni/interaction": "3.3.1-canary.38922642121001",
|
|
71
|
+
"@opengeni/jev": "3.3.1-canary.38922642121001",
|
|
72
|
+
"@opengeni/network": "3.3.1-canary.38922642121001",
|
|
73
|
+
"@opengeni/observability": "3.3.1-canary.38922642121001",
|
|
74
|
+
"@opengeni/runtime": "3.3.1-canary.38922642121001",
|
|
75
|
+
"@opengeni/sdk": "3.3.1-canary.38922642121001",
|
|
76
|
+
"@opengeni/storage": "3.3.1-canary.38922642121001",
|
|
77
|
+
"@opengeni/subscriptions": "3.3.1-canary.38922642121001",
|
|
78
|
+
"@opengeni/tool-gateway": "3.3.1-canary.38922642121001",
|
|
79
|
+
"@opengeni/vaults": "3.3.1-canary.38922642121001",
|
|
80
|
+
"@opengeni/vaults-keeper": "3.3.1-canary.38922642121001",
|
|
81
|
+
"@opengeni/vaults-onepassword": "3.3.1-canary.38922642121001",
|
|
82
|
+
"@opengeni/vaults-protonpass": "3.3.1-canary.38922642121001",
|
|
83
|
+
"@opengeni/xai-subscription": "3.3.1-canary.38922642121001",
|
|
84
84
|
"@temporalio/activity": "^1.17.0",
|
|
85
85
|
"@temporalio/client": "^1.17.0",
|
|
86
86
|
"@temporalio/worker": "^1.17.0",
|
|
@@ -542,6 +542,8 @@ export async function establishTurnSandbox(deps: EstablishTurnSandboxDeps): Prom
|
|
|
542
542
|
liveMachineEnrollment?.agentCapabilities.operationCpuQuota === true,
|
|
543
543
|
transactionalFsWriteSupported:
|
|
544
544
|
liveMachineEnrollment?.agentCapabilities.transactionalFsWrite === true,
|
|
545
|
+
browserControlHttpSupported:
|
|
546
|
+
liveMachineEnrollment?.agentCapabilities.browserControlHttp === true,
|
|
545
547
|
// Carried for shared machines too: the audience can narrow to Only me
|
|
546
548
|
// mid-turn, and each operation then rechecks this authority.
|
|
547
549
|
...(fileAuthoritySubjectId
|
|
@@ -10,11 +10,13 @@ import {
|
|
|
10
10
|
automaticSessionTitleFanoutDue,
|
|
11
11
|
browserDeadlineCheckpointDue,
|
|
12
12
|
knowledgeIndexDue,
|
|
13
|
+
maintainSubscriptionPlans,
|
|
13
14
|
sandboxIdleCheckpointDue,
|
|
14
15
|
sandboxLeaseReaperDue,
|
|
15
16
|
sandboxMaintenanceDue,
|
|
16
17
|
sessionWorkflowWakesDue,
|
|
17
18
|
siteAuthMaintenanceDue,
|
|
19
|
+
subscriptionPlanMaintenanceDue,
|
|
18
20
|
workspacePauseTimerDue,
|
|
19
21
|
type Database,
|
|
20
22
|
} from "@opengeni/db";
|
|
@@ -53,6 +55,8 @@ export const SITE_AUTH_MAINTENANCE_WORKFLOW_ID = "opengeni-site-auth-maintenance
|
|
|
53
55
|
export const SITE_AUTH_MAINTENANCE_PERIOD_MS = 60 * 1_000;
|
|
54
56
|
/** The Schedule earlier releases used to drive the sandbox lease reaper. */
|
|
55
57
|
export const SANDBOX_REAPER_SCHEDULE_ID = "opengeni-sandbox-lease-reaper";
|
|
58
|
+
/** Small bounded DB-only pass; no Temporal execution for plan maintenance. */
|
|
59
|
+
export const SUBSCRIPTION_PLAN_MAINTENANCE_PERIOD_MS = 60_000;
|
|
56
60
|
|
|
57
61
|
export const INTERNAL_MAINTENANCE_JOBS = [
|
|
58
62
|
"session-workflow-wake-dispatcher",
|
|
@@ -61,6 +65,7 @@ export const INTERNAL_MAINTENANCE_JOBS = [
|
|
|
61
65
|
"sandbox-lease-reaper",
|
|
62
66
|
"sandbox-idle-checkpoint",
|
|
63
67
|
"browser-deadline-checkpoint",
|
|
68
|
+
"subscription-plan-maintenance",
|
|
64
69
|
] as const;
|
|
65
70
|
export type InternalMaintenanceJob = (typeof INTERNAL_MAINTENANCE_JOBS)[number];
|
|
66
71
|
|
|
@@ -139,6 +144,25 @@ export async function internalMaintenanceCadences(input: {
|
|
|
139
144
|
const jobs = new Set(input.jobs ?? INTERNAL_MAINTENANCE_JOBS);
|
|
140
145
|
const taskQueue = settings.temporalTaskQueue;
|
|
141
146
|
const cadences: MaintenanceCadence[] = [];
|
|
147
|
+
if (settings.subscriptionPlansEnabled && jobs.has("subscription-plan-maintenance")) {
|
|
148
|
+
cadences.push({
|
|
149
|
+
job: "subscription-plan-maintenance",
|
|
150
|
+
periodMs: SUBSCRIPTION_PLAN_MAINTENANCE_PERIOD_MS,
|
|
151
|
+
hasWork: async () => await subscriptionPlanMaintenanceDue(db),
|
|
152
|
+
start: async () => {
|
|
153
|
+
const result = await maintainSubscriptionPlans(db, {
|
|
154
|
+
onError: (error, accountId) =>
|
|
155
|
+
observability.warn("Subscription plan maintenance account failed", {
|
|
156
|
+
accountId,
|
|
157
|
+
error: error instanceof Error ? error.message : String(error),
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
if (result.failedAccounts > 0)
|
|
161
|
+
throw new Error(`${result.failedAccounts} subscription plan maintenance accounts failed`);
|
|
162
|
+
return "started";
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
}
|
|
142
166
|
if (jobs.has("session-workflow-wake-dispatcher")) {
|
|
143
167
|
const { repairMissedSessionWorkflowWakes } = await import("./activities/parent-wake");
|
|
144
168
|
cadences.push({
|
package/src/sandbox-routing.ts
CHANGED
|
@@ -1542,6 +1542,7 @@ export type SelfhostedTurnSessionArgs = {
|
|
|
1542
1542
|
operationCpuQuotaSupported: boolean;
|
|
1543
1543
|
/** Feature advertisement only; refreshed by exact live admission for each operation. */
|
|
1544
1544
|
transactionalFsWriteSupported?: boolean;
|
|
1545
|
+
browserControlHttpSupported?: boolean;
|
|
1545
1546
|
/** The active pointer's epoch — the control-op fence echoed to the agent. */
|
|
1546
1547
|
epoch: number;
|
|
1547
1548
|
/** The run's declared sandbox environment (the SAME object fed to buildAgent +
|
|
@@ -1618,6 +1619,7 @@ export function connectionBindingFor(
|
|
|
1618
1619
|
operationResourcePolicySupported: enrollment.agentCapabilities.operationResourcePolicy === true,
|
|
1619
1620
|
operationCpuQuotaSupported: enrollment.agentCapabilities.operationCpuQuota === true,
|
|
1620
1621
|
transactionalFsWriteSupported: enrollment.agentCapabilities.transactionalFsWrite === true,
|
|
1622
|
+
browserControlHttpSupported: enrollment.agentCapabilities.browserControlHttp === true,
|
|
1621
1623
|
};
|
|
1622
1624
|
}
|
|
1623
1625
|
|
|
@@ -1693,6 +1695,7 @@ export async function establishSelfhostedTurnSession(
|
|
|
1693
1695
|
operationResourcePolicySupported: args.operationResourcePolicySupported,
|
|
1694
1696
|
operationCpuQuotaSupported: args.operationCpuQuotaSupported,
|
|
1695
1697
|
transactionalFsWriteSupported: args.transactionalFsWriteSupported === true,
|
|
1698
|
+
browserControlHttpSupported: args.browserControlHttpSupported === true,
|
|
1696
1699
|
resolveOperationAdmission: async () => {
|
|
1697
1700
|
// The machine's audience can change in place during a turn. Read the
|
|
1698
1701
|
// current scope on every admitted operation: a machine that is Only me now
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|