refactor(agent): move the connector credential helpers out of VaultStore (P1.2)

getConnectorCredential, setConnectorCredential and setConnectorCredentialBundle
are now plain functions over a SecretStore in
packages/agent/src/connectors/connector-credentials.ts. The secret names,
metadata layout and the rule that tokens never go into plaintext metadata are
unchanged, so existing vault files keep working.

A bundle still lands as one update: SecretStore gains writeBatch, which
VaultStore applies with a single vault-file replacement.

Connector tests seed a Map-backed SecretStore instead of mocking VaultStore
methods; the helper tests from core and server moved to the agent package.
This commit is contained in:
shumeiko.it
2026-10-24 16:34:20 +02:00
parent 23431550ae
commit 3528a242f6
60 changed files with 602 additions and 606 deletions

View File

@@ -404,6 +404,10 @@ export {
} from './skill-watcher.js';
export { BaseConnector, type WaggleConnector, type ConnectorAction, type ConnectorResult } from './connector-sdk.js';
export { ConnectorRegistry, type AuditLogger } from './connector-registry.js';
export {
getConnectorCredential, setConnectorCredential, setConnectorCredentialBundle,
type ConnectorCredentialInput, type StoredConnectorCredential,
} from './connectors/connector-credentials.js';
export {
GitHubConnector, SlackConnector, JiraConnector, EmailConnector, GoogleCalendarConnector,
DiscordConnector, LinearConnector, AsanaConnector, TrelloConnector, MondayConnector,