@opengeni/runtime 2.4.3 → 2.5.1-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/{agent-UA75SUZ7.js → agent-Q2VNH5FV.js} +2 -2
- package/dist/{chunk-ORKCCH5X.js → chunk-25B3EQRW.js} +3 -398
- package/dist/{chunk-ORKCCH5X.js.map → chunk-25B3EQRW.js.map} +1 -1
- package/dist/{chunk-BV2DSPZK.js → chunk-26GUTY32.js} +267 -181
- package/dist/chunk-26GUTY32.js.map +1 -0
- package/dist/{chunk-YRKIQK25.js → chunk-CD22I76N.js} +2 -2
- package/dist/{chunk-7K6WOXFS.js → chunk-GB763TSV.js} +17 -1
- package/dist/chunk-GB763TSV.js.map +1 -0
- package/dist/{chunk-WATBACLT.js → chunk-LGLJ5PVD.js} +5 -88
- package/dist/chunk-LGLJ5PVD.js.map +1 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.js +11 -5
- package/dist/{localSources-GDQRRHT3.js → localSources-Z5IJIIRV.js} +3 -3
- package/dist/model-input.d.ts +2 -1
- package/dist/runtime-skills.d.ts +28 -5
- package/dist/sandbox/index.js +3 -3
- package/dist/skill-files.d.ts +4 -0
- package/dist/skill-library.d.ts +1 -1
- package/dist/skill-library.js +3 -1
- package/dist/workspace-tool-gateway.js +5 -5
- package/package.json +11 -11
- package/src/bundled_management_skills/opengeni-skills/SKILL.md +3 -1
- package/src/index.ts +184 -33
- package/src/lazy-tool-transport.ts +0 -3
- package/src/model-input.ts +1 -1
- package/src/run-events.ts +23 -0
- package/src/runtime-skills.ts +122 -161
- package/src/sandbox/routing/routing-session.ts +1 -1
- package/src/skill-files.ts +20 -0
- package/src/skill-library.ts +1 -0
- package/dist/chunk-7K6WOXFS.js.map +0 -1
- package/dist/chunk-BV2DSPZK.js.map +0 -1
- package/dist/chunk-WATBACLT.js.map +0 -1
- /package/dist/{agent-UA75SUZ7.js.map → agent-Q2VNH5FV.js.map} +0 -0
- /package/dist/{chunk-YRKIQK25.js.map → chunk-CD22I76N.js.map} +0 -0
- /package/dist/{localSources-GDQRRHT3.js.map → localSources-Z5IJIIRV.js.map} +0 -0
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
createTurnToolCancellationController,
|
|
9
9
|
isDefinitePathNotFoundError,
|
|
10
10
|
isRoutingMutationOutcomeUnknownError,
|
|
11
|
-
localDirLazySkillSource,
|
|
12
11
|
normalizeProtocolJsonValue,
|
|
13
12
|
repairSerializedRunStateExposedPorts,
|
|
14
13
|
restoredSandboxSessionStateFromEntry,
|
|
@@ -24,15 +23,19 @@ import {
|
|
|
24
23
|
withRunCredentialsClient,
|
|
25
24
|
withRunCredentialsSession,
|
|
26
25
|
wrapCapabilityToolsForTurnCancellation
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LGLJ5PVD.js";
|
|
28
27
|
import {
|
|
29
28
|
MemorySession,
|
|
30
29
|
connectMcpServers
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CD22I76N.js";
|
|
32
31
|
import {
|
|
32
|
+
SKILL_MAX_FILES,
|
|
33
|
+
SkillFileError,
|
|
33
34
|
buildPortableSkillArtifact,
|
|
35
|
+
listSkillPaths,
|
|
36
|
+
readSkillFiles,
|
|
34
37
|
readSkillLibraryArtifact
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GB763TSV.js";
|
|
36
39
|
import {
|
|
37
40
|
MCP_MAX_CONCURRENT_SERVER_OPERATIONS,
|
|
38
41
|
MCP_MAX_TOOL_DEFINITION_BYTES,
|
|
@@ -92,7 +95,6 @@ import {
|
|
|
92
95
|
gitRepo,
|
|
93
96
|
inContainerMountStrategy,
|
|
94
97
|
loadEnv,
|
|
95
|
-
localDir,
|
|
96
98
|
logModelAndToolActionError,
|
|
97
99
|
logModelAndToolActionWarning,
|
|
98
100
|
normalizeHostedMcpRequireApproval,
|
|
@@ -103,11 +105,10 @@ import {
|
|
|
103
105
|
setTraceProcessors,
|
|
104
106
|
setTracingDisabled,
|
|
105
107
|
shell,
|
|
106
|
-
skills,
|
|
107
108
|
tool,
|
|
108
109
|
withGenerationSpan,
|
|
109
110
|
withResponseSpan
|
|
110
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-25B3EQRW.js";
|
|
111
112
|
|
|
112
113
|
// src/command-read-refresh.ts
|
|
113
114
|
async function executeCommandReadWithRefresh(input) {
|
|
@@ -1841,13 +1842,13 @@ function toOpenAIShellEnvironment(environment) {
|
|
|
1841
1842
|
};
|
|
1842
1843
|
}
|
|
1843
1844
|
if (environment.type === "container_auto") {
|
|
1844
|
-
const
|
|
1845
|
+
const skills = environment.skills?.map(toOpenAIShellSkill);
|
|
1845
1846
|
return {
|
|
1846
1847
|
type: "container_auto",
|
|
1847
1848
|
file_ids: environment.fileIds,
|
|
1848
1849
|
memory_limit: environment.memoryLimit,
|
|
1849
1850
|
network_policy: toOpenAIShellNetworkPolicy(environment.networkPolicy),
|
|
1850
|
-
skills
|
|
1851
|
+
skills
|
|
1851
1852
|
};
|
|
1852
1853
|
}
|
|
1853
1854
|
if (environment.type === "container_reference") {
|
|
@@ -7157,9 +7158,6 @@ var ALWAYS_VISIBLE_BASE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
7157
7158
|
"view_image",
|
|
7158
7159
|
// A plain function tool on Chat Completions; Responses uses type apply_patch.
|
|
7159
7160
|
"apply_patch",
|
|
7160
|
-
// The SDK skills capability prints the skill index in the instructions and
|
|
7161
|
-
// mandates this call before any SKILL.md read.
|
|
7162
|
-
"load_skill",
|
|
7163
7161
|
// The server-backed reader needs neither sandbox setup nor tool search.
|
|
7164
7162
|
"skill_read",
|
|
7165
7163
|
"request_human_input",
|
|
@@ -8267,7 +8265,7 @@ import {
|
|
|
8267
8265
|
} from "@opengeni/codex";
|
|
8268
8266
|
import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
|
|
8269
8267
|
import { createHash as createHash5, randomUUID as randomUUID3 } from "crypto";
|
|
8270
|
-
import { dirname as dirname2, isAbsolute
|
|
8268
|
+
import { dirname as dirname2, isAbsolute, join as join2, posix as posixPath2 } from "path";
|
|
8271
8269
|
|
|
8272
8270
|
// src/screenshot-error-card.ts
|
|
8273
8271
|
var SCREENSHOT_FAILURE_CARD_IMAGE_URL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABVMAAAGYCAYAAABPvXKBAAAh90lEQVR42u3dMXLkxhJF0VnEGDQQXLY2CaedtkcLkEJBBaqrXmYe43j6bDZQKGTd+RH89df39x8AAAAAAP7bLxcBAAAAAEBMBQAAAAAQUwEAAAAAxFQAAAAAADEVAAAAAEBMBQAAAAAQUwEAAAAAxFQAAAAAAMRUAAAAAAAxFQAAAABATAUAAAAAEFMBAAAAAMRUAAAAAAAxFQAAAABATAUAAAAAQEwFAAAAABBTAQAAAADEVAAAAAAAMRUAAAAAQEwFAAAAABBTAQAAAADEVAAAAAAAMRUAAAAAgMCY+n7dSyV9bpfvdur7Pvnc1Wsy/eGtuNam7RHp63nade7yrE57fk89R9Pev4ZiAAAQU8VUMVVMFWPEVPuVmCqmiqliKgAAiKliqpgqpooxIpCYKqaKqWKqmAoAAGKqmCqmiqliqpgqpoqpnl8xVUwFAAAxVUwVU8VUMVVMFVPFVM+vmCqmAgCAmBp9uKn4uRUPkUmH1y4x1Xq+S34P1/lu848Xnt95P8/9FVgBAEBMFZ/EVDFV5PPzxFTPr5/n/oqpAAAgpopPYqqYaj2LQGKqmGrdmzfEVAAAEFMdbsRUMdV6FoHEVDHVujdviKkAACCm+lwxVUy1nkUgMVVMFVNdZzEVAADEVIcbMfXg53aJO9azCCSmiqnWvXlDTAUAADHV54qpYqr1LAKJqWKqmCqmiqkAACCmOtyIqWKq9Symus5iqtgmpoqpAAAgpjrciBNiqhgjpoqpYqrnV0x1fwEAQEx1yBBTxVQxRkwVU8VUz6+Y6v4CAABbY+qTv8Re8a+zP/luq7/vtM8VU/PX85P7sWNdiam9942k57f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aceSkillsCapability = class extends Capability {
|
|
|
11740
11738
|
this._runAs,
|
|
11741
11739
|
this.shadowedNames
|
|
11742
11740
|
);
|
|
11743
|
-
const
|
|
11744
|
-
if (
|
|
11745
|
-
const available =
|
|
11741
|
+
const skills = await this.discovery;
|
|
11742
|
+
if (skills.length === 0) return null;
|
|
11743
|
+
const available = skills.map((skill) => `- ${skill.name}: ${skill.description} (file: ${skill.path})`).join("\n");
|
|
11746
11744
|
return `## Repository skills
|
|
11747
11745
|
|
|
11748
11746
|
Repository skills are instructions already present in the live workspace. They do not need to be loaded or copied.
|
|
@@ -11930,20 +11928,12 @@ function requireWorkspaceSkillSession(session) {
|
|
|
11930
11928
|
}
|
|
11931
11929
|
|
|
11932
11930
|
// src/runtime-skills.ts
|
|
11933
|
-
import {
|
|
11934
|
-
cpSync,
|
|
11935
|
-
existsSync,
|
|
11936
|
-
mkdirSync,
|
|
11937
|
-
readdirSync,
|
|
11938
|
-
readFileSync,
|
|
11939
|
-
renameSync,
|
|
11940
|
-
rmSync
|
|
11941
|
-
} from "fs";
|
|
11931
|
+
import { existsSync, readdirSync } from "fs";
|
|
11942
11932
|
|
|
11943
11933
|
// ../sdk/package.json
|
|
11944
11934
|
var package_default = {
|
|
11945
11935
|
name: "@opengeni/sdk",
|
|
11946
|
-
version: "
|
|
11936
|
+
version: "5.0.0-canary.0",
|
|
11947
11937
|
description: "Framework-agnostic TypeScript SDK for the OpenGeni API: typed client, session lifecycle, SSE event streaming with reconnect + replay-by-sequence, and proxy re-streaming helpers.",
|
|
11948
11938
|
license: "Apache-2.0",
|
|
11949
11939
|
repository: {
|
|
@@ -12060,6 +12050,7 @@ var package_default = {
|
|
|
12060
12050
|
prepublishOnly: "bash ../../scripts/prepublish-guard"
|
|
12061
12051
|
},
|
|
12062
12052
|
dependencies: {
|
|
12053
|
+
"@opengeni/connect": "workspace:*",
|
|
12063
12054
|
"@opengeni/contracts": "workspace:*"
|
|
12064
12055
|
},
|
|
12065
12056
|
devDependencies: {
|
|
@@ -12082,7 +12073,7 @@ var package_default = {
|
|
|
12082
12073
|
// ../react/package.json
|
|
12083
12074
|
var package_default2 = {
|
|
12084
12075
|
name: "@opengeni/react",
|
|
12085
|
-
version: "
|
|
12076
|
+
version: "5.0.2-canary.0",
|
|
12086
12077
|
description: "React hooks and styled components for OpenGeni: live session streaming, chat composer, message timeline, session status, and fleet views \u2014 token-themed (CSS variables), dark-first, built on Tailwind v4 + Radix + Motion.",
|
|
12087
12078
|
license: "Apache-2.0",
|
|
12088
12079
|
repository: {
|
|
@@ -12103,6 +12094,19 @@ var package_default2 = {
|
|
|
12103
12094
|
module: "./src/index.ts",
|
|
12104
12095
|
types: "./src/index.ts",
|
|
12105
12096
|
exports: {
|
|
12097
|
+
"./sites": {
|
|
12098
|
+
types: "./src/sites.ts",
|
|
12099
|
+
default: "./src/sites.ts"
|
|
12100
|
+
},
|
|
12101
|
+
"./connect.css": {
|
|
12102
|
+
types: "./styles/connect.d.ts",
|
|
12103
|
+
style: "./styles/connect.css",
|
|
12104
|
+
default: "./styles/connect.css"
|
|
12105
|
+
},
|
|
12106
|
+
"./connect": {
|
|
12107
|
+
types: "./src/connect.ts",
|
|
12108
|
+
default: "./src/connect.ts"
|
|
12109
|
+
},
|
|
12106
12110
|
".": {
|
|
12107
12111
|
types: "./src/index.ts",
|
|
12108
12112
|
default: "./src/index.ts"
|
|
@@ -12202,6 +12206,7 @@ var package_default2 = {
|
|
|
12202
12206
|
"@dnd-kit/utilities": "3.2.2",
|
|
12203
12207
|
"@fontsource-variable/noto-sans-arabic": "5.2.10",
|
|
12204
12208
|
"@fontsource-variable/noto-sans-jp": "5.2.10",
|
|
12209
|
+
"@opengeni/connect": "workspace:*",
|
|
12205
12210
|
"@opengeni/sdk": "workspace:*",
|
|
12206
12211
|
clsx: "^2.1.1",
|
|
12207
12212
|
dequal: "2.0.3",
|
|
@@ -12320,7 +12325,7 @@ var package_default2 = {
|
|
|
12320
12325
|
// ../codemode/package.json
|
|
12321
12326
|
var package_default3 = {
|
|
12322
12327
|
name: "@opengeni/codemode",
|
|
12323
|
-
version: "0.5.
|
|
12328
|
+
version: "0.5.4-canary.0",
|
|
12324
12329
|
description: "Attempt-frozen programmatic tool catalog and execution authority for OpenGeni.",
|
|
12325
12330
|
license: "Apache-2.0",
|
|
12326
12331
|
repository: {
|
|
@@ -12369,7 +12374,7 @@ var package_default3 = {
|
|
|
12369
12374
|
// ../ogtool/package.json
|
|
12370
12375
|
var package_default4 = {
|
|
12371
12376
|
name: "@opengeni/ogtool",
|
|
12372
|
-
version: "0.3.
|
|
12377
|
+
version: "0.3.36-canary.0",
|
|
12373
12378
|
description: "Codemode CLI and typed client entrypoint for an OpenGeni execution attempt.",
|
|
12374
12379
|
license: "Apache-2.0",
|
|
12375
12380
|
repository: {
|
|
@@ -12439,7 +12444,7 @@ function sitePackageVersions(override = process.env.OPENGENI_SITE_PACKAGE_VERSIO
|
|
|
12439
12444
|
}
|
|
12440
12445
|
|
|
12441
12446
|
// src/runtime-skills.ts
|
|
12442
|
-
import { dirname,
|
|
12447
|
+
import { dirname, join } from "path";
|
|
12443
12448
|
import { fileURLToPath } from "url";
|
|
12444
12449
|
import { readSkillMetadata } from "@opengeni/contracts";
|
|
12445
12450
|
var emptyNativeToolSkillSet = Object.freeze({
|
|
@@ -12471,8 +12476,6 @@ function loadNativeToolSkillArtifacts(nativeTools) {
|
|
|
12471
12476
|
});
|
|
12472
12477
|
});
|
|
12473
12478
|
}
|
|
12474
|
-
var stagedBundledArtifactSkillsDir = null;
|
|
12475
|
-
var stagedBundledVideoSkillsDir = null;
|
|
12476
12479
|
function composeRuntimeSkills(activations, nativeTools = emptyNativeToolSkillSet) {
|
|
12477
12480
|
const nativeSources = nativeToolSkillSources(nativeTools);
|
|
12478
12481
|
const nativeNameKeys = new Set(
|
|
@@ -12482,37 +12485,51 @@ function composeRuntimeSkills(activations, nativeTools = emptyNativeToolSkillSet
|
|
|
12482
12485
|
activations.map(validateRuntimeSkillActivation),
|
|
12483
12486
|
nativeNameKeys
|
|
12484
12487
|
);
|
|
12485
|
-
const
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
for (const source of nativeSources) {
|
|
12490
|
-
for (const name of source.names) {
|
|
12491
|
-
children[name] = source.entries?.[name] ?? localDir({ src: join(source.directory, name) });
|
|
12492
|
-
}
|
|
12493
|
-
}
|
|
12494
|
-
const activationIndex = [];
|
|
12495
|
-
for (const { activation } of effectiveActivations) {
|
|
12496
|
-
const { artifact } = activation;
|
|
12497
|
-
children[artifact.name] = runtimeSkillDirEntry(artifact);
|
|
12498
|
-
activationIndex.push({
|
|
12488
|
+
const nativeArtifacts = loadNativeToolSkillArtifacts(nativeTools);
|
|
12489
|
+
const nativeReadables = nativeArtifacts.map(
|
|
12490
|
+
(artifact) => Object.freeze({
|
|
12491
|
+
id: `native-tool:${artifact.name}`,
|
|
12499
12492
|
name: artifact.name,
|
|
12500
12493
|
description: runtimeSkillDescription(artifact),
|
|
12501
|
-
|
|
12502
|
-
})
|
|
12503
|
-
|
|
12494
|
+
files: artifact.files
|
|
12495
|
+
})
|
|
12496
|
+
);
|
|
12497
|
+
const configuredDescriptors = Object.freeze(
|
|
12498
|
+
effectiveActivations.map(
|
|
12499
|
+
({ activation }) => Object.freeze({
|
|
12500
|
+
id: activation.id,
|
|
12501
|
+
name: activation.artifact.name,
|
|
12502
|
+
source: activation.source,
|
|
12503
|
+
reason: activation.reason,
|
|
12504
|
+
description: runtimeSkillDescription(activation.artifact)
|
|
12505
|
+
})
|
|
12506
|
+
)
|
|
12507
|
+
);
|
|
12508
|
+
const configuredReadables = effectiveActivations.map(
|
|
12509
|
+
({ activation }) => Object.freeze({
|
|
12510
|
+
id: activation.id,
|
|
12511
|
+
name: activation.artifact.name,
|
|
12512
|
+
description: runtimeSkillDescription(activation.artifact),
|
|
12513
|
+
files: activation.artifact.files
|
|
12514
|
+
})
|
|
12515
|
+
);
|
|
12516
|
+
const index = Object.freeze([
|
|
12517
|
+
...nativeReadables.map(
|
|
12518
|
+
(artifact) => Object.freeze({
|
|
12519
|
+
id: artifact.id,
|
|
12520
|
+
name: artifact.name,
|
|
12521
|
+
description: artifact.description
|
|
12522
|
+
})
|
|
12523
|
+
),
|
|
12524
|
+
...configuredDescriptors.map(
|
|
12525
|
+
(descriptor) => Object.freeze({
|
|
12526
|
+
id: descriptor.id,
|
|
12527
|
+
name: descriptor.name,
|
|
12528
|
+
description: descriptor.description
|
|
12529
|
+
})
|
|
12530
|
+
)
|
|
12531
|
+
]);
|
|
12504
12532
|
return Object.freeze({
|
|
12505
|
-
lazySource: {
|
|
12506
|
-
source: dir({ children }),
|
|
12507
|
-
getIndex: (manifest, skillsPath) => [
|
|
12508
|
-
...nativeSources.flatMap(
|
|
12509
|
-
(source) => (source.lazySource.getIndex?.(manifest, skillsPath) ?? []).filter(
|
|
12510
|
-
(entry) => !activatedNameKeys.has((entry.path ?? entry.name).toLowerCase())
|
|
12511
|
-
)
|
|
12512
|
-
),
|
|
12513
|
-
...activationIndex
|
|
12514
|
-
]
|
|
12515
|
-
},
|
|
12516
12533
|
selections: Object.freeze([
|
|
12517
12534
|
...nativeSources.flatMap(
|
|
12518
12535
|
(source) => source.names.map(
|
|
@@ -12528,23 +12545,48 @@ function composeRuntimeSkills(activations, nativeTools = emptyNativeToolSkillSet
|
|
|
12528
12545
|
),
|
|
12529
12546
|
...effectiveActivations.map((activation) => selectionForActivation(activation))
|
|
12530
12547
|
]),
|
|
12531
|
-
configuredDescriptors
|
|
12532
|
-
effectiveActivations.map(
|
|
12533
|
-
({ activation }) => Object.freeze({
|
|
12534
|
-
id: activation.id,
|
|
12535
|
-
name: activation.artifact.name,
|
|
12536
|
-
source: activation.source,
|
|
12537
|
-
reason: activation.reason,
|
|
12538
|
-
description: runtimeSkillDescription(activation.artifact)
|
|
12539
|
-
})
|
|
12540
|
-
)
|
|
12541
|
-
),
|
|
12548
|
+
configuredDescriptors,
|
|
12542
12549
|
configuredNames: Object.freeze(
|
|
12543
12550
|
effectiveActivations.map(({ activation }) => activation.artifact.name)
|
|
12544
12551
|
),
|
|
12545
|
-
nativeToolNames: Object.freeze([...nativeSources.flatMap((source) => source.names)])
|
|
12552
|
+
nativeToolNames: Object.freeze([...nativeSources.flatMap((source) => source.names)]),
|
|
12553
|
+
index,
|
|
12554
|
+
artifacts: Object.freeze([...nativeReadables, ...configuredReadables])
|
|
12546
12555
|
});
|
|
12547
12556
|
}
|
|
12557
|
+
function skillCatalogFromComposition(composition) {
|
|
12558
|
+
return composition.index;
|
|
12559
|
+
}
|
|
12560
|
+
function readRuntimeSkill(composition, request) {
|
|
12561
|
+
const skill = request.skill.trim();
|
|
12562
|
+
if (!skill)
|
|
12563
|
+
throw new SkillFileError("invalid_request", "skill_read requires a Skill identifier.");
|
|
12564
|
+
if (request.listFiles === true && request.paths !== void 0) {
|
|
12565
|
+
throw new SkillFileError(
|
|
12566
|
+
"invalid_request",
|
|
12567
|
+
"skill_read listFiles:true cannot be combined with paths."
|
|
12568
|
+
);
|
|
12569
|
+
}
|
|
12570
|
+
const exact = composition.artifacts.find((artifact2) => artifact2.id === skill);
|
|
12571
|
+
const matches = exact ? [exact] : composition.artifacts.filter((artifact2) => artifact2.name === skill);
|
|
12572
|
+
if (matches.length === 0) {
|
|
12573
|
+
throw new SkillFileError("missing_file", `Skill not found: ${skill}`);
|
|
12574
|
+
}
|
|
12575
|
+
if (matches.length > 1) {
|
|
12576
|
+
throw new SkillFileError(
|
|
12577
|
+
"invalid_request",
|
|
12578
|
+
`Skill name is ambiguous: ${skill}. Use the catalog id.`
|
|
12579
|
+
);
|
|
12580
|
+
}
|
|
12581
|
+
const artifact = matches[0];
|
|
12582
|
+
if (request.listFiles === true) {
|
|
12583
|
+
return { skillId: artifact.id, ...listSkillPaths(artifact.files, SKILL_MAX_FILES) };
|
|
12584
|
+
}
|
|
12585
|
+
return {
|
|
12586
|
+
skillId: artifact.id,
|
|
12587
|
+
files: readSkillFiles(artifact.files, request.paths).files
|
|
12588
|
+
};
|
|
12589
|
+
}
|
|
12548
12590
|
function resolveEffectiveActivations(activations, nativeNameKeys) {
|
|
12549
12591
|
const effective = /* @__PURE__ */ new Map();
|
|
12550
12592
|
for (const candidate of activations) {
|
|
@@ -12630,33 +12672,20 @@ function selectionForActivation({
|
|
|
12630
12672
|
function nativeToolSkillSources(nativeTools) {
|
|
12631
12673
|
const sources = [];
|
|
12632
12674
|
if (nativeTools.editableArtifacts) {
|
|
12633
|
-
const directory = bundledArtifactSkillsDir();
|
|
12634
12675
|
sources.push({
|
|
12635
|
-
|
|
12636
|
-
lazySource: localDirLazySkillSource({ src: directory }),
|
|
12637
|
-
names: skillDirNames(directory),
|
|
12676
|
+
names: skillDirNames(packagedSkillDirectory("bundled_artifact_skills")),
|
|
12638
12677
|
reason: "native editable-artifact tool surface"
|
|
12639
12678
|
});
|
|
12640
12679
|
}
|
|
12641
12680
|
if (nativeTools.sites) {
|
|
12642
|
-
const directory = packagedSkillDirectory("bundled_site_skills");
|
|
12643
|
-
const site = bundledSkillEntry(join(directory, "opengeni-sites"), {
|
|
12644
|
-
"package-versions.json": file({ content: JSON.stringify(sitePackageVersions(), null, 2) })
|
|
12645
|
-
});
|
|
12646
12681
|
sources.push({
|
|
12647
|
-
|
|
12648
|
-
entries: { "opengeni-sites": site },
|
|
12649
|
-
lazySource: localDirLazySkillSource({ src: directory, baseDir: directory }),
|
|
12650
|
-
names: skillDirNames(directory),
|
|
12682
|
+
names: skillDirNames(packagedSkillDirectory("bundled_site_skills")),
|
|
12651
12683
|
reason: "bundled Site authoring skill"
|
|
12652
12684
|
});
|
|
12653
12685
|
}
|
|
12654
12686
|
if (nativeTools.videoGeneration) {
|
|
12655
|
-
const directory = bundledVideoSkillsDir();
|
|
12656
12687
|
sources.push({
|
|
12657
|
-
|
|
12658
|
-
lazySource: localDirLazySkillSource({ src: directory }),
|
|
12659
|
-
names: skillDirNames(directory),
|
|
12688
|
+
names: skillDirNames(packagedSkillDirectory("bundled_video_skills")),
|
|
12660
12689
|
reason: "native video-generation tool surface"
|
|
12661
12690
|
});
|
|
12662
12691
|
}
|
|
@@ -12670,60 +12699,9 @@ function packagedSkillDirectory(directoryName) {
|
|
|
12670
12699
|
join(moduleDir, "..", "src", directoryName)
|
|
12671
12700
|
].find((candidate) => existsSync(candidate)) ?? join(moduleDir, directoryName);
|
|
12672
12701
|
}
|
|
12673
|
-
function bundledArtifactSkillsDir() {
|
|
12674
|
-
const packaged = packagedSkillDirectory("bundled_artifact_skills");
|
|
12675
|
-
if (isPathWithin(process.cwd(), packaged)) return packaged;
|
|
12676
|
-
if (!stagedBundledArtifactSkillsDir) {
|
|
12677
|
-
stagedBundledArtifactSkillsDir = stageSkillDirectory(
|
|
12678
|
-
packaged,
|
|
12679
|
-
join(process.cwd(), ".opengeni", "bundled_artifact_skills")
|
|
12680
|
-
);
|
|
12681
|
-
}
|
|
12682
|
-
return stagedBundledArtifactSkillsDir;
|
|
12683
|
-
}
|
|
12684
|
-
function bundledSkillEntry(directory, overrides = {}) {
|
|
12685
|
-
const children = {};
|
|
12686
|
-
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
12687
|
-
const path = join(directory, entry.name);
|
|
12688
|
-
children[entry.name] = entry.isDirectory() ? bundledSkillEntry(path) : file({ content: readFileSync(path, "utf8") });
|
|
12689
|
-
}
|
|
12690
|
-
return dir({ children: { ...children, ...overrides } });
|
|
12691
|
-
}
|
|
12692
|
-
function bundledVideoSkillsDir() {
|
|
12693
|
-
const packaged = packagedSkillDirectory("bundled_video_skills");
|
|
12694
|
-
if (isPathWithin(process.cwd(), packaged)) return packaged;
|
|
12695
|
-
if (!stagedBundledVideoSkillsDir) {
|
|
12696
|
-
stagedBundledVideoSkillsDir = stageSkillDirectory(
|
|
12697
|
-
packaged,
|
|
12698
|
-
join(process.cwd(), ".opengeni", "bundled_video_skills")
|
|
12699
|
-
);
|
|
12700
|
-
}
|
|
12701
|
-
return stagedBundledVideoSkillsDir;
|
|
12702
|
-
}
|
|
12703
|
-
function stageSkillDirectory(packaged, target) {
|
|
12704
|
-
const temporary = `${target}.tmp-${process.pid}`;
|
|
12705
|
-
rmSync(temporary, { recursive: true, force: true });
|
|
12706
|
-
mkdirSync(dirname(temporary), { recursive: true });
|
|
12707
|
-
cpSync(packaged, temporary, { recursive: true });
|
|
12708
|
-
rmSync(target, { recursive: true, force: true });
|
|
12709
|
-
try {
|
|
12710
|
-
renameSync(temporary, target);
|
|
12711
|
-
} catch (error) {
|
|
12712
|
-
rmSync(temporary, { recursive: true, force: true });
|
|
12713
|
-
if (!existsSync(target)) throw error;
|
|
12714
|
-
}
|
|
12715
|
-
return target;
|
|
12716
|
-
}
|
|
12717
|
-
function isPathWithin(root, candidate) {
|
|
12718
|
-
const relativePath = relative(root, candidate);
|
|
12719
|
-
return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute(relativePath);
|
|
12720
|
-
}
|
|
12721
12702
|
function skillDirNames(root) {
|
|
12722
12703
|
return readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory() && existsSync(join(root, entry.name, "SKILL.md"))).map((entry) => entry.name).sort();
|
|
12723
12704
|
}
|
|
12724
|
-
function runtimeSkillDirEntry(skill) {
|
|
12725
|
-
return runtimeSkillDirFromNode(runtimeSkillDirNode(skill));
|
|
12726
|
-
}
|
|
12727
12705
|
function runtimeSkillDirNode(skill) {
|
|
12728
12706
|
const root = { dirs: /* @__PURE__ */ new Map(), files: /* @__PURE__ */ new Map() };
|
|
12729
12707
|
for (const skillFile of skill.files) {
|
|
@@ -12751,12 +12729,6 @@ function runtimeSkillDirNode(skill) {
|
|
|
12751
12729
|
}
|
|
12752
12730
|
return root;
|
|
12753
12731
|
}
|
|
12754
|
-
function runtimeSkillDirFromNode(node) {
|
|
12755
|
-
const children = {};
|
|
12756
|
-
for (const [name, child] of node.dirs) children[name] = runtimeSkillDirFromNode(child);
|
|
12757
|
-
for (const [name, content] of node.files) children[name] = file({ content });
|
|
12758
|
-
return dir({ children });
|
|
12759
|
-
}
|
|
12760
12732
|
function assertSafeRuntimeSkillName(name) {
|
|
12761
12733
|
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/u.test(name)) {
|
|
12762
12734
|
throw new Error(`Invalid Skill name: ${name}`);
|
|
@@ -13095,7 +13067,7 @@ function skillsFromSelections(selections) {
|
|
|
13095
13067
|
}));
|
|
13096
13068
|
}
|
|
13097
13069
|
function skillsFromGovernanceLayer(content) {
|
|
13098
|
-
const
|
|
13070
|
+
const skills = [];
|
|
13099
13071
|
const marker = "Skill descriptors (full instructions are on-demand):\n";
|
|
13100
13072
|
let cursor = 0;
|
|
13101
13073
|
while (cursor < content.length) {
|
|
@@ -13128,7 +13100,7 @@ function skillsFromGovernanceLayer(content) {
|
|
|
13128
13100
|
const name = typeof record.title === "string" ? record.title : typeof record.stableKey === "string" ? record.stableKey : null;
|
|
13129
13101
|
const description = typeof record.description === "string" ? record.description : "";
|
|
13130
13102
|
if (!name) continue;
|
|
13131
|
-
|
|
13103
|
+
skills.push({
|
|
13132
13104
|
kind: "preference_descriptor",
|
|
13133
13105
|
name,
|
|
13134
13106
|
description,
|
|
@@ -13140,7 +13112,7 @@ function skillsFromGovernanceLayer(content) {
|
|
|
13140
13112
|
}
|
|
13141
13113
|
cursor = end;
|
|
13142
13114
|
}
|
|
13143
|
-
return
|
|
13115
|
+
return skills;
|
|
13144
13116
|
}
|
|
13145
13117
|
async function buildModelContextSnapshot(input) {
|
|
13146
13118
|
const layers = splitCapturedInstructions({
|
|
@@ -13172,7 +13144,7 @@ async function buildModelContextSnapshot(input) {
|
|
|
13172
13144
|
);
|
|
13173
13145
|
}
|
|
13174
13146
|
const governance = layers.find((layer) => layer.id === "workspace_governance")?.content ?? "";
|
|
13175
|
-
const
|
|
13147
|
+
const skills = [
|
|
13176
13148
|
...skillsFromGovernanceLayer(governance),
|
|
13177
13149
|
...skillsFromSelections(input.skillSelections)
|
|
13178
13150
|
];
|
|
@@ -13184,7 +13156,7 @@ async function buildModelContextSnapshot(input) {
|
|
|
13184
13156
|
instructions: input.capturedInstructions,
|
|
13185
13157
|
layers,
|
|
13186
13158
|
tools,
|
|
13187
|
-
skills
|
|
13159
|
+
skills,
|
|
13188
13160
|
tokens: onWireTokenCounts(input.capturedInstructions, tools)
|
|
13189
13161
|
};
|
|
13190
13162
|
}
|
|
@@ -13240,7 +13212,7 @@ function buildModelContextSnapshotFromRequest(input) {
|
|
|
13240
13212
|
);
|
|
13241
13213
|
}
|
|
13242
13214
|
const governance = layers.find((layer) => layer.id === "workspace_governance")?.content ?? "";
|
|
13243
|
-
const
|
|
13215
|
+
const skills = [
|
|
13244
13216
|
...skillsFromGovernanceLayer(governance),
|
|
13245
13217
|
...skillsFromSelections(input.skillSelections)
|
|
13246
13218
|
];
|
|
@@ -13252,7 +13224,7 @@ function buildModelContextSnapshotFromRequest(input) {
|
|
|
13252
13224
|
instructions: capturedInstructions,
|
|
13253
13225
|
layers,
|
|
13254
13226
|
tools,
|
|
13255
|
-
skills
|
|
13227
|
+
skills,
|
|
13256
13228
|
tokens: onWireTokenCounts(capturedInstructions, tools)
|
|
13257
13229
|
};
|
|
13258
13230
|
}
|
|
@@ -13881,6 +13853,7 @@ import {
|
|
|
13881
13853
|
approvalIdentifier,
|
|
13882
13854
|
RequestHumanInteractionToolInput,
|
|
13883
13855
|
RequestHumanInputToolInput,
|
|
13856
|
+
canonicalSkillReviewQuestion,
|
|
13884
13857
|
sessionEventMediaPreview,
|
|
13885
13858
|
sessionEventMediaPreviewFromDataUrl
|
|
13886
13859
|
} from "@opengeni/contracts";
|
|
@@ -14309,6 +14282,25 @@ function serializeHumanInputRequests(interruptions) {
|
|
|
14309
14282
|
throw new Error("Human-input interruption is missing a stable tool-call identity");
|
|
14310
14283
|
}
|
|
14311
14284
|
const input = RequestHumanInputToolInput.parse(interruptionArguments(item));
|
|
14285
|
+
const reviews = input.questions.filter((question) => question.skillReview);
|
|
14286
|
+
if (reviews.length > 0) {
|
|
14287
|
+
if (input.questions.length !== 1) {
|
|
14288
|
+
throw new Error("Skill review requires one dedicated human-input question");
|
|
14289
|
+
}
|
|
14290
|
+
const question = reviews[0];
|
|
14291
|
+
const canonical = canonicalSkillReviewQuestion(question);
|
|
14292
|
+
if (!canonical) {
|
|
14293
|
+
throw new Error("Skill review must use the exact host-owned confirmation presentation");
|
|
14294
|
+
}
|
|
14295
|
+
return {
|
|
14296
|
+
toolCallId,
|
|
14297
|
+
input: {
|
|
14298
|
+
...input,
|
|
14299
|
+
questions: [canonical],
|
|
14300
|
+
allowSkip: false
|
|
14301
|
+
}
|
|
14302
|
+
};
|
|
14303
|
+
}
|
|
14312
14304
|
return {
|
|
14313
14305
|
toolCallId,
|
|
14314
14306
|
input: {
|
|
@@ -16348,9 +16340,12 @@ async function summarizeForCompaction(settings, input, options = {}) {
|
|
|
16348
16340
|
}
|
|
16349
16341
|
const request = {
|
|
16350
16342
|
systemInstructions: options.systemInstructions ?? "",
|
|
16351
|
-
input,
|
|
16343
|
+
input: input.map(detachCompactionResponseItemIdentity),
|
|
16352
16344
|
modelSettings: {
|
|
16353
16345
|
maxTokens,
|
|
16346
|
+
// Azure can select a historical tool despite empty schemas. Keep this
|
|
16347
|
+
// verified policy off subscription/gateway transports with other contracts.
|
|
16348
|
+
...provider.wireProfile === "azure-openai" ? { toolChoice: "none" } : {},
|
|
16354
16349
|
// Azure rejects store:false; the Codex subscription transport enforces
|
|
16355
16350
|
// it independently. The OpenAI platform path remains explicitly storeless.
|
|
16356
16351
|
...settings.openaiProvider === "azure" ? {} : { store: false },
|
|
@@ -16381,6 +16376,26 @@ async function summarizeForCompaction(settings, input, options = {}) {
|
|
|
16381
16376
|
}
|
|
16382
16377
|
return summary;
|
|
16383
16378
|
}
|
|
16379
|
+
var DETACHABLE_COMPACTION_ITEM_TYPES = /* @__PURE__ */ new Set([
|
|
16380
|
+
"message",
|
|
16381
|
+
"reasoning",
|
|
16382
|
+
"function_call",
|
|
16383
|
+
"function_call_result",
|
|
16384
|
+
"shell_call",
|
|
16385
|
+
"shell_call_output",
|
|
16386
|
+
"computer_call",
|
|
16387
|
+
"computer_call_result",
|
|
16388
|
+
"apply_patch_call",
|
|
16389
|
+
"apply_patch_call_output"
|
|
16390
|
+
]);
|
|
16391
|
+
function detachCompactionResponseItemIdentity(item) {
|
|
16392
|
+
const clientToolSearch = (item.type === "tool_search_call" || item.type === "tool_search_output") && getToolSearchExecution(item) !== "server" && Boolean(getToolSearchProviderCallId(item));
|
|
16393
|
+
const providerData = item.providerData;
|
|
16394
|
+
const webSearch = item.type === "hosted_tool_call" && (providerData?.type === "web_search_call" || providerData?.type === "web_search");
|
|
16395
|
+
if (!DETACHABLE_COMPACTION_ITEM_TYPES.has(String(item.type)) && !clientToolSearch && !webSearch)
|
|
16396
|
+
return item;
|
|
16397
|
+
return stripProviderItemId(item);
|
|
16398
|
+
}
|
|
16384
16399
|
async function serializedToolsForRemoteCompaction(agent) {
|
|
16385
16400
|
const tools = await agent.getAllTools(new RunContext());
|
|
16386
16401
|
const serialized = [];
|
|
@@ -16539,11 +16554,13 @@ function compactionProviderFailureDiagnostics(error) {
|
|
|
16539
16554
|
let type = null;
|
|
16540
16555
|
let requestId = null;
|
|
16541
16556
|
let eventType = null;
|
|
16557
|
+
let rejectionReason = null;
|
|
16542
16558
|
const seen = /* @__PURE__ */ new Set();
|
|
16543
16559
|
for (let depth = 0; depth < 6 && current && typeof current === "object"; depth += 1) {
|
|
16544
16560
|
if (seen.has(current)) break;
|
|
16545
16561
|
seen.add(current);
|
|
16546
16562
|
const record = current;
|
|
16563
|
+
rejectionReason ??= compactionRejectionReason(record);
|
|
16547
16564
|
if (!errorName && current instanceof Error) {
|
|
16548
16565
|
errorName = boundCompactionDiagnosticField(current.name);
|
|
16549
16566
|
}
|
|
@@ -16590,6 +16607,7 @@ function compactionProviderFailureDiagnostics(error) {
|
|
|
16590
16607
|
const nestedError = record.error;
|
|
16591
16608
|
if (nestedError && typeof nestedError === "object" && !seen.has(nestedError)) {
|
|
16592
16609
|
const nested = nestedError;
|
|
16610
|
+
rejectionReason ??= compactionRejectionReason(nested);
|
|
16593
16611
|
if (code === null && typeof nested.code === "string") {
|
|
16594
16612
|
code = boundCompactionDiagnosticField(nested.code);
|
|
16595
16613
|
}
|
|
@@ -16619,9 +16637,15 @@ function compactionProviderFailureDiagnostics(error) {
|
|
|
16619
16637
|
code,
|
|
16620
16638
|
type,
|
|
16621
16639
|
requestId,
|
|
16622
|
-
...eventType ? { eventType } : {}
|
|
16640
|
+
...eventType ? { eventType } : {},
|
|
16641
|
+
...rejectionReason ? { rejectionReason } : {}
|
|
16623
16642
|
};
|
|
16624
16643
|
}
|
|
16644
|
+
function compactionRejectionReason(record) {
|
|
16645
|
+
return typeof record.message === "string" && record.message.length <= 1024 && /^Item '[A-Za-z0-9_-]+' of type '[a-z_]+' was provided without its required 'reasoning' item: '[A-Za-z0-9_-]+'\.$/.test(
|
|
16646
|
+
record.message
|
|
16647
|
+
) ? "missing_required_reasoning_item" : null;
|
|
16648
|
+
}
|
|
16625
16649
|
var COMPACTION_DIAGNOSTIC_FIELD_MAX_BYTES = 256;
|
|
16626
16650
|
var COMPACTION_DIAGNOSTIC_TRUNCATION_MARKER = "\u2026[truncated]";
|
|
16627
16651
|
function boundCompactionDiagnosticField(value) {
|
|
@@ -16737,6 +16761,8 @@ var CompactionResponsesModel = class extends OpenGeniResponsesModel {
|
|
|
16737
16761
|
};
|
|
16738
16762
|
var agentSkillSelections = /* @__PURE__ */ new WeakMap();
|
|
16739
16763
|
var emptySkillSelections = Object.freeze([]);
|
|
16764
|
+
var agentRuntimeSkillIndex = /* @__PURE__ */ new WeakMap();
|
|
16765
|
+
var emptyRuntimeSkillIndex = Object.freeze([]);
|
|
16740
16766
|
var agentInstructionInspection = /* @__PURE__ */ new WeakMap();
|
|
16741
16767
|
var emptyInstructionInspection = Object.freeze({
|
|
16742
16768
|
layers: Object.freeze([]),
|
|
@@ -16745,6 +16771,9 @@ var emptyInstructionInspection = Object.freeze({
|
|
|
16745
16771
|
function effectiveSkillSelectionsForAgent(agent) {
|
|
16746
16772
|
return agentSkillSelections.get(agent) ?? emptySkillSelections;
|
|
16747
16773
|
}
|
|
16774
|
+
function runtimeSkillIndexForAgent(agent) {
|
|
16775
|
+
return agentRuntimeSkillIndex.get(agent) ?? emptyRuntimeSkillIndex;
|
|
16776
|
+
}
|
|
16748
16777
|
function persistentAgentInstructionInspectionFor(agent) {
|
|
16749
16778
|
return agentInstructionInspection.get(agent) ?? emptyInstructionInspection;
|
|
16750
16779
|
}
|
|
@@ -16941,7 +16970,7 @@ function artifactRuntimeIsAvailable(options) {
|
|
|
16941
16970
|
const environment = options.sandboxEnvironment;
|
|
16942
16971
|
const manifest = environment?.[ARTIFACT_RUNTIME_MANIFEST_ENV];
|
|
16943
16972
|
const entrypoint = environment?.[ARTIFACT_TOOL_ENTRY_ENV];
|
|
16944
|
-
if (!manifest || !entrypoint || !
|
|
16973
|
+
if (!manifest || !entrypoint || !isAbsolute(manifest) || !isAbsolute(entrypoint)) {
|
|
16945
16974
|
throw new Error(
|
|
16946
16975
|
"artifactRuntimeAvailable requires absolute OPENGENI_ARTIFACT_RUNTIME_MANIFEST and OPENGENI_ARTIFACT_TOOL_ENTRY paths"
|
|
16947
16976
|
);
|
|
@@ -16965,6 +16994,11 @@ function hasCanonicalEditableArtifactToolSurface(catalog) {
|
|
|
16965
16994
|
return entry.source === "opengeni" && entry.modelName === sharedPrefixedMcpToolName("opengeni", toolName) && entry.codemodePath.length === path.length && entry.codemodePath.every((segment, index) => segment === path[index]);
|
|
16966
16995
|
});
|
|
16967
16996
|
}
|
|
16997
|
+
var SkillReadToolInput = external_exports.object({
|
|
16998
|
+
skill: external_exports.string().min(1).max(512),
|
|
16999
|
+
listFiles: external_exports.boolean().optional(),
|
|
17000
|
+
paths: external_exports.array(external_exports.string().min(1).max(1024)).min(1).max(128).optional()
|
|
17001
|
+
});
|
|
16968
17002
|
function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
16969
17003
|
if (Boolean(options.codemodeTokenSeed) !== Boolean(options.codemodeTokenSessionId)) {
|
|
16970
17004
|
throw new Error("codemodeTokenSeed and codemodeTokenSessionId must be supplied together");
|
|
@@ -16976,6 +17010,23 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
16976
17010
|
const editableArtifactToolsAvailable = hasCanonicalEditableArtifactToolSurface(
|
|
16977
17011
|
options.attemptToolCatalog
|
|
16978
17012
|
);
|
|
17013
|
+
const hostSuppliedSkillCatalog = options.skillCatalog !== void 0;
|
|
17014
|
+
if (hostSuppliedSkillCatalog && options.skillActivations?.length) {
|
|
17015
|
+
throw new Error(
|
|
17016
|
+
"Supply either host Skill catalog/reader or runtime Skill activations, not both."
|
|
17017
|
+
);
|
|
17018
|
+
}
|
|
17019
|
+
const filesystemAvailable = (options.activeSandboxBackend ?? settings.sandboxBackend) !== "none";
|
|
17020
|
+
const skillComposition = composeRuntimeSkills(options.skillActivations ?? [], {
|
|
17021
|
+
editableArtifacts: !hostSuppliedSkillCatalog && editableArtifactToolsAvailable,
|
|
17022
|
+
sites: !hostSuppliedSkillCatalog && filesystemAvailable,
|
|
17023
|
+
videoGeneration: !hostSuppliedSkillCatalog && Boolean(options.videoGeneration)
|
|
17024
|
+
});
|
|
17025
|
+
const skillCatalog = hostSuppliedSkillCatalog ? options.skillCatalog : skillComposition.index.length > 0 ? skillCatalogFromComposition(skillComposition) : void 0;
|
|
17026
|
+
const instructionOptions = {
|
|
17027
|
+
...options,
|
|
17028
|
+
...skillCatalog !== void 0 ? { skillCatalog } : {}
|
|
17029
|
+
};
|
|
16979
17030
|
const hostedWebSearch = options.hostedWebSearch ?? settings.webSearchEnabled;
|
|
16980
17031
|
const encryptedReasoning = options.encryptedReasoning ?? settings.openaiReasoningEncryptedContent;
|
|
16981
17032
|
const serviceTier = options.serviceTier;
|
|
@@ -17077,7 +17128,21 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
17077
17128
|
...videoGenerationTool ? [videoGenerationTool] : [],
|
|
17078
17129
|
...humanInputTool ? [humanInputTool] : []
|
|
17079
17130
|
];
|
|
17080
|
-
const
|
|
17131
|
+
const embeddedSkillReadTool = !hostSuppliedSkillCatalog && skillComposition.artifacts.length > 0 ? tool({
|
|
17132
|
+
name: "skill_read",
|
|
17133
|
+
description: "Read Skill text without starting a sandbox. Omit paths to read SKILL.md; provide relative paths to read exactly those files, never implicitly adding SKILL.md. Set listFiles:true without paths to list relative paths only, with no file bodies. Use an id or name from the Skill index.",
|
|
17134
|
+
parameters: SkillReadToolInput,
|
|
17135
|
+
errorFunction: null,
|
|
17136
|
+
execute: (input) => JSON.stringify(
|
|
17137
|
+
readRuntimeSkill(skillComposition, {
|
|
17138
|
+
skill: input.skill,
|
|
17139
|
+
...input.paths !== void 0 ? { paths: input.paths } : {},
|
|
17140
|
+
...input.listFiles !== void 0 ? { listFiles: input.listFiles } : {}
|
|
17141
|
+
})
|
|
17142
|
+
)
|
|
17143
|
+
}) : null;
|
|
17144
|
+
if (embeddedSkillReadTool) agentTools.push(embeddedSkillReadTool);
|
|
17145
|
+
const instructionInspection = inspectPersistentAgentInstructions(settings, instructionOptions);
|
|
17081
17146
|
const baseConfig = {
|
|
17082
17147
|
name: "OpenGeni Agent",
|
|
17083
17148
|
model: options.model ?? settings.openaiModel,
|
|
@@ -17139,6 +17204,8 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
17139
17204
|
const agent2 = new Agent(baseConfig);
|
|
17140
17205
|
if (options.inputWaitYield) agentInputWaitYields.set(agent2, options.inputWaitYield);
|
|
17141
17206
|
agentInstructionInspection.set(agent2, instructionInspection);
|
|
17207
|
+
agentSkillSelections.set(agent2, skillComposition.selections);
|
|
17208
|
+
agentRuntimeSkillIndex.set(agent2, skillComposition.index);
|
|
17142
17209
|
if (options.missingSessionTitleHint ?? options.genesisTitleHint) {
|
|
17143
17210
|
agentsNeedingGenesisTitleDirective.add(agent2);
|
|
17144
17211
|
}
|
|
@@ -17166,21 +17233,6 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
17166
17233
|
);
|
|
17167
17234
|
return agent2;
|
|
17168
17235
|
}
|
|
17169
|
-
const skillComposition = composeRuntimeSkills(
|
|
17170
|
-
options.serverSkillReading ? [] : options.skillActivations ?? [],
|
|
17171
|
-
{
|
|
17172
|
-
editableArtifacts: !options.serverSkillReading && editableArtifactToolsAvailable,
|
|
17173
|
-
// Sites guidance is bundled capability metadata, not eager tool authority.
|
|
17174
|
-
// Tool discovery/execution remains governed by the lazy attempt gateway.
|
|
17175
|
-
sites: !options.serverSkillReading && (options.activeSandboxBackend ?? settings.sandboxBackend) !== "selfhosted",
|
|
17176
|
-
// A connected machine owns its filesystem, and its session deliberately
|
|
17177
|
-
// does not materialize host-local lazy entries. Advertising this bundled
|
|
17178
|
-
// skill there makes load_skill report a path that does not exist. Keep the
|
|
17179
|
-
// executable tools (whose descriptions contain the full short workflow),
|
|
17180
|
-
// but expose the filesystem-backed helper only where it can be delivered.
|
|
17181
|
-
videoGeneration: !options.serverSkillReading && Boolean(options.videoGeneration) && options.activeSandboxBackend !== "selfhosted"
|
|
17182
|
-
}
|
|
17183
|
-
);
|
|
17184
17236
|
if (options.activeSandboxBackend === "selfhosted" && !options.sandboxWorkspaceRoot) {
|
|
17185
17237
|
throw new Error("A Connected Machine agent requires its reported workspace root");
|
|
17186
17238
|
}
|
|
@@ -17199,6 +17251,7 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
17199
17251
|
),
|
|
17200
17252
|
...runAs ? { runAs } : {},
|
|
17201
17253
|
capabilities: buildAgentCapabilitiesFromComposition(settings, skillComposition, {
|
|
17254
|
+
...options.authorizeAttemptExecution ? { authorizeAttemptExecution: options.authorizeAttemptExecution } : {},
|
|
17202
17255
|
...editableArtifactToolsAvailable ? { editableArtifactToolsAvailable: true } : {},
|
|
17203
17256
|
...options.videoGeneration ? { videoGenerationAvailable: true } : {},
|
|
17204
17257
|
...repositoryWorkspaceSkillPathsOption(resources),
|
|
@@ -17212,6 +17265,7 @@ function buildOpenGeniAgent(settings, resources, options = {}) {
|
|
|
17212
17265
|
})
|
|
17213
17266
|
});
|
|
17214
17267
|
agentSkillSelections.set(agent, skillComposition.selections);
|
|
17268
|
+
agentRuntimeSkillIndex.set(agent, skillComposition.index);
|
|
17215
17269
|
if (options.inputWaitYield) agentInputWaitYields.set(agent, options.inputWaitYield);
|
|
17216
17270
|
agentInstructionInspection.set(agent, instructionInspection);
|
|
17217
17271
|
if (options.missingSessionTitleHint ?? options.genesisTitleHint) {
|
|
@@ -17675,7 +17729,7 @@ function buildAgentCapabilitiesFromComposition(settings, skillComposition, optio
|
|
|
17675
17729
|
const filesystemCapability = filesystem({
|
|
17676
17730
|
...options.structuredToolTransport === false || options.supportsImageInput === false || options.onRetainableSessionImageOutput ? { configureTools: configureFilesystemTools } : {}
|
|
17677
17731
|
});
|
|
17678
|
-
if (options.structuredToolTransport === false) {
|
|
17732
|
+
if (options.structuredToolTransport === false || options.authorizeAttemptExecution) {
|
|
17679
17733
|
neutralizeStructuredToolTransport(filesystemCapability);
|
|
17680
17734
|
}
|
|
17681
17735
|
const caps = [
|
|
@@ -17684,11 +17738,6 @@ function buildAgentCapabilitiesFromComposition(settings, skillComposition, optio
|
|
|
17684
17738
|
...toolCancellation ? {} : { configureTools: withExecOpCorrelation }
|
|
17685
17739
|
})
|
|
17686
17740
|
];
|
|
17687
|
-
caps.push(
|
|
17688
|
-
skills({
|
|
17689
|
-
lazyFrom: skillComposition.lazySource
|
|
17690
|
-
})
|
|
17691
|
-
);
|
|
17692
17741
|
if (options.workspaceSkillPaths?.length) {
|
|
17693
17742
|
caps.push(
|
|
17694
17743
|
workspaceSkills(
|
|
@@ -17706,6 +17755,25 @@ function buildAgentCapabilitiesFromComposition(settings, skillComposition, optio
|
|
|
17706
17755
|
);
|
|
17707
17756
|
}
|
|
17708
17757
|
}
|
|
17758
|
+
if (options.authorizeAttemptExecution) {
|
|
17759
|
+
for (const capability of caps) {
|
|
17760
|
+
const target = capability;
|
|
17761
|
+
const original = target.tools;
|
|
17762
|
+
target.tools = function() {
|
|
17763
|
+
return original.call(this).map((tool2) => {
|
|
17764
|
+
if (tool2.type !== "function") return tool2;
|
|
17765
|
+
const invoke = tool2.invoke;
|
|
17766
|
+
return {
|
|
17767
|
+
...tool2,
|
|
17768
|
+
invoke: async (context, input, details) => {
|
|
17769
|
+
await options.authorizeAttemptExecution();
|
|
17770
|
+
return invoke(context, input, details);
|
|
17771
|
+
}
|
|
17772
|
+
};
|
|
17773
|
+
});
|
|
17774
|
+
};
|
|
17775
|
+
}
|
|
17776
|
+
}
|
|
17709
17777
|
return caps;
|
|
17710
17778
|
}
|
|
17711
17779
|
function sandboxRunAs(_settings) {
|
|
@@ -18293,10 +18361,25 @@ async function prepareAttemptToolEnvironment(servers, registry, resolvedMcpConne
|
|
|
18293
18361
|
options.connectorActionPolicy
|
|
18294
18362
|
);
|
|
18295
18363
|
const subjectId = options.subjectId ?? "worker:mcp-model";
|
|
18364
|
+
const guardedDefinitions = options.authorizeAttemptExecution ? definitions.map((definition) => ({
|
|
18365
|
+
...definition,
|
|
18366
|
+
lifecycle: {
|
|
18367
|
+
prepare: async (input) => {
|
|
18368
|
+
const prior = await definition.lifecycle?.prepare(input);
|
|
18369
|
+
return {
|
|
18370
|
+
begin: async () => {
|
|
18371
|
+
await options.authorizeAttemptExecution();
|
|
18372
|
+
await prior?.begin?.();
|
|
18373
|
+
},
|
|
18374
|
+
...prior?.complete ? { complete: prior.complete } : {}
|
|
18375
|
+
};
|
|
18376
|
+
}
|
|
18377
|
+
}
|
|
18378
|
+
})) : definitions;
|
|
18296
18379
|
const environment = createAttemptToolEnvironment({
|
|
18297
18380
|
scope,
|
|
18298
18381
|
generation: options.attemptToolCatalogGeneration ?? 1,
|
|
18299
|
-
definitions,
|
|
18382
|
+
definitions: guardedDefinitions,
|
|
18300
18383
|
confirmModelApproval: ({ modelName, subjectId: callerSubjectId }) => callerSubjectId === subjectId && activeModelToolInvocation(modelName)?.approvalConfirmed === true,
|
|
18301
18384
|
...options.attemptToolAuthorize ? { authorize: options.attemptToolAuthorize } : {}
|
|
18302
18385
|
});
|
|
@@ -21280,7 +21363,7 @@ function sandboxArtifactRuntimeHooksForAgent(agent) {
|
|
|
21280
21363
|
}
|
|
21281
21364
|
function sandboxArtifactRuntimeDoctorHooks(environment) {
|
|
21282
21365
|
const facade = environment[ARTIFACT_TOOL_ENTRY_ENV];
|
|
21283
|
-
if (!facade || !
|
|
21366
|
+
if (!facade || !isAbsolute(facade)) return [];
|
|
21284
21367
|
const runtimeCli = join2(dirname2(facade), "opengeni-artifact-runtime.mjs");
|
|
21285
21368
|
return [
|
|
21286
21369
|
{
|
|
@@ -22355,7 +22438,7 @@ function rigSetupScriptCommand(script, versionId, options = {}) {
|
|
|
22355
22438
|
["marker", markerRoot],
|
|
22356
22439
|
["trusted content marker", trustedContentMarkerRoot]
|
|
22357
22440
|
]) {
|
|
22358
|
-
if (!
|
|
22441
|
+
if (!isAbsolute(root) || root === "/") {
|
|
22359
22442
|
throw new Error(`Rig setup ${label} root must be a non-root absolute path`);
|
|
22360
22443
|
}
|
|
22361
22444
|
}
|
|
@@ -22868,6 +22951,8 @@ export {
|
|
|
22868
22951
|
configureOpenAI,
|
|
22869
22952
|
loadNativeToolSkillArtifacts,
|
|
22870
22953
|
composeRuntimeSkills,
|
|
22954
|
+
skillCatalogFromComposition,
|
|
22955
|
+
readRuntimeSkill,
|
|
22871
22956
|
joinPersistentAgentInstructionLayers,
|
|
22872
22957
|
buildModelContextSnapshot,
|
|
22873
22958
|
createModelVisibleContextCaptureFilter,
|
|
@@ -22938,6 +23023,7 @@ export {
|
|
|
22938
23023
|
compactionResponseDiagnostics,
|
|
22939
23024
|
extractResponseOutputText,
|
|
22940
23025
|
effectiveSkillSelectionsForAgent,
|
|
23026
|
+
runtimeSkillIndexForAgent,
|
|
22941
23027
|
persistentAgentInstructionInspectionFor,
|
|
22942
23028
|
ConnectorActionBindingRejectedError,
|
|
22943
23029
|
ConnectorActionExecutionError,
|
|
@@ -23008,4 +23094,4 @@ export {
|
|
|
23008
23094
|
runAzureCliLoginHook,
|
|
23009
23095
|
renderSessionGoalContext2 as renderSessionGoalContext
|
|
23010
23096
|
};
|
|
23011
|
-
//# sourceMappingURL=chunk-
|
|
23097
|
+
//# sourceMappingURL=chunk-26GUTY32.js.map
|