openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
61 lines (60 loc) • 4.18 kB
JavaScript
import { i as getPluginToolMeta, t as classifyAgentToolSource } from "../tool-metadata-rqUpUHlb.mjs";
import { y as pinExecToolTarget } from "../agent-tool-metadata-nrQgRaqv.mjs";
import { S as resolveAgentHarnessTtsProvenanceTransferCapability, x as resolveAgentHarnessScheduledToolProjectionCapability } from "../host-private-capabilities-DDumj0c_.mjs";
import { n as captureMcpClientElicitation } from "../mcp-client-elicitation-Cw8LWMma.mjs";
import { h as runWithCronCreatorAuthorityResolver, m as runWithCronCreatorAuthorityCapabilityResolver } from "../cron-creator-authority-context-D4fHKVAj.mjs";
import { o as resolveBootstrapFilesForPreparation } from "../bootstrap-files-CdJt18lf.mjs";
import { i as resolveProjectedMcpCodexToolApprovalMode, n as normalizeMcpCodexToolAnnotations, r as requiresMcpCodexToolApproval, t as formatMcpCodexApprovalRemedy } from "../mcp-codex-tool-approval-C6Ex4SQ6.mjs";
import { r as loadCodexBundleMcpApprovalConfig } from "../codex-mcp-config-npQyRCZo.mjs";
import { i as resolveCodexMcpToolOverridesForAgent, n as buildCodexUserMcpServersThreadConfigPatchForRuntime, t as buildCodexUserMcpServersThreadConfigPatchForRun } from "../bundle-mcp-codex-MrFSmE1F.mjs";
import { i as readMcpAppToolExtensions, r as readMcpAppSettingsCapability, t as readMcpAppIcons } from "../mcp-app-extension-metadata-DyV6LL2L.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(e) {
return resolveAgentHarnessScheduledToolProjectionCapability({
hostCapabilities: e,
ownerPluginId: "codex"
});
}
/** Resolve private TTS delivery transfer for the bundled Codex harness owner. */
function resolveCodexTtsProvenanceTransfer(e) {
return resolveAgentHarnessTtsProvenanceTransferCapability({
hostCapabilities: e,
ownerPluginId: "codex"
});
}
/** Materialize static configured MCP under the Codex harness authority envelope. */
async function materializeStaticMcpToolsForHarnessRun(e) {
const { materializeStaticMcpToolsForHarnessRunCore: t } = await import("../agent-bundle-mcp-harness-DtY2puMp.mjs");
return t(e);
}
/** Capture the final Codex dynamic-tool surface for cron creator authority. */
async function captureFinalCodexCronCreatorToolAllowlist(e, t, n, r = {}) {
const { captureFinalEffectiveCronCreatorToolAllowlist: i } = await import("../cron-tool-UD94cJBw.mjs");
return i(e, t, n, (e) => getPluginToolMeta(e), { canonicalToolNames: r.nativeToolSurfaceEnabled ? CODEX_NATIVE_CRON_CREATOR_AUTHORITY : void 0 });
}
/** Bind rich-form resources to the exact originating harness MCP connection. */
async function createHarnessMcpFormResourceContext(e) {
const { createMcpAppFormResourceContext: t } = await import("../mcp-app-form-resources-TCtv8YPz.mjs");
e.origin.assertCurrent();
const { prepareMcpAppFormUpload: n } = await import("../mcp-form-resource-upload-BRC1F9Tj.mjs");
const r = e.origin.prepareToolCall;
const i = {
...e.origin,
prepareToolCall: r ? async ({ toolName: e, input: t, assertCurrent: n, signal: i }) => r({
toolName: e,
input: t,
assertCurrent: n,
signal: i
}) : void 0
};
return await t({
origin: i,
snapshot: e.snapshot,
signal: e.signal,
uploadResources: await n(i)
});
}
//#endregion
export { buildCodexUserMcpServersThreadConfigPatchForRun, buildCodexUserMcpServersThreadConfigPatchForRuntime, captureFinalCodexCronCreatorToolAllowlist, captureMcpClientElicitation, classifyAgentToolSource, createHarnessMcpFormResourceContext, formatMcpCodexApprovalRemedy, loadCodexBundleMcpApprovalConfig, materializeStaticMcpToolsForHarnessRun, normalizeMcpCodexToolAnnotations, pinExecToolTarget, readMcpAppIcons, readMcpAppSettingsCapability, readMcpAppToolExtensions, requiresMcpCodexToolApproval, resolveBootstrapFilesForPreparation, resolveCodexMcpToolOverridesForAgent, resolveCodexScheduledToolProjectionFactory, resolveCodexTtsProvenanceTransfer, resolveProjectedMcpCodexToolApprovalMode, runWithCronCreatorAuthorityCapabilityResolver, runWithCronCreatorAuthorityResolver };