@kingingwang/pi-linux-arm64 0.83.0

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 (212) hide show
  1. package/LICENSE +21 -0
  2. package/bin/CHANGELOG.md +5402 -0
  3. package/bin/README.md +712 -0
  4. package/bin/assets/clankolas.png +0 -0
  5. package/bin/docs/compaction.md +401 -0
  6. package/bin/docs/containerization.md +111 -0
  7. package/bin/docs/custom-provider.md +774 -0
  8. package/bin/docs/development.md +71 -0
  9. package/bin/docs/docs.json +156 -0
  10. package/bin/docs/environment-variables.md +88 -0
  11. package/bin/docs/extensions.md +2987 -0
  12. package/bin/docs/images/doom-extension.png +0 -0
  13. package/bin/docs/images/exy.png +0 -0
  14. package/bin/docs/images/interactive-mode.png +0 -0
  15. package/bin/docs/images/tree-view.png +0 -0
  16. package/bin/docs/index.md +84 -0
  17. package/bin/docs/json.md +91 -0
  18. package/bin/docs/keybindings.md +226 -0
  19. package/bin/docs/llama-cpp.md +99 -0
  20. package/bin/docs/models.md +565 -0
  21. package/bin/docs/packages.md +228 -0
  22. package/bin/docs/prompt-templates.md +96 -0
  23. package/bin/docs/providers.md +310 -0
  24. package/bin/docs/quickstart.md +167 -0
  25. package/bin/docs/rpc.md +1578 -0
  26. package/bin/docs/sdk.md +1205 -0
  27. package/bin/docs/security.md +59 -0
  28. package/bin/docs/session-format.md +438 -0
  29. package/bin/docs/sessions.md +145 -0
  30. package/bin/docs/settings.md +328 -0
  31. package/bin/docs/shell-aliases.md +13 -0
  32. package/bin/docs/skills.md +231 -0
  33. package/bin/docs/terminal-setup.md +142 -0
  34. package/bin/docs/termux.md +127 -0
  35. package/bin/docs/themes.md +299 -0
  36. package/bin/docs/tmux.md +63 -0
  37. package/bin/docs/tui.md +942 -0
  38. package/bin/docs/usage.md +305 -0
  39. package/bin/docs/windows.md +17 -0
  40. package/bin/examples/README.md +25 -0
  41. package/bin/examples/extensions/README.md +213 -0
  42. package/bin/examples/extensions/auto-commit-on-exit.ts +49 -0
  43. package/bin/examples/extensions/bash-spawn-hook.ts +30 -0
  44. package/bin/examples/extensions/bookmark.ts +50 -0
  45. package/bin/examples/extensions/border-status-editor.ts +150 -0
  46. package/bin/examples/extensions/built-in-tool-renderer.ts +249 -0
  47. package/bin/examples/extensions/claude-rules.ts +86 -0
  48. package/bin/examples/extensions/commands.ts +72 -0
  49. package/bin/examples/extensions/confirm-destructive.ts +59 -0
  50. package/bin/examples/extensions/custom-compaction.ts +117 -0
  51. package/bin/examples/extensions/custom-footer.ts +64 -0
  52. package/bin/examples/extensions/custom-header.ts +73 -0
  53. package/bin/examples/extensions/custom-provider-anthropic/index.ts +611 -0
  54. package/bin/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  55. package/bin/examples/extensions/custom-provider-anthropic/package.json +19 -0
  56. package/bin/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
  57. package/bin/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  58. package/bin/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  59. package/bin/examples/extensions/dirty-repo-guard.ts +56 -0
  60. package/bin/examples/extensions/doom-overlay/README.md +46 -0
  61. package/bin/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  62. package/bin/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  63. package/bin/examples/extensions/doom-overlay/doom/build.sh +152 -0
  64. package/bin/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  65. package/bin/examples/extensions/doom-overlay/doom-component.ts +132 -0
  66. package/bin/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  67. package/bin/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  68. package/bin/examples/extensions/doom-overlay/index.ts +74 -0
  69. package/bin/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  70. package/bin/examples/extensions/dynamic-resources/SKILL.md +8 -0
  71. package/bin/examples/extensions/dynamic-resources/dynamic.json +79 -0
  72. package/bin/examples/extensions/dynamic-resources/dynamic.md +5 -0
  73. package/bin/examples/extensions/dynamic-resources/index.ts +15 -0
  74. package/bin/examples/extensions/dynamic-tools.ts +74 -0
  75. package/bin/examples/extensions/entry-renderer.ts +41 -0
  76. package/bin/examples/extensions/event-bus.ts +43 -0
  77. package/bin/examples/extensions/file-trigger.ts +41 -0
  78. package/bin/examples/extensions/git-checkpoint.ts +53 -0
  79. package/bin/examples/extensions/git-merge-and-resolve.ts +115 -0
  80. package/bin/examples/extensions/github-issue-autocomplete.ts +185 -0
  81. package/bin/examples/extensions/gondolin/index.ts +531 -0
  82. package/bin/examples/extensions/gondolin/package-lock.json +185 -0
  83. package/bin/examples/extensions/gondolin/package.json +19 -0
  84. package/bin/examples/extensions/handoff.ts +190 -0
  85. package/bin/examples/extensions/hello.ts +26 -0
  86. package/bin/examples/extensions/hidden-thinking-label.ts +53 -0
  87. package/bin/examples/extensions/inline-bash.ts +94 -0
  88. package/bin/examples/extensions/input-transform-streaming.ts +39 -0
  89. package/bin/examples/extensions/input-transform.ts +43 -0
  90. package/bin/examples/extensions/interactive-shell.ts +196 -0
  91. package/bin/examples/extensions/kimi-deferred-tools.ts +61 -0
  92. package/bin/examples/extensions/mac-system-theme.ts +47 -0
  93. package/bin/examples/extensions/message-renderer.ts +59 -0
  94. package/bin/examples/extensions/minimal-mode.ts +426 -0
  95. package/bin/examples/extensions/modal-editor.ts +85 -0
  96. package/bin/examples/extensions/model-status.ts +31 -0
  97. package/bin/examples/extensions/notify.ts +55 -0
  98. package/bin/examples/extensions/overlay-qa-tests.ts +1450 -0
  99. package/bin/examples/extensions/overlay-test.ts +153 -0
  100. package/bin/examples/extensions/permission-gate.ts +34 -0
  101. package/bin/examples/extensions/pirate.ts +47 -0
  102. package/bin/examples/extensions/plan-mode/README.md +66 -0
  103. package/bin/examples/extensions/plan-mode/index.ts +390 -0
  104. package/bin/examples/extensions/plan-mode/utils.ts +168 -0
  105. package/bin/examples/extensions/preset.ts +436 -0
  106. package/bin/examples/extensions/project-trust.ts +64 -0
  107. package/bin/examples/extensions/prompt-customizer.ts +97 -0
  108. package/bin/examples/extensions/protected-paths.ts +30 -0
  109. package/bin/examples/extensions/provider-payload.ts +18 -0
  110. package/bin/examples/extensions/qna.ts +118 -0
  111. package/bin/examples/extensions/question.ts +286 -0
  112. package/bin/examples/extensions/questionnaire.ts +448 -0
  113. package/bin/examples/extensions/rainbow-editor.ts +88 -0
  114. package/bin/examples/extensions/reload-runtime.ts +37 -0
  115. package/bin/examples/extensions/rpc-demo.ts +118 -0
  116. package/bin/examples/extensions/sandbox/index.ts +321 -0
  117. package/bin/examples/extensions/sandbox/package-lock.json +92 -0
  118. package/bin/examples/extensions/sandbox/package.json +19 -0
  119. package/bin/examples/extensions/send-user-message.ts +97 -0
  120. package/bin/examples/extensions/session-name.ts +27 -0
  121. package/bin/examples/extensions/shutdown-command.ts +63 -0
  122. package/bin/examples/extensions/snake.ts +343 -0
  123. package/bin/examples/extensions/space-invaders.ts +560 -0
  124. package/bin/examples/extensions/ssh.ts +220 -0
  125. package/bin/examples/extensions/status-line.ts +32 -0
  126. package/bin/examples/extensions/structured-output.ts +65 -0
  127. package/bin/examples/extensions/subagent/README.md +175 -0
  128. package/bin/examples/extensions/subagent/agents/planner.md +37 -0
  129. package/bin/examples/extensions/subagent/agents/reviewer.md +35 -0
  130. package/bin/examples/extensions/subagent/agents/scout.md +50 -0
  131. package/bin/examples/extensions/subagent/agents/worker.md +24 -0
  132. package/bin/examples/extensions/subagent/agents.ts +126 -0
  133. package/bin/examples/extensions/subagent/index.ts +1015 -0
  134. package/bin/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  135. package/bin/examples/extensions/subagent/prompts/implement.md +10 -0
  136. package/bin/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  137. package/bin/examples/extensions/summarize.ts +199 -0
  138. package/bin/examples/extensions/system-prompt-header.ts +17 -0
  139. package/bin/examples/extensions/tic-tac-toe.ts +1008 -0
  140. package/bin/examples/extensions/timed-confirm.ts +70 -0
  141. package/bin/examples/extensions/titlebar-spinner.ts +58 -0
  142. package/bin/examples/extensions/todo.ts +297 -0
  143. package/bin/examples/extensions/tool-override.ts +144 -0
  144. package/bin/examples/extensions/tools.ts +146 -0
  145. package/bin/examples/extensions/trigger-compact.ts +50 -0
  146. package/bin/examples/extensions/truncated-tool.ts +195 -0
  147. package/bin/examples/extensions/widget-placement.ts +9 -0
  148. package/bin/examples/extensions/with-deps/index.ts +32 -0
  149. package/bin/examples/extensions/with-deps/package-lock.json +31 -0
  150. package/bin/examples/extensions/with-deps/package.json +22 -0
  151. package/bin/examples/extensions/working-indicator.ts +123 -0
  152. package/bin/examples/extensions/working-message-test.ts +25 -0
  153. package/bin/examples/rpc-extension-ui.ts +641 -0
  154. package/bin/examples/sdk/01-minimal.ts +26 -0
  155. package/bin/examples/sdk/02-custom-model.ts +49 -0
  156. package/bin/examples/sdk/03-custom-prompt.ts +75 -0
  157. package/bin/examples/sdk/04-skills.ts +55 -0
  158. package/bin/examples/sdk/05-tools.ts +48 -0
  159. package/bin/examples/sdk/06-extensions.ts +99 -0
  160. package/bin/examples/sdk/07-context-files.ts +47 -0
  161. package/bin/examples/sdk/08-prompt-templates.ts +51 -0
  162. package/bin/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  163. package/bin/examples/sdk/10-settings.ts +53 -0
  164. package/bin/examples/sdk/11-sessions.ts +52 -0
  165. package/bin/examples/sdk/12-full-control.ts +74 -0
  166. package/bin/examples/sdk/13-session-runtime.ts +67 -0
  167. package/bin/examples/sdk/README.md +140 -0
  168. package/bin/export-html/ansi-to-html.d.ts +22 -0
  169. package/bin/export-html/ansi-to-html.d.ts.map +1 -0
  170. package/bin/export-html/ansi-to-html.js +249 -0
  171. package/bin/export-html/ansi-to-html.js.map +1 -0
  172. package/bin/export-html/index.d.ts +37 -0
  173. package/bin/export-html/index.d.ts.map +1 -0
  174. package/bin/export-html/index.js +226 -0
  175. package/bin/export-html/index.js.map +1 -0
  176. package/bin/export-html/template.css +1066 -0
  177. package/bin/export-html/template.html +55 -0
  178. package/bin/export-html/template.js +1864 -0
  179. package/bin/export-html/tool-renderer.d.ts +34 -0
  180. package/bin/export-html/tool-renderer.d.ts.map +1 -0
  181. package/bin/export-html/tool-renderer.js +108 -0
  182. package/bin/export-html/tool-renderer.js.map +1 -0
  183. package/bin/export-html/vendor/highlight.min.js +1213 -0
  184. package/bin/export-html/vendor/marked.min.js +78 -0
  185. package/bin/node_modules/@mariozechner/clipboard/.yarnrc.yml +1 -0
  186. package/bin/node_modules/@mariozechner/clipboard/Cargo.toml +45 -0
  187. package/bin/node_modules/@mariozechner/clipboard/README.md +60 -0
  188. package/bin/node_modules/@mariozechner/clipboard/build.rs +5 -0
  189. package/bin/node_modules/@mariozechner/clipboard/clipboard.linux-arm64-gnu.node +0 -0
  190. package/bin/node_modules/@mariozechner/clipboard/exp.ts +12 -0
  191. package/bin/node_modules/@mariozechner/clipboard/index.d.ts +37 -0
  192. package/bin/node_modules/@mariozechner/clipboard/index.js +606 -0
  193. package/bin/node_modules/@mariozechner/clipboard/package.json +56 -0
  194. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +307 -0
  195. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +93 -0
  196. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +313 -0
  197. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +471 -0
  198. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +252 -0
  199. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +431 -0
  200. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +712 -0
  201. package/bin/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +916 -0
  202. package/bin/node_modules/@mariozechner/clipboard/src/lib.rs +194 -0
  203. package/bin/node_modules/@mariozechner/clipboard-linux-arm64-gnu/README.md +3 -0
  204. package/bin/node_modules/@mariozechner/clipboard-linux-arm64-gnu/clipboard.linux-arm64-gnu.node +0 -0
  205. package/bin/node_modules/@mariozechner/clipboard-linux-arm64-gnu/package.json +25 -0
  206. package/bin/package.json +108 -0
  207. package/bin/photon_rs_bg.wasm +0 -0
  208. package/bin/pi +0 -0
  209. package/bin/theme/dark.json +88 -0
  210. package/bin/theme/light.json +87 -0
  211. package/bin/theme/theme-schema.json +344 -0
  212. package/package.json +20 -0
