Skip to content

feat: live Jupyter session introspection + CRLF/LF install fix#18

Merged
KadenMc merged 1 commit into
mainfrom
feat/aexp-jupyter-introspection
May 15, 2026
Merged

feat: live Jupyter session introspection + CRLF/LF install fix#18
KadenMc merged 1 commit into
mainfrom
feat/aexp-jupyter-introspection

Conversation

@KadenMc
Copy link
Copy Markdown
Owner

@KadenMc KadenMc commented May 15, 2026

Adds aexp.jupyter for live introspection of the connected kernel:

  • init()/whoami() return a SessionInfo composed of /proc/self/cgroup (SLURM job_id), list_running_servers (Jupyter URL/token/port/root), Jupyter HTTP /api/sessions (attached notebooks), nvidia-smi (GPU residents), and discover_other_servers for sibling Jupyters.
  • /aexp-jupyter-connect and /aexp-jupyter-discover slash commands. /aexp-jupyter-iterate gains a Step 0 to confirm identity before touching cells.
  • PostToolUse hook jupyter_connect_postuse fires after every connect_to_jupyter, telling the agent to re-run init() and state the populated fields back to the user before any further execute_code. Registered automatically when --with-jupyter was ever used (sticky bit honored).
  • MCP tools jupyter_introspect_current + jupyter_parse_introspection use recipe-based dispatch so the aexp MCP and Jupyter MCP stay decoupled.

Also fixes a cross-platform install bug where wheels built on Windows with core.autocrlf=true shipped CRLF text files, causing aexp install to forever report skipped_conflict on every text file in any consumer repo whose on-disk copy used a different EOL convention:

  • .gitattributes forces LF in the working tree for every text type we ship, so future wheels always carry LF bytes regardless of build OS.
  • _files_identical does EOL-normalized comparison for known text extensions (binary files still compared strict-bytewise).
  • _copy_file writes LF for text regardless of source EOL, so even a stale CRLF wheel installs LF files on disk.
  • 7 new install tests cover CRLF<->LF equivalence, binary strictness, end-to-end re-install behavior, and a .gitattributes presence guard.

Pyproject bumped 0.2.1 -> 0.3.0. Full suite 428/429 (the one expected fail clears once editable installs are refreshed).

Adds aexp.jupyter for live introspection of the connected kernel:

- init()/whoami() return a SessionInfo composed of /proc/self/cgroup
  (SLURM job_id), list_running_servers (Jupyter URL/token/port/root),
  Jupyter HTTP /api/sessions (attached notebooks), nvidia-smi (GPU
  residents), and discover_other_servers for sibling Jupyters.
- /aexp-jupyter-connect and /aexp-jupyter-discover slash commands.
  /aexp-jupyter-iterate gains a Step 0 to confirm identity before
  touching cells.
- PostToolUse hook jupyter_connect_postuse fires after every
  connect_to_jupyter, telling the agent to re-run init() and state
  the populated fields back to the user before any further
  execute_code. Registered automatically when --with-jupyter was
  ever used (sticky bit honored).
- MCP tools jupyter_introspect_current + jupyter_parse_introspection
  use recipe-based dispatch so the aexp MCP and Jupyter MCP stay
  decoupled.

Also fixes a cross-platform install bug where wheels built on Windows
with core.autocrlf=true shipped CRLF text files, causing aexp install
to forever report skipped_conflict on every text file in any consumer
repo whose on-disk copy used a different EOL convention:

- .gitattributes forces LF in the working tree for every text type we
  ship, so future wheels always carry LF bytes regardless of build OS.
- _files_identical does EOL-normalized comparison for known text
  extensions (binary files still compared strict-bytewise).
- _copy_file writes LF for text regardless of source EOL, so even a
  stale CRLF wheel installs LF files on disk.
- 7 new install tests cover CRLF<->LF equivalence, binary strictness,
  end-to-end re-install behavior, and a .gitattributes presence guard.

Pyproject bumped 0.2.1 -> 0.3.0. Full suite 428/429 (the one expected
fail clears once editable installs are refreshed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KadenMc KadenMc merged commit 5e8a2ec into main May 15, 2026
6 checks passed
@KadenMc KadenMc deleted the feat/aexp-jupyter-introspection branch May 15, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant