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

Function ownedKeys

packages/core/sdk/src/executor.ts:1295–1305  ·  view source on GitHub ↗
(owner: Owner)

Source from the content-addressed store, hash-verified

1293 };
1294
1295 const ownedKeys = (owner: Owner): OwnedKeys => {
1296 if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT };
1297 if (subject == null) {
1298 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers
1299 throw new StorageError({
1300 message: `Cannot target owner "user": executor has no subject.`,
1301 cause: undefined,
1302 });
1303 }
1304 return { tenant, owner, subject };
1305 };
1306
1307 const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> =>
1308 owner === "user" && subject == null

Callers 5

produceConnectionToolsFunction · 0.85
connectionsCreateFunction · 0.85
mintOAuthConnectionFunction · 0.85
policiesCreateFunction · 0.85
createExecutorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected