codebind 0.6.5__tar.gz → 0.6.6__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 (32) hide show
  1. codebind-0.6.6/PKG-INFO +135 -0
  2. codebind-0.6.6/README.md +107 -0
  3. {codebind-0.6.5 → codebind-0.6.6}/pyproject.toml +1 -1
  4. {codebind-0.6.5 → codebind-0.6.6}/pyproject.toml.orig +1 -1
  5. codebind-0.6.5/PKG-INFO +0 -118
  6. codebind-0.6.5/README.md +0 -90
  7. {codebind-0.6.5 → codebind-0.6.6}/LICENSE +0 -0
  8. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/install.json +0 -0
  9. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/package.json +0 -0
  10. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/static/590.dae4561c5427a855.js +0 -0
  11. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/static/remoteEntry.c10098fb6e87897c.js +0 -0
  12. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/static/style.js +0 -0
  13. {codebind-0.6.5 → codebind-0.6.6}/data/share/jupyter/labextensions/codebind-jupyterlab/static/third-party-licenses.json +0 -0
  14. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/.yarnrc.yml +0 -0
  15. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/install.json +0 -0
  16. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/package.json +0 -0
  17. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/src/index.ts +0 -0
  18. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/tsconfig.json +0 -0
  19. {codebind-0.6.5 → codebind-0.6.6}/jupyterlab/yarn.lock +0 -0
  20. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/__init__.py +0 -0
  21. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/cli.py +0 -0
  22. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/configuration.py +0 -0
  23. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/conversation.py +0 -0
  24. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/display.py +0 -0
  25. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/execution.py +0 -0
  26. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/extension.py +0 -0
  27. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/images.py +0 -0
  28. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/instructions.md +0 -0
  29. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/jupyter.py +0 -0
  30. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/py.typed +0 -0
  31. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/session.py +0 -0
  32. {codebind-0.6.5 → codebind-0.6.6}/src/codebind/terminal.py +0 -0
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: codebind
3
+ Version: 0.6.6
4
+ Summary: A frontend-neutral model loop for persistent IPython sessions.
5
+ Keywords: ai,ipython,llm,repl,agents
6
+ Author: Giovanni Gravili
7
+ Author-email: Giovanni Gravili <ghovax@users.noreply.github.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Typing :: Typed
18
+ Requires-Dist: ipython>=9.17
19
+ Requires-Dist: langchain-core>=1.0
20
+ Requires-Dist: models-provider>=0.1.2
21
+ Requires-Dist: pillow>=11
22
+ Requires-Dist: resvg-py>=0.5
23
+ Requires-Dist: rich>=14.1
24
+ Requires-Python: >=3.13
25
+ Project-URL: Repository, https://github.com/ghovax/codebind
26
+ Project-URL: Issues, https://github.com/ghovax/codebind/issues
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Codebind
30
+
31
+ Codebind turns an ordinary IPython session into a durable model harness with one tool: an IPython cell executed in the active session. IPython owns execution, namespace, history, magics, tracebacks, and rich display; Codebind owns conversation state and model orchestration.
32
+
33
+ ## Installation
34
+
35
+ ```console
36
+ uvx codebind
37
+ ```
38
+
39
+ Or install it with any Python package installer:
40
+
41
+ ```console
42
+ pip install codebind
43
+ ```
44
+
45
+ ## Configuration
46
+
47
+ Codebind reads its private model choice from `$XDG_CONFIG_HOME/codebind/configuration.json`, or `~/.config/codebind/configuration.json` when `XDG_CONFIG_HOME` is unset:
48
+
49
+ ```json
50
+ {
51
+ "model": "openai/gpt-5.6-luna",
52
+ "parameters": {
53
+ "reasoning_effort": "medium"
54
+ }
55
+ }
56
+ ```
57
+
58
+ Provider credentials use the same XDG directory in `models.json`. Keep both files readable only by their owner. Loading Codebind does not add `chat`, `model`, `models`, `Models`, or any other variable to the IPython namespace.
59
+
60
+ ## Terminal IPython
61
+
62
+ Start a new conversation:
63
+
64
+ ```console
65
+ uvx codebind
66
+ ```
67
+
68
+ Ask through ordinary IPython magic syntax:
69
+
70
+ ```python
71
+ %%question
72
+ Inspect this project and tell me what to implement first.
73
+ ```
74
+
75
+ Terminal conversations remain live for the current IPython process. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
76
+ Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
77
+
78
+ ## JupyterLab
79
+
80
+ ```console
81
+ uvx --from jupyterlab --with codebind --with 'nbconvert[webpdf]' jupyter lab
82
+ ```
83
+
84
+ When running an unpublished local checkout, expose both its editable Python source and its current prebuilt frontend:
85
+
86
+ ```console
87
+ JUPYTER_PATH=/path/to/codebind/data/share/jupyter \
88
+ uvx --refresh --from jupyterlab --with-editable /path/to/codebind \
89
+ --with 'nbconvert[webpdf]' jupyter-lab
90
+ ```
91
+
92
+ Load Codebind in a notebook:
93
+
94
+ ```python
95
+ %load_ext codebind
96
+ ```
97
+
98
+ That is the complete setup. **Question** is a native toolbar toggle:
99
+
100
+ - Turning it on converts the selected cell into a Question and makes each newly created user cell a Question until the toggle is turned off.
101
+ - Codebind-generated instruction, tool, and answer cells are never converted.
102
+ - Write ordinary Markdown and press `Shift+Enter`.
103
+
104
+ ### Instructions and notebook context
105
+
106
+ - Loading the extension adds a locked Markdown cell containing Codebind's packaged instructions. Its exact text becomes the conversation's immutable system message and remains stable when the server or kernel restarts.
107
+ - The whole notebook is model context. Before each Question, Codebind snapshots ordinary Markdown, raw, and code cells—including visible text and image outputs, but never the live Python namespace.
108
+ - Images displayed by the model's IPython tool are included in that tool's result. PNG, JPEG, WebP, GIF, and SVG renditions are prepared as model-visible images; unsupported or oversized images are reported as omissions.
109
+ - The first turn records the snapshot. Later turns append only new, changed, removed, or reordered cells. Existing Questions, tool calls, tool results, and answers in the conversation ledger are not duplicated.
110
+ - Image bytes travel in the relevant message; notebook snapshots contain only stable image descriptors. This append-only representation keeps the prior model prefix unchanged for provider caching.
111
+
112
+ ### Persistence and notebook behavior
113
+
114
+ - Codebind stores the complete LangChain message, notebook-context, and turn ledger in notebook metadata. Reopening the notebook, restarting its kernel, and loading the extension restores the accumulated context automatically.
115
+ - Each assistant Markdown segment is buffered and inserted as one complete native cell as soon as it finishes, before a following tool call completes.
116
+ - Tool executions and assistant answers are appended to the notebook end without changing the user's selection or scroll position. Tool outputs are collapsed by default and expandable through JupyterLab's native output control.
117
+
118
+ ### Reliability and editing
119
+
120
+ - The conversation ledger validates its structure and each assistant tool call against its single matching result, without a version gate.
121
+ - Interrupted saves finish before a turn is cancelled, preventing a restart from turning a partial write into an orphan tool result. An interrupted tool call is closed with an explicit interrupted result.
122
+ - Temporary model transport failures retry the same Question with a fresh connection; repeated WebSocket failures use HTTP. Invalid requests and authentication failures remain visible errors.
123
+ - If a provider stream is cancelled or fails, Codebind discards that provider session before the next Question while retaining the notebook conversation and stable prompt-cache identity.
124
+ - The instruction cell, sent Question cells, model-authored tool cells, and assistant Markdown cells are non-editable and non-deletable. Draft Questions remain editable until sent. Jupyter's standard interrupt button cancels an active Codebind question.
125
+
126
+ ### Markdown and other frontends
127
+
128
+ - Question and assistant Markdown supports `$...$`, `$$...$$`, `\(...\)`, and `\[...\]` through JupyterLab's native MathJax renderer.
129
+ - Other IPython frontends retain standard MIME display, syntax-highlighted code, Markdown, stdout, tracebacks, rich results, and native IPython history.
130
+
131
+ ## ChatGPT account access
132
+
133
+ - Models Provider owns OpenAI account authorization and token refresh.
134
+ - Save the resulting provider-values object in Codebind's XDG `models.json`; Codebind loads it privately when the extension starts.
135
+ - ChatGPT subscription access is separate from the public, pay-as-you-go OpenAI API and may require compatibility updates when the account protocol changes.
@@ -0,0 +1,107 @@
1
+ # Codebind
2
+
3
+ Codebind turns an ordinary IPython session into a durable model harness with one tool: an IPython cell executed in the active session. IPython owns execution, namespace, history, magics, tracebacks, and rich display; Codebind owns conversation state and model orchestration.
4
+
5
+ ## Installation
6
+
7
+ ```console
8
+ uvx codebind
9
+ ```
10
+
11
+ Or install it with any Python package installer:
12
+
13
+ ```console
14
+ pip install codebind
15
+ ```
16
+
17
+ ## Configuration
18
+
19
+ Codebind reads its private model choice from `$XDG_CONFIG_HOME/codebind/configuration.json`, or `~/.config/codebind/configuration.json` when `XDG_CONFIG_HOME` is unset:
20
+
21
+ ```json
22
+ {
23
+ "model": "openai/gpt-5.6-luna",
24
+ "parameters": {
25
+ "reasoning_effort": "medium"
26
+ }
27
+ }
28
+ ```
29
+
30
+ Provider credentials use the same XDG directory in `models.json`. Keep both files readable only by their owner. Loading Codebind does not add `chat`, `model`, `models`, `Models`, or any other variable to the IPython namespace.
31
+
32
+ ## Terminal IPython
33
+
34
+ Start a new conversation:
35
+
36
+ ```console
37
+ uvx codebind
38
+ ```
39
+
40
+ Ask through ordinary IPython magic syntax:
41
+
42
+ ```python
43
+ %%question
44
+ Inspect this project and tell me what to implement first.
45
+ ```
46
+
47
+ Terminal conversations remain live for the current IPython process. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
48
+ Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
49
+
50
+ ## JupyterLab
51
+
52
+ ```console
53
+ uvx --from jupyterlab --with codebind --with 'nbconvert[webpdf]' jupyter lab
54
+ ```
55
+
56
+ When running an unpublished local checkout, expose both its editable Python source and its current prebuilt frontend:
57
+
58
+ ```console
59
+ JUPYTER_PATH=/path/to/codebind/data/share/jupyter \
60
+ uvx --refresh --from jupyterlab --with-editable /path/to/codebind \
61
+ --with 'nbconvert[webpdf]' jupyter-lab
62
+ ```
63
+
64
+ Load Codebind in a notebook:
65
+
66
+ ```python
67
+ %load_ext codebind
68
+ ```
69
+
70
+ That is the complete setup. **Question** is a native toolbar toggle:
71
+
72
+ - Turning it on converts the selected cell into a Question and makes each newly created user cell a Question until the toggle is turned off.
73
+ - Codebind-generated instruction, tool, and answer cells are never converted.
74
+ - Write ordinary Markdown and press `Shift+Enter`.
75
+
76
+ ### Instructions and notebook context
77
+
78
+ - Loading the extension adds a locked Markdown cell containing Codebind's packaged instructions. Its exact text becomes the conversation's immutable system message and remains stable when the server or kernel restarts.
79
+ - The whole notebook is model context. Before each Question, Codebind snapshots ordinary Markdown, raw, and code cells—including visible text and image outputs, but never the live Python namespace.
80
+ - Images displayed by the model's IPython tool are included in that tool's result. PNG, JPEG, WebP, GIF, and SVG renditions are prepared as model-visible images; unsupported or oversized images are reported as omissions.
81
+ - The first turn records the snapshot. Later turns append only new, changed, removed, or reordered cells. Existing Questions, tool calls, tool results, and answers in the conversation ledger are not duplicated.
82
+ - Image bytes travel in the relevant message; notebook snapshots contain only stable image descriptors. This append-only representation keeps the prior model prefix unchanged for provider caching.
83
+
84
+ ### Persistence and notebook behavior
85
+
86
+ - Codebind stores the complete LangChain message, notebook-context, and turn ledger in notebook metadata. Reopening the notebook, restarting its kernel, and loading the extension restores the accumulated context automatically.
87
+ - Each assistant Markdown segment is buffered and inserted as one complete native cell as soon as it finishes, before a following tool call completes.
88
+ - Tool executions and assistant answers are appended to the notebook end without changing the user's selection or scroll position. Tool outputs are collapsed by default and expandable through JupyterLab's native output control.
89
+
90
+ ### Reliability and editing
91
+
92
+ - The conversation ledger validates its structure and each assistant tool call against its single matching result, without a version gate.
93
+ - Interrupted saves finish before a turn is cancelled, preventing a restart from turning a partial write into an orphan tool result. An interrupted tool call is closed with an explicit interrupted result.
94
+ - Temporary model transport failures retry the same Question with a fresh connection; repeated WebSocket failures use HTTP. Invalid requests and authentication failures remain visible errors.
95
+ - If a provider stream is cancelled or fails, Codebind discards that provider session before the next Question while retaining the notebook conversation and stable prompt-cache identity.
96
+ - The instruction cell, sent Question cells, model-authored tool cells, and assistant Markdown cells are non-editable and non-deletable. Draft Questions remain editable until sent. Jupyter's standard interrupt button cancels an active Codebind question.
97
+
98
+ ### Markdown and other frontends
99
+
100
+ - Question and assistant Markdown supports `$...$`, `$$...$$`, `\(...\)`, and `\[...\]` through JupyterLab's native MathJax renderer.
101
+ - Other IPython frontends retain standard MIME display, syntax-highlighted code, Markdown, stdout, tracebacks, rich results, and native IPython history.
102
+
103
+ ## ChatGPT account access
104
+
105
+ - Models Provider owns OpenAI account authorization and token refresh.
106
+ - Save the resulting provider-values object in Codebind's XDG `models.json`; Codebind loads it privately when the extension starts.
107
+ - ChatGPT subscription access is separate from the public, pay-as-you-go OpenAI API and may require compatibility updates when the account protocol changes.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codebind"
3
- version = "0.6.5"
3
+ version = "0.6.6"
4
4
  description = "A frontend-neutral model loop for persistent IPython sessions."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codebind"
