Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 4.44 KB

File metadata and controls

99 lines (77 loc) · 4.44 KB

INDEX.md — index.md

Modo: incremental | Directorios indexados: 11 Para regenerar: idx generate --path ./index.md


Scope

/ — index-md package: Repository INDEX.


Árbol de Estructura

index_md/ — CLI and runner for the idx index.md tool, centered on main and IndexRunner

  • cli.py — Typer CLI app with generate, query, validate, login, and config commands
  • runner.py — IndexRunner class orchestrating index builds and queries
  • types.py — Shared type definitions Entry: cli.py:L1

scripts/ — Scripts for tracing and vendoring the code_puppy import closure into index_md/engine/

trace_closure.py walks the static import graph from seed modules and emits a deterministic file list; copy_engine.py performs the mechanical copy, and smoke_imports.py verifies the result.

  • trace_closure.py — traces import closure and lists required files
  • copy_engine.py — copies traced files into the target package
  • smoke_imports.py — verifies vendored imports load correctly Entry: trace_closure.py:L1

tests/ — Test suite for the parent package.

index_md/engine/ — Callback registry and engine configuration for index_md

Provides register_callback, unregister_callback, and on_* event hook decorators for agent lifecycle events, plus configuration loading.

  • callbacks.py — Callback registry with event hook decorators
  • config.py — Configuration and XDG directory resolution
  • reopenable_async_client.py — Reopenable async HTTP client Entry: callbacks.py:L1

index_md/hook/ — Persistent hook state and lifecycle management for index-md sessions

Exports HookStore for per-session state tracking and install/uninstall/run_hook for Claude hook lifecycle.

  • store.py — HookStore class managing touched directories and emitted INDEX.md paths
  • claude_install.py — install and uninstall functions for Claude hook setup
  • server.py — run_hook function for hook execution Entry: store.py:L1

index_md/engine/agents — Provides the get_current_agent function.

  • __init__.py — Exports get_current_agent
  • agent_manager.py — Agent management logic Entry: __init__.py:L1

index_md/engine/command_line/ — Provides the safe_input function for reading user input from the command line.

  • utils.py — Defines safe_input
  • __init__.py — Exports command line utilities Entry: utils.py:L1

index_md/engine/messaging — Minimal stand-in for code_puppy.messaging providing emit_info, emit_warning, emit_error, and emit_success functions.

Routes messages through stdlib logging instead of a TUI bus.

  • __init__.py — Defines the four emit_* entry points backed by stdlib logging
  • message_queue.py — Additional messaging support Entry: __init__.py:L1

index_md/engine/plugins — OAuth HTML template plugins with puppy-themed success/failure pages

Provides oauth_success_html and oauth_failure_html for generating playful OAuth result pages, plus load_builtin_plugins to register them.

  • oauth_puppy_html.py — HTML templates for OAuth success and failure responses
  • __init__.py — Plugin loader registering built-in plugins Entry: oauth_puppy_html.py:L1

index_md/engine/tools/ — State management utilities for tool execution flow

Provides set_awaiting_user_input, is_awaiting_user_input, and should_suppress_browser to coordinate tool execution state.

  • command_runner.py — user-input awaiting state helpers
  • common.py — browser suppression flag Entry: command_runner.py:L1

Mapa de Dependencias

index_md/              ──uses──► engine/                (model factory + provider plugins)
index_md/              ──uses──► hook/                  (hook server and installer)
index_md/              ──uses──► runner/                (orchestrates generation pipeline)
index_md/              ──uses──► types/                 (uses)
index_md/              ──uses──► walker/                (walks filesystem)
scripts/               ──uses──► engine/                (model factory + provider plugins)

Señales de Cambio Reciente

  • INDEX.md
  • index_md/analyzer.py
  • index_md/assembler.py
  • index_md/cli.py
  • index_md/hook/__init__.py
  • index_md/hook/claude_install.py
  • index_md/hook/server.py
  • index_md/hook/store.py
  • index_md/prompts.py
  • index_md/runner.py