// src/framework/shadowlisp/metacircular-bundle.ts
//
// Vision 49: Entry point for metacircular ShadowLisp
//
// Import this file to register all ShadowLisp elements.

// Bootstrap (McCarthy's 7 in JS)
export * from './SlBootstrap';

// All primitive elements
export * from './primitives';

// Metacircular evaluator
export * from './SlMetaEval';

// Metacircular runtime
export * from './SlRuntimeMeta';

// Also export from existing shadowlisp for compatibility
export { SlForm } from './SlForm';
export { SlAtom } from './SlAtom';

function logMetacircularInit(message: string): void {
  // eslint-disable-next-line no-console -- kernel ShadowLisp registration has no actor context
  console.log(message);
}

/**
 * Initialize the metacircular ShadowLisp system.
 *
 * Call this once to ensure all custom elements are registered.
 */
export function initMetacircularShadowLisp(): void {
  logMetacircularInit('[ShadowLisp] Metacircular system initialized');
  logMetacircularInit('[ShadowLisp] Available elements:');
  logMetacircularInit('  - <sl-runtime-meta>  : Top-level runtime');
  logMetacircularInit('  - <sl-num>, <sl-str>, <sl-sym>  : Literals');
  logMetacircularInit('  - <sl-true>, <sl-false>, <sl-nil>  : Constants');
  logMetacircularInit('  - <sl-ref>  : Variable reference');
  logMetacircularInit('  - <sl-quote>  : Quote (unevaluated)');
  logMetacircularInit('  - <sl-if>, <sl-cond>, <sl-clause>  : Conditionals');
  logMetacircularInit('  - <sl-lambda>, <sl-define>, <sl-set>  : Functions & bindings');
  logMetacircularInit('  - <sl-car>, <sl-cdr>, <sl-cons>, <sl-list>  : List operations');
  logMetacircularInit('  - <sl-atom-p>, <sl-eq>  : Predicates');
  logMetacircularInit('  - <sl-add>, <sl-sub>, <sl-mul>, <sl-gt>, <sl-lt>  : Arithmetic');
}
