openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
61 lines (60 loc) • 4.33 kB
JavaScript
import { i as readMcpAppToolExtensions, r as readMcpAppSettingsCapability, t as readMcpAppIcons } from "../mcp-app-extension-metadata-moidhg1Q.mjs";
import { i as resolveProjectedMcpCodexToolApprovalMode, n as normalizeMcpCodexToolAnnotations, r as requiresMcpCodexToolApproval, t as formatMcpCodexApprovalRemedy } from "../mcp-codex-tool-approval-DQZI_si1.mjs";
import { r as captureMcpClientElicitation } from "../mcp-client-elicitation-BkRPu9Nl.mjs";
import { r as getPluginToolMeta } from "../tool-metadata-D5DsuLcG.mjs";
import { d as pinExecToolTarget } from "../agent-tool-metadata-DU21au_v.mjs";
import { v as resolveAgentHarnessScheduledToolProjectionCapability, y as resolveAgentHarnessTtsProvenanceTransferCapability } from "../host-private-capabilities-BL8gRbZP.mjs";
import { m as runWithCronCreatorAuthorityResolver, p as runWithCronCreatorAuthorityCapabilityResolver } from "../cron-creator-authority-context-DJ_0mFxL.mjs";
import { o as resolveBootstrapFilesForPreparation } from "../bootstrap-files-BVIOGOj-.mjs";
import { r as loadCodexBundleMcpApprovalConfig } from "../codex-mcp-config-4NP_GYFS.mjs";
import { i as resolveCodexMcpToolOverridesForAgent, n as buildCodexUserMcpServersThreadConfigPatchForRuntime, t as buildCodexUserMcpServersThreadConfigPatchForRun } from "../bundle-mcp-codex-BzgFrVCF.mjs";
//#region src/plugin-sdk/codex-mcp-projection.ts
const CODEX_NATIVE_CRON_CREATOR_AUTHORITY = ["read", "exec"];
/** Resolve the private scheduled-tool projection issuer for the Codex harness owner. */
function resolveCodexScheduledToolProjectionFactory(hostCapabilities) {
return resolveAgentHarnessScheduledToolProjectionCapability({
hostCapabilities,
ownerPluginId: "codex"
});
}
/** Resolve private TTS delivery transfer for the bundled Codex harness owner. */
function resolveCodexTtsProvenanceTransfer(hostCapabilities) {
return resolveAgentHarnessTtsProvenanceTransferCapability({
hostCapabilities,
ownerPluginId: "codex"
});
}
/** Materialize static configured MCP under the Codex harness authority envelope. */
async function materializeStaticMcpToolsForHarnessRun(params) {
const { materializeStaticMcpToolsForHarnessRunCore: materialize } = await import("../agent-bundle-mcp-harness-CaP7wSVl.mjs");
return materialize(params);
}
/** Capture the final Codex dynamic-tool surface for cron creator authority. */
async function captureFinalCodexCronCreatorToolAllowlist(target, captureRef, tools, options = {}) {
const { captureFinalEffectiveCronCreatorToolAllowlist: capture } = await import("../cron-tool-1TY4oQzK.mjs");
return capture(target, captureRef, tools, (tool) => getPluginToolMeta(tool), { canonicalToolNames: options.nativeToolSurfaceEnabled ? CODEX_NATIVE_CRON_CREATOR_AUTHORITY : void 0 });
}
/** Bind rich-form resources to the exact originating harness MCP connection. */
async function createHarnessMcpFormResourceContext(params) {
const { createMcpAppFormResourceContext } = await import("../mcp-app-form-resources-BTIc9kOW.mjs");
params.origin.assertCurrent();
const { prepareMcpAppFormUpload } = await import("../mcp-form-resource-upload-n-1C6HeN.mjs");
const prepare = params.origin.prepareToolCall;
const origin = {
...params.origin,
prepareToolCall: prepare ? async ({ toolName, input, assertCurrent, signal }) => prepare({
toolName,
input,
assertCurrent,
signal
}) : void 0
};
return await createMcpAppFormResourceContext({
origin,
snapshot: params.snapshot,
signal: params.signal,
uploadResources: await prepareMcpAppFormUpload(origin)
});
}
//#endregion
export { buildCodexUserMcpServersThreadConfigPatchForRun, buildCodexUserMcpServersThreadConfigPatchForRuntime, captureFinalCodexCronCreatorToolAllowlist, captureMcpClientElicitation, createHarnessMcpFormResourceContext, formatMcpCodexApprovalRemedy, loadCodexBundleMcpApprovalConfig, materializeStaticMcpToolsForHarnessRun, normalizeMcpCodexToolAnnotations, pinExecToolTarget, readMcpAppIcons, readMcpAppSettingsCapability, readMcpAppToolExtensions, requiresMcpCodexToolApproval, resolveBootstrapFilesForPreparation, resolveCodexMcpToolOverridesForAgent, resolveCodexScheduledToolProjectionFactory, resolveCodexTtsProvenanceTransfer, resolveProjectedMcpCodexToolApprovalMode, runWithCronCreatorAuthorityCapabilityResolver, runWithCronCreatorAuthorityResolver };