MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createSecretPlaceholder

Function createSecretPlaceholder

scripts/agent-config-smoke.ts:142–160  ·  view source on GitHub ↗
(
  ctx: CliContext,
  scope: string,
  expectedHandoffScope: string,
  name: string,
)

Source from the content-addressed store, hash-verified

140};
141
142const createSecretPlaceholder = async (
143 ctx: CliContext,
144 scope: string,
145 expectedHandoffScope: string,
146 name: string,
147) => {
148 const result = toolData<{ readonly id: string; readonly url: string }>(
149 parseJsonOutput(
150 await callTool(ctx, ["executor", "coreTools", "secrets", "create"], { name, scope }),
151 ),
152 );
153 const handoff = new URL(result.url);
154 assert(handoff.pathname === "/secrets", `Expected /secrets handoff URL, got ${result.url}`);
155 assert(
156 handoff.searchParams.get("scope") === expectedHandoffScope,
157 `Secret handoff omitted scope: ${result.url}`,
158 );
159 return result;
160};
161
162const setSecretViaBrowserBoundary = async (
163 ctx: CliContext,

Callers 1

runSmokeFunction · 0.85

Calls 5

toolDataFunction · 0.85
parseJsonOutputFunction · 0.85
callToolFunction · 0.85
assertFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected