@opengeni/worker-bundle 0.22.1-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
|
@@ -76,6 +76,12 @@ export declare function createControlActivitiesFromServices(services: () => Prom
|
|
|
76
76
|
startedAt?: string | undefined;
|
|
77
77
|
finishedAt?: string | undefined;
|
|
78
78
|
log?: string | undefined;
|
|
79
|
+
platformCheckResults?: {
|
|
80
|
+
name: string;
|
|
81
|
+
command: string;
|
|
82
|
+
exitCode: number | null;
|
|
83
|
+
output?: string | undefined;
|
|
84
|
+
}[] | undefined;
|
|
79
85
|
checkResults?: {
|
|
80
86
|
name: string;
|
|
81
87
|
command: string;
|
|
@@ -93,12 +99,8 @@ export declare function createControlActivitiesFromServices(services: () => Prom
|
|
|
93
99
|
}) => Promise<{
|
|
94
100
|
versionId: string;
|
|
95
101
|
passed: boolean;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
output: string;
|
|
99
|
-
name: string;
|
|
100
|
-
command: string;
|
|
101
|
-
}[];
|
|
102
|
+
platformCheckResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
103
|
+
checkResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
102
104
|
providerImage: {
|
|
103
105
|
backend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "opensandbox" | "runloop" | "selfhosted" | "vercel";
|
|
104
106
|
provider: string;
|
|
@@ -226,6 +228,12 @@ export declare function createControlActivities(dependencies?: ActivityDependenc
|
|
|
226
228
|
startedAt?: string | undefined;
|
|
227
229
|
finishedAt?: string | undefined;
|
|
228
230
|
log?: string | undefined;
|
|
231
|
+
platformCheckResults?: {
|
|
232
|
+
name: string;
|
|
233
|
+
command: string;
|
|
234
|
+
exitCode: number | null;
|
|
235
|
+
output?: string | undefined;
|
|
236
|
+
}[] | undefined;
|
|
229
237
|
checkResults?: {
|
|
230
238
|
name: string;
|
|
231
239
|
command: string;
|
|
@@ -243,12 +251,8 @@ export declare function createControlActivities(dependencies?: ActivityDependenc
|
|
|
243
251
|
}) => Promise<{
|
|
244
252
|
versionId: string;
|
|
245
253
|
passed: boolean;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
output: string;
|
|
249
|
-
name: string;
|
|
250
|
-
command: string;
|
|
251
|
-
}[];
|
|
254
|
+
platformCheckResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
255
|
+
checkResults: import("./activities/rig-verification.js").RigPlatformCheckResult[];
|
|
252
256
|
providerImage: {
|
|
253
257
|
backend: "blaxel" | "cloudflare" | "daytona" | "docker" | "e2b" | "local" | "modal" | "none" | "opensandbox" | "runloop" | "selfhosted" | "vercel";
|
|
254
258
|
provider: string;
|
|
@@ -57,7 +57,6 @@ import {
|
|
|
57
57
|
sandboxRouteTransitionCode,
|
|
58
58
|
selectCodexCredentialLeaseForTurn,
|
|
59
59
|
settingsWithPackSandboxImage,
|
|
60
|
-
settingsWithRigImage,
|
|
61
60
|
shardCredentialForSession,
|
|
62
61
|
shouldRecoverCompactionProviderFailure,
|
|
63
62
|
shouldRunTurnEndWorkspacePersistence,
|
|
@@ -75,7 +74,7 @@ import {
|
|
|
75
74
|
waitForTurnStreamCleanup,
|
|
76
75
|
waitForWarmSnapshot,
|
|
77
76
|
withFirstPartyTools
|
|
78
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-XWQPS6GG.js";
|
|
79
78
|
import {
|
|
80
79
|
StreamTimingMetrics,
|
|
81
80
|
makeMachineOpObserver,
|
|
@@ -98,7 +97,7 @@ import {
|
|
|
98
97
|
recordTurnWorkerPreparationTotal,
|
|
99
98
|
runtimeMetricsHooksForObservability,
|
|
100
99
|
turnLifecycleMetricsFor
|
|
101
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FA35XBBC.js";
|
|
102
101
|
|
|
103
102
|
// src/activities-turn.ts
|
|
104
103
|
import { createProductionAgentRuntime, summarizeForCompaction as summarizeForCompaction2 } from "@opengeni/runtime";
|
|
@@ -10551,6 +10550,7 @@ function computerToolModeForTurn(resolvedModel) {
|
|
|
10551
10550
|
}
|
|
10552
10551
|
function structuredToolTransportForTurn(resolvedModel) {
|
|
10553
10552
|
if (!resolvedModel) return true;
|
|
10553
|
+
if (resolvedModel.provider.api === "chat") return false;
|
|
10554
10554
|
return ![
|
|
10555
10555
|
"codex-subscription",
|
|
10556
10556
|
"xai-subscription",
|
|
@@ -10708,13 +10708,10 @@ async function prepareGovernanceAndModel(deps) {
|
|
|
10708
10708
|
);
|
|
10709
10709
|
} catch {
|
|
10710
10710
|
}
|
|
10711
|
-
const logicalSandboxSettings =
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
packRuntime.sandboxProviderImages
|
|
10716
|
-
),
|
|
10717
|
-
rigVersion?.image ?? null
|
|
10711
|
+
const logicalSandboxSettings = rigVersion ? capabilitySettings : settingsWithPackSandboxImage(
|
|
10712
|
+
capabilitySettings,
|
|
10713
|
+
packRuntime.sandboxImage,
|
|
10714
|
+
packRuntime.sandboxProviderImages
|
|
10718
10715
|
);
|
|
10719
10716
|
const providerImageSelection = await resolveRigProviderImageForRun(
|
|
10720
10717
|
logicalSandboxSettings,
|
|
@@ -10724,12 +10721,10 @@ async function prepareGovernanceAndModel(deps) {
|
|
|
10724
10721
|
const providerImageSettings = providerImageSelection.settings;
|
|
10725
10722
|
const verifiedRigProviderImageId = providerImageSelection.reason === "selected" ? providerImageSelection.imageId ?? void 0 : void 0;
|
|
10726
10723
|
const baseRunSettings = {
|
|
10727
|
-
// IMAGE PRECEDENCE:
|
|
10728
|
-
//
|
|
10729
|
-
//
|
|
10730
|
-
//
|
|
10731
|
-
// then applied only to fresh creation without changing the logical
|
|
10732
|
-
// lease image.
|
|
10724
|
+
// IMAGE PRECEDENCE: a Rig uses the deployment platform base; a rig-less
|
|
10725
|
+
// pre-v2 Pack may retain its compatibility image. A matching verified
|
|
10726
|
+
// provider-native ID is then applied only to fresh creation without
|
|
10727
|
+
// changing the logical lease image.
|
|
10733
10728
|
...providerImageSettings,
|
|
10734
10729
|
openaiModel: turn.model,
|
|
10735
10730
|
openaiReasoningEffort: turn.reasoningEffort,
|
|
@@ -12916,7 +12911,8 @@ async function resolveSandboxRoute(deps) {
|
|
|
12916
12911
|
media,
|
|
12917
12912
|
sandboxState,
|
|
12918
12913
|
fileAuthoritySubjectId,
|
|
12919
|
-
runSettings
|
|
12914
|
+
runSettings,
|
|
12915
|
+
logicalSandboxSettings
|
|
12920
12916
|
} = deps;
|
|
12921
12917
|
const routingOn = routingEnabled(settings);
|
|
12922
12918
|
let activeSandboxPointer = routingOn ? await readActiveSandbox3(db, input.workspaceId, input.sessionId).catch(() => null) : null;
|
|
@@ -12961,7 +12957,7 @@ async function resolveSandboxRoute(deps) {
|
|
|
12961
12957
|
const groupBoxBackend = runSettings.sandboxBackend === "selfhosted" && !machinePrimary ? settings.sandboxBackend : runSettings.sandboxBackend;
|
|
12962
12958
|
sandboxState.startupMilestoneBackend = activeSandboxBackend ?? groupBoxBackend;
|
|
12963
12959
|
media.sandboxFileDownloadBackend = sandboxState.startupMilestoneBackend;
|
|
12964
|
-
const groupBoxImage = rigProviderImageSourceImage(
|
|
12960
|
+
const groupBoxImage = rigProviderImageSourceImage(logicalSandboxSettings, groupBoxBackend);
|
|
12965
12961
|
const sandboxCreationBackend = settings.sandboxOwnershipEnabled && runSettings.sandboxBackend !== "none" ? groupBoxBackend : runSettings.sandboxBackend;
|
|
12966
12962
|
const effectiveRunCredentialBackend = activeSandboxBackend ?? groupBoxBackend;
|
|
12967
12963
|
return {
|
|
@@ -14859,8 +14855,10 @@ import {
|
|
|
14859
14855
|
getScheduledVariableSetExpectedGenerationForAttempt,
|
|
14860
14856
|
persistAttemptToolCatalog,
|
|
14861
14857
|
namedSubjectHasLiveWorkspaceAuthority as namedSubjectHasLiveWorkspaceAuthority2,
|
|
14858
|
+
updateSessionTitleWithEvent,
|
|
14862
14859
|
withCodexAppsRequestAuthorization
|
|
14863
14860
|
} from "@opengeni/db";
|
|
14861
|
+
import { publishDurableSessionEvents as publishDurableSessionEvents8 } from "@opengeni/events";
|
|
14864
14862
|
import {
|
|
14865
14863
|
createFirstPartyInteractionAttemptToolDefinitions
|
|
14866
14864
|
} from "@opengeni/runtime";
|
|
@@ -16675,6 +16673,86 @@ import {
|
|
|
16675
16673
|
} from "@opengeni/core";
|
|
16676
16674
|
import { SandboxChannelAService as SandboxChannelAService3 } from "@opengeni/runtime/sandbox";
|
|
16677
16675
|
import { sandboxRunAs as sandboxRunAs5 } from "@opengeni/runtime";
|
|
16676
|
+
|
|
16677
|
+
// src/activities/agent-turn/session-title.ts
|
|
16678
|
+
import { hasPermission } from "@opengeni/core";
|
|
16679
|
+
import {
|
|
16680
|
+
AUTOMATIC_SESSION_TITLE_FALLBACK,
|
|
16681
|
+
DEFAULT_FIRST_PARTY_MCP_PERMISSIONS
|
|
16682
|
+
} from "@opengeni/contracts";
|
|
16683
|
+
var SESSION_TITLE_MODEL_TOOL_NAME = "opengeni__set_session_title";
|
|
16684
|
+
var SESSION_TITLE_DESCRIPTION = "Set this session's display title to a concise 3-7 word topic label. Use a stable noun phrase about the actual task or subject, never a quote/prefix of a prompt, greeting, request boilerplate, URL, identifier, credential, token, or other sensitive value. Call once on a new session, then only when the topic materially changes. Never call it as routine setup after a continuation, resume, or interruption, or merely to reassert the same title. A human-set title cannot be replaced.";
|
|
16685
|
+
function shouldRequestMissingSessionTitle(input) {
|
|
16686
|
+
const title = input.title?.trim() ?? "";
|
|
16687
|
+
const needsSemanticTitle = input.titleSource !== "user" && (!title || title === AUTOMATIC_SESSION_TITLE_FALLBACK);
|
|
16688
|
+
if (!needsSemanticTitle) return false;
|
|
16689
|
+
if (!input.firstPartyMcpTools.includes("set_session_title")) return false;
|
|
16690
|
+
const permissions = input.firstPartyMcpPermissions ?? DEFAULT_FIRST_PARTY_MCP_PERMISSIONS;
|
|
16691
|
+
return hasPermission([...permissions], "sessions:control");
|
|
16692
|
+
}
|
|
16693
|
+
function sessionTitleToolPlan(input) {
|
|
16694
|
+
const promoteTitleTool = input.shouldRequestTitle && input.tools.some((tool) => tool.kind === "mcp" && tool.id === "opengeni");
|
|
16695
|
+
return {
|
|
16696
|
+
promoteTitleTool,
|
|
16697
|
+
remoteFirstPartyMcpTools: promoteTitleTool ? input.selectedFirstPartyMcpTools.filter((tool) => tool !== "set_session_title") : [...input.selectedFirstPartyMcpTools],
|
|
16698
|
+
preparationIndependentToolNames: promoteTitleTool ? [SESSION_TITLE_MODEL_TOOL_NAME] : []
|
|
16699
|
+
};
|
|
16700
|
+
}
|
|
16701
|
+
function createSessionTitleAttemptToolDefinition(input) {
|
|
16702
|
+
return {
|
|
16703
|
+
identity: { serverId: "opengeni", toolName: "set_session_title" },
|
|
16704
|
+
modelName: SESSION_TITLE_MODEL_TOOL_NAME,
|
|
16705
|
+
codemodePath: ["opengeni", "set_session_title"],
|
|
16706
|
+
title: "Set session title",
|
|
16707
|
+
description: SESSION_TITLE_DESCRIPTION,
|
|
16708
|
+
inputSchema: {
|
|
16709
|
+
type: "object",
|
|
16710
|
+
properties: {
|
|
16711
|
+
title: { type: "string", minLength: 1, maxLength: 200 }
|
|
16712
|
+
},
|
|
16713
|
+
required: ["title"],
|
|
16714
|
+
additionalProperties: false
|
|
16715
|
+
},
|
|
16716
|
+
outputSchema: {
|
|
16717
|
+
type: "object",
|
|
16718
|
+
properties: {
|
|
16719
|
+
ok: { type: "boolean", const: true },
|
|
16720
|
+
updated: { type: "boolean" },
|
|
16721
|
+
title: { type: "string" }
|
|
16722
|
+
},
|
|
16723
|
+
required: ["ok", "updated", "title"],
|
|
16724
|
+
additionalProperties: false
|
|
16725
|
+
},
|
|
16726
|
+
annotations: {
|
|
16727
|
+
title: "Set session title",
|
|
16728
|
+
readOnlyHint: false,
|
|
16729
|
+
destructiveHint: false,
|
|
16730
|
+
idempotentHint: true,
|
|
16731
|
+
openWorldHint: false
|
|
16732
|
+
},
|
|
16733
|
+
source: "opengeni",
|
|
16734
|
+
approval: "none",
|
|
16735
|
+
execute: async (args) => {
|
|
16736
|
+
const title = args.title;
|
|
16737
|
+
if (typeof title !== "string") {
|
|
16738
|
+
throw new Error("set_session_title requires a title string");
|
|
16739
|
+
}
|
|
16740
|
+
const result = await input.updateTitle(title);
|
|
16741
|
+
const output = {
|
|
16742
|
+
ok: true,
|
|
16743
|
+
updated: result.updated,
|
|
16744
|
+
title: result.title ?? title
|
|
16745
|
+
};
|
|
16746
|
+
return {
|
|
16747
|
+
isError: false,
|
|
16748
|
+
content: [{ type: "text", text: JSON.stringify(output) }],
|
|
16749
|
+
structuredContent: output
|
|
16750
|
+
};
|
|
16751
|
+
}
|
|
16752
|
+
};
|
|
16753
|
+
}
|
|
16754
|
+
|
|
16755
|
+
// src/activities/agent-turn/tool-environment.ts
|
|
16678
16756
|
async function prepareTurnToolPolicy(deps) {
|
|
16679
16757
|
const {
|
|
16680
16758
|
input,
|
|
@@ -16713,9 +16791,11 @@ async function prepareTurnToolPolicy(deps) {
|
|
|
16713
16791
|
workspaceId: input.workspaceId
|
|
16714
16792
|
};
|
|
16715
16793
|
const rigDefaultVariableSetIds = rigVersion?.defaultVariableSetIds ?? [];
|
|
16794
|
+
const sessionVariableSetIds = session.variableSetIds;
|
|
16716
16795
|
let workspaceVariableSet = null;
|
|
16796
|
+
const explicitEnvironmentValues = {};
|
|
16717
16797
|
const rigDefaultEnvironmentValues = {};
|
|
16718
|
-
if (
|
|
16798
|
+
if (sessionVariableSetIds.length > 0 || rigDefaultVariableSetIds.length > 0) {
|
|
16719
16799
|
const variableSetAuthority = {
|
|
16720
16800
|
sessionId: input.sessionId,
|
|
16721
16801
|
turnId: turn.id,
|
|
@@ -16735,19 +16815,24 @@ async function prepareTurnToolPolicy(deps) {
|
|
|
16735
16815
|
executionGeneration: turn.executionGeneration,
|
|
16736
16816
|
variableSetId: candidateVariableSetId
|
|
16737
16817
|
});
|
|
16738
|
-
|
|
16739
|
-
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
-
|
|
16746
|
-
|
|
16747
|
-
|
|
16748
|
-
|
|
16749
|
-
|
|
16750
|
-
|
|
16818
|
+
for (const variableSetId of sessionVariableSetIds) {
|
|
16819
|
+
const selected = await waitForTurnOperation(
|
|
16820
|
+
(async () => loadWorkspaceEnvironmentForRunWithCredentials(
|
|
16821
|
+
db,
|
|
16822
|
+
runSettings,
|
|
16823
|
+
connectionScope,
|
|
16824
|
+
variableSetId,
|
|
16825
|
+
variableSetAuthority,
|
|
16826
|
+
connectionCredentials?.sandboxSecrets,
|
|
16827
|
+
connectionCredentials?.sandboxSecrets ? { expectedGeneration: await expectedVariableSetGeneration(variableSetId) } : {}
|
|
16828
|
+
))(),
|
|
16829
|
+
cancellationSignal,
|
|
16830
|
+
void 0
|
|
16831
|
+
);
|
|
16832
|
+
if (!selected) continue;
|
|
16833
|
+
Object.assign(explicitEnvironmentValues, selected.values);
|
|
16834
|
+
workspaceVariableSet = { ...selected, values: { ...explicitEnvironmentValues } };
|
|
16835
|
+
}
|
|
16751
16836
|
Object.assign(
|
|
16752
16837
|
rigDefaultEnvironmentValues,
|
|
16753
16838
|
await loadRigDefaultVariableSetEnvironment(
|
|
@@ -16773,7 +16858,7 @@ async function prepareTurnToolPolicy(deps) {
|
|
|
16773
16858
|
workspaceRefs.variableSetId = workspaceVariableSet?.id ?? "";
|
|
16774
16859
|
const sandboxWorkspaceEnvironmentValues = mergeRigDefaultVariableSetEnvironment(
|
|
16775
16860
|
rigDefaultEnvironmentValues,
|
|
16776
|
-
|
|
16861
|
+
explicitEnvironmentValues
|
|
16777
16862
|
);
|
|
16778
16863
|
return {
|
|
16779
16864
|
turnResources,
|
|
@@ -16951,6 +17036,16 @@ async function prepareTurnToolRuntime(deps) {
|
|
|
16951
17036
|
runSettings,
|
|
16952
17037
|
session.firstPartyMcpTools
|
|
16953
17038
|
);
|
|
17039
|
+
const titleToolPlan = sessionTitleToolPlan({
|
|
17040
|
+
tools: turnTools,
|
|
17041
|
+
selectedFirstPartyMcpTools,
|
|
17042
|
+
shouldRequestTitle: shouldRequestMissingSessionTitle({
|
|
17043
|
+
title: session.title,
|
|
17044
|
+
titleSource: session.titleSource,
|
|
17045
|
+
firstPartyMcpTools: selectedFirstPartyMcpTools,
|
|
17046
|
+
firstPartyMcpPermissions: session.firstPartyMcpPermissions
|
|
17047
|
+
})
|
|
17048
|
+
});
|
|
16954
17049
|
const googleDrivePublicationAllowed = selectedFirstPartyMcpTools.includes("editable_artifact_export") && selectedFirstPartyMcpTools.includes("editable_artifact_export_status") && (!session.firstPartyMcpPermissions?.length || session.firstPartyMcpPermissions.includes("artifacts:read") && session.firstPartyMcpPermissions.includes("artifacts:publish"));
|
|
16955
17050
|
const googleDriveConnectorBindings = googleDrivePublicationTool && googleDrivePublicationTarget && googleDrivePublicationAllowed ? [
|
|
16956
17051
|
{
|
|
@@ -16963,6 +17058,25 @@ async function prepareTurnToolRuntime(deps) {
|
|
|
16963
17058
|
}
|
|
16964
17059
|
] : [];
|
|
16965
17060
|
const attemptToolDefinitions = [
|
|
17061
|
+
...titleToolPlan.promoteTitleTool ? [
|
|
17062
|
+
createSessionTitleAttemptToolDefinition({
|
|
17063
|
+
updateTitle: async (title) => {
|
|
17064
|
+
const result = await updateSessionTitleWithEvent(db, {
|
|
17065
|
+
workspaceId: input.workspaceId,
|
|
17066
|
+
sessionId: input.sessionId,
|
|
17067
|
+
title,
|
|
17068
|
+
source: "agent"
|
|
17069
|
+
});
|
|
17070
|
+
await publishDurableSessionEvents8(
|
|
17071
|
+
bus,
|
|
17072
|
+
input.workspaceId,
|
|
17073
|
+
input.sessionId,
|
|
17074
|
+
result.events
|
|
17075
|
+
);
|
|
17076
|
+
return result;
|
|
17077
|
+
}
|
|
17078
|
+
})
|
|
17079
|
+
] : [],
|
|
16966
17080
|
...createFirstPartyInteractionAttemptToolDefinitions({
|
|
16967
17081
|
settings: runSettings,
|
|
16968
17082
|
scope: {
|
|
@@ -17077,7 +17191,7 @@ async function prepareTurnToolRuntime(deps) {
|
|
|
17077
17191
|
// Manager-style sessions carry a creation-validated permission set
|
|
17078
17192
|
// for their first-party MCP token; null keeps the fixed default.
|
|
17079
17193
|
...session.firstPartyMcpPermissions?.length ? { firstPartyPermissions: session.firstPartyMcpPermissions } : {},
|
|
17080
|
-
firstPartyTools:
|
|
17194
|
+
firstPartyTools: titleToolPlan.remoteFirstPartyMcpTools,
|
|
17081
17195
|
nestedAgentDepth: session.nestedAgentDepth,
|
|
17082
17196
|
effectiveMaxNestedAgentDepth: session.effectiveMaxNestedAgentDepth,
|
|
17083
17197
|
attemptToolDefinitions,
|
|
@@ -17159,7 +17273,8 @@ async function prepareTurnToolRuntime(deps) {
|
|
|
17159
17273
|
...githubRestMcp.connectorBindings
|
|
17160
17274
|
],
|
|
17161
17275
|
connectorActionIdentity,
|
|
17162
|
-
postToolPreparationStartedAt
|
|
17276
|
+
postToolPreparationStartedAt,
|
|
17277
|
+
preparationIndependentToolNames: titleToolPlan.preparationIndependentToolNames
|
|
17163
17278
|
};
|
|
17164
17279
|
}
|
|
17165
17280
|
|
|
@@ -17353,7 +17468,6 @@ import {
|
|
|
17353
17468
|
resolveXaiProviderAccountAuthoritySnapshotForAcceptance,
|
|
17354
17469
|
getXaiSessionAccountPin as getXaiSessionAccountPin2,
|
|
17355
17470
|
setXaiSessionAccountPin as setXaiSessionAccountPin2,
|
|
17356
|
-
countSessionHistoryItems,
|
|
17357
17471
|
getWorkspaceVideoGenerationPolicy,
|
|
17358
17472
|
loadWorkspaceVercelAiGatewayCredentialLease,
|
|
17359
17473
|
beginConnectorActionExecution as beginConnectorActionExecution3,
|
|
@@ -18407,7 +18521,6 @@ async function buildTurnAgent(deps) {
|
|
|
18407
18521
|
cancellationSignal,
|
|
18408
18522
|
runtimeCancellationSignal,
|
|
18409
18523
|
eventing,
|
|
18410
|
-
attempt,
|
|
18411
18524
|
sandboxState,
|
|
18412
18525
|
recordingState,
|
|
18413
18526
|
maybeStartOnTurnRecording,
|
|
@@ -18450,6 +18563,7 @@ async function buildTurnAgent(deps) {
|
|
|
18450
18563
|
fileResourceDownloads,
|
|
18451
18564
|
attemptConnectorActionBindings,
|
|
18452
18565
|
connectorActionIdentity,
|
|
18566
|
+
preparationIndependentToolNames,
|
|
18453
18567
|
videoGenerationAcceptancesByCallId,
|
|
18454
18568
|
activeSandboxBackend,
|
|
18455
18569
|
groupBoxBackend,
|
|
@@ -18457,7 +18571,9 @@ async function buildTurnAgent(deps) {
|
|
|
18457
18571
|
codexContext
|
|
18458
18572
|
} = deps;
|
|
18459
18573
|
const preparedTools = eventing.preparedTools;
|
|
18460
|
-
const
|
|
18574
|
+
const missingSessionTitleHint = preparationIndependentToolNames.includes(
|
|
18575
|
+
SESSION_TITLE_MODEL_TOOL_NAME
|
|
18576
|
+
);
|
|
18461
18577
|
const workspaceEnvironmentOption = workspaceVariableSet ? {
|
|
18462
18578
|
workspaceEnvironment: {
|
|
18463
18579
|
name: workspaceVariableSet.name,
|
|
@@ -18804,7 +18920,7 @@ async function buildTurnAgent(deps) {
|
|
|
18804
18920
|
...serviceTier ? { serviceTier } : {},
|
|
18805
18921
|
...humanInputResume ? { humanInputResponse: humanInputResume } : {},
|
|
18806
18922
|
humanInputEnabled: agentHumanInputEnabled,
|
|
18807
|
-
|
|
18923
|
+
missingSessionTitleHint,
|
|
18808
18924
|
sandboxEnvironment,
|
|
18809
18925
|
...preparedTools.attemptToolCatalog ? { attemptToolCatalog: preparedTools.attemptToolCatalog } : {},
|
|
18810
18926
|
...sandboxArtifactRuntime.available ? { artifactRuntimeAvailable: true } : {},
|
|
@@ -18859,6 +18975,7 @@ async function buildTurnAgent(deps) {
|
|
|
18859
18975
|
...videoGenerationOption,
|
|
18860
18976
|
lazyToolTransport,
|
|
18861
18977
|
...eventing.toolPreparationReady ? { toolPreparationReady: eventing.toolPreparationReady } : {},
|
|
18978
|
+
preparationIndependentToolNames,
|
|
18862
18979
|
supportsImageInput,
|
|
18863
18980
|
inputFileMediaTypes: modelInputPolicy.inputFileMediaTypes,
|
|
18864
18981
|
...resolvedModel ? {
|
|
@@ -19598,7 +19715,8 @@ function createRunAgentTurnActivity(services) {
|
|
|
19598
19715
|
sandboxState,
|
|
19599
19716
|
media,
|
|
19600
19717
|
fileAuthoritySubjectId,
|
|
19601
|
-
runSettings
|
|
19718
|
+
runSettings,
|
|
19719
|
+
logicalSandboxSettings
|
|
19602
19720
|
});
|
|
19603
19721
|
const {
|
|
19604
19722
|
routingOn,
|
|
@@ -19816,7 +19934,8 @@ function createRunAgentTurnActivity(services) {
|
|
|
19816
19934
|
const {
|
|
19817
19935
|
attemptConnectorActionBindings,
|
|
19818
19936
|
connectorActionIdentity,
|
|
19819
|
-
postToolPreparationStartedAt
|
|
19937
|
+
postToolPreparationStartedAt,
|
|
19938
|
+
preparationIndependentToolNames
|
|
19820
19939
|
} = toolRuntime;
|
|
19821
19940
|
const builtAgent = await buildTurnAgent({
|
|
19822
19941
|
input,
|
|
@@ -19870,6 +19989,7 @@ function createRunAgentTurnActivity(services) {
|
|
|
19870
19989
|
fileResourceDownloads,
|
|
19871
19990
|
attemptConnectorActionBindings,
|
|
19872
19991
|
connectorActionIdentity,
|
|
19992
|
+
preparationIndependentToolNames,
|
|
19873
19993
|
videoGenerationAcceptancesByCallId,
|
|
19874
19994
|
activeSandboxBackend,
|
|
19875
19995
|
groupBoxBackend,
|
|
@@ -20256,7 +20376,7 @@ import {
|
|
|
20256
20376
|
settleVideoGenerationFailure,
|
|
20257
20377
|
settleVideoGenerationReady
|
|
20258
20378
|
} from "@opengeni/db";
|
|
20259
|
-
import { publishDurableSessionEvents as
|
|
20379
|
+
import { publishDurableSessionEvents as publishDurableSessionEvents9 } from "@opengeni/events";
|
|
20260
20380
|
|
|
20261
20381
|
// src/activities/gateway-video-generation.ts
|
|
20262
20382
|
import { readResponseTextBounded as readResponseTextBounded2 } from "@opengeni/network";
|
|
@@ -21058,7 +21178,7 @@ async function deliverTerminalResult(service, operation) {
|
|
|
21058
21178
|
return;
|
|
21059
21179
|
}
|
|
21060
21180
|
if (result.added && result.events.length > 0) {
|
|
21061
|
-
await
|
|
21181
|
+
await publishDurableSessionEvents9(
|
|
21062
21182
|
service.bus,
|
|
21063
21183
|
operation.workspaceId,
|
|
21064
21184
|
operation.sessionId,
|
|
@@ -21323,4 +21443,4 @@ export {
|
|
|
21323
21443
|
createTurnActivities,
|
|
21324
21444
|
createTurnActivitiesFromServices
|
|
21325
21445
|
};
|
|
21326
|
-
//# sourceMappingURL=activities-turn-
|
|
21446
|
+
//# sourceMappingURL=activities-turn-J3CR27E6.js.map
|