// auto-generated by @connexum/ai-governance — do not edit; regenerate via npx ai-governance init --agent-dir
// agent-id: {{AGENT_ID}}
// source:   {{SOURCE_FILE}}
/**
 * Governance shim for {{MODULE_NAME}}.
 * Wraps OpenAI client with Connexum governance enforcement.
 * Change pack assignments in governance.json; regenerate this file to apply.
 */

import { createGovernedOpenAI } from '@connexum/typescript-sdk';
import type { GovernedOpenAIInstance } from '@connexum/typescript-sdk';

// Re-export everything from the original module
export * from './{{MODULE_NAME}}';

// Override the `client` export with a governed wrapper.
// The governed client intercepts all chat.completions.create() calls,
// runs pre-call governance checks, and logs to the audit chain.
export const client: GovernedOpenAIInstance = createGovernedOpenAI({
  tenantId: process.env['CONNEXUM_TENANT_ID'] ?? '',
  agentId: '{{AGENT_ID}}',
  packs: {{PACKS}},
  governanceSidecarUrl: process.env['CONNEXUM_API_URL'] ?? 'http://localhost:4201',
  licenseKey: process.env['CONNEXUM_LICENSE_KEY'] ?? '',
});
