pi-repl-py 0.6.9 → 0.6.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-repl-py",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
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": [
@@ -2,21 +2,21 @@
2
2
  // description = rich short behavior; promptSnippet = one-liner; guidelines = flat bullets.
3
3
 
4
4
  export const executeToolDescription =
5
- "Execute Python cells in a persistent Python shell that is your entire workspace: it is where you read, " +
6
- "write, run, and move, all in one instrument. The state you build, files, and subprocesses survive " +
7
- "from one call to the next. Returns stdout, stderr, and the value of the last expression. Output is " +
8
- "truncated to 45K with a marker.";
5
+ "Execute Python in a Jupyter notebook. Your workspace is one notebook where every cell runs in a " +
6
+ "shared Python environment: variables, functions, imports, classes, and data defined in one cell " +
7
+ "stay available to later cells for the life of the notebook. Cells return their last expression " +
8
+ "(auto-displayed) plus stdout/stderr; output is truncated to 45K with a marker.";
9
9
 
10
- export const executePromptSnippet = "Execute Python in a persistent shell (read, write, run, search, and more)";
10
+ export const executePromptSnippet = "Run Python cells in a Jupyter notebook (read, write, run, search, and more)";
11
11
 
12
12
  // --- the model-facing guidelines, flat bullets like pi's own tool contributions ---
13
13
  export function buildPromptGuidelines(preloaded: string[]): string[] {
14
14
  return [
15
- "Find, filter, fetch, sample: narrow the output in Python, then print only the exact slice you need.",
16
- "Make surgical, precise changes over rewrites or whole-file dumps: a small unique anchor, replace, verify, read the file back before trusting it.",
17
- "Reference what the persistent shell already holds, don't redefine it.",
18
15
  "Write modern idiomatic Python.",
19
- "If output begins with <repl_engine_reset>, the kernel rebuilt; re-verify a revived variable.",
16
+ "Find, filter, fetch, sample: narrow the output in Python, then print only the window that decides the next step (a head, a shape, a slice), not the whole.",
17
+ "Make surgical, precise changes over rewrites or whole-file dumps: a small unique anchor, replace, verify, read the file back before trusting it.",
18
+ "Prefer to reuse existing variables, functions, imports, classes, and data from prior cells/namespaces over recomputing.",
19
+ "If output begins with <repl_engine_reset>, the runtime rebuilt and the notebook was restored from the last snapshot; reverify surviving names before building on them.",
20
20
  ...(preloaded.length
21
21
  ? [
22
22
  [