mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-25 16:14:26 +01:00
Simplify plugin runtime and cleanup lifecycle
This commit is contained in:
1 parent
80cdbdbd47
commit
12ccfc2c9a
21 files changed
+120
-838
No files matched your search
@@ -321,19 +321,6 @@ export function createPluginSecretsHandler(
|
||||
throw secretNotFound(trimmedRef);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// 2b. Verify the plugin is available for the secret's company.
|
||||
// This prevents cross-company secret access via UUID guessing.
|
||||
// ---------------------------------------------------------------
|
||||
const companyId = (secret as { companyId?: string }).companyId;
|
||||
if (companyId) {
|
||||
const availability = await registry.getCompanyAvailability(companyId, pluginId);
|
||||
if (!availability || !availability.available) {
|
||||
// Return the same error as "not found" to avoid leaking existence
|
||||
throw secretNotFound(trimmedRef);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// 3. Fetch the latest version's material
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user