@opengeni/worker-bundle 4.2.1-canary.39642758903001 → 4.3.1
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/provider-dispatch-barrier.d.ts +32 -4
- package/dist/{activities-control-CVGFJKV4.js → activities-control-7ZHF4LES.js} +2 -2
- package/dist/{activities-turn-HOQGFNMD.js → activities-turn-7VX4IWPO.js} +13 -5
- package/dist/activities-turn-7VX4IWPO.js.map +1 -0
- package/dist/artifact-materializer-entry.js +0 -0
- package/dist/artifact-outbox-entry.js +0 -0
- package/dist/{chunk-TJPZ7XBZ.js → chunk-5KOLEDGM.js} +26 -2
- package/dist/chunk-5KOLEDGM.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/workflow-bundle.js +1 -1
- package/package.json +27 -27
- package/src/activities/agent-turn/provider-dispatch-barrier.ts +54 -3
- package/src/activities/agent-turn/run.ts +13 -1
- package/src/activities/session-title-route.ts +3 -1
- package/dist/activities-turn-HOQGFNMD.js.map +0 -1
- package/dist/chunk-TJPZ7XBZ.js.map +0 -1
- /package/dist/{activities-control-CVGFJKV4.js.map → activities-control-7ZHF4LES.js.map} +0 -0
|
@@ -4,16 +4,44 @@ export declare class SandboxCapabilitiesChangedError extends Error {
|
|
|
4
4
|
readonly code = "native_capabilities_changed_this_attempt";
|
|
5
5
|
constructor();
|
|
6
6
|
}
|
|
7
|
+
type ActiveRoutePointer = {
|
|
8
|
+
activeSandboxId: string | null;
|
|
9
|
+
activeEpoch: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Ends an attempt between tool batches when its route moved somewhere it can
|
|
13
|
+
* no longer serve. A swap to a machine with another workspace root (or back
|
|
14
|
+
* to a home this attempt cannot reach) used to surface only on the first
|
|
15
|
+
* sandbox call of the following batch: the model's whole next response was
|
|
16
|
+
* discarded with the attempt, including sibling calls that had already run.
|
|
17
|
+
* Checking before the next model request ends the attempt at a clean point
|
|
18
|
+
* instead: the batch that moved the route is complete and durable, and the
|
|
19
|
+
* next attempt starts on the new route.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ActiveRouteDispatchBoundary {
|
|
22
|
+
private readonly deps;
|
|
23
|
+
private observed;
|
|
24
|
+
constructor(deps: {
|
|
25
|
+
/** The attempt's routed sandbox session, once one is established. */
|
|
26
|
+
session: () => {
|
|
27
|
+
assertActiveRouteContinuable?: () => Promise<void>;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
/** True for a typed transition that must continue in a fresh attempt. */
|
|
30
|
+
isRouteTransition: (error: unknown) => boolean;
|
|
31
|
+
});
|
|
32
|
+
check(active: ActiveRoutePointer | null): Promise<void>;
|
|
33
|
+
}
|
|
7
34
|
/**
|
|
8
35
|
* Persist the SDK's complete prior model/tool history before another provider
|
|
9
36
|
* request can start. The first request has no prior model/tool rows to append.
|
|
10
37
|
* Follow-up requests run only after the preceding complete call/result batch is
|
|
11
|
-
* replay-safe.
|
|
38
|
+
* replay-safe. A route that moved during that batch to somewhere this attempt
|
|
39
|
+
* cannot serve ends the attempt here, after the batch is durable.
|
|
12
40
|
*/
|
|
13
41
|
export declare function checkpointHistoryBeforeProviderDispatch(historySink: Pick<TurnHistorySink, "reconcileConversationTruth">, route?: {
|
|
14
42
|
effectiveSandboxBackend: Settings["sandboxBackend"];
|
|
15
43
|
routingEnabled: boolean;
|
|
16
|
-
readActiveSandbox: () => Promise<
|
|
17
|
-
|
|
18
|
-
} | null>;
|
|
44
|
+
readActiveSandbox: () => Promise<ActiveRoutePointer | null>;
|
|
45
|
+
activeRoute?: ActiveRouteDispatchBoundary;
|
|
19
46
|
}): Promise<void>;
|
|
47
|
+
export {};
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
withFirstPartyTools,
|
|
24
24
|
workflowIdForSession,
|
|
25
25
|
writeSessionUsageReceipts
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5KOLEDGM.js";
|
|
27
27
|
import "./chunk-K225DMA7.js";
|
|
28
28
|
import {
|
|
29
29
|
agentRunAdmissionDenial,
|
|
@@ -6414,4 +6414,4 @@ export {
|
|
|
6414
6414
|
createControlActivities,
|
|
6415
6415
|
createControlActivitiesFromServices
|
|
6416
6416
|
};
|
|
6417
|
-
//# sourceMappingURL=activities-control-
|
|
6417
|
+
//# sourceMappingURL=activities-control-7ZHF4LES.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ActiveRouteDispatchBoundary,
|
|
2
3
|
CLAUDE_CORE_WAIT_BINDING,
|
|
3
4
|
CODEX_CORE_WAIT_BINDING,
|
|
4
5
|
FIRST_PARTY_MCP_SETUP_UNAVAILABLE_CODE,
|
|
@@ -112,7 +113,7 @@ import {
|
|
|
112
113
|
wakeSubscriptionCoreWaitersAndDeliver,
|
|
113
114
|
withFirstPartyTools,
|
|
114
115
|
withModelRoutePresentation
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-5KOLEDGM.js";
|
|
116
117
|
import "./chunk-K225DMA7.js";
|
|
117
118
|
import {
|
|
118
119
|
agentBackgroundCommandDeps,
|
|
@@ -26148,7 +26149,9 @@ var providerKinds = {
|
|
|
26148
26149
|
"opper-workspace": "opper",
|
|
26149
26150
|
"opper-organization": "opper",
|
|
26150
26151
|
"anthropic-workspace": "anthropic",
|
|
26151
|
-
"anthropic-organization": "anthropic"
|
|
26152
|
+
"anthropic-organization": "anthropic",
|
|
26153
|
+
"direct-openai-organization": "openai",
|
|
26154
|
+
"direct-azure-organization": "azure_openai"
|
|
26152
26155
|
};
|
|
26153
26156
|
async function sessionTitleApiConnectionId(input) {
|
|
26154
26157
|
const { db, settings, provider, workspaceId, accountId } = input;
|
|
@@ -26167,7 +26170,7 @@ async function sessionTitleApiConnectionId(input) {
|
|
|
26167
26170
|
}
|
|
26168
26171
|
const kind = providerKinds[provider.kind];
|
|
26169
26172
|
if (provider.credentialSource.kind === "workspace_connection") {
|
|
26170
|
-
if (!kind)
|
|
26173
|
+
if (!kind || kind === "openai" || kind === "azure_openai")
|
|
26171
26174
|
throw new SessionTitleRouteUnavailableError("Title workspace provider is unsupported");
|
|
26172
26175
|
const metadata = await getWorkspaceProviderApiKeyConnectionMetadata(db, workspaceId, kind);
|
|
26173
26176
|
const spec = workspaceProviderApiKeyConnectionSpec(kind);
|
|
@@ -41507,13 +41510,18 @@ function createRunAgentTurnActivity(services) {
|
|
|
41507
41510
|
providerRecoveryCount: attempt.providerRecoveryCount,
|
|
41508
41511
|
recoveryStartedAt: attempt.providerRecoveryStartedAt
|
|
41509
41512
|
});
|
|
41513
|
+
const activeRoute = new ActiveRouteDispatchBoundary({
|
|
41514
|
+
session: () => sandboxState.resolvedSandbox?.established.session,
|
|
41515
|
+
isRouteTransition: (error51) => sandboxRouteTransitionCode(error51) !== null
|
|
41516
|
+
});
|
|
41510
41517
|
const checkpointBeforeProviderDispatch = async () => {
|
|
41511
41518
|
assertRecoveryWindow();
|
|
41512
41519
|
await awaitModelCallAdmission();
|
|
41513
41520
|
await checkpointHistoryBeforeProviderDispatch(historySink, {
|
|
41514
41521
|
effectiveSandboxBackend: eventing.modelRunSettings.sandboxBackend,
|
|
41515
41522
|
routingEnabled: routingEnabled(settings),
|
|
41516
|
-
readActiveSandbox: () => readActiveSandbox3(db, input.workspaceId, input.sessionId)
|
|
41523
|
+
readActiveSandbox: () => readActiveSandbox3(db, input.workspaceId, input.sessionId),
|
|
41524
|
+
activeRoute
|
|
41517
41525
|
});
|
|
41518
41526
|
assertRecoveryWindow();
|
|
41519
41527
|
};
|
|
@@ -44203,4 +44211,4 @@ export {
|
|
|
44203
44211
|
createTurnActivities,
|
|
44204
44212
|
createTurnActivitiesFromServices
|
|
44205
44213
|
};
|
|
44206
|
-
//# sourceMappingURL=activities-turn-
|
|
44214
|
+
//# sourceMappingURL=activities-turn-7VX4IWPO.js.map
|