@earendil-works/pi-coding-agent 0.86.1 → 0.87.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.
Files changed (160) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +25 -675
  3. package/dist/bundle/chunks/{anthropic-messages-MYU5ZMRF.js → anthropic-messages-J5WXPPPC.js} +1 -1
  4. package/dist/bundle/chunks/chunk-65HAU2C5.js +2 -0
  5. package/dist/bundle/chunks/{chunk-CMRUVXTE.js → chunk-OJP47DM6.js} +48 -42
  6. package/dist/bundle/chunks/github-copilot.js +1 -1
  7. package/dist/bundle/chunks/{openai-completions-CYGM3XXP.js → openai-completions-OBX42CLD.js} +2 -2
  8. package/dist/bundle/chunks/{virtual-modules-MGTKWDID.js → virtual-modules-VHMJYYWQ.js} +1 -1
  9. package/dist/bundle/cli-runtime.js +1 -1
  10. package/dist/bundle/index.js +1 -1
  11. package/dist/bundle/rpc-entry.js +1 -1
  12. package/dist/cli/args.d.ts.map +1 -1
  13. package/dist/cli/args.js +14 -4
  14. package/dist/cli/args.js.map +1 -1
  15. package/dist/cli/file-processor.d.ts +1 -1
  16. package/dist/cli/file-processor.d.ts.map +1 -1
  17. package/dist/cli/file-processor.js.map +1 -1
  18. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  19. package/dist/core/agent-session-runtime.js +1 -1
  20. package/dist/core/agent-session-runtime.js.map +1 -1
  21. package/dist/core/agent-session.d.ts +27 -3
  22. package/dist/core/agent-session.d.ts.map +1 -1
  23. package/dist/core/agent-session.js +389 -119
  24. package/dist/core/agent-session.js.map +1 -1
  25. package/dist/core/cache-warmer.d.ts +1 -0
  26. package/dist/core/cache-warmer.d.ts.map +1 -1
  27. package/dist/core/cache-warmer.js +15 -1
  28. package/dist/core/cache-warmer.js.map +1 -1
  29. package/dist/core/compaction/compaction.d.ts +3 -1
  30. package/dist/core/compaction/compaction.d.ts.map +1 -1
  31. package/dist/core/compaction/compaction.js +155 -57
  32. package/dist/core/compaction/compaction.js.map +1 -1
  33. package/dist/core/crash-log.d.ts +5 -0
  34. package/dist/core/crash-log.d.ts.map +1 -1
  35. package/dist/core/crash-log.js +68 -0
  36. package/dist/core/crash-log.js.map +1 -1
  37. package/dist/core/export-html/template.js +6 -1
  38. package/dist/core/extensions/index.d.ts +1 -1
  39. package/dist/core/extensions/index.d.ts.map +1 -1
  40. package/dist/core/extensions/index.js.map +1 -1
  41. package/dist/core/extensions/runner.d.ts +16 -3
  42. package/dist/core/extensions/runner.d.ts.map +1 -1
  43. package/dist/core/extensions/runner.js +110 -5
  44. package/dist/core/extensions/runner.js.map +1 -1
  45. package/dist/core/extensions/types.d.ts +77 -6
  46. package/dist/core/extensions/types.d.ts.map +1 -1
  47. package/dist/core/extensions/types.js.map +1 -1
  48. package/dist/core/index.d.ts +1 -1
  49. package/dist/core/index.d.ts.map +1 -1
  50. package/dist/core/index.js.map +1 -1
  51. package/dist/core/model-config.d.ts +52 -0
  52. package/dist/core/model-config.d.ts.map +1 -1
  53. package/dist/core/model-config.js +16 -0
  54. package/dist/core/model-config.js.map +1 -1
  55. package/dist/core/model-resolver.d.ts.map +1 -1
  56. package/dist/core/model-resolver.js +1 -1
  57. package/dist/core/model-resolver.js.map +1 -1
  58. package/dist/core/prompt-templates.d.ts +6 -1
  59. package/dist/core/prompt-templates.d.ts.map +1 -1
  60. package/dist/core/prompt-templates.js +61 -35
  61. package/dist/core/prompt-templates.js.map +1 -1
  62. package/dist/core/provider-composer.d.ts +1 -0
  63. package/dist/core/provider-composer.d.ts.map +1 -1
  64. package/dist/core/provider-composer.js +19 -0
  65. package/dist/core/provider-composer.js.map +1 -1
  66. package/dist/core/resource-loader.d.ts.map +1 -1
  67. package/dist/core/resource-loader.js +6 -2
  68. package/dist/core/resource-loader.js.map +1 -1
  69. package/dist/core/sdk.d.ts.map +1 -1
  70. package/dist/core/sdk.js +3 -4
  71. package/dist/core/sdk.js.map +1 -1
  72. package/dist/core/session-manager.d.ts +36 -9
  73. package/dist/core/session-manager.d.ts.map +1 -1
  74. package/dist/core/session-manager.js +97 -7
  75. package/dist/core/session-manager.js.map +1 -1
  76. package/dist/core/tools/read.d.ts +4 -1
  77. package/dist/core/tools/read.d.ts.map +1 -1
  78. package/dist/core/tools/read.js +5 -1
  79. package/dist/core/tools/read.js.map +1 -1
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/index.js.map +1 -1
  84. package/dist/main.d.ts.map +1 -1
  85. package/dist/main.js +4 -3
  86. package/dist/main.js.map +1 -1
  87. package/dist/modes/interactive/bug-report.d.ts.map +1 -1
  88. package/dist/modes/interactive/bug-report.js +4 -0
  89. package/dist/modes/interactive/bug-report.js.map +1 -1
  90. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  91. package/dist/modes/interactive/components/tree-selector.js +7 -0
  92. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  93. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  94. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  95. package/dist/modes/interactive/interactive-mode.js +64 -2
  96. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  97. package/dist/utils/mime.d.ts.map +1 -1
  98. package/dist/utils/mime.js +1 -1
  99. package/dist/utils/mime.js.map +1 -1
  100. package/dist/utils/tool-result-images.d.ts +3 -1
  101. package/dist/utils/tool-result-images.d.ts.map +1 -1
  102. package/dist/utils/tool-result-images.js +4 -1
  103. package/dist/utils/tool-result-images.js.map +1 -1
  104. package/docs/cli-integration.md +106 -0
  105. package/docs/cli.md +268 -0
  106. package/docs/compaction.md +45 -26
  107. package/docs/configuration.md +45 -0
  108. package/docs/containerization.md +109 -82
  109. package/docs/custom-provider.md +132 -784
  110. package/docs/docs.json +139 -99
  111. package/docs/environment-variables.md +3 -5
  112. package/docs/extensions.md +134 -2956
  113. package/docs/how-pi-works.md +49 -0
  114. package/docs/images/interactive-mode.png +0 -0
  115. package/docs/index.md +24 -69
  116. package/docs/json.md +193 -65
  117. package/docs/keybindings.md +57 -102
  118. package/docs/llama-cpp.md +3 -3
  119. package/docs/message-types.md +261 -0
  120. package/docs/models.md +64 -546
  121. package/docs/packages.md +66 -167
  122. package/docs/prompt-templates.md +31 -68
  123. package/docs/providers.md +102 -240
  124. package/docs/quickstart.md +61 -106
  125. package/docs/rpc-commands.md +854 -0
  126. package/docs/rpc-extension-ui.md +200 -0
  127. package/docs/rpc.md +129 -1556
  128. package/docs/sdk.md +76 -1160
  129. package/docs/security.md +70 -32
  130. package/docs/session-format.md +25 -216
  131. package/docs/sessions.md +35 -141
  132. package/docs/settings.md +109 -387
  133. package/docs/shell-aliases.md +85 -5
  134. package/docs/skills.md +51 -190
  135. package/docs/slash-commands.md +60 -0
  136. package/docs/terminal-setup.md +105 -78
  137. package/docs/termux.md +74 -83
  138. package/docs/themes.md +68 -280
  139. package/docs/tmux.md +31 -39
  140. package/docs/tui.md +69 -923
  141. package/docs/usage.md +54 -272
  142. package/docs/windows.md +43 -17
  143. package/examples/README.md +13 -2
  144. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  145. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  146. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  147. package/examples/extensions/gondolin/package-lock.json +2 -2
  148. package/examples/extensions/gondolin/package.json +1 -1
  149. package/examples/extensions/sandbox/package-lock.json +2 -2
  150. package/examples/extensions/sandbox/package.json +1 -1
  151. package/examples/extensions/with-deps/package-lock.json +2 -2
  152. package/examples/extensions/with-deps/package.json +1 -1
  153. package/examples/plugins/pi-example-plugin/src/session.ts +3 -2
  154. package/examples/rpc-client.ts +35 -0
  155. package/examples/rpc-extension-ui.ts +25 -5
  156. package/examples/sdk/README.md +1 -1
  157. package/npm-shrinkwrap.json +20 -20
  158. package/package.json +8 -8
  159. package/dist/bundle/chunks/chunk-HTEQD2HM.js +0 -2
  160. package/docs/development.md +0 -90
