import { checkElizaAction } from '@sigilcore/agent-hooks';
HTTP note: emit typed `http` only for an explicit valid method in the intercepted action; otherwise preserve `web_fetch` and its unknown-method semantics.
const config = {
apiKey: process.env.SIGIL_API_KEY!,
agentId: 'my-eliza-agent',
failMode: 'closed',
};
// Before any ELIZA action:
const blocked = await checkElizaAction(
{ name: 'SEND_TOKEN', params: { to: '0x...', amount: '1.0' } },
config
);
if (blocked) {
console.error('Blocked by Sigil:', blocked.rejection);
return;
}
// Action is approved — proceed