pi-repl-py 0.2.0 → 0.2.1

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.
package/README.md CHANGED
@@ -49,12 +49,13 @@ clear notice. How the interpreter is resolved is in [docs/ARCHITECTURE.md](docs/
49
49
 
50
50
  ## Helpers
51
51
 
52
- A **helper** is a Python function you preload into every kernel. Drop a file in the one
53
- helpers directory, restart the session, and the function is callable from the workspace
54
- for example, `helpers/double.py` exposing `def double` becomes `double(...)`. It ships
55
- **empty** (shell and file IO are already plain Python), so a fresh install preloads nothing
56
- until you add one. Each helper's `helper_description` is shown to the model verbatim;
57
- the full contract lives in [docs/how-to-functions.md](docs/how-to-functions.md).
52
+ A **helper** is a `.py` file that gets exec'd into every kernel, so whatever it defines
53
+ functions, classes, constants, imports, or a module that manages a tricky piece of
54
+ complexity is available in the workspace. Drop a file in the one helpers directory and
55
+ restart the session; e.g. `helpers/double.py` defining `def double(x)` becomes callable as
56
+ `double(...)`. It ships **empty** (shell and file IO are already plain Python), so a fresh
57
+ install preloads nothing until you add one. Each helper's `helper_description` is shown to
58
+ the model verbatim; the full contract lives in [docs/helpers.md](docs/helpers.md).
58
59
 
59
60
  Everything the extension keeps lives under one folder in your home directory:
60
61
 
@@ -121,7 +121,7 @@ The model discovers what is loaded by listing the namespace with ordinary Python
121
121
  ```
122
122
 
123
123
  For the full helper contract — the description, the docstring, disabling — see
124
- [how-to-functions.md](how-to-functions.md).
124
+ [helpers.md](helpers.md).
125
125
 
126
126
  ## Snapshots & honest resets
127
127
 
@@ -179,4 +179,4 @@ but working cell may run on).
179
179
  ## Reference documentation
180
180
 
181
181
  - Philosophy and design rationale: [philosophy.md](philosophy.md)
182
- - Adding a helper: [how-to-functions.md](how-to-functions.md)
182
+ - Adding a helper: [helpers.md](helpers.md)
@@ -1,12 +1,12 @@
1
1
  # How to write a helper
2
2
 
3
- A **helper** is a Python function you write once that becomes available to the agent in
4
- every `pi --repl` session. You drop a `.py` file into one folder, restart the session, and
5
- the function is callable from the workspace like a bookmark for code the agent keeps
6
- reaching for.
3
+ A **helper** is a `.py` file that gets exec'd into every kernel, so anything it defines —
4
+ functions, classes, constants, imports, or a module that owns a fragile or opaque piece of
5
+ work becomes part of the agent's workspace; you drop the file into one folder, restart
6
+ the session, and it's available. Like a bookmark for code the agent keeps reaching for.
7
7
 
8
- This guide shows the smallest helper that works, then explains the three parts every
9
- helper file has and the habits that make a helper useful.
8
+ This guide shows the smallest callable helper that works, then explains the parts of a
9
+ helper file and the habits that make a helper useful.
10
10
 
11
11
  ## Prerequisites
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-repl-py",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "A pi extension with a single tool: execute, running a TypeScript host with a persistent Python (ipykernel) evaluator and a user-configurable toolbox of functions.",
6
6
  "keywords": [