package/docs/docs.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "navigation": [
3
3
  {
4
- "title": "Start here",
4
+ "title": "Get Started",
5
5
  "items": [
6
6
  {
7
7
  "title": "Overview",
@@ -12,142 +12,178 @@
12
12
  "path": "quickstart.md"
13
13
  },
14
14
  {
15
- "title": "Using Pi",
16
- "path": "usage.md"
17
- },
18
- {
19
- "title": "Providers",
20
- "path": "providers.md"
21
- },
22
- {
23
- "title": "Security",
24
- "path": "security.md"
25
- },
26
- {
27
- "title": "Containerization",
28
- "path": "containerization.md"
29
- },
30
- {
31
- "title": "Settings",
32
- "path": "settings.md"
33
- },
34
- {
35
- "title": "Keybindings",
36
- "path": "keybindings.md"
37
- },
38
- {
39
- "title": "Sessions",
40
- "path": "sessions.md"
41
- },
42
- {
43
- "title": "Compaction",
44
- "path": "compaction.md"
15
+ "title": "How Pi Works",
16
+ "path": "how-pi-works.md"
45
17
  }
46
18
  ]
47
19
  },
48
20
  {
49
- "title": "Customization",
21
+ "title": "Guides",
50
22
  "items": [
51
23
  {
52
- "title": "Extensions",
53
- "path": "extensions.md"
54
- },
24
+ "title": "Run Pi",
25
+ "items": [
26
+ {
27
+ "title": "Use Pi in the Terminal",
28
+ "path": "usage.md"
29
+ },
30
+ {
31
+ "title": "Choose a Model",
32
+ "path": "models.md"
33
+ },
34
+ {
35
+ "title": "Manage Sessions and Context",
36
+ "path": "sessions.md"
37
+ },
38
+ {
39
+ "title": "Run Pi Safely",
40
+ "path": "security.md"
41
+ },
42
+ {
43
+ "title": "Isolate Pi",
44
+ "path": "containerization.md"
45
+ },
46
+ {
47
+ "title": "Run Local Models",
48
+ "path": "llama-cpp.md"
49
+ },
50
+ {
51
+ "title": "Configure Your Terminal",
52
+ "path": "terminal-setup.md"
53
+ },
54
+ {
55
+ "title": "Configure Shell Commands",
56
+ "path": "shell-aliases.md"
57
+ },
58
+ {
59
+ "title": "Run Pi in tmux",
60
+ "path": "tmux.md"
61
+ },
62
+ {
63
+ "title": "Run Pi on Windows",
64
+ "path": "windows.md"
65
+ },
66
+ {
67
+ "title": "Run Pi on Android",
68
+ "path": "termux.md"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "title": "Customize Pi",
74
+ "items": [
75
+ {
76
+ "title": "Configure Pi",
77
+ "path": "configuration.md"
78
+ },
79
+ {
80
+ "title": "Create Prompt Templates",
81
+ "path": "prompt-templates.md"
82
+ },
83
+ {
84
+ "title": "Add Skills",
85
+ "path": "skills.md"
86
+ },
87
+ {
88
+ "title": "Create Themes",
89
+ "path": "themes.md"
90
+ },
91
+ {
92
+ "title": "Use Pi Packages",
93
+ "path": "packages.md"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "title": "Build on Pi",
99
+ "items": [
100
+ {
101
+ "title": "Build Extensions",
102
+ "path": "extensions.md"
103
+ },
104
+ {
105
+ "title": "Add Custom Providers",
106
+ "path": "custom-provider.md"
107
+ },
108
+ {
109
+ "title": "Build Terminal UI Components",
110
+ "path": "tui.md"
111
+ },
112
+ {
113
+ "title": "Integrate with the CLI",
114
+ "path": "cli-integration.md"
115
+ },
116
+ {
117
+ "title": "Use the SDK",
118
+ "path": "sdk.md"
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "title": "Reference",
126
+ "items": [
55
127
  {
56
- "title": "Skills",
57
- "path": "skills.md"
128
+ "title": "CLI",
129
+ "path": "cli.md"
58
130
  },
59
131
  {
60
- "title": "Prompt Templates",
61
- "path": "prompt-templates.md"
132
+ "title": "Slash Commands",
133
+ "path": "slash-commands.md"
62
134
  },
63
135
  {
64
- "title": "Themes",
65
- "path": "themes.md"
136
+ "title": "Settings",
137
+ "path": "settings.md"
66
138
  },
67
139
  {
68
- "title": "Pi Packages",
69
- "path": "packages.md"
140
+ "title": "Environment Variables",
141
+ "path": "environment-variables.md"
70
142
  },
71
143
  {
72
- "title": "Custom Models",
73
- "path": "models.md"
144
+ "title": "Keybindings",
145
+ "path": "keybindings.md"
74
146
  },
75
147
  {
76
- "title": "Custom Providers",
77
- "path": "custom-provider.md"
78
- }
79
- ]
80
- },
81
- {
82
- "title": "Reference",
83
- "items": [
84
- {
85
- "title": "Environment Variables",
86
- "path": "environment-variables.md"
148
+ "title": "Provider Authentication",
149
+ "path": "providers.md"
87
150
  },
88
151
  {
89
- "title": "Session Format",
152
+ "title": "Session File Format",
90
153
  "path": "session-format.md"
91
- }
92
- ]
93
- },
94
- {
95
- "title": "Programmatic Usage",
96
- "items": [
97
- {
98
- "title": "SDK",
99
- "path": "sdk.md"
100
154
  },
101
155
  {
102
- "title": "RPC Mode",
103
- "path": "rpc.md"
156
+ "title": "Compaction and Branch Summaries",
157
+ "path": "compaction.md"
104
158
  },
105
159
  {
106
- "title": "JSON Event Stream Mode",
160
+ "title": "JSON Event Stream",
107
161
  "path": "json.md"
108
162
  },
109
163
  {
110
- "title": "TUI Components",
111
- "path": "tui.md"
112
- }
113
- ]
114
- },
115
- {
116
- "title": "Platform Setup",
117
- "items": [
118
- {
119
- "title": "Windows",
120
- "path": "windows.md"
121
- },
122
- {
123
- "title": "Termux on Android",
124
- "path": "termux.md"
164
+ "title": "RPC Protocol",
165
+ "path": "rpc.md"
125
166
  },
126
167
  {
127
- "title": "tmux",
128
- "path": "tmux.md"
168
+ "title": "RPC Commands",
169
+ "path": "rpc-commands.md"
129
170
  },
130
171
  {
131
- "title": "Terminal Setup",
132
- "path": "terminal-setup.md"
172
+ "title": "RPC Extension UI",
173
+ "path": "rpc-extension-ui.md"
133
174
  },
134
175
  {
135
- "title": "Shell Aliases",
136
- "path": "shell-aliases.md"
137
- }
138
- ]
139
- },
140
- {
141
- "title": "Development",
142
- "items": [
143
- {
144
- "title": "Development",
145
- "path": "development.md"
176
+ "title": "Message Types",
177
+ "path": "message-types.md"
146
178
  }
147
179
  ]
148
180
  }
149
181
  ],
150
182
  "redirects": [
183
+ {
184
+ "from": "development.md",
185
+ "to": "index.md"
186
+ },
151
187
  {
152
188
  "from": "session.md",
153
189
  "to": "session-format.md"
@@ -155,6 +191,10 @@
155
191
  {
156
192
  "from": "tree.md",
157
193
  "to": "sessions.md"
194
+ },
195
+ {
196
+ "from": "process-integration.md",
197
+ "to": "cli-integration.md"
158
198
  }
159
199
  ]
160
200
  }
@@ -6,7 +6,7 @@ Pi uses environment variables in three ways:
6
6
  - Pi sets process markers so child processes can identify Pi as the launching agent.
7
7
  - Commands run by the LLM-callable shell tools receive `PI_*` variables describing the current session.
8
8
 
9
- Provider API-key variables are documented separately in [Providers](providers.md#environment-variables-or-auth-file).
9
+ Provider API-key variables are documented separately in [Provider Authentication](providers.md#use-an-api-key-from-the-environment).
10
10
 
11
11
  ## Process Marker
12
12
 
@@ -81,7 +81,7 @@ These variables are read by Pi itself:
81
81
  | `PI_CODING_AGENT_DIR` | Override the config directory; default is `~/.pi/agent` |
82
82
  | `PI_CODING_AGENT_SESSION_DIR` | Override session storage; overridden by `--session-dir` |
83
83
  | `PI_PACKAGE_DIR` | Override the package directory, useful for Nix/Guix store paths |
84
- | `PI_OFFLINE` | Disable startup network operations, including update checks, package updates, and install/update telemetry |
84
+ | `PI_OFFLINE` | Disable automatic network activity, including model catalog refreshes |
85
85
  | `PI_SKIP_VERSION_CHECK` | Disable the `pi.dev` latest-version request |
86
86
  | `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no` |
87
87
  | `PI_CACHE_RETENTION` | Set to `long` for extended provider prompt caching where supported |
@@ -95,6 +95,4 @@ These variables are read by Pi itself:
95
95
  | `VISUAL`, `EDITOR` | External editor fallback when `externalEditor` is unset |
96
96
  | `HTTP_PROXY`, `HTTPS_PROXY` | Proxy outbound HTTP requests |
97
97
 
98
- Provider credentials such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, and cloud-provider configuration are listed in [Providers](providers.md#environment-variables-or-auth-file).
99
-
100
- `PI_SERVER_DIR` and `PI_SERVER_ID` apply only to the source-only [experimental remote harness](development.md#experimental-remote-harness), not distributed builds.
98
+ Provider credentials such as `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, and cloud-provider configuration are listed in [Provider Authentication](providers.md#use-an-api-key-from-the-environment).