notebook-intelligence 4.6.0__tar.gz → 4.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. notebook_intelligence-4.8.0/CHANGELOG.md +205 -0
  2. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/PKG-INFO +71 -3
  3. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/README.md +65 -0
  4. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/docs/admin-guide.md +64 -21
  5. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/docs/rulesets.md +6 -0
  6. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/jest.config.js +3 -1
  7. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/_version.py +1 -1
  8. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/ai_service_manager.py +25 -16
  9. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/api.py +104 -76
  10. notebook_intelligence-4.8.0/notebook_intelligence/cell_output.py +152 -0
  11. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/claude.py +179 -57
  12. notebook_intelligence-4.8.0/notebook_intelligence/claude_sessions.py +392 -0
  13. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/config.py +131 -16
  14. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/extension.py +653 -39
  15. notebook_intelligence-4.8.0/notebook_intelligence/feature_flags.py +131 -0
  16. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/package.json +7 -3
  17. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/schemas/@notebook-intelligence/notebook-intelligence/package.json.orig +6 -2
  18. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/694.d0b052d80c0397c7f1ea.js → notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/313.d3668bf2674eafcf4573.js +1 -1
  19. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/603.36795be29d2f6849fe6e.js → notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/631.a549782dde8c94a5612d.js +1 -1
  20. notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/694.3bcf1107fa397004be17.js +1 -0
  21. notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/728.c436df7c2664f4cf8e16.js +1 -0
  22. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/326.4de77f44c9c6c2bbad47.js → notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/745.54aab870383fe1bf44c8.js +2 -2
  23. notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/830.eecfb0cd62e605cbbd1e.js +1 -0
  24. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/editor.worker.js +2 -2
  25. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/remoteEntry.529a506747dc96eb215a.js → notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/remoteEntry.64319537c5af580d82c4.js +1 -1
  26. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/third-party-licenses.json +6 -0
  27. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/llm_providers/openai_compatible_llm_provider.py +16 -1
  28. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/mcp_manager.py +16 -27
  29. notebook_intelligence-4.8.0/notebook_intelligence/rule_injector.py +50 -0
  30. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/skill_github_import.py +73 -3
  31. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/skill_manager.py +66 -44
  32. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/skill_manifest.py +30 -1
  33. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/util.py +5 -0
  34. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/package.json +6 -2
  35. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/pyproject.toml +5 -2
  36. notebook_intelligence-4.8.0/tests/test_api_hygiene.py +88 -0
  37. notebook_intelligence-4.8.0/tests/test_cell_output.py +247 -0
  38. notebook_intelligence-4.8.0/tests/test_cell_output_features_response.py +197 -0
  39. notebook_intelligence-4.8.0/tests/test_claude_client.py +1186 -0
  40. notebook_intelligence-4.8.0/tests/test_claude_sessions.py +671 -0
  41. notebook_intelligence-4.8.0/tests/test_claude_sessions_handler.py +176 -0
  42. notebook_intelligence-4.8.0/tests/test_config_atomic_save.py +104 -0
  43. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_config_integration.py +55 -5
  44. notebook_intelligence-4.8.0/tests/test_feature_flags.py +212 -0
  45. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_feedback.py +6 -3
  46. notebook_intelligence-4.8.0/tests/test_image_context.py +244 -0
  47. notebook_intelligence-4.8.0/tests/test_mcp_manager.py +82 -0
  48. notebook_intelligence-4.8.0/tests/test_openai_compatible_llm_provider.py +60 -0
  49. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_rule_injector.py +40 -4
  50. notebook_intelligence-4.8.0/tests/test_skill_fetch_redirects.py +143 -0
  51. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_skill_github_import.py +6 -6
  52. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_skill_manager.py +51 -1
  53. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_skill_manifest.py +6 -6
  54. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_skills_handlers.py +99 -0
  55. notebook_intelligence-4.8.0/tests/ts/__mocks__/svg.ts +3 -0
  56. notebook_intelligence-4.8.0/tests/ts/__mocks__/tiktoken.ts +38 -0
  57. notebook_intelligence-4.8.0/tests/ts/cell-output-bundle.test.ts +304 -0
  58. notebook_intelligence-4.8.0/tests/ts/cell-output-features.test.ts +47 -0
  59. notebook_intelligence-4.8.0/tests/ts/cell-output-toolbar.test.ts +266 -0
  60. notebook_intelligence-4.8.0/tests/ts/notebook-generation.test.ts +48 -0
  61. notebook_intelligence-4.8.0/tests/ts/setup.ts +13 -0
  62. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/ts/utils.test.ts +214 -1
  63. notebook_intelligence-4.8.0/tests/ts/workspace-skips.test.ts +34 -0
  64. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tsconfig.json +1 -0
  65. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/yarn.lock +827 -8
  66. notebook_intelligence-4.6.0/CHANGELOG.md +0 -150
  67. notebook_intelligence-4.6.0/notebook_intelligence/claude_sessions.py +0 -189
  68. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/503.5a5f40ccf41b5e9303d0.js +0 -1
  69. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/728.e4002103de29171178ce.js +0 -1
  70. notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/830.dce0715eed94aae2b2b4.js +0 -1
  71. notebook_intelligence-4.6.0/notebook_intelligence/rule_injector.py +0 -24
  72. notebook_intelligence-4.6.0/tests/test_claude_client.py +0 -543
  73. notebook_intelligence-4.6.0/tests/test_claude_sessions.py +0 -253
  74. notebook_intelligence-4.6.0/tests/ts/__mocks__/tiktoken.ts +0 -26
  75. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/.copier-answers.yml +0 -0
  76. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/.gitignore +0 -0
  77. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/.prettierignore +0 -0
  78. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/.yarnrc.yml +0 -0
  79. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/CONTRIBUTING.md +0 -0
  80. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/LICENSE +0 -0
  81. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/PRIVACY.md +0 -0
  82. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/RELEASE.md +0 -0
  83. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/SECURITY.md +0 -0
  84. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/docs/skills.md +0 -0
  85. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/docs/troubleshooting.md +0 -0
  86. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/install.json +0 -0
  87. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/jupyter-config/server-config/notebook_intelligence.json +0 -0
  88. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/__init__.py +0 -0
  89. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/base_chat_participant.py +0 -0
  90. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/built_in_toolsets.py +0 -0
  91. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/context_factory.py +0 -0
  92. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/github_copilot.py +0 -0
  93. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/github_copilot_chat_participant.py +0 -0
  94. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/schemas/@notebook-intelligence/notebook-intelligence/plugin.json +0 -0
  95. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/196.db3f5562c0372c6e07f6.js +0 -0
  96. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/1b55f12eca93ba6743e7.ttf +0 -0
  97. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/327.fe6b84491254fcaf64bf.js +0 -0
  98. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/327.fe6b84491254fcaf64bf.js.LICENSE.txt +0 -0
  99. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/671.1797d409270b24758991.js +0 -0
  100. /notebook_intelligence-4.6.0/notebook_intelligence/labextension/static/326.4de77f44c9c6c2bbad47.js.LICENSE.txt → /notebook_intelligence-4.8.0/notebook_intelligence/labextension/static/745.54aab870383fe1bf44c8.js.LICENSE.txt +0 -0
  101. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/977.7e3d66ffc344a0af7a4e.js +0 -0
  102. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/be02dcbf2787b0b29ec8.module.wasm +0 -0
  103. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/e589c9ba04e3e5a90081.module.wasm +0 -0
  104. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/editor.worker.js.LICENSE.txt +0 -0
  105. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/labextension/static/style.js +0 -0
  106. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/llm_providers/github_copilot_llm_provider.py +0 -0
  107. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/llm_providers/litellm_compatible_llm_provider.py +0 -0
  108. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/llm_providers/ollama_llm_provider.py +0 -0
  109. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/prompts.py +0 -0
  110. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/rule_manager.py +0 -0
  111. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/ruleset.py +0 -0
  112. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/skill_reconciler.py +0 -0
  113. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/notebook_intelligence/skillset.py +0 -0
  114. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/schema/plugin.json +0 -0
  115. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/setup.py +0 -0
  116. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/conftest.py +0 -0
  117. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/01-test-global.md +0 -0
  118. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/02-test-security.md +0 -0
  119. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/03-invalid-rule.md +0 -0
  120. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/modes/agent/01-test-production.md +0 -0
  121. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/modes/ask/01-test-exploration.md +0 -0
  122. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/fixtures/rules/modes/inline-chat/01-test-quick.md +0 -0
  123. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_ai_service_manager_integration.py +0 -0
  124. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_base_chat_participant_integration.py +0 -0
  125. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_claude_models.py +0 -0
  126. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_context_factory.py +0 -0
  127. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_end_to_end_rule_integration.py +0 -0
  128. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_file_upload.py +0 -0
  129. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_models.py +0 -0
  130. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_rule_auto_reload.py +0 -0
  131. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_rule_manager.py +0 -0
  132. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_skill_reconciler.py +0 -0
  133. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/test_websocket_handler_integration.py +0 -0
  134. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/ts/mcp-util.test.ts +0 -0
  135. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/tests/ts/tsconfig.json +0 -0
  136. {notebook_intelligence-4.6.0 → notebook_intelligence-4.8.0}/webpack.config.js +0 -0
@@ -0,0 +1,205 @@
1
+ # Changelog
2
+
3
+ All notable changes to Notebook Intelligence are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) starting with 4.0.0.
6
+
7
+ For each release we list user-facing changes grouped as **Added**, **Changed**, **Fixed**, and **Removed**. Commits are squashed into the change that motivated them; the full git log remains the source of truth for low-level history.
8
+
9
+ <!-- <START NEW CHANGELOG ENTRY> -->
10
+
11
+ ## [4.7.0] — 2026-05-07
12
+
13
+ ### Added
14
+
15
+ - **Cell output actions** — right-click a cell output (or hover for the toolbar) for **Explain**, **Ask**, and **Troubleshoot** quick actions that open the chat sidebar with the output already attached as context. Outputs forward as structured MIME bundles and include images for vision-capable models, token-bounded so large outputs don't overflow the context window. Per-user toggles in `config.json` (`enable_explain_error`, `enable_output_followup`, `enable_output_toolbar`, default on); admins can lock them via `NBI_EXPLAIN_ERROR_POLICY` / `NBI_OUTPUT_FOLLOWUP_POLICY` / `NBI_OUTPUT_TOOLBAR_POLICY`.
16
+ - **Image attachments in chat** — paste or attach images alongside a prompt; the image goes to the model as input when it's vision-capable.
17
+ - **Streaming inline-chat responses** — the inline chat popover now streams tokens as they arrive instead of waiting for the full response.
18
+ - **Notebook toolbar generation button** — a sparkle icon on the active notebook's toolbar opens a popover that scopes the generation to that notebook.
19
+ - **Claude Code launcher tile** — a Claude Code tile in the JupyterLab launcher opens a session picker (resume a transcript or start a new one in the file browser's active subdirectory). Session IDs are copyable from the picker.
20
+ - **Repo-level `AGENTS.md`** — when a project root contains `AGENTS.md`, NBI appends it under the system prompt's "Additional Guidelines" alongside the existing ruleset injection.
21
+ - **Claude WebSocket heartbeat** — keeps long-running Claude agent requests alive through upstream proxy / load balancer idle timeouts (e.g. JupyterHub's nginx default of 60s) by sending a status heartbeat every 20s while a request is in flight. Fixes Bedrock-style request failures where processing exceeds the proxy idle window.
22
+ - **Extended admin policy coverage** — every Settings panel toggle is now lockable via an env var. New boolean policies: `NBI_CLAUDE_MODE_POLICY`, `NBI_CLAUDE_CONTINUE_CONVERSATION_POLICY`, `NBI_CLAUDE_CODE_TOOLS_POLICY`, `NBI_CLAUDE_JUPYTER_UI_TOOLS_POLICY`, `NBI_CLAUDE_SETTING_SOURCE_USER_POLICY`, `NBI_CLAUDE_SETTING_SOURCE_PROJECT_POLICY`, `NBI_STORE_GITHUB_ACCESS_TOKEN_POLICY`. New value-presence locks: `NBI_CHAT_MODEL_PROVIDER`, `NBI_CHAT_MODEL_ID`, `NBI_INLINE_COMPLETION_MODEL_PROVIDER`, `NBI_INLINE_COMPLETION_MODEL_ID`, `NBI_CLAUDE_CHAT_MODEL`, `NBI_CLAUDE_INLINE_COMPLETION_MODEL`, `ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL`. See [README → Admin policies](README.md#admin-policies).
23
+ - `/claude-sessions` HTTP route accepts `?scope=cwd` to filter to sessions whose recorded `cwd` matches the lab's working directory.
24
+
25
+ ### Changed
26
+
27
+ - Claude agent connection now happens in the background so JupyterLab finishes loading without waiting on the SDK handshake.
28
+
29
+ ### Fixed
30
+
31
+ - Public-API hygiene in `notebook_intelligence.api`: `raise NotImplemented` → `raise NotImplementedError` (the former raised `TypeError` at the call site), `Toolset(tools=[])` and four other shared-default-argument cases corrected, `Signal.disconnect` tolerates double-disconnect with a debug-level log, registrar methods raise a new `RegistrationError` instead of silently logging.
32
+ - Claude headers (model + version) are now sent on inline completion calls, matching the chat path.
33
+ - OpenAI-compatible provider drops the unsupported `tool` `strict` flag when targeting vLLM (#108).
34
+ - Resolve symlinks when locating Claude session transcripts so `~/.claude/projects/` symlinked off another volume keeps working.
35
+ - Claude worker thread no longer crashes on cancellation; the chat loop recovers cleanly.
36
+ - "Generating..." row no longer reflows the chat sidebar on narrow widths.
37
+ - Skills popup in the chat sidebar dismisses on click-outside or when the input is cleared.
38
+ - Spurious "Skills reloaded" notification when launching a Claude session. The watcher now keys off a structural signature of bundle dirs + `SKILL.md` mtimes, ignoring sibling writes (`.DS_Store`, `.git/`, log/cache files) to the parent `~/.claude/skills/` directory.
39
+ - Traitlets `DeprecationWarning` ("Traits should be given as instances, not types") at startup is silenced for the `disabled_*` config.
40
+
41
+ ### Internal
42
+
43
+ - CI runs `pytest tests/` and `jlpm test` on every PR. The `[test]` extra was added to `pyproject.toml`. Both build jobs declare `permissions: { contents: read }` so a compromised step can't push.
44
+
45
+ <!-- <END NEW CHANGELOG ENTRY> -->
46
+
47
+ ## [4.6.0] — 2026-04-29
48
+
49
+ ### Added
50
+
51
+ - **Claude Skills management panel** — Settings now exposes a **Skills** tab for managing the bundles Claude can invoke (SKILL.md frontmatter, helper files, allowed tools). Skills resolve from `~/.claude/skills/` (user) and `<project>/.claude/skills/` (project) — the same locations the Claude CLI reads. Inline editor, duplicate / rename / delete with undo, and import-from-GitHub via the public tarball API. For organization deployments, NBI can install a curated set from a YAML manifest pointed at by `NBI_SKILLS_MANIFEST` and keep them in sync; managed skills are read-only in the UI. See [`docs/skills.md`](docs/skills.md) for the full reference.
52
+ - Restructured documentation: `README.md` rewritten with a TOC and concept glossary, plus new `SECURITY.md`, `PRIVACY.md`, and operator guides under `docs/` (`admin-guide.md`, `rulesets.md`, `skills.md`, `troubleshooting.md`).
53
+
54
+ ### Fixed
55
+
56
+ - **Windows Claude mode reliability** — Claude agent thread now uses the Proactor event loop on Windows, fixing subprocess spawn failures and intermittent "Claude agent not connected" races at startup. The Claude SDK retry path also reconnects when the worker thread has died instead of waiting out the full response timeout.
57
+ - Anthropic credentials are normalized (whitespace + scheme handling) before being passed to the SDK.
58
+ - Skill imports from GitHub reject tarball entries with absolute paths or `../` traversal — a malicious or buggy bundle can no longer write outside its install directory.
59
+ - `_send_claude_agent_request` guarded against the disconnect race that left chat handlers waiting on a closed queue.
60
+ - WebSocket message handlers are disconnected when the originating request finishes; previously they accumulated for the lifetime of the WebSocket.
61
+ - `configChanged` handlers are disconnected when components unmount, fixing a slow leak when the chat sidebar was opened and closed repeatedly.
62
+ - Claude session picker list scrolls correctly when the transcript count exceeds the visible area.
63
+
64
+ <!-- This entry was filled in retroactively after the 4.6.0 tag shipped. -->
65
+
66
+ ## [4.5.0] — 2026-04-09
67
+
68
+ ### Added
69
+
70
+ - Chat feedback mechanism for AI responses, configurable via the `enable_chat_feedback` traitlet, with a `telemetry` event hook.
71
+ - Attach files as context in chat.
72
+ - `Shift+Enter` inserts a newline in the chat input.
73
+ - Disable LLM providers via the `disabled_providers` traitlet, with optional per-pod re-enable via `NBI_ENABLED_PROVIDERS`.
74
+
75
+ ### Changed
76
+
77
+ - Inline completion for the OpenAI-compatible provider now uses the Chat Completions API.
78
+
79
+ ### Fixed
80
+
81
+ - OpenAI-compatible provider now correctly handles `tool` and `tool_choice` parameters.
82
+ - File-attach popover styling.
83
+ - Newlines in user input are preserved.
84
+
85
+ ## [4.4.0] — 2026-03-13
86
+
87
+ ### Added
88
+
89
+ - Configurable Claude Code CLI path via the `NBI_CLAUDE_CLI_PATH` environment variable.
90
+
91
+ ### Changed
92
+
93
+ - Subprocess invocations no longer use `shell=True`.
94
+
95
+ ## [4.3.2] — 2026-03-13
96
+
97
+ ### Fixed
98
+
99
+ - Refresh-models button in Claude settings; model list pulled from the Anthropic SDK.
100
+
101
+ ## [4.3.1] — 2026-01-12
102
+
103
+ ### Fixed
104
+
105
+ - Inline-chat autocomplete popover position.
106
+
107
+ ## [4.3.0] — 2026-01-11
108
+
109
+ ### Added
110
+
111
+ - Auto-complete debounce delay configuration.
112
+ - Additional inline-completion options in Claude mode.
113
+ - Conversation continuation in Claude mode.
114
+
115
+ ### Changed
116
+
117
+ - Settings dialog hides Claude-specific options when Claude mode is off.
118
+ - NBI sidebar moved to the left side of the JupyterLab UI.
119
+
120
+ ### Fixed
121
+
122
+ - Auto-complete tab-state handling.
123
+
124
+ ## [4.2.1] — 2026-01-06
125
+
126
+ ### Changed
127
+
128
+ - Project rebrand from "JUI" to "NBI" (`@notebook-intelligence/notebook-intelligence`).
129
+
130
+ ## [4.2.0] — 2026-01-06
131
+
132
+ ### Changed
133
+
134
+ - Notebook tool calls (e.g., cell execution) now require explicit user approval instead of being auto-allowed.
135
+
136
+ ### Fixed
137
+
138
+ - Improved error handling and message-handler disconnect.
139
+ - Claude settings font color and UI state when toggling Claude mode.
140
+
141
+ ## [4.1.2] — 2026-01-05
142
+
143
+ ### Fixed
144
+
145
+ - Lock-handling in long-running Claude sessions.
146
+
147
+ ## [4.1.1] — 2026-01-04
148
+
149
+ ### Fixed
150
+
151
+ - Claude mode reliability (multiple cleanup commits).
152
+
153
+ ## [4.1.0] — 2026-01-03
154
+
155
+ ### Added
156
+
157
+ - Plan mode for Claude.
158
+ - Custom message for the Bash tool.
159
+
160
+ ### Changed
161
+
162
+ - Claude session timeout raised to 30 minutes.
163
+ - Improved AskUserQuestion styling.
164
+
165
+ ### Fixed
166
+
167
+ - Current-directory context and chat-history handling.
168
+
169
+ ## [4.0.0] — 2026-01-01
170
+
171
+ ### Added
172
+
173
+ - **Claude mode** — first-class integration with [Claude Code](https://code.claude.com/), including:
174
+ - Claude Code-backed Agent Chat UI, inline chat, and auto-complete.
175
+ - Claude Code tools, skills, MCP servers, and custom commands available inside JupyterLab.
176
+ - Claude session resume from `~/.claude/projects/`.
177
+ - Honor `c.ServerApp.base_url` for all extension routes.
178
+
179
+ ### Changed
180
+
181
+ - Settings UI restructured around Claude vs default mode.
182
+ - WebSocket connection reliability improvements.
183
+
184
+ [unreleased]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.7.0...HEAD
185
+ [4.7.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.6.0...v4.7.0
186
+ [4.6.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.5.0...v4.6.0
187
+ [4.5.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.4.0...v4.5.0
188
+ [4.4.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.3.2...v4.4.0
189
+ [4.3.2]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.3.1...v4.3.2
190
+ [4.3.1]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.3.0...v4.3.1
191
+ [4.3.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.2.1...v4.3.0
192
+ [4.2.1]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.2.0...v4.2.1
193
+ [4.2.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.1.2...v4.2.0
194
+ [4.1.2]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.1.1...v4.1.2
195
+ [4.1.1]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.1.0...v4.1.1
196
+ [4.1.0]: https://github.com/notebook-intelligence/notebook-intelligence/compare/v4.0.0...v4.1.0
197
+ [4.0.0]: https://github.com/notebook-intelligence/notebook-intelligence/releases/tag/v4.0.0
198
+
199
+ ## Versioning policy
200
+
201
+ - **Major (X.0.0)** — backward-incompatible changes to traitlets, environment variables, REST routes, or on-disk file formats. Major releases are accompanied by a migration note in this file.
202
+ - **Minor (4.Y.0)** — new features and traitlets. Existing configuration continues to work.
203
+ - **Patch (4.5.Z)** — bug fixes only.
204
+
205
+ Deprecations land in a minor release with a warning at startup, and are removed no earlier than the next major release.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notebook_intelligence
3
- Version: 4.6.0
3
+ Version: 4.8.0
4
4
  Summary: AI coding assistant for JupyterLab
5
5
  Project-URL: Homepage, https://github.com/notebook-intelligence/notebook-intelligence
6
6
  Project-URL: Bug Tracker, https://github.com/notebook-intelligence/notebook-intelligence/issues
@@ -694,10 +694,10 @@ Classifier: Programming Language :: Python :: 3.10
694
694
  Classifier: Programming Language :: Python :: 3.11
695
695
  Classifier: Programming Language :: Python :: 3.12
696
696
  Requires-Python: >=3.10
697
- Requires-Dist: anthropic
697
+ Requires-Dist: anthropic>=0.22.1
698
698
  Requires-Dist: claude-agent-sdk
699
699
  Requires-Dist: cryptography
700
- Requires-Dist: fastmcp
700
+ Requires-Dist: fastmcp>=2.11.2
701
701
  Requires-Dist: fuzy-jon==0.1.0
702
702
  Requires-Dist: jupyter-server<3,>=2.0.1
703
703
  Requires-Dist: litellm>=1.62.1
@@ -705,6 +705,9 @@ Requires-Dist: ollama
705
705
  Requires-Dist: openai
706
706
  Requires-Dist: sseclient-py
707
707
  Requires-Dist: tiktoken
708
+ Provides-Extra: test
709
+ Requires-Dist: pytest<9,>=7.0; extra == 'test'
710
+ Requires-Dist: pyyaml; extra == 'test'
708
711
  Description-Content-Type: text/markdown
709
712
 
710
713
  # Notebook Intelligence
@@ -724,6 +727,8 @@ NBI is free and open-source. Connect it to a free or paid LLM provider of your c
724
727
  - [Code generation with inline chat](#code-generation-with-inline-chat)
725
728
  - [Auto-complete](#auto-complete)
726
729
  - [Chat interface](#chat-interface)
730
+ - [Cell output actions](#cell-output-actions)
731
+ - [Notebook toolbar generation](#notebook-toolbar-generation)
727
732
  - [Configuration](#configuration)
728
733
  - [Configuration files](#configuration-files)
729
734
  - [Remembering GitHub Copilot login](#remembering-github-copilot-login)
@@ -796,6 +801,10 @@ If the Claude Code CLI is on `PATH`, NBI launches it automatically. To override
796
801
 
797
802
  When Claude mode is on, the chat sidebar shows a history icon next to the gear. Click it to list the Claude Code sessions recorded for the current working directory (the same transcripts the Claude Code CLI stores under `~/.claude/projects/`). Selecting a session reconnects via `resume`, so the next message you send continues that transcript with full prior context.
798
803
 
804
+ #### Claude Code launcher tile
805
+
806
+ When Claude mode is enabled and the Claude CLI is available, the JupyterLab launcher (the panel that opens with new tabs) shows a **Claude Code** tile alongside the standard kernel launchers. Clicking it opens a session picker — search across past transcripts and resume one in a fresh terminal, or start a new session in the file browser's active subdirectory. Session IDs are copyable from the picker for paste into a `claude --resume <id>` command.
807
+
799
808
  ### Agent mode
800
809
 
801
810
  In Agent mode, the built-in AI agent creates, edits, and executes notebooks for you interactively. It can detect issues in cells and fix them.
@@ -820,6 +829,22 @@ Auto-complete suggestions are shown as you type. `Tab` accepts. NBI provides aut
820
829
 
821
830
  <img src="media/copilot-chat.gif" alt="Chat interface" width=600 />
822
831
 
832
+ You can paste or attach images alongside a chat prompt — the image goes to the model as input when the active model supports vision.
833
+
834
+ ### Cell output actions
835
+
836
+ Right-click a cell output (or hover for the toolbar) to send it straight into the chat as context:
837
+
838
+ - **Explain cell errors** — surfaces a "Troubleshoot errors in output" entry on cells that raised; opens a chat turn with the traceback attached.
839
+ - **Ask about cell outputs** — attaches the output as structured context for a follow-up question. Includes images for vision-capable models.
840
+ - **Show output toolbar** — the floating toolbar above each output with quick **Explain** / **Ask** / **Troubleshoot** actions.
841
+
842
+ Each is per-user toggleable from Settings (saved as `enable_explain_error`, `enable_output_followup`, `enable_output_toolbar` in `config.json`, default on) and admin-lockable via `NBI_EXPLAIN_ERROR_POLICY` / `NBI_OUTPUT_FOLLOWUP_POLICY` / `NBI_OUTPUT_TOOLBAR_POLICY`.
843
+
844
+ ### Notebook toolbar generation
845
+
846
+ Active notebooks show a sparkle icon on the toolbar. Click it to open a popover that scopes the generation request to that specific notebook — handy for multi-notebook sessions where you don't want the chat sidebar to compete for context.
847
+
823
848
  ## Configuration
824
849
 
825
850
  Configure your provider, model, and API key from NBI Settings — the gear icon in the chat panel, the `/settings` chat command, or the JupyterLab command palette. For background, see the [provider blog post](https://notebook-intelligence.github.io/notebook-intelligence/blog/2025/03/05/support-for-any-llm-provider.html).
@@ -834,6 +859,49 @@ These config files store provider, model, and MCP configuration. **API keys for
834
859
 
835
860
  > Manual edits to `config.json` require a JupyterLab restart to take effect. Edits via the Settings dialog are picked up live.
836
861
 
862
+ ### Admin policies
863
+
864
+ Most settings panel toggles can be locked by org administrators. Two shapes:
865
+
866
+ **Boolean policies** use the `*_POLICY` suffix and accept three values: `user-choice` (default — user toggles freely), `force-on` (locked enabled), `force-off` (locked disabled). When forced, the panel control is disabled with a "Locked by your administrator" tooltip and any client-side write is ignored.
867
+
868
+ | Env var | Locks the Settings panel control for |
869
+ | ------------------------------------------ | ----------------------------------------- |
870
+ | `NBI_EXPLAIN_ERROR_POLICY` | "Explain cell errors" |
871
+ | `NBI_OUTPUT_FOLLOWUP_POLICY` | "Ask about cell outputs" |
872
+ | `NBI_OUTPUT_TOOLBAR_POLICY` | "Show output toolbar" |
873
+ | `NBI_CLAUDE_MODE_POLICY` | "Enable Claude mode" |
874
+ | `NBI_CLAUDE_CONTINUE_CONVERSATION_POLICY` | "Remember conversation history" |
875
+ | `NBI_CLAUDE_CODE_TOOLS_POLICY` | "Claude Code tools" |
876
+ | `NBI_CLAUDE_JUPYTER_UI_TOOLS_POLICY` | "Jupyter UI tools" |
877
+ | `NBI_CLAUDE_SETTING_SOURCE_USER_POLICY` | Setting source: User |
878
+ | `NBI_CLAUDE_SETTING_SOURCE_PROJECT_POLICY` | Setting source: Project |
879
+ | `NBI_STORE_GITHUB_ACCESS_TOKEN_POLICY` | "Remember my GitHub Copilot access token" |
880
+
881
+ The first three also have matching traitlets on `NotebookIntelligence` (`explain_error_policy`, `output_followup_policy`, `output_toolbar_policy`); add the others as needed in the same shape:
882
+
883
+ ```python
884
+ c.NotebookIntelligence.claude_mode_policy = "force-on"
885
+ c.NotebookIntelligence.claude_jupyter_ui_tools_policy = "force-off"
886
+ ```
887
+
888
+ Per-user preferences (default on for the cell-output features) live in `config.json` as `enable_explain_error`, `enable_output_followup`, `enable_output_toolbar`.
889
+
890
+ **Value-presence locks** for non-boolean settings: setting the env var to a non-empty value pins the control to that value and disables it. Empty/unset = user-choice.
891
+
892
+ | Env var | Pins |
893
+ | -------------------------------------- | ---------------------------------------------------------------------------- |
894
+ | `NBI_CHAT_MODEL_PROVIDER` | General → Chat model → Provider |
895
+ | `NBI_CHAT_MODEL_ID` | General → Chat model → Model |
896
+ | `NBI_INLINE_COMPLETION_MODEL_PROVIDER` | General → Auto-complete model → Provider |
897
+ | `NBI_INLINE_COMPLETION_MODEL_ID` | General → Auto-complete model → Model |
898
+ | `NBI_CLAUDE_CHAT_MODEL` | Claude → Chat model |
899
+ | `NBI_CLAUDE_INLINE_COMPLETION_MODEL` | Claude → Auto-complete model |
900
+ | `ANTHROPIC_API_KEY` | Claude → API Key (input is locked + blanked; the SDK reads the env directly) |
901
+ | `ANTHROPIC_BASE_URL` | Claude → Base URL |
902
+
903
+ Provider IDs: `github-copilot`, `openai-compatible`, `litellm-compatible`, `ollama`, `none`. The `*_MODEL_ID` value is whatever the chosen provider exposes (e.g. `gpt-4o`, `llama3:latest`). Claude model IDs are the literal IDs from the Anthropic API (e.g. `claude-opus-4-7`, `claude-sonnet-4-6`); empty string = "Default (recommended)"; `NBI_CLAUDE_INLINE_COMPLETION_MODEL` also accepts `none` (no inline completion in Claude mode) or `inherit` (use the General-tab Auto-complete model).
904
+
837
905
  ### Remembering GitHub Copilot login
838
906
 
839
907
  NBI can remember your GitHub Copilot login so you don't have to sign in again after a JupyterLab or system restart.
@@ -15,6 +15,8 @@ NBI is free and open-source. Connect it to a free or paid LLM provider of your c
15
15
  - [Code generation with inline chat](#code-generation-with-inline-chat)
16
16
  - [Auto-complete](#auto-complete)
17
17
  - [Chat interface](#chat-interface)
18
+ - [Cell output actions](#cell-output-actions)
19
+ - [Notebook toolbar generation](#notebook-toolbar-generation)
18
20
  - [Configuration](#configuration)
19
21
  - [Configuration files](#configuration-files)
20
22
  - [Remembering GitHub Copilot login](#remembering-github-copilot-login)
@@ -87,6 +89,10 @@ If the Claude Code CLI is on `PATH`, NBI launches it automatically. To override
87
89
 
88
90
  When Claude mode is on, the chat sidebar shows a history icon next to the gear. Click it to list the Claude Code sessions recorded for the current working directory (the same transcripts the Claude Code CLI stores under `~/.claude/projects/`). Selecting a session reconnects via `resume`, so the next message you send continues that transcript with full prior context.
89
91
 
92
+ #### Claude Code launcher tile
93
+
94
+ When Claude mode is enabled and the Claude CLI is available, the JupyterLab launcher (the panel that opens with new tabs) shows a **Claude Code** tile alongside the standard kernel launchers. Clicking it opens a session picker — search across past transcripts and resume one in a fresh terminal, or start a new session in the file browser's active subdirectory. Session IDs are copyable from the picker for paste into a `claude --resume <id>` command.
95
+
90
96
  ### Agent mode
91
97
 
92
98
  In Agent mode, the built-in AI agent creates, edits, and executes notebooks for you interactively. It can detect issues in cells and fix them.
@@ -111,6 +117,22 @@ Auto-complete suggestions are shown as you type. `Tab` accepts. NBI provides aut
111
117
 
112
118
  <img src="media/copilot-chat.gif" alt="Chat interface" width=600 />
113
119
 
120
+ You can paste or attach images alongside a chat prompt — the image goes to the model as input when the active model supports vision.
121
+
122
+ ### Cell output actions
123
+
124
+ Right-click a cell output (or hover for the toolbar) to send it straight into the chat as context:
125
+
126
+ - **Explain cell errors** — surfaces a "Troubleshoot errors in output" entry on cells that raised; opens a chat turn with the traceback attached.
127
+ - **Ask about cell outputs** — attaches the output as structured context for a follow-up question. Includes images for vision-capable models.
128
+ - **Show output toolbar** — the floating toolbar above each output with quick **Explain** / **Ask** / **Troubleshoot** actions.
129
+
130
+ Each is per-user toggleable from Settings (saved as `enable_explain_error`, `enable_output_followup`, `enable_output_toolbar` in `config.json`, default on) and admin-lockable via `NBI_EXPLAIN_ERROR_POLICY` / `NBI_OUTPUT_FOLLOWUP_POLICY` / `NBI_OUTPUT_TOOLBAR_POLICY`.
131
+
132
+ ### Notebook toolbar generation
133
+
134
+ Active notebooks show a sparkle icon on the toolbar. Click it to open a popover that scopes the generation request to that specific notebook — handy for multi-notebook sessions where you don't want the chat sidebar to compete for context.
135
+
114
136
  ## Configuration
115
137
 
116
138
  Configure your provider, model, and API key from NBI Settings — the gear icon in the chat panel, the `/settings` chat command, or the JupyterLab command palette. For background, see the [provider blog post](https://notebook-intelligence.github.io/notebook-intelligence/blog/2025/03/05/support-for-any-llm-provider.html).
@@ -125,6 +147,49 @@ These config files store provider, model, and MCP configuration. **API keys for
125
147
 
126
148
  > Manual edits to `config.json` require a JupyterLab restart to take effect. Edits via the Settings dialog are picked up live.
127
149
 
150
+ ### Admin policies
151
+
152
+ Most settings panel toggles can be locked by org administrators. Two shapes:
153
+
154
+ **Boolean policies** use the `*_POLICY` suffix and accept three values: `user-choice` (default — user toggles freely), `force-on` (locked enabled), `force-off` (locked disabled). When forced, the panel control is disabled with a "Locked by your administrator" tooltip and any client-side write is ignored.
155
+
156
+ | Env var | Locks the Settings panel control for |
157
+ | ------------------------------------------ | ----------------------------------------- |
158
+ | `NBI_EXPLAIN_ERROR_POLICY` | "Explain cell errors" |
159
+ | `NBI_OUTPUT_FOLLOWUP_POLICY` | "Ask about cell outputs" |
160
+ | `NBI_OUTPUT_TOOLBAR_POLICY` | "Show output toolbar" |
161
+ | `NBI_CLAUDE_MODE_POLICY` | "Enable Claude mode" |
162
+ | `NBI_CLAUDE_CONTINUE_CONVERSATION_POLICY` | "Remember conversation history" |
163
+ | `NBI_CLAUDE_CODE_TOOLS_POLICY` | "Claude Code tools" |
164
+ | `NBI_CLAUDE_JUPYTER_UI_TOOLS_POLICY` | "Jupyter UI tools" |
165
+ | `NBI_CLAUDE_SETTING_SOURCE_USER_POLICY` | Setting source: User |
166
+ | `NBI_CLAUDE_SETTING_SOURCE_PROJECT_POLICY` | Setting source: Project |
167
+ | `NBI_STORE_GITHUB_ACCESS_TOKEN_POLICY` | "Remember my GitHub Copilot access token" |
168
+
169
+ The first three also have matching traitlets on `NotebookIntelligence` (`explain_error_policy`, `output_followup_policy`, `output_toolbar_policy`); add the others as needed in the same shape:
170
+
171
+ ```python
172
+ c.NotebookIntelligence.claude_mode_policy = "force-on"
173
+ c.NotebookIntelligence.claude_jupyter_ui_tools_policy = "force-off"
174
+ ```
175
+
176
+ Per-user preferences (default on for the cell-output features) live in `config.json` as `enable_explain_error`, `enable_output_followup`, `enable_output_toolbar`.
177
+
178
+ **Value-presence locks** for non-boolean settings: setting the env var to a non-empty value pins the control to that value and disables it. Empty/unset = user-choice.
179
+
180
+ | Env var | Pins |
181
+ | -------------------------------------- | ---------------------------------------------------------------------------- |
182
+ | `NBI_CHAT_MODEL_PROVIDER` | General → Chat model → Provider |
183
+ | `NBI_CHAT_MODEL_ID` | General → Chat model → Model |
184
+ | `NBI_INLINE_COMPLETION_MODEL_PROVIDER` | General → Auto-complete model → Provider |
185
+ | `NBI_INLINE_COMPLETION_MODEL_ID` | General → Auto-complete model → Model |
186
+ | `NBI_CLAUDE_CHAT_MODEL` | Claude → Chat model |
187
+ | `NBI_CLAUDE_INLINE_COMPLETION_MODEL` | Claude → Auto-complete model |
188
+ | `ANTHROPIC_API_KEY` | Claude → API Key (input is locked + blanked; the SDK reads the env directly) |
189
+ | `ANTHROPIC_BASE_URL` | Claude → Base URL |
190
+
191
+ Provider IDs: `github-copilot`, `openai-compatible`, `litellm-compatible`, `ollama`, `none`. The `*_MODEL_ID` value is whatever the chosen provider exposes (e.g. `gpt-4o`, `llama3:latest`). Claude model IDs are the literal IDs from the Anthropic API (e.g. `claude-opus-4-7`, `claude-sonnet-4-6`); empty string = "Default (recommended)"; `NBI_CLAUDE_INLINE_COMPLETION_MODEL` also accepts `none` (no inline completion in Claude mode) or `inherit` (use the General-tab Auto-complete model).
192
+
128
193
  ### Remembering GitHub Copilot login
129
194
 
130
195
  NBI can remember your GitHub Copilot login so you don't have to sign in again after a JupyterLab or system restart.
@@ -75,27 +75,32 @@ If users share a home directory across nodes (NFS-backed shared HPC, classroom l
75
75
 
76
76
  The full surface, in one table.
77
77
 
78
- | Name | Type | Default | Source | Purpose |
79
- | ----------------------------------- | ---- | --------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
80
- | `disabled_providers` | List | `[]` | traitlet on `NotebookIntelligence` | Hide providers from the user dropdown. Values: `github-copilot`, `ollama`, `litellm-compatible`, `openai-compatible`. |
81
- | `allow_enabling_providers_with_env` | Bool | `False` | traitlet | If true, `NBI_ENABLED_PROVIDERS` re-enables hidden providers per pod. |
82
- | `NBI_ENABLED_PROVIDERS` | csv | unset | env | Comma-separated provider IDs to re-enable. Effective only when `allow_enabling_providers_with_env=True`. |
83
- | `disabled_tools` | List | `[]` | traitlet | Hide built-in tools from agent mode. Values listed in [Restricting features](#restricting-features-for-managed-deployments). |
84
- | `allow_enabling_tools_with_env` | Bool | `False` | traitlet | If true, `NBI_ENABLED_BUILTIN_TOOLS` re-enables hidden tools per pod. |
85
- | `NBI_ENABLED_BUILTIN_TOOLS` | csv | unset | env | Comma-separated tool IDs to re-enable. Effective only when `allow_enabling_tools_with_env=True`. |
86
- | `enable_chat_feedback` | Bool | `False` | traitlet | Enables thumbs-up/down UI in chat and emits in-process `telemetry` events. |
87
- | `skills_manifest` | str | `""` | traitlet | URL or filesystem path to a managed-skills manifest. See [`docs/skills.md`](skills.md#managed-skills-via-an-org-manifest). |
88
- | `NBI_SKILLS_MANIFEST` | str | unset | env (overrides traitlet) | Same as above; env takes precedence. |
89
- | `skills_manifest_interval` | int | `86400` | traitlet | Seconds between reconciles. |
90
- | `NBI_SKILLS_MANIFEST_INTERVAL` | int | unset | env (overrides traitlet) | Same as above; env takes precedence. |
91
- | `managed_skills_token` | str | `""` | traitlet | Bearer token for managed-skills GitHub fetches. |
92
- | `NBI_MANAGED_SKILLS_TOKEN` | str | unset | env (overrides traitlet) | Same as above; env takes precedence. |
93
- | `NBI_GH_ACCESS_TOKEN_PASSWORD` | str | `nbi-access-token-password` | env | Password used to encrypt the stored Copilot token in `user-data.json`. **Change in multi-tenant deployments.** |
94
- | `NBI_RULES_AUTO_RELOAD` | bool | `true` | env | When `false`, ruleset edits require a JupyterLab restart to take effect. |
95
- | `NBI_CLAUDE_CLI_PATH` | str | unset | env | Absolute path to the Claude Code CLI binary. When unset, NBI looks up `claude` on `PATH`. |
96
- | `NBI_GHE_SUBDOMAIN` | str | `""` | env | GitHub Enterprise subdomain for GitHub Copilot users on a GHE tenant. Empty selects github.com. |
97
- | `NBI_LOG_LEVEL` | str | `INFO` | env | Python logging level for the `notebook_intelligence` logger. |
98
- | `GITHUB_TOKEN`, `GH_TOKEN` | str | unset | env | Used (in that order) by user-initiated skill imports for GitHub auth. Falls back to `gh` CLI auth. |
78
+ | Name | Type | Default | Source | Purpose |
79
+ | ---------------------------------------------- | ---- | --------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80
+ | `disabled_providers` | List | `[]` | traitlet on `NotebookIntelligence` | Hide providers from the user dropdown. Values: `github-copilot`, `ollama`, `litellm-compatible`, `openai-compatible`. |
81
+ | `allow_enabling_providers_with_env` | Bool | `False` | traitlet | If true, `NBI_ENABLED_PROVIDERS` re-enables hidden providers per pod. |
82
+ | `NBI_ENABLED_PROVIDERS` | csv | unset | env | Comma-separated provider IDs to re-enable. Effective only when `allow_enabling_providers_with_env=True`. |
83
+ | `disabled_tools` | List | `[]` | traitlet | Hide built-in tools from agent mode. Values listed in [Restricting features](#restricting-features-for-managed-deployments). |
84
+ | `allow_enabling_tools_with_env` | Bool | `False` | traitlet | If true, `NBI_ENABLED_BUILTIN_TOOLS` re-enables hidden tools per pod. |
85
+ | `NBI_ENABLED_BUILTIN_TOOLS` | csv | unset | env | Comma-separated tool IDs to re-enable. Effective only when `allow_enabling_tools_with_env=True`. |
86
+ | `enable_chat_feedback` | Bool | `False` | traitlet | Enables thumbs-up/down UI in chat and emits in-process `telemetry` events. |
87
+ | `additional_skipped_workspace_directories` | List | `[]` | traitlet | Extra directory names to skip in the chat-sidebar @-mention workspace file picker. Merged with the built-in skips (`__pycache__`, `node_modules`). Match is by directory name only, case-sensitive. |
88
+ | `NBI_ADDITIONAL_SKIPPED_WORKSPACE_DIRECTORIES` | csv | unset | env (appends to traitlet) | Comma-separated extra directory names. Resolved at server startup and concatenated with the traitlet value, so a spawn profile can add to (rather than replace) the org-wide list. |
89
+ | `allow_github_skill_import` | Bool | `True` | traitlet | When `False`, hides the **Import from GitHub** button in the Skills panel and rejects `/skills/import` POSTs with 403. Does not affect the managed-skills reconciler. |
90
+ | `NBI_ALLOW_GITHUB_SKILL_IMPORT` | bool | unset | env (overrides traitlet) | Per-pod override for `allow_github_skill_import`. Accepts `true`/`false`/`1`/`0`/`yes`/`no`/`on`/`off` (case-insensitive). Useful for varying the policy across spawn profiles. |
91
+ | `skills_manifest` | str | `""` | traitlet | URL or filesystem path to a managed-skills manifest. See [`docs/skills.md`](skills.md#managed-skills-via-an-org-manifest). |
92
+ | `NBI_SKILLS_MANIFEST` | str | unset | env (overrides traitlet) | Same as above; env takes precedence. |
93
+ | `skills_manifest_interval` | int | `86400` | traitlet | Seconds between reconciles. |
94
+ | `NBI_SKILLS_MANIFEST_INTERVAL` | int | unset | env (overrides traitlet) | Same as above; env takes precedence. |
95
+ | `managed_skills_token` | str | `""` | traitlet | Bearer token for managed-skills GitHub fetches. |
96
+ | `NBI_MANAGED_SKILLS_TOKEN` | str | unset | env (overrides traitlet) | Same as above; env takes precedence. |
97
+ | `NBI_GH_ACCESS_TOKEN_PASSWORD` | str | `nbi-access-token-password` | env | Password used to encrypt the stored Copilot token in `user-data.json`. **Change in multi-tenant deployments.** |
98
+ | `NBI_RULES_AUTO_RELOAD` | bool | `true` | env | When `false`, ruleset edits require a JupyterLab restart to take effect. |
99
+ | `NBI_CLAUDE_CLI_PATH` | str | unset | env | Absolute path to the Claude Code CLI binary. When unset, NBI looks up `claude` on `PATH`. |
100
+ | `NBI_GHE_SUBDOMAIN` | str | `""` | env | GitHub Enterprise subdomain for GitHub Copilot users on a GHE tenant. Empty selects github.com. |
101
+ | `NBI_LOG_LEVEL` | str | `INFO` | env | Python logging level for the `notebook_intelligence` logger. |
102
+ | `GITHUB_TOKEN`, `GH_TOKEN` | str | unset | env | Used (in that order) by user-initiated skill imports for GitHub auth. Falls back to `gh` CLI auth. |
103
+ | `NBI_*_POLICY` | str | `user-choice` | env | Lock individual Settings panel toggles. See [README → Admin policies](../README.md#admin-policies) for the full list of `*_POLICY` env vars and matching traitlets. |
99
104
 
100
105
  Configure traitlets in `jupyter_server_config.py`:
101
106
 
@@ -314,6 +319,44 @@ NBI_ENABLED_BUILTIN_TOOLS=nbi-notebook-execute,nbi-python-file-edit
314
319
 
315
320
  NBI does not currently support an explicit allowlist mode (`allowed_providers`, `allowed_tools`). A new built-in provider added in a minor release would auto-enable for users with `disabled_providers=[]`. If this matters for your compliance posture, pin to specific NBI versions and review changelog entries before upgrading. Tracked as a feature request.
316
321
 
322
+ ### Disabling user-initiated GitHub Skill imports
323
+
324
+ ```python
325
+ c.NotebookIntelligence.allow_github_skill_import = False
326
+ ```
327
+
328
+ Hides the **Import from GitHub** button in the Skills panel and rejects POSTs to `/notebook-intelligence/skills/import` and `/notebook-intelligence/skills/import/preview` with HTTP 403. This does **not** disable the [managed-skills reconciler](#managed-claude-skills-token); admin-curated skills delivered via `NBI_SKILLS_MANIFEST` continue to install. Use this when you want to allow only org-vetted skills.
329
+
330
+ To vary the policy per spawn profile, override at pod startup:
331
+
332
+ ```bash
333
+ NBI_ALLOW_GITHUB_SKILL_IMPORT=false
334
+ ```
335
+
336
+ The env var wins over the traitlet and is resolved at server startup. Recognized values: `true`/`false`/`1`/`0`/`yes`/`no`/`on`/`off`, case-insensitive. Unrecognized values raise at startup so a typo can't silently flip the policy.
337
+
338
+ ### Tuning the chat-sidebar workspace file picker
339
+
340
+ **Audience:** server admins. End users can't override this — ask your admin to add or remove entries.
341
+
342
+ The @-mention picker in the chat sidebar enumerates files from the JupyterLab working directory and skips a built-in set of directories (`__pycache__`, `node_modules`) plus any dotfiles/dot-directories. Because dot-prefixed names are filtered separately, entries starting with `.` in the list below are no-ops; list non-dot names only.
343
+
344
+ To extend the directory skip set without editing the codebase:
345
+
346
+ ```python
347
+ c.NotebookIntelligence.additional_skipped_workspace_directories = ["build", "dist", "target"]
348
+ ```
349
+
350
+ Match is by directory name only (not path), case-sensitive. Use this when a project has standard build outputs the picker shouldn't surface.
351
+
352
+ To vary the list per spawn profile, append entries via env at pod startup:
353
+
354
+ ```bash
355
+ NBI_ADDITIONAL_SKIPPED_WORKSPACE_DIRECTORIES=tmp,artifacts
356
+ ```
357
+
358
+ The env var **appends** to the traitlet value at server startup (in contrast to `NBI_ALLOW_GITHUB_SKILL_IMPORT` and the `NBI_*_POLICY` env vars, which override). Duplicates are collapsed; both lists are then merged with the built-in skip set on the frontend.
359
+
317
360
  ---
318
361
 
319
362
  ## Multi-tenancy and per-team scoping
@@ -8,6 +8,12 @@ Rules live in `~/.jupyter/nbi/rules/`. NBI loads them at startup, watches the di
8
8
 
9
9
  Selected rules are concatenated in priority order and prepended to the system prompt sent to the LLM.
10
10
 
11
+ ## Repository-level `AGENTS.md`
12
+
13
+ If the Jupyter project root contains an `AGENTS.md`, NBI appends it to the system prompt under the **Additional Guidelines** heading alongside the rules described below. This works the same as the [AGENTS.md convention](https://agents.md/) used by other coding agents. The file is project-scoped: each project's `AGENTS.md` only applies when JupyterLab is launched from that directory.
14
+
15
+ `AGENTS.md` and the ruleset system are additive — both contribute to the same prompt section when both exist.
16
+
11
17
  ## Creating rules
12
18
 
13
19
  ### Global rules — apply to all contexts
@@ -3,6 +3,7 @@
3
3
  /** @type {import('jest').Config} */
4
4
  module.exports = {
5
5
  testEnvironment: 'jsdom',
6
+ setupFilesAfterEnv: ['<rootDir>/tests/ts/setup.ts'],
6
7
  testMatch: [
7
8
  '<rootDir>/tests/ts/**/*.test.ts',
8
9
  '<rootDir>/tests/ts/**/*.test.tsx'
@@ -19,7 +20,8 @@ module.exports = {
19
20
  // tiktoken pulls in WebAssembly that doesn't load cleanly under jsdom.
20
21
  // The tests don't depend on real tokenization, so stub it out.
21
22
  moduleNameMapper: {
22
- '^tiktoken$': '<rootDir>/tests/ts/__mocks__/tiktoken.ts'
23
+ '^tiktoken$': '<rootDir>/tests/ts/__mocks__/tiktoken.ts',
24
+ '\\.svg$': '<rootDir>/tests/ts/__mocks__/svg.ts'
23
25
  },
24
26
  clearMocks: true
25
27
  };
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '4.6.0'
4
+ __version__ = VERSION = '4.8.0'