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.
19 lines
649 B
TypeScript
19 lines
649 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
|
|
describe('Connector Foundation', () => {
|
|
it('exports connectorRoutes function', async () => {
|
|
const mod = await import('../../src/local/routes/connectors.js');
|
|
expect(mod.connectorRoutes).toBeDefined();
|
|
expect(typeof mod.connectorRoutes).toBe('function');
|
|
});
|
|
});
|
|
|
|
describe('ConnectorDefinition Types', () => {
|
|
it('shared types include connector types', async () => {
|
|
// Verify the types compile correctly by importing them
|
|
const types = await import('@waggle/shared');
|
|
// Type-level check — if this compiles, the types exist
|
|
expect(types).toBeDefined();
|
|
});
|
|
});
|