refactor: depend on SecretStore instead of the VaultStore class (P1.2)
Connectors, the connector SDK and registry, setup-connectors, provider-env, the LiteLLM runtime config and the sidecar's `vault` decoration only read and write secrets, so they now take the SecretStore interface. VaultStore is still constructed in the sidecar and the service startup, and its file format is unchanged. AGENTS.md now points at the interface.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import { BaseConnector, type ConnectorAction, type ConnectorResult } from '../connector-sdk.js';
|
||||
import { getConnectorCredential } from './connector-credentials.js';
|
||||
import type { VaultStore } from '@waggle/core';
|
||||
import type { SecretStore } from '@waggle/core';
|
||||
import type { ConnectorHealth } from '@waggle/shared';
|
||||
|
||||
const API_BASE = 'https://api.trello.com/1';
|
||||
@@ -109,7 +109,7 @@ export class TrelloConnector extends BaseConnector {
|
||||
private apiKey: string | null = null;
|
||||
private apiToken: string | null = null;
|
||||
|
||||
async connect(vault: VaultStore): Promise<void> {
|
||||
async connect(vault: SecretStore): Promise<void> {
|
||||
const cred = getConnectorCredential(vault, this.id);
|
||||
this.apiToken = cred?.value ?? null;
|
||||
// API key stored as a separate vault entry
|
||||
|
||||
Reference in New Issue
Block a user