/** Islander interaction runtime — single source of truth for selectors & limits. */

export const ISLANDER_CONFIG = {
  rootSelectors: ['.ac-app-shell', 'main', 'body'],
  refAttr: 'data-islander-ref',
  labelAttr: 'data-islander-label',
  kindAttr: 'data-islander-kind',
  ignoreAttr: 'data-islander-ignore',
  pageTitleSelectors: ['[data-islander-page-title]', '.ac-title-bar', 'main h1'],
  maxElements: 48,
  maxAgentRounds: 4,
  navigateWaitMs: 450,
  actionBlockRe: '```islander-actions\\s*([\\s\\S]*?)```',
  excludeSelectors: [
    '.ac-islander',
    '.ac-job-monitor',
    `[data-islander-ignore]`,
    '[aria-hidden="true"]',
    'script',
    'style',
    'svg',
    'path',
  ],
  interactiveSelectors: [
    'a[href]',
    'button',
    'input',
    'textarea',
    'select',
    'summary',
    '[role="button"]',
    '[role="tab"]',
    '[role="menuitem"]',
    '[role="link"]',
    '[role="switch"]',
    '[role="checkbox"]',
    'label[for]',
    `[data-islander-label]`,
  ],
  blockedClickPatterns: [/登出/i, /logout/i],
  defaultSuggestions: [] as string[],
  highlightClass: 'ac-islander-target-highlight',
  highlightDurationMs: 1800,
} as const