3
- version = "0.6.5"
3
+ version = "0.6.6"
4
4
  description = "A frontend-neutral model loop for persistent IPython sessions."
5
5
  readme = "README.md"
6
6
  authors = [
codebind-0.6.5/PKG-INFO DELETED
@@ -1,118 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: codebind
3
- Version: 0.6.5
4
- Summary: A frontend-neutral model loop for persistent IPython sessions.
5
- Keywords: ai,ipython,llm,repl,agents
6
- Author: Giovanni Gravili
7
- Author-email: Giovanni Gravili <ghovax@users.noreply.github.com>
8
- License-Expression: MIT
9
- License-File: LICENSE
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Programming Language :: Python :: 3.14
17
- Classifier: Typing :: Typed
18
- Requires-Dist: ipython>=9.17
19
- Requires-Dist: langchain-core>=1.0
20
- Requires-Dist: models-provider>=0.1.2
21
- Requires-Dist: pillow>=11
22
- Requires-Dist: resvg-py>=0.5
23
- Requires-Dist: rich>=14.1
24
- Requires-Python: >=3.13
25
- Project-URL: Repository, https://github.com/ghovax/codebind
26
- Project-URL: Issues, https://github.com/ghovax/codebind/issues
27
- Description-Content-Type: text/markdown
28
-
29
- # Codebind
30
-
31
- Codebind turns an ordinary IPython session into a durable model harness with one tool: an IPython cell executed in the active session. IPython owns execution, namespace, history, magics, tracebacks, and rich display; Codebind owns conversation state and model orchestration.
32
-
33
- ## Installation
34
-
35
- ```console
36
- uvx codebind
37
- ```
38
-
39
- Or install it with any Python package installer:
40
-
41
- ```console
42
- pip install codebind
43
- ```
44
-
45
- ## Configuration
46
-
47
- Codebind reads its private model choice from `$XDG_CONFIG_HOME/codebind/configuration.json`, or `~/.config/codebind/configuration.json` when `XDG_CONFIG_HOME` is unset:
48
-
49
- ```json
50
- {
51
- "model": "openai/gpt-5.6-luna",
52
- "parameters": {
53
- "reasoning_effort": "medium"
54
- }
55
- }
56
- ```
57
-
58
- Provider credentials use the same XDG directory in `models.json`. Keep both files readable only by their owner. Loading Codebind does not add `chat`, `model`, `models`, `Models`, or any other variable to the IPython namespace.
59
-
60
- ## Terminal IPython
61
-
62
- Start a new conversation:
63
-
64
- ```console
65
- uvx codebind
66
- ```
67
-
68
- Ask through ordinary IPython magic syntax:
69
-
70
- ```python
71
- %%question
72
- Inspect this project and tell me what to implement first.
73
- ```
74
-
75
- Terminal conversations remain live for the current IPython process. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
76
- Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
77
-
78
- ## JupyterLab
79
-
80
- ```console
81
- uvx --from jupyterlab --with codebind --with 'nbconvert[webpdf]' jupyter lab
82
- ```
83
-
84
- When running an unpublished local checkout, expose both its editable Python source and its current prebuilt frontend:
85
-
86
- ```console
87
- JUPYTER_PATH=/path/to/codebind/data/share/jupyter \
88
- uvx --refresh --from jupyterlab --with-editable /path/to/codebind \
89
- --with 'nbconvert[webpdf]' jupyter-lab
90
- ```
91
-
92
- Load Codebind in a notebook:
93
-
94
- ```python
95
- %load_ext codebind
96
- ```
97
-
98
- That is the complete setup. **Question** is a native toolbar toggle. Turning it on converts the selected cell into a Question and automatically makes each newly created user cell a Question until the toggle is turned off. Codebind-generated instruction, tool, and answer cells are never converted. Write ordinary Markdown and press `Shift+Enter`.
99
-
100
- Loading the extension adds a locked Markdown cell containing Codebind's packaged instructions. That exact text becomes the conversation's immutable system message and remains stable when the server or kernel restarts.
101
-
102
- The whole notebook is model context. Before each Question, Codebind takes a canonical snapshot of ordinary Markdown, raw, and code cells, including visible text and image outputs but never the live Python namespace. Images displayed by the model's IPython tool are included in that tool's result as well. PNG, JPEG, WebP, GIF, and SVG renditions are prepared as model-visible images; unsupported or oversized images are reported as omissions rather than silently discarded. The first turn records the snapshot; later turns append only new, changed, removed, or reordered cells. Questions, tool calls, tool results, and answers already present in the conversation ledger are not duplicated. Image bytes are carried in the relevant message, while notebook snapshots contain only stable image descriptors. This append-only representation keeps the prior model prefix unchanged for provider caching.
103
-
104
- Codebind stores the complete LangChain message, notebook-context, and turn ledger in notebook metadata. Reopening the notebook, restarting its kernel, and loading the extension restores the exact accumulated context automatically. Each assistant Markdown segment is buffered and inserted as one complete native cell as soon as that segment finishes, before a following tool call is complete. Tool executions and assistant answers are always appended to the notebook end without changing the user's current selection or scroll position. Tool outputs are collapsed by default and remain expandable through JupyterLab's native output control.
105
-
106
- The conversation ledger validates its structure and every assistant tool call against its single matching result, without a version gate. Interrupted saves finish before a turn is cancelled, so a restart cannot turn a partial write into an orphan tool result. Temporary model transport failures retry the same Question with a fresh connection; repeated WebSocket failures use HTTP. Invalid requests and authentication failures remain visible errors.
107
-
108
- An interrupted tool call is closed with an explicit interrupted result before the turn ends. If a provider stream is cancelled or fails, Codebind discards that provider session before the next Question while retaining the notebook conversation and its stable prompt-cache identity.
109
-
110
- The instruction cell, sent Question cells, model-authored tool cells, and assistant Markdown cells are non-editable and non-deletable. Draft Question cells remain editable until they are sent. Jupyter's standard interrupt button cancels an active Codebind question.
111
-
112
- Question and assistant Markdown supports `$...$`, `$$...$$`, `\(...\)`, and `\[...\]` through JupyterLab's native MathJax renderer.
113
-
114
- Other IPython frontends retain standard MIME display, syntax-highlighted code, Markdown, stdout, tracebacks, rich results, and native IPython history.
115
-
116
- ## ChatGPT account access
117
-
118
- Models Provider owns OpenAI account authorization and token refresh. Save the resulting provider-values object in Codebind's XDG `models.json`; Codebind loads it privately when the extension starts. ChatGPT subscription access is separate from the public, pay-as-you-go OpenAI API and may require compatibility updates when the account protocol changes.
codebind-0.6.5/README.md DELETED
@@ -1,90 +0,0 @@
1
- # Codebind
2
-
3
- Codebind turns an ordinary IPython session into a durable model harness with one tool: an IPython cell executed in the active session. IPython owns execution, namespace, history, magics, tracebacks, and rich display; Codebind owns conversation state and model orchestration.
4
-
5
- ## Installation
6
-
7
- ```console
8
- uvx codebind
9
- ```
10
-
11
- Or install it with any Python package installer:
12
-
13
- ```console
14
- pip install codebind
15
- ```
16
-
17
- ## Configuration
18
-
19
- Codebind reads its private model choice from `$XDG_CONFIG_HOME/codebind/configuration.json`, or `~/.config/codebind/configuration.json` when `XDG_CONFIG_HOME` is unset:
20
-
21
- ```json
22
- {
23
- "model": "openai/gpt-5.6-luna",
24
- "parameters": {
25
- "reasoning_effort": "medium"
26
- }
27
- }
28
- ```
29
-
30
- Provider credentials use the same XDG directory in `models.json`. Keep both files readable only by their owner. Loading Codebind does not add `chat`, `model`, `models`, `Models`, or any other variable to the IPython namespace.
31
-
32
- ## Terminal IPython
33
-
34
- Start a new conversation:
35
-
36
- ```console
37
- uvx codebind
38
- ```
39
-
40
- Ask through ordinary IPython magic syntax:
41
-
42
- ```python
43
- %%question
44
- Inspect this project and tell me what to implement first.
45
- ```
46
-
47
- Terminal conversations remain live for the current IPython process. Durable automatic resumption belongs to notebooks, where the notebook file provides an unambiguous conversation identity.
48
- Model-executed cells appear with IPython's native input counter, syntax highlighting, output prompts, streams, and tracebacks. Assistant Markdown is rendered through IPython's terminal MIME renderer. A terminal is a stream rather than a notebook document, so these displays are not editable notebook cells.
49
-
50
- ## JupyterLab
51
-
52
- ```console
53
- uvx --from jupyterlab --with codebind --with 'nbconvert[webpdf]' jupyter lab
54
- ```
55
-
56
- When running an unpublished local checkout, expose both its editable Python source and its current prebuilt frontend:
57
-
58
- ```console
59
- JUPYTER_PATH=/path/to/codebind/data/share/jupyter \
60
- uvx --refresh --from jupyterlab --with-editable /path/to/codebind \
61
- --with 'nbconvert[webpdf]' jupyter-lab
62
- ```
63
-
64
- Load Codebind in a notebook:
65
-
66
- ```python
67
- %load_ext codebind
68
- ```
69
-
70
- That is the complete setup. **Question** is a native toolbar toggle. Turning it on converts the selected cell into a Question and automatically makes each newly created user cell a Question until the toggle is turned off. Codebind-generated instruction, tool, and answer cells are never converted. Write ordinary Markdown and press `Shift+Enter`.
71
-
72
- Loading the extension adds a locked Markdown cell containing Codebind's packaged instructions. That exact text becomes the conversation's immutable system message and remains stable when the server or kernel restarts.
73
-
74
- The whole notebook is model context. Before each Question, Codebind takes a canonical snapshot of ordinary Markdown, raw, and code cells, including visible text and image outputs but never the live Python namespace. Images displayed by the model's IPython tool are included in that tool's result as well. PNG, JPEG, WebP, GIF, and SVG renditions are prepared as model-visible images; unsupported or oversized images are reported as omissions rather than silently discarded. The first turn records the snapshot; later turns append only new, changed, removed, or reordered cells. Questions, tool calls, tool results, and answers already present in the conversation ledger are not duplicated. Image bytes are carried in the relevant message, while notebook snapshots contain only stable image descriptors. This append-only representation keeps the prior model prefix unchanged for provider caching.
75
-
76
- Codebind stores the complete LangChain message, notebook-context, and turn ledger in notebook metadata. Reopening the notebook, restarting its kernel, and loading the extension restores the exact accumulated context automatically. Each assistant Markdown segment is buffered and inserted as one complete native cell as soon as that segment finishes, before a following tool call is complete. Tool executions and assistant answers are always appended to the notebook end without changing the user's current selection or scroll position. Tool outputs are collapsed by default and remain expandable through JupyterLab's native output control.
77
-
78
- The conversation ledger validates its structure and every assistant tool call against its single matching result, without a version gate. Interrupted saves finish before a turn is cancelled, so a restart cannot turn a partial write into an orphan tool result. Temporary model transport failures retry the same Question with a fresh connection; repeated WebSocket failures use HTTP. Invalid requests and authentication failures remain visible errors.
79
-
80
- An interrupted tool call is closed with an explicit interrupted result before the turn ends. If a provider stream is cancelled or fails, Codebind discards that provider session before the next Question while retaining the notebook conversation and its stable prompt-cache identity.
81
-
82
- The instruction cell, sent Question cells, model-authored tool cells, and assistant Markdown cells are non-editable and non-deletable. Draft Question cells remain editable until they are sent. Jupyter's standard interrupt button cancels an active Codebind question.
83
-
84
- Question and assistant Markdown supports `$...$`, `$$...$$`, `\(...\)`, and `\[...\]` through JupyterLab's native MathJax renderer.
85
-
86
- Other IPython frontends retain standard MIME display, syntax-highlighted code, Markdown, stdout, tracebacks, rich results, and native IPython history.
87
-
88
- ## ChatGPT account access
89
-
90
- Models Provider owns OpenAI account authorization and token refresh. Save the resulting provider-values object in Codebind's XDG `models.json`; Codebind loads it privately when the extension starts. ChatGPT subscription access is separate from the public, pay-as-you-go OpenAI API and may require compatibility updates when the account protocol changes.
File without changes
File without changes
File without changes
File without changes