/** * Which argv the injector wrapper wraps, by server shape. * * Getting this wrong is SILENT: wrapCommand returns undefined, the wrapper is * skipped, the agent still renders /vault/secrets/, nothing sources it, * and the server starts with empty credentials. Observed live on docmost and * my-home-assistant, which carry a `command` but no `entrypoint`. */ import { describe, it, expect } from 'vitest'; import { ServerIdentityService } from '../src/services/server-identity.service.js'; import type { SecretBackendService } from '../src/services/secret-backend.service.js'; const svc = new ServerIdentityService( {} as unknown as SecretBackendService, { namespace: 'mcpctl-servers', ensure: async () => undefined, remove: async () => undefined }, ); const withSecret = { env: [{ name: 'T', valueFrom: { secretRef: { name: 'creds', key: 'K' } } }] }; /** The wrapper is `sh -c