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

Function setSecretViaBrowserBoundary

scripts/agent-config-smoke.ts:162–175  ·  view source on GitHub ↗
(
  ctx: CliContext,
  browserBaseUrl: string,
  scopeId: string,
  input: { readonly id: string; readonly name: string; readonly value: string },
)

Source from the content-addressed store, hash-verified

160};
161
162const setSecretViaBrowserBoundary = async (
163 ctx: CliContext,
164 browserBaseUrl: string,
165 scopeId: string,
166 input: { readonly id: string; readonly name: string; readonly value: string },
167) => {
168 await postJson(`${browserBaseUrl}/api/scopes/${encodeURIComponent(scopeId)}/secrets`, input);
169 const status = toolData<{ readonly status: "resolved" | "missing" }>(
170 parseJsonOutput(
171 await callTool(ctx, ["executor", "coreTools", "secrets", "status"], { id: input.id }),
172 ),
173 );
174 assert(status.status === "resolved", `Secret ${input.id} was not resolved`);
175};
176
177const runSmoke = async (oauth: OAuthTestServerShape, graph: GraphqlTestServerShape) => {
178 const root = await mkdtemp(join(tmpdir(), "executor-agent-config-smoke-"));

Callers 1

runSmokeFunction · 0.85

Calls 5

toolDataFunction · 0.85
parseJsonOutputFunction · 0.85
callToolFunction · 0.85
assertFunction · 0.85
postJsonFunction · 0.70

Tested by

no test coverage detected