@@ -0,0 +1,194 @@
1
+ #![deny(clippy::all)]
2
+ use base64::{engine::general_purpose, Engine as _};
3
+ #[allow(dead_code, unused_imports)]
4
+ mod clipboard_rs;
5
+
6
+ use clipboard_rs::{
7
+ common::RustImage, Clipboard, ClipboardContext, ClipboardHandler, ClipboardWatcher,
8
+ ClipboardWatcherContext, ContentFormat, RustImageData,
9
+ };
10
+ use napi::{
11
+ bindgen_prelude::*,
12
+ threadsafe_function::{ThreadsafeFunction, ThreadsafeFunctionCallMode},
13
+ };
14
+ use std::{sync::Arc, thread, time::Duration};
15
+
16
+ #[macro_use]
17
+ extern crate napi_derive;
18
+
19
+ fn napi_error(error: impl ToString) -> Error {
20
+ Error::from_reason(error.to_string())
21
+ }
22
+
23
+ #[napi]
24
+ pub fn available_formats() -> Result<Vec<String>> {
25
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
26
+ ctx.available_formats().map_err(napi_error)
27
+ }
28
+
29
+ #[napi]
30
+ pub async fn get_text() -> Result<String> {
31
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
32
+ ctx.get_text().map_err(napi_error)
33
+ }
34
+
35
+ #[napi]
36
+ pub async fn set_text(text: String) -> Result<()> {
37
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
38
+ ctx.set_text(text).map_err(napi_error)
39
+ }
40
+
41
+ #[napi]
42
+ pub fn has_text() -> Result<bool> {
43
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
44
+ Ok(ctx.has(ContentFormat::Text))
45
+ }
46
+
47
+ #[napi]
48
+ pub async fn get_image_binary() -> Result<Vec<u8>> {
49
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
50
+ let image = ctx.get_image().map_err(napi_error)?;
51
+ let image_bytes = image.to_png().map_err(napi_error)?.get_bytes().to_vec();
52
+ Ok(image_bytes)
53
+ }
54
+
55
+ #[napi]
56
+ pub async fn get_image_base64() -> Result<String> {
57
+ let image_bytes = get_image_binary().await?;
58
+ let base64_str = general_purpose::STANDARD_NO_PAD.encode(&image_bytes);
59
+ Ok(base64_str)
60
+ }
61
+
62
+ #[napi]
63
+ pub async fn set_image_binary(image_bytes: Vec<u8>) -> Result<()> {
64
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
65
+ let img = RustImageData::from_bytes(&image_bytes).map_err(napi_error)?;
66
+ ctx.set_image(img).map_err(napi_error)
67
+ }
68
+
69
+ #[napi]
70
+ pub async fn set_image_base64(base64_str: String) -> Result<()> {
71
+ let decoded: Vec<u8> = general_purpose::STANDARD_NO_PAD
72
+ .decode(base64_str)
73
+ .map_err(napi_error)?;
74
+ set_image_binary(decoded).await
75
+ }
76
+
77
+ #[napi]
78
+ pub fn has_image() -> Result<bool> {
79
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
80
+ Ok(ctx.has(ContentFormat::Image))
81
+ }
82
+
83
+ #[napi]
84
+ pub async fn get_html() -> Result<String> {
85
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
86
+ ctx.get_html().map_err(napi_error)
87
+ }
88
+
89
+ #[napi]
90
+ pub async fn set_html(html: String) -> Result<()> {
91
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
92
+ ctx.set_html(html).map_err(napi_error)
93
+ }
94
+
95
+ #[napi]
96
+ fn has_html() -> Result<bool> {
97
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
98
+ Ok(ctx.has(ContentFormat::Html))
99
+ }
100
+
101
+ #[napi]
102
+ pub async fn get_rtf() -> Result<String> {
103
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
104
+ ctx.get_rich_text().map_err(napi_error)
105
+ }
106
+
107
+ #[napi]
108
+ pub async fn set_rtf(rtf: String) -> Result<()> {
109
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
110
+ ctx.set_rich_text(rtf).map_err(napi_error)
111
+ }
112
+
113
+ #[napi]
114
+ pub fn has_rtf() -> Result<bool> {
115
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
116
+ Ok(ctx.has(ContentFormat::Rtf))
117
+ }
118
+
119
+ #[napi]
120
+ pub async fn clear() -> Result<()> {
121
+ let ctx = ClipboardContext::new().map_err(napi_error)?;
122
+ ctx.clear().map_err(napi_error)
123
+ }
124
+
125
+ struct Manager {
126
+ ctx: ClipboardContext,
127
+ }
128
+
129
+ impl Manager {
130
+ pub fn new() -> Self {
131
+ let ctx = ClipboardContext::new().unwrap();
132
+ Manager { ctx }
133
+ }
134
+ }
135
+
136
+ impl ClipboardHandler for Manager {
137
+ fn on_clipboard_change(&mut self) {
138
+ println!(
139
+ "on_clipboard_change, txt = {}",
140
+ self.ctx.get_text().unwrap()
141
+ );
142
+ }
143
+ }
144
+
145
+ #[napi]
146
+ pub fn watch() {
147
+ let manager = Manager::new();
148
+
149
+ let mut watcher = ClipboardWatcherContext::new().unwrap();
150
+
151
+ let watcher_shutdown = watcher.add_handler(manager).get_shutdown_channel();
152
+
153
+ thread::spawn(move || {
154
+ thread::sleep(Duration::from_secs(5));
155
+ println!("stop watch!");
156
+ watcher_shutdown.stop();
157
+ });
158
+
159
+ println!("start watch!");
160
+ watcher.start_watch();
161
+ }
162
+
163
+ #[napi]
164
+ pub fn call_threadsafe_function(callback: Arc<ThreadsafeFunction<u32, ()>>) -> Result<()> {
165
+ for n in 0..10 {
166
+ let tsfn = Arc::clone(&callback);
167
+ thread::spawn(move || {
168
+ tsfn.call(Ok(n), ThreadsafeFunctionCallMode::Blocking);
169
+ });
170
+ }
171
+ Ok(())
172
+ }
173
+
174
+ // #[js_function(1)]
175
+ // fn hello(ctx: CallContext) -> Result<JsString, String> {
176
+ // let argument_one = ctx
177
+ // .get::<JsString>(0)
178
+ // .map_err(|err| err.to_string())?
179
+ // .into_utf8()
180
+ // .map_err(|err| err.to_string())?;
181
+ // ctx
182
+ // .env
183
+ // .create_string_from_std(format!("{} world!", argument_one.as_str()?))
184
+ // }
185
+
186
+ #[cfg(test)]
187
+ mod tests {
188
+ use super::*;
189
+
190
+ #[test]
191
+ fn it_works() {
192
+ watch();
193
+ }
194
+ }
@@ -0,0 +1,3 @@
1
+ # `@mariozechner/clipboard-linux-arm64-gnu`
2
+
3
+ This is the **aarch64-unknown-linux-gnu** binary for `@mariozechner/clipboard`
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@mariozechner/clipboard-linux-arm64-gnu",
3
+ "version": "0.3.9",
4
+ "os": [
5
+ "linux"
6
+ ],
7
+ "cpu": [
8
+ "arm64"
9
+ ],
10
+ "main": "clipboard.linux-arm64-gnu.node",
11
+ "files": [
12
+ "clipboard.linux-arm64-gnu.node"
13
+ ],
14
+ "license": "MIT",
15
+ "engines": {
16
+ "node": ">= 10"
17
+ },
18
+ "libc": [
19
+ "glibc"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/badlogic/clipboard.git"
24
+ }
25
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@earendil-works/pi-coding-agent",
3
+ "version": "0.83.0",
4
+ "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
+ "type": "module",
6
+ "piConfig": {
7
+ "configDir": ".pi"
8
+ },
9
+ "bin": {
10
+ "pi": "dist/cli.js"
11
+ },
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./rpc-entry": {
20
+ "import": "./dist/rpc-entry.js"
21
+ },
22
+ "./client": {
23
+ "types": "./dist/client/index.d.ts",
24
+ "import": "./dist/client/index.js"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "docs",
30
+ "examples",
31
+ "containerization.md",
32
+ "CHANGELOG.md",
33
+ "npm-shrinkwrap.json"
34
+ ],
35
+ "scripts": {
36
+ "clean": "shx rm -rf dist",
37
+ "build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && npm run copy-assets",
38
+ "build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile ./dist/bun/cli.js ./src/utils/image-resize-worker.ts --outfile dist/pi && npm run copy-binary-assets",
39
+ "copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
40
+ "copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
41
+ "test": "vitest --run",
42
+ "shrinkwrap": "node ../../scripts/generate-coding-agent-shrinkwrap.mjs",
43
+ "prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
44
+ },
45
+ "dependencies": {
46
+ "@earendil-works/pi-agent-core": "^0.83.0",
47
+ "@earendil-works/pi-ai": "^0.83.0",
48
+ "@earendil-works/pi-client": "^0.83.0",
49
+ "@earendil-works/pi-protocol": "^0.83.0",
50
+ "@earendil-works/pi-tui": "^0.83.0",
51
+ "@silvia-odwyer/photon-node": "0.3.4",
52
+ "chalk": "5.6.2",
53
+ "cross-spawn": "7.0.6",
54
+ "diff": "8.0.4",
55
+ "glob": "13.0.6",
56
+ "grok-mermaid": "0.2.2",
57
+ "highlight.js": "10.7.3",
58
+ "hosted-git-info": "9.0.3",
59
+ "ignore": "7.0.5",
60
+ "jiti": "2.7.0",
61
+ "minimatch": "10.2.5",
62
+ "proper-lockfile": "4.1.2",
63
+ "semver": "7.8.0",
64
+ "typebox": "1.3.7",
65
+ "undici": "8.9.0",
66
+ "yaml": "2.9.0"
67
+ },
68
+ "overrides": {
69
+ "protobufjs": "7.6.5",
70
+ "rimraf": "6.1.2",
71
+ "gaxios": {
72
+ "rimraf": "6.1.2"
73
+ }
74
+ },
75
+ "optionalDependencies": {
76
+ "@mariozechner/clipboard": "0.3.9"
77
+ },
78
+ "devDependencies": {
79
+ "@types/cross-spawn": "6.0.6",
80
+ "@types/diff": "7.0.2",
81
+ "@types/hosted-git-info": "3.0.5",
82
+ "@types/ms": "2.1.0",
83
+ "@types/node": "24.12.4",
84
+ "@types/proper-lockfile": "4.1.4",
85
+ "@types/semver": "7.7.1",
86
+ "shx": "0.4.0",
87
+ "typescript": "5.9.3",
88
+ "vitest": "4.1.9"
89
+ },
90
+ "keywords": [
91
+ "coding-agent",
92
+ "ai",
93
+ "llm",
94
+ "cli",
95
+ "tui",
96
+ "agent"
97
+ ],
98
+ "author": "Mario Zechner",
99
+ "license": "MIT",
100
+ "repository": {
101
+ "type": "git",
102
+ "url": "git+https://github.com/earendil-works/pi.git",
103
+ "directory": "packages/coding-agent"
104
+ },
105
+ "engines": {
106
+ "node": ">=22.19.0"
107
+ }
108
+ }
Binary file
package/bin/pi ADDED
Binary file
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "dark",
4
+ "vars": {
5
+ "cyan": "#00d7ff",
6
+ "blue": "#5f87ff",
7
+ "green": "#b5bd68",
8
+ "red": "#cc6666",
9
+ "yellow": "#ffff00",
10
+ "text": "#d4d4d4",
11
+ "gray": "#808080",
12
+ "dimGray": "#666666",
13
+ "darkGray": "#505050",
14
+ "accent": "#8abeb7",
15
+ "selectedBg": "#3a3a4a",
16
+ "userMsgBg": "#343541",
17
+ "toolPendingBg": "#282832",
18
+ "toolSuccessBg": "#283228",
19
+ "toolErrorBg": "#3c2828",
20
+ "customMsgBg": "#2d2838"
21
+ },
22
+ "colors": {
23
+ "accent": "accent",
24
+ "border": "blue",
25
+ "borderAccent": "cyan",
26
+ "borderMuted": "darkGray",
27
+ "success": "green",
28
+ "error": "red",
29
+ "warning": "yellow",
30
+ "muted": "gray",
31
+ "dim": "dimGray",
32
+ "text": "text",
33
+ "thinkingText": "gray",
34
+
35
+ "selectedBg": "selectedBg",
36
+ "scrollbarThumb": "selectedBg",
37
+ "userMessageBg": "userMsgBg",
38
+ "userMessageText": "text",
39
+ "customMessageBg": "customMsgBg",
40
+ "customMessageText": "text",
41
+ "customMessageLabel": "#9575cd",
42
+ "toolPendingBg": "toolPendingBg",
43
+ "toolSuccessBg": "toolSuccessBg",
44
+ "toolErrorBg": "toolErrorBg",
45
+ "toolTitle": "text",
46
+ "toolOutput": "gray",
47
+
48
+ "mdHeading": "#f0c674",
49
+ "mdLink": "#81a2be",
50
+ "mdLinkUrl": "dimGray",
51
+ "mdCode": "accent",
52
+ "mdCodeBlock": "green",
53
+ "mdCodeBlockBorder": "gray",
54
+ "mdQuote": "gray",
55
+ "mdQuoteBorder": "gray",
56
+ "mdHr": "gray",
57
+ "mdListBullet": "accent",
58
+
59
+ "toolDiffAdded": "green",
60
+ "toolDiffRemoved": "red",
61
+ "toolDiffContext": "gray",
62
+
63
+ "syntaxComment": "#6A9955",
64
+ "syntaxKeyword": "#569CD6",
65
+ "syntaxFunction": "#DCDCAA",
66
+ "syntaxVariable": "#9CDCFE",
67
+ "syntaxString": "#CE9178",
68
+ "syntaxNumber": "#B5CEA8",
69
+ "syntaxType": "#4EC9B0",
70
+ "syntaxOperator": "#D4D4D4",
71
+ "syntaxPunctuation": "#D4D4D4",
72
+
73
+ "thinkingOff": "darkGray",
74
+ "thinkingMinimal": "#6e6e6e",
75
+ "thinkingLow": "#5f87af",
76
+ "thinkingMedium": "#81a2be",
77
+ "thinkingHigh": "#b294bb",
78
+ "thinkingXhigh": "#d183e8",
79
+ "thinkingMax": "#ff5fff",
80
+
81
+ "bashMode": "green"
82
+ },
83
+ "export": {
84
+ "pageBg": "#18181e",
85
+ "cardBg": "#1e1e24",
86
+ "infoBg": "#3c3728"
87
+ }
88
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "light",
4
+ "vars": {
5
+ "teal": "#5a8080",
6
+ "blue": "#547da7",
7
+ "green": "#588458",
8
+ "red": "#aa5555",
9
+ "yellow": "#9a7326",
10
+ "text": "#1f2328",
11
+ "mediumGray": "#6c6c6c",
12
+ "dimGray": "#767676",
13
+ "lightGray": "#b0b0b0",
14
+ "selectedBg": "#d0d0e0",
15
+ "userMsgBg": "#e8e8e8",
16
+ "toolPendingBg": "#e8e8f0",
17
+ "toolSuccessBg": "#e8f0e8",
18
+ "toolErrorBg": "#f0e8e8",
19
+ "customMsgBg": "#ede7f6"
20
+ },
21
+ "colors": {
22
+ "accent": "teal",
23
+ "border": "blue",
24
+ "borderAccent": "teal",
25
+ "borderMuted": "lightGray",
26
+ "success": "green",
27
+ "error": "red",
28
+ "warning": "yellow",
29
+ "muted": "mediumGray",
30
+ "dim": "dimGray",
31
+ "text": "text",
32
+ "thinkingText": "mediumGray",
33
+
34
+ "selectedBg": "selectedBg",
35
+ "scrollbarThumb": "selectedBg",
36
+ "userMessageBg": "userMsgBg",
37
+ "userMessageText": "text",
38
+ "customMessageBg": "customMsgBg",
39
+ "customMessageText": "text",
40
+ "customMessageLabel": "#7e57c2",
41
+ "toolPendingBg": "toolPendingBg",
42
+ "toolSuccessBg": "toolSuccessBg",
43
+ "toolErrorBg": "toolErrorBg",
44
+ "toolTitle": "text",
45
+ "toolOutput": "mediumGray",
46
+
47
+ "mdHeading": "yellow",
48
+ "mdLink": "blue",
49
+ "mdLinkUrl": "dimGray",
50
+ "mdCode": "teal",
51
+ "mdCodeBlock": "green",
52
+ "mdCodeBlockBorder": "mediumGray",
53
+ "mdQuote": "mediumGray",
54
+ "mdQuoteBorder": "mediumGray",
55
+ "mdHr": "mediumGray",
56
+ "mdListBullet": "green",
57
+
58
+ "toolDiffAdded": "green",
59
+ "toolDiffRemoved": "red",
60
+ "toolDiffContext": "mediumGray",
61
+
62
+ "syntaxComment": "#008000",
63
+ "syntaxKeyword": "#0000FF",
64
+ "syntaxFunction": "#795E26",
65
+ "syntaxVariable": "#001080",
66
+ "syntaxString": "#A31515",
67
+ "syntaxNumber": "#098658",
68
+ "syntaxType": "#267F99",
69
+ "syntaxOperator": "#000000",
70
+ "syntaxPunctuation": "#000000",
71
+
72
+ "thinkingOff": "lightGray",
73
+ "thinkingMinimal": "#767676",
74
+ "thinkingLow": "blue",
75
+ "thinkingMedium": "teal",
76
+ "thinkingHigh": "#875f87",
77
+ "thinkingXhigh": "#8b008b",
78
+ "thinkingMax": "#af005f",
79
+
80
+ "bashMode": "green"
81
+ },
82
+ "export": {
83
+ "pageBg": "#f8f8f8",
84
+ "cardBg": "#ffffff",
85
+ "infoBg": "#fffae6"
86
+ }
87
+ }