@opengeni/worker-bundle 4.6.1 → 4.6.2-canary.39853438886001
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/sandbox-provision.d.ts +5 -2
- package/dist/activities/agent-turn/tool-environment.d.ts +2 -2
- package/dist/activities/types.d.ts +1 -1
- package/dist/{activities-control-BXAGB3AU.js → activities-control-PIHEELGP.js} +19 -2
- package/dist/activities-control-PIHEELGP.js.map +1 -0
- package/dist/{activities-turn-B73PNSEA.js → activities-turn-YWX2FJPH.js} +123 -770
- package/dist/activities-turn-YWX2FJPH.js.map +1 -0
- package/dist/artifact-materializer-entry.js +0 -0
- package/dist/artifact-outbox-entry.js +0 -0
- package/dist/{chunk-53INB25R.js → chunk-IRRU27W4.js} +11 -1
- package/dist/chunk-IRRU27W4.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +195 -36
- package/dist/index.js.map +1 -1
- package/dist/worker-service-lifecycle.d.ts +2 -0
- package/dist/worker-shutdown.d.ts +66 -0
- package/dist/workflow-bundle.js +1 -1
- package/package.json +27 -27
- package/src/activities/agent-turn/knowledge-source-tools.ts +2 -1
- package/src/activities/agent-turn/sandbox-provision.ts +5 -2
- package/src/activities/agent-turn/tool-environment.ts +2 -66
- package/src/activities/knowledge-source-sync.ts +10 -0
- package/src/activities/scheduled-tasks.ts +20 -0
- package/src/activities/types.ts +1 -0
- package/src/index.ts +113 -35
- package/src/worker-service-lifecycle.ts +32 -1
- package/src/worker-shutdown.ts +161 -0
- package/dist/activities-control-BXAGB3AU.js.map +0 -1
- package/dist/activities-turn-B73PNSEA.js.map +0 -1
- package/dist/chunk-53INB25R.js.map +0 -1
|
@@ -55,8 +55,11 @@ export declare function throwIfTurnOperationCancelled(signal: AbortSignal | unde
|
|
|
55
55
|
export declare function waitForTurnOperation<T>(operation: Promise<T>, signal: AbortSignal | undefined, disposeLateResult: ((result: T) => Promise<void> | void) | undefined): Promise<T>;
|
|
56
56
|
/**
|
|
57
57
|
* Upper bound for joining a cancelled attempt's in-flight provider establish.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
58
|
+
* Ordinary user or replacement cancellation has no worker deadline. During a
|
|
59
|
+
* turn-worker shutdown, turns cancelled with WORKER_SHUTDOWN after the natural
|
|
60
|
+
* drain (default 90s) have only the checkpoint window before the SDK force
|
|
61
|
+
* time (default 105s) and process exit (115s); an establish still running past
|
|
62
|
+
* that is left to the lease reaper, as after a crash.
|
|
60
63
|
*/
|
|
61
64
|
export declare const PHYSICAL_SANDBOX_RESUME_DRAIN_TIMEOUT_MS = 60000;
|
|
62
65
|
/** Register the PHYSICAL lease acquire/provider establish promise, not the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RunMcpCredentials, type
|
|
1
|
+
import { type RunMcpCredentials, type ConnectorActionPolicyHooks } from "@opengeni/runtime";
|
|
2
2
|
import { type Settings } from "@opengeni/config";
|
|
3
3
|
import { withFirstPartyTools } from "../goals.js";
|
|
4
4
|
import type { TurnActivityServices as ActivityServices, RunAgentTurnInput } from "../types.js";
|
|
@@ -146,7 +146,7 @@ export declare function prepareTurnToolPolicy(deps: PrepareTurnToolPolicyDeps):
|
|
|
146
146
|
};
|
|
147
147
|
}>;
|
|
148
148
|
export declare function prepareTurnToolRuntime(deps: PrepareTurnToolRuntimeDeps): Promise<{
|
|
149
|
-
attemptConnectorActionBindings: AttemptConnectorActionBinding[];
|
|
149
|
+
attemptConnectorActionBindings: import("@opengeni/runtime").AttemptConnectorActionBinding[];
|
|
150
150
|
connectorActionPolicy: ConnectorActionPolicyHooks;
|
|
151
151
|
mcpServers: {
|
|
152
152
|
id: string;
|
|
@@ -412,7 +412,7 @@ export type DispatchScheduledTaskRunResult = {
|
|
|
412
412
|
diagnostic?: import("@opengeni/contracts").ConnectionAccountSelectionDiagnostic;
|
|
413
413
|
/** Present when the occurrence was refused as a visible run receipt. */
|
|
414
414
|
refusal?: import("@opengeni/contracts").ScheduledTaskAdmissionRefusal;
|
|
415
|
-
reason: "insufficient_credits" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | "session_usage_limit" | "malformed_manual_trigger" | "scheduled_task_paused" | "scheduled_authority_exhausted" | "scheduled_run_terminal" | "scheduled_execution_unrepresentable" | "connection_account_unavailable" | "scheduled_authority_unavailable" | "machine_target_unavailable" | "machine_enrollment_inactive" | "variable_set_unavailable" | "rig_version_unavailable" | "scheduled_model_unavailable" | "knowledge_source_paused" | "legacy_source_schedule_requires_migration" | "atlassian_native_retired" | "incident_preflight_metadata_missing" | "incident_responder_under_capable" | "incident_data_source_unsuitable";
|
|
415
|
+
reason: "insufficient_credits" | "allowance_exhausted" | "monthly_model_cost_limit" | "monthly_agent_run_limit" | "session_usage_limit" | "malformed_manual_trigger" | "scheduled_task_paused" | "scheduled_authority_exhausted" | "scheduled_run_terminal" | "scheduled_execution_unrepresentable" | "connection_account_unavailable" | "scheduled_authority_unavailable" | "machine_target_unavailable" | "machine_enrollment_inactive" | "variable_set_unavailable" | "rig_version_unavailable" | "scheduled_model_unavailable" | "knowledge_source_paused" | "legacy_source_schedule_requires_migration" | "atlassian_native_retired" | "google_drive_native_retired" | "incident_preflight_metadata_missing" | "incident_responder_under_capable" | "incident_data_source_unsuitable";
|
|
416
416
|
} | {
|
|
417
417
|
action: "start" | "signal";
|
|
418
418
|
accountId: string;
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
withFirstPartyTools,
|
|
24
24
|
workflowIdForSession,
|
|
25
25
|
writeSessionUsageReceipts
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IRRU27W4.js";
|
|
27
27
|
import "./chunk-K225DMA7.js";
|
|
28
28
|
import {
|
|
29
29
|
agentRunAdmissionDenial,
|
|
@@ -2589,6 +2589,10 @@ function createRigVerificationActivities(services) {
|
|
|
2589
2589
|
}
|
|
2590
2590
|
|
|
2591
2591
|
// src/activities/scheduled-tasks.ts
|
|
2592
|
+
import {
|
|
2593
|
+
GOOGLE_DRIVE_NATIVE_RETIRED_REASON,
|
|
2594
|
+
isRetiredNativeGoogleDriveTask
|
|
2595
|
+
} from "@opengeni/contracts/google-drive-native-retirement";
|
|
2592
2596
|
import { getScheduledTaskClaudeProviderAccountAuthoritySnapshot } from "@opengeni/db";
|
|
2593
2597
|
|
|
2594
2598
|
// src/activities/scheduled-task-admission.ts
|
|
@@ -2938,6 +2942,15 @@ function createScheduledTaskActivities(services) {
|
|
|
2938
2942
|
}
|
|
2939
2943
|
throw new Error("scheduled agent run is missing accepted execution truth");
|
|
2940
2944
|
}
|
|
2945
|
+
if (priorRun.status === "queued" && isRetiredNativeGoogleDriveTask(acceptedExecution.task)) {
|
|
2946
|
+
await markScheduledTaskRunFailedIfQueued(
|
|
2947
|
+
db,
|
|
2948
|
+
priorRun.workspaceId,
|
|
2949
|
+
priorRun.id,
|
|
2950
|
+
GOOGLE_DRIVE_NATIVE_RETIRED_REASON
|
|
2951
|
+
);
|
|
2952
|
+
return scheduledRunTerminalResult(GOOGLE_DRIVE_NATIVE_RETIRED_REASON);
|
|
2953
|
+
}
|
|
2941
2954
|
if (priorRun.status === "queued" && isRetiredNativeAtlassianTask(acceptedExecution.task)) {
|
|
2942
2955
|
await markScheduledTaskRunFailedIfQueued(
|
|
2943
2956
|
db,
|
|
@@ -3008,6 +3021,8 @@ function createScheduledTaskActivities(services) {
|
|
|
3008
3021
|
if (!task) {
|
|
3009
3022
|
return { action: "deleted" };
|
|
3010
3023
|
}
|
|
3024
|
+
if (isRetiredNativeGoogleDriveTask(task))
|
|
3025
|
+
return { action: "blocked", reason: GOOGLE_DRIVE_NATIVE_RETIRED_REASON };
|
|
3011
3026
|
if (isRetiredNativeAtlassianTask(task))
|
|
3012
3027
|
return { action: "blocked", reason: ATLASSIAN_NATIVE_RETIRED_REASON };
|
|
3013
3028
|
if (task.action.kind !== "agent_turn") {
|
|
@@ -4565,6 +4580,8 @@ function scheduledAdmissionRefusalResult(run) {
|
|
|
4565
4580
|
};
|
|
4566
4581
|
}
|
|
4567
4582
|
function scheduledRunTerminalResult(error) {
|
|
4583
|
+
if (error === GOOGLE_DRIVE_NATIVE_RETIRED_REASON)
|
|
4584
|
+
return { action: "blocked", reason: GOOGLE_DRIVE_NATIVE_RETIRED_REASON };
|
|
4568
4585
|
if (error === ATLASSIAN_NATIVE_RETIRED_REASON)
|
|
4569
4586
|
return { action: "blocked", reason: ATLASSIAN_NATIVE_RETIRED_REASON };
|
|
4570
4587
|
if (error === "scheduled_authority_exhausted") {
|
|
@@ -6428,4 +6445,4 @@ export {
|
|
|
6428
6445
|
createControlActivities,
|
|
6429
6446
|
createControlActivitiesFromServices
|
|
6430
6447
|
};
|
|
6431
|
-
//# sourceMappingURL=activities-control-
|
|
6448
|
+
//# sourceMappingURL=activities-control-PIHEELGP.js.map
|