MCPcopy Create free account
hub / github.com/openai/plugins / readInvocationPolicy

Function readInvocationPolicy

plugins/plugin-eval/src/core/budget.js:57–78  ·  view source on GitHub ↗
(rootPath)

Source from the content-addressed store, hash-verified

55}
56
57async function readInvocationPolicy(rootPath) {
58 const policyPath = path.join(rootPath, "agents", "openai.yaml");
59 if (!(await pathExists(policyPath))) {
60 return {
61 allowImplicitInvocation: true,
62 path: null,
63 };
64 }
65
66 try {
67 const parsed = parseYamlDocument(await readText(policyPath));
68 return {
69 allowImplicitInvocation: parsed?.policy?.allow_implicit_invocation !== false,
70 path: policyPath,
71 };
72 } catch {
73 return {
74 allowImplicitInvocation: true,
75 path: policyPath,
76 };
77 }
78}
79
80export async function computeSkillBudget(skillRoot) {
81 const skillPath = path.join(skillRoot, "SKILL.md");

Callers 2

computeSkillBudgetFunction · 0.85
computePluginBudgetFunction · 0.85

Calls 3

pathExistsFunction · 0.90
parseYamlDocumentFunction · 0.90
readTextFunction · 0.90

Tested by

no test coverage detected