@eminent337/aery 0.1.114 → 0.1.116
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/CHANGELOG.md +4172 -16
- package/README.md +621 -34
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +2 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +11 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +66 -46
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +5 -5
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +37 -36
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +2 -2
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +3 -3
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/custom-openai-compatible.d.ts +1 -0
- package/dist/core/custom-openai-compatible.d.ts.map +1 -1
- package/dist/core/custom-openai-compatible.js +30 -4
- package/dist/core/custom-openai-compatible.js.map +1 -1
- package/dist/core/export-html/template.css +45 -1
- package/dist/core/export-html/template.js +68 -4
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +40 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +17 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts +6 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +59 -2
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +9 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-display-names.d.ts +2 -0
- package/dist/core/provider-display-names.d.ts.map +1 -0
- package/dist/core/provider-display-names.js +35 -0
- package/dist/core/provider-display-names.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +1 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +3 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +18 -10
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -3
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +2 -2
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -5
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +105 -125
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +50 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +178 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +70 -13
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -2
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +23 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js +2 -2
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +2 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +6 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +5 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +19 -5
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -3
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -17
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +24 -27
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +4 -2
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +2 -1
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +10 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +8 -10
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts +2 -2
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +2 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +3 -3
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +9 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/mime.d.ts +1 -0
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js +59 -16
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +16 -0
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +2 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +5 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +12 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +118 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +76 -7
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/uuid.d.ts +2 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/dist/utils/uuid.js +40 -0
- package/dist/utils/uuid.js.map +1 -0
- package/dist/utils/version-check.d.ts +7 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +12 -5
- package/dist/utils/version-check.js.map +1 -1
- package/docs/compaction.md +16 -16
- package/docs/custom-provider.md +40 -32
- package/docs/development.md +4 -4
- package/docs/docs.json +20 -5
- package/docs/extensions.md +152 -102
- package/docs/index.md +16 -7
- package/docs/json.md +7 -7
- package/docs/keybindings.md +3 -3
- package/docs/models.md +48 -8
- package/docs/packages.md +41 -36
- package/docs/prompt-templates.md +2 -2
- package/docs/providers.md +52 -36
- package/docs/quickstart.md +20 -20
- package/docs/rpc.md +9 -9
- package/docs/sdk.md +31 -53
- package/docs/session-format.md +10 -10
- package/docs/sessions.md +9 -9
- package/docs/settings.md +12 -6
- package/docs/skills.md +4 -4
- package/docs/terminal-setup.md +6 -6
- package/docs/termux.md +6 -6
- package/docs/themes.md +7 -7
- package/docs/tmux.md +1 -1
- package/docs/tui.md +8 -8
- package/docs/usage.md +41 -39
- package/examples/extensions/README.md +3 -5
- package/examples/extensions/antigravity-image-gen.ts +9 -9
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +2 -2
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-header.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/README.md +2 -2
- package/examples/extensions/doom-overlay/doom/build.sh +2 -2
- package/examples/extensions/doom-overlay/index.ts +1 -1
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/handoff.ts +42 -5
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform.ts +3 -3
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +2 -2
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +6 -6
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/preset.ts +2 -2
- package/examples/extensions/provider-payload.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +3 -3
- package/examples/extensions/sandbox/package-lock.json +7 -7
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/shutdown-command.ts +5 -5
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +2 -2
- package/examples/extensions/subagent/agents/aery-pods.md +1 -1
- package/examples/extensions/subagent/agents.ts +1 -1
- package/examples/extensions/subagent/index.ts +2 -2
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/tool-override.ts +2 -2
- package/examples/extensions/truncated-tool.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +4 -4
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +14 -10
- package/examples/sdk/02-custom-model.ts +12 -8
- package/examples/sdk/03-custom-prompt.ts +24 -16
- package/examples/sdk/04-skills.ts +2 -2
- package/examples/sdk/05-tools.ts +8 -4
- package/examples/sdk/06-extensions.ts +11 -7
- package/examples/sdk/07-context-files.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +2 -2
- package/examples/sdk/09-api-keys-and-oauth.ts +8 -4
- package/examples/sdk/10-settings.ts +4 -4
- package/examples/sdk/11-sessions.ts +4 -0
- package/examples/sdk/12-full-control.ts +11 -7
- package/examples/sdk/README.md +5 -8
- package/package.json +8 -14
package/docs/quickstart.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
This page gets you from install to a useful first
|
|
3
|
+
This page gets you from install to a useful first pi session.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -10,11 +10,11 @@ Pi is distributed as an npm package:
|
|
|
10
10
|
npm install -g @eminent337/aery
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Then start
|
|
13
|
+
Then start pi in the project directory you want it to work on:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
cd /path/to/project
|
|
17
|
-
|
|
17
|
+
pi
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Authenticate
|
|
@@ -23,21 +23,21 @@ Pi can use subscription providers through `/login`, or API-key providers through
|
|
|
23
23
|
|
|
24
24
|
### Option 1: subscription login
|
|
25
25
|
|
|
26
|
-
Start
|
|
26
|
+
Start pi and run:
|
|
27
27
|
|
|
28
28
|
```text
|
|
29
29
|
/login
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), GitHub Copilot
|
|
32
|
+
Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
|
|
33
33
|
|
|
34
34
|
### Option 2: API key
|
|
35
35
|
|
|
36
|
-
Set an API key before launching
|
|
36
|
+
Set an API key before launching pi:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
40
|
-
|
|
40
|
+
pi
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
You can also run `/login` and select an API-key provider to store the key in `~/.aery/agent/auth.json`.
|
|
@@ -46,13 +46,13 @@ See [Providers](providers.md) for all supported providers, environment variables
|
|
|
46
46
|
|
|
47
47
|
## First session
|
|
48
48
|
|
|
49
|
-
Once
|
|
49
|
+
Once pi starts, type a request and press Enter:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
Summarize this repository and tell me how to run its checks.
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
By default,
|
|
55
|
+
By default, pi gives the model four tools:
|
|
56
56
|
|
|
57
57
|
- `read` - read files
|
|
58
58
|
- `write` - create or overwrite files
|
|
@@ -61,7 +61,7 @@ By default, aery gives the model four tools:
|
|
|
61
61
|
|
|
62
62
|
Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options. Pi runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
|
|
63
63
|
|
|
64
|
-
## Give
|
|
64
|
+
## Give pi project instructions
|
|
65
65
|
|
|
66
66
|
Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ Pi loads:
|
|
|
78
78
|
- `~/.aery/agent/AGENTS.md` for global instructions
|
|
79
79
|
- `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
|
|
80
80
|
|
|
81
|
-
Restart
|
|
81
|
+
Restart pi, or run `/reload`, after changing context files.
|
|
82
82
|
|
|
83
83
|
## Common things to try
|
|
84
84
|
|
|
@@ -87,8 +87,8 @@ Restart aery, or run `/reload`, after changing context files.
|
|
|
87
87
|
Type `@` in the editor to fuzzy-search files, or pass files on the command line:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
pi @README.md "Summarize this"
|
|
91
|
+
pi @src/app.ts @src/app.test.ts "Review these together"
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
Images can be pasted with Ctrl+V (Alt+V on Windows) or dragged into supported terminals.
|
|
@@ -112,21 +112,21 @@ Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle thinking level.
|
|
|
112
112
|
Sessions are saved automatically:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
pi -c # Continue most recent session
|
|
116
|
+
pi -r # Browse previous sessions
|
|
117
|
+
pi --session <path|id> # Open a specific session
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Inside
|
|
120
|
+
Inside pi, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
|
|
121
121
|
|
|
122
122
|
### Non-interactive mode
|
|
123
123
|
|
|
124
124
|
For one-shot prompts:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
|
|
128
|
-
cat README.md |
|
|
129
|
-
|
|
127
|
+
pi -p "Summarize this codebase"
|
|
128
|
+
cat README.md | pi -p "Summarize this text"
|
|
129
|
+
pi -p @screenshot.png "What's in this image?"
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
Use `--mode json` for JSON event output or `--mode rpc` for process integration.
|
package/docs/rpc.md
CHANGED
|
@@ -7,7 +7,7 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
|
|
|
7
7
|
## Starting RPC Mode
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
pi --mode rpc [options]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Common options:
|
|
@@ -63,7 +63,7 @@ With images:
|
|
|
63
63
|
|
|
64
64
|
If the agent is streaming and no `streamingBehavior` is specified, the command returns an error.
|
|
65
65
|
|
|
66
|
-
**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `
|
|
66
|
+
**Extension commands**: If the message is an extension command (e.g., `/mycommand`), it executes immediately even during streaming. Extension commands manage their own LLM interaction via `pi.sendMessage()`.
|
|
67
67
|
|
|
68
68
|
**Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing.
|
|
69
69
|
|
|
@@ -714,9 +714,9 @@ Response:
|
|
|
714
714
|
"success": true,
|
|
715
715
|
"data": {
|
|
716
716
|
"commands": [
|
|
717
|
-
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.
|
|
718
|
-
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.
|
|
719
|
-
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.
|
|
717
|
+
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.pi/agent/extensions/session.ts"},
|
|
718
|
+
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.pi/agent/prompts/fix-tests.md"},
|
|
719
|
+
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.pi/agent/skills/brave-search/SKILL.md"}
|
|
720
720
|
]
|
|
721
721
|
}
|
|
722
722
|
}
|
|
@@ -731,7 +731,7 @@ Each command has:
|
|
|
731
731
|
- `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
|
|
732
732
|
- `location`: Where it was loaded from (optional, not present for extensions):
|
|
733
733
|
- `"user"`: User-level (`~/.aery/agent/`)
|
|
734
|
-
- `"project"`: Project-level (`./.
|
|
734
|
+
- `"project"`: Project-level (`./.pi/agent/`)
|
|
735
735
|
- `"path"`: Explicit path via CLI or settings
|
|
736
736
|
- `path`: Absolute file path to the command source (optional)
|
|
737
737
|
|
|
@@ -1132,7 +1132,7 @@ Set the terminal window/tab title. Fire-and-forget.
|
|
|
1132
1132
|
"type": "extension_ui_request",
|
|
1133
1133
|
"id": "uuid-8",
|
|
1134
1134
|
"method": "setTitle",
|
|
1135
|
-
"title": "
|
|
1135
|
+
"title": "pi - my project"
|
|
1136
1136
|
}
|
|
1137
1137
|
```
|
|
1138
1138
|
|
|
@@ -1319,7 +1319,7 @@ import subprocess
|
|
|
1319
1319
|
import json
|
|
1320
1320
|
|
|
1321
1321
|
proc = subprocess.Popen(
|
|
1322
|
-
["
|
|
1322
|
+
["pi", "--mode", "rpc", "--no-session"],
|
|
1323
1323
|
stdin=subprocess.PIPE,
|
|
1324
1324
|
stdout=subprocess.PIPE,
|
|
1325
1325
|
text=True
|
|
@@ -1358,7 +1358,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
|
|
|
1358
1358
|
const { spawn } = require("child_process");
|
|
1359
1359
|
const { StringDecoder } = require("string_decoder");
|
|
1360
1360
|
|
|
1361
|
-
const agent = spawn("
|
|
1361
|
+
const agent = spawn("pi", ["--mode", "rpc", "--no-session"]);
|
|
1362
1362
|
|
|
1363
1363
|
function attachJsonlReader(stream, onLine) {
|
|
1364
1364
|
const decoder = new StringDecoder("utf8");
|
package/docs/sdk.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
>
|
|
1
|
+
> pi can help you use the SDK. Ask it to build an integration for your use case.
|
|
2
2
|
|
|
3
3
|
# SDK
|
|
4
4
|
|
|
5
|
-
The SDK provides programmatic access to
|
|
6
|
-
|
|
7
|
-
> This SDK is based on [pi-mono](https://github.com/badlogic/pi-mono). Similar SDKs exist in [opencode](https://github.com/sst/opencode) and [openclaude](https://github.com/Gitlawb/openclaude). Concepts are transferable across these projects.
|
|
5
|
+
The SDK provides programmatic access to pi's agent capabilities. Use it to embed pi in other applications, build custom interfaces, or integrate with automated workflows.
|
|
8
6
|
|
|
9
7
|
**Example use cases:**
|
|
10
8
|
- Build a custom UI (web, desktop, mobile)
|
|
@@ -56,7 +54,7 @@ The main factory function for a single `AgentSession`.
|
|
|
56
54
|
`createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery.
|
|
57
55
|
|
|
58
56
|
```typescript
|
|
59
|
-
import { createAgentSession } from "@eminent337/aery";
|
|
57
|
+
import { createAgentSession, SessionManager } from "@eminent337/aery";
|
|
60
58
|
|
|
61
59
|
// Minimal: defaults with DefaultResourceLoader
|
|
62
60
|
const { session } = await createAgentSession();
|
|
@@ -64,7 +62,7 @@ const { session } = await createAgentSession();
|
|
|
64
62
|
// Custom: override specific options
|
|
65
63
|
const { session } = await createAgentSession({
|
|
66
64
|
model: myModel,
|
|
67
|
-
tools: [
|
|
65
|
+
tools: ["read", "bash"],
|
|
68
66
|
sessionManager: SessionManager.inMemory(),
|
|
69
67
|
});
|
|
70
68
|
```
|
|
@@ -221,7 +219,7 @@ await session.prompt("After you're done, also check X", { streamingBehavior: "fo
|
|
|
221
219
|
```
|
|
222
220
|
|
|
223
221
|
**Behavior:**
|
|
224
|
-
- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `
|
|
222
|
+
- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `pi.sendMessage()`.
|
|
225
223
|
- **File-based prompt templates** (from `.md` files): Expanded to their content before sending or queueing.
|
|
226
224
|
- **During streaming without `streamingBehavior`**: Throws an error. Use `steer()` or `followUp()` directly, or specify the option.
|
|
227
225
|
- **`preflightResult(true)`**: Means the prompt was accepted, queued, or handled immediately.
|
|
@@ -468,70 +466,56 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
468
466
|
|
|
469
467
|
### Tools
|
|
470
468
|
|
|
469
|
+
Specify which built-in tools to enable:
|
|
470
|
+
|
|
471
|
+
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
472
|
+
- Default built-ins: `read`, `bash`, `edit`, `write`
|
|
473
|
+
- `noTools: "all"` disables all tools
|
|
474
|
+
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
475
|
+
|
|
471
476
|
```typescript
|
|
472
|
-
import {
|
|
473
|
-
codingTools, // read, bash, edit, write (default)
|
|
474
|
-
readOnlyTools, // read, grep, find, ls
|
|
475
|
-
readTool, bashTool, editTool, writeTool,
|
|
476
|
-
grepTool, findTool, lsTool,
|
|
477
|
-
} from "@eminent337/aery";
|
|
477
|
+
import { createAgentSession } from "@eminent337/aery";
|
|
478
478
|
|
|
479
|
-
//
|
|
479
|
+
// Read-only mode
|
|
480
480
|
const { session } = await createAgentSession({
|
|
481
|
-
tools:
|
|
481
|
+
tools: ["read", "grep", "find", "ls"],
|
|
482
482
|
});
|
|
483
483
|
|
|
484
484
|
// Pick specific tools
|
|
485
485
|
const { session } = await createAgentSession({
|
|
486
|
-
tools: [
|
|
486
|
+
tools: ["read", "bash", "grep"],
|
|
487
487
|
});
|
|
488
488
|
```
|
|
489
489
|
|
|
490
490
|
#### Tools with Custom cwd
|
|
491
491
|
|
|
492
|
-
|
|
492
|
+
When you pass a custom `cwd`, `createAgentSession()` builds selected built-in tools for that cwd.
|
|
493
493
|
|
|
494
494
|
```typescript
|
|
495
|
-
import {
|
|
496
|
-
createCodingTools, // Creates [read, bash, edit, write] for specific cwd
|
|
497
|
-
createReadOnlyTools, // Creates [read, grep, find, ls] for specific cwd
|
|
498
|
-
createReadTool,
|
|
499
|
-
createBashTool,
|
|
500
|
-
createEditTool,
|
|
501
|
-
createWriteTool,
|
|
502
|
-
createGrepTool,
|
|
503
|
-
createFindTool,
|
|
504
|
-
createLsTool,
|
|
505
|
-
} from "@eminent337/aery";
|
|
495
|
+
import { createAgentSession, SessionManager } from "@eminent337/aery";
|
|
506
496
|
|
|
507
497
|
const cwd = "/path/to/project";
|
|
508
498
|
|
|
509
|
-
// Use
|
|
499
|
+
// Use default tools for custom cwd
|
|
510
500
|
const { session } = await createAgentSession({
|
|
511
501
|
cwd,
|
|
512
|
-
|
|
502
|
+
sessionManager: SessionManager.inMemory(cwd),
|
|
513
503
|
});
|
|
514
504
|
|
|
515
|
-
// Or pick specific tools
|
|
505
|
+
// Or pick specific tools for custom cwd
|
|
516
506
|
const { session } = await createAgentSession({
|
|
517
507
|
cwd,
|
|
518
|
-
tools: [
|
|
508
|
+
tools: ["read", "bash", "grep"],
|
|
509
|
+
sessionManager: SessionManager.inMemory(cwd),
|
|
519
510
|
});
|
|
520
511
|
```
|
|
521
512
|
|
|
522
|
-
**When you don't need factories:**
|
|
523
|
-
- If you omit `tools`, aery automatically creates them with the correct `cwd`
|
|
524
|
-
- If you use `process.cwd()` as your `cwd`, the pre-built instances work fine
|
|
525
|
-
|
|
526
|
-
**When you must use factories:**
|
|
527
|
-
- When you specify both `cwd` (different from `process.cwd()`) AND `tools`
|
|
528
|
-
|
|
529
513
|
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
|
530
514
|
|
|
531
515
|
### Custom Tools
|
|
532
516
|
|
|
533
517
|
```typescript
|
|
534
|
-
import { Type } from "
|
|
518
|
+
import { Type } from "typebox";
|
|
535
519
|
import { createAgentSession, defineTool } from "@eminent337/aery";
|
|
536
520
|
|
|
537
521
|
// Inline custom tool
|
|
@@ -558,6 +542,8 @@ Use `defineTool()` for standalone definitions and arrays like `customTools: [myT
|
|
|
558
542
|
|
|
559
543
|
Custom tools passed via `customTools` are combined with extension-registered tools. Extensions loaded by the ResourceLoader can also register tools via `pi.registerTool()`.
|
|
560
544
|
|
|
545
|
+
If you pass `tools`, include each custom or extension tool name you want enabled, for example `tools: ["read", "bash", "my_tool"]`.
|
|
546
|
+
|
|
561
547
|
> See [examples/sdk/05-tools.ts](../examples/sdk/05-tools.ts)
|
|
562
548
|
|
|
563
549
|
### Extensions
|
|
@@ -584,7 +570,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
584
570
|
|
|
585
571
|
Extensions can register tools, subscribe to events, add commands, and more. See [extensions.md](extensions.md) for the full API.
|
|
586
572
|
|
|
587
|
-
**Event Bus:** Extensions can communicate via `
|
|
573
|
+
**Event Bus:** Extensions can communicate via `pi.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside:
|
|
588
574
|
|
|
589
575
|
```typescript
|
|
590
576
|
import { createEventBus, DefaultResourceLoader } from "@eminent337/aery";
|
|
@@ -884,15 +870,13 @@ interface LoadExtensionsResult {
|
|
|
884
870
|
|
|
885
871
|
```typescript
|
|
886
872
|
import { getModel } from "@eminent337/aery-ai";
|
|
887
|
-
import { Type } from "
|
|
873
|
+
import { Type } from "typebox";
|
|
888
874
|
import {
|
|
889
875
|
AuthStorage,
|
|
890
|
-
bashTool,
|
|
891
876
|
createAgentSession,
|
|
892
877
|
DefaultResourceLoader,
|
|
893
878
|
defineTool,
|
|
894
879
|
ModelRegistry,
|
|
895
|
-
readTool,
|
|
896
880
|
SessionManager,
|
|
897
881
|
SettingsManager,
|
|
898
882
|
} from "@eminent337/aery";
|
|
@@ -946,7 +930,7 @@ const { session } = await createAgentSession({
|
|
|
946
930
|
authStorage,
|
|
947
931
|
modelRegistry,
|
|
948
932
|
|
|
949
|
-
tools: [
|
|
933
|
+
tools: ["read", "bash", "status"],
|
|
950
934
|
customTools: [statusTool],
|
|
951
935
|
resourceLoader: loader,
|
|
952
936
|
|
|
@@ -1083,7 +1067,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
|
|
|
1083
1067
|
For subprocess-based integration without building with the SDK, use the CLI directly:
|
|
1084
1068
|
|
|
1085
1069
|
```bash
|
|
1086
|
-
|
|
1070
|
+
pi --mode rpc --no-session
|
|
1087
1071
|
```
|
|
1088
1072
|
|
|
1089
1073
|
See [RPC documentation](rpc.md) for the JSON protocol.
|
|
@@ -1125,13 +1109,7 @@ defineTool
|
|
|
1125
1109
|
SessionManager
|
|
1126
1110
|
SettingsManager
|
|
1127
1111
|
|
|
1128
|
-
//
|
|
1129
|
-
codingTools
|
|
1130
|
-
readOnlyTools
|
|
1131
|
-
readTool, bashTool, editTool, writeTool
|
|
1132
|
-
grepTool, findTool, lsTool
|
|
1133
|
-
|
|
1134
|
-
// Tool factories (for custom cwd)
|
|
1112
|
+
// Tool factories
|
|
1135
1113
|
createCodingTools
|
|
1136
1114
|
createReadOnlyTools
|
|
1137
1115
|
createReadTool, createBashTool, createEditTool, createWriteTool
|
package/docs/session-format.md
CHANGED
|
@@ -14,7 +14,7 @@ Where `<path>` is the working directory with `/` replaced by `-`.
|
|
|
14
14
|
|
|
15
15
|
Sessions can be removed by deleting their `.jsonl` files under `~/.aery/agent/sessions/`.
|
|
16
16
|
|
|
17
|
-
Pi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available,
|
|
17
|
+
Pi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, pi uses the `trash` CLI to avoid permanent deletion.
|
|
18
18
|
|
|
19
19
|
## Session Version
|
|
20
20
|
|
|
@@ -28,11 +28,11 @@ Existing sessions are automatically migrated to the current version (v3) when lo
|
|
|
28
28
|
|
|
29
29
|
## Source Files
|
|
30
30
|
|
|
31
|
-
Source on GitHub ([
|
|
32
|
-
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/
|
|
33
|
-
- [`packages/coding-agent/src/core/messages.ts`](https://github.com/
|
|
34
|
-
- [`packages/ai/src/types.ts`](https://github.com/
|
|
35
|
-
- [`packages/agent/src/types.ts`](https://github.com/
|
|
31
|
+
Source on GitHub ([pi-mono](https://github.com/eminent337/aery)):
|
|
32
|
+
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
|
|
33
|
+
- [`packages/coding-agent/src/core/messages.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
|
|
34
|
+
- [`packages/ai/src/types.ts`](https://github.com/eminent337/aery/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
|
|
35
|
+
- [`packages/agent/src/types.ts`](https://github.com/eminent337/aery/blob/main/packages/agent/src/types.ts) - AgentMessage union type
|
|
36
36
|
|
|
37
37
|
For TypeScript definitions in your project, inspect `node_modules/@eminent337/aery/dist/` and `node_modules/@eminent337/aery-ai/dist/`.
|
|
38
38
|
|
|
@@ -116,7 +116,7 @@ interface Usage {
|
|
|
116
116
|
}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
### Extended Message Types (from
|
|
119
|
+
### Extended Message Types (from pi-coding-agent)
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
122
|
interface BashExecutionMessage {
|
|
@@ -233,7 +233,7 @@ Created when context is compacted. Stores a summary of earlier messages.
|
|
|
233
233
|
|
|
234
234
|
Optional fields:
|
|
235
235
|
- `details`: Implementation-specific data (e.g., `{ readFiles: string[], modifiedFiles: string[] }` for default, or custom data for extensions)
|
|
236
|
-
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if
|
|
236
|
+
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if pi-generated (legacy field name)
|
|
237
237
|
|
|
238
238
|
### BranchSummaryEntry
|
|
239
239
|
|
|
@@ -245,7 +245,7 @@ Created when switching branches via `/tree` with an LLM generated summary of the
|
|
|
245
245
|
|
|
246
246
|
Optional fields:
|
|
247
247
|
- `details`: File tracking data (`{ readFiles: string[], modifiedFiles: string[] }`) for default, or custom data for extensions
|
|
248
|
-
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if
|
|
248
|
+
- `fromHook`: `true` if generated by an extension, `false`/`undefined` if pi-generated (legacy field name)
|
|
249
249
|
|
|
250
250
|
### CustomEntry
|
|
251
251
|
|
|
@@ -282,7 +282,7 @@ Set `label` to `undefined` to clear a label.
|
|
|
282
282
|
|
|
283
283
|
### SessionInfoEntry
|
|
284
284
|
|
|
285
|
-
Session metadata (e.g., user-defined display name). Set via `/name` command or `
|
|
285
|
+
Session metadata (e.g., user-defined display name). Set via `/name` command or `pi.setSessionName()` in extensions.
|
|
286
286
|
|
|
287
287
|
```json
|
|
288
288
|
{"type":"session_info","id":"k1l2m3n4","parentId":"j0k1l2m3","timestamp":"2024-12-03T14:35:00.000Z","name":"Refactor auth module"}
|
package/docs/sessions.md
CHANGED
|
@@ -7,11 +7,11 @@ Pi saves conversations as sessions so you can continue work, branch from earlier
|
|
|
7
7
|
Sessions auto-save to `~/.aery/agent/sessions/`, organized by working directory. Each session is a JSONL file with a tree structure.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
pi -c # Continue most recent session
|
|
11
|
+
pi -r # Browse and select from past sessions
|
|
12
|
+
pi --no-session # Ephemeral mode; do not save
|
|
13
|
+
pi --session <path|id> # Use a specific session file or partial session ID
|
|
14
|
+
pi --fork <path|id> # Fork a session file or partial session ID into a new session
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Use `/session` in interactive mode to see the current session file, session ID, message count, tokens, and cost.
|
|
@@ -35,7 +35,7 @@ For the JSONL file format and SessionManager API, see [Session Format](session-f
|
|
|
35
35
|
|
|
36
36
|
## Resuming and Deleting Sessions
|
|
37
37
|
|
|
38
|
-
`/resume` opens an interactive session picker for the current project. `
|
|
38
|
+
`/resume` opens an interactive session picker for the current project. `pi -r` opens the same picker at startup.
|
|
39
39
|
|
|
40
40
|
In the picker you can:
|
|
41
41
|
|
|
@@ -46,7 +46,7 @@ In the picker you can:
|
|
|
46
46
|
- rename with Ctrl+R
|
|
47
47
|
- delete with Ctrl+D, then confirm
|
|
48
48
|
|
|
49
|
-
When available,
|
|
49
|
+
When available, pi uses the `trash` CLI for deletion instead of permanently removing files.
|
|
50
50
|
|
|
51
51
|
## Naming Sessions
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Use `/name <name>` to set a human-readable session name:
|
|
|
56
56
|
/name Refactor auth module
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Named sessions are easier to find in `/resume` and `
|
|
59
|
+
Named sessions are easier to find in `/resume` and `pi -r`.
|
|
60
60
|
|
|
61
61
|
## Branching with `/tree`
|
|
62
62
|
|
|
@@ -120,7 +120,7 @@ Use `/tree` when you want to keep alternatives together. Use `/fork` or `/clone`
|
|
|
120
120
|
|
|
121
121
|
## Branch Summaries
|
|
122
122
|
|
|
123
|
-
When `/tree` switches away from one branch to another,
|
|
123
|
+
When `/tree` switches away from one branch to another, pi can summarize the abandoned branch and attach that summary at the new position. This preserves important context from the path you left without replaying the whole branch.
|
|
124
124
|
|
|
125
125
|
When prompted, choose one of:
|
|
126
126
|
|
package/docs/settings.md
CHANGED
|
@@ -41,13 +41,19 @@ Edit directly or use `/settings` for common options.
|
|
|
41
41
|
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, or custom) |
|
|
42
42
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
43
43
|
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
44
|
-
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous
|
|
44
|
+
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
|
|
45
45
|
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
46
46
|
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
47
47
|
| `editorPaddingX` | number | `0` | Horizontal padding for input editor (0-3) |
|
|
48
48
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
49
49
|
| `showHardwareCursor` | boolean | `false` | Show terminal cursor |
|
|
50
50
|
|
|
51
|
+
### Telemetry and update checks
|
|
52
|
+
|
|
53
|
+
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://eminent337.github.io/api/report-install`. Opting out of telemetry does not disable update checks; Pi can still fetch `https://eminent337.github.io/api/latest-version` to look for the latest version.
|
|
54
|
+
|
|
55
|
+
Set `AERY_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--offline` or `AERY_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
56
|
+
|
|
51
57
|
### Warnings
|
|
52
58
|
|
|
53
59
|
| Setting | Type | Default | Description |
|
|
@@ -161,7 +167,7 @@ Normally the package manager's global modules location is queried using `root -g
|
|
|
161
167
|
{ "sessionDir": ".aery/sessions" }
|
|
162
168
|
```
|
|
163
169
|
|
|
164
|
-
When multiple sources specify a session directory, `--session-dir`
|
|
170
|
+
When multiple sources specify a session directory, precedence is `--session-dir`, `AERY_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
165
171
|
|
|
166
172
|
### Model Cycling
|
|
167
173
|
|
|
@@ -185,7 +191,7 @@ When multiple sources specify a session directory, `--session-dir` CLI flag take
|
|
|
185
191
|
|
|
186
192
|
These settings define where to load extensions, skills, prompts, and themes from.
|
|
187
193
|
|
|
188
|
-
Paths in `~/.aery/agent/settings.json` resolve relative to `~/.aery/agent`. Paths in `.aery/settings.json` resolve relative to `.
|
|
194
|
+
Paths in `~/.aery/agent/settings.json` resolve relative to `~/.aery/agent`. Paths in `.aery/settings.json` resolve relative to `.pi`. Absolute paths and `~` are supported.
|
|
189
195
|
|
|
190
196
|
| Setting | Type | Default | Description |
|
|
191
197
|
|---------|------|---------|-------------|
|
|
@@ -204,7 +210,7 @@ String form loads all resources from a package:
|
|
|
204
210
|
|
|
205
211
|
```json
|
|
206
212
|
{
|
|
207
|
-
"packages": ["
|
|
213
|
+
"packages": ["pi-skills", "@org/my-extension"]
|
|
208
214
|
}
|
|
209
215
|
```
|
|
210
216
|
|
|
@@ -214,7 +220,7 @@ Object form filters which resources to load:
|
|
|
214
220
|
{
|
|
215
221
|
"packages": [
|
|
216
222
|
{
|
|
217
|
-
"source": "
|
|
223
|
+
"source": "pi-skills",
|
|
218
224
|
"skills": ["brave-search", "transcribe"],
|
|
219
225
|
"extensions": []
|
|
220
226
|
}
|
|
@@ -245,7 +251,7 @@ See [packages.md](packages.md) for package management details.
|
|
|
245
251
|
"warnings": {
|
|
246
252
|
"anthropicExtraUsage": true
|
|
247
253
|
},
|
|
248
|
-
"packages": ["
|
|
254
|
+
"packages": ["pi-skills"]
|
|
249
255
|
}
|
|
250
256
|
```
|
|
251
257
|
|
package/docs/skills.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
>
|
|
1
|
+
> pi can create skills. Ask it to build one for your use case.
|
|
2
2
|
|
|
3
3
|
# Skills
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ Pi loads skills from:
|
|
|
29
29
|
- Project:
|
|
30
30
|
- `.aery/skills/`
|
|
31
31
|
- `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo)
|
|
32
|
-
- Packages: `skills/` directories or `
|
|
32
|
+
- Packages: `skills/` directories or `pi.skills` entries in `package.json`
|
|
33
33
|
- Settings: `skills` array with files or directories
|
|
34
34
|
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
35
|
|
|
@@ -63,7 +63,7 @@ For project-level Claude Code skills, add to `.aery/settings.json`:
|
|
|
63
63
|
|
|
64
64
|
## How Skills Work
|
|
65
65
|
|
|
66
|
-
1. At startup,
|
|
66
|
+
1. At startup, pi scans skill locations and extracts names and descriptions
|
|
67
67
|
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
68
68
|
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
69
69
|
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
@@ -229,4 +229,4 @@ cd /path/to/brave-search && npm install
|
|
|
229
229
|
## Skill Repositories
|
|
230
230
|
|
|
231
231
|
- [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development
|
|
232
|
-
- [
|
|
232
|
+
- [Pi Skills](https://github.com/badlogic/pi-skills) - Web search, browser automation, Google APIs, transcription
|
package/docs/terminal-setup.md
CHANGED
|
@@ -20,11 +20,11 @@ Older Claude Code versions may have added this Ghostty mapping:
|
|
|
20
20
|
keybind = shift+enter=text:\n
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
That mapping sends a raw linefeed byte. Inside
|
|
23
|
+
That mapping sends a raw linefeed byte. Inside pi, that is indistinguishable from `Ctrl+J`, so tmux and pi no longer see a real `shift+enter` key event.
|
|
24
24
|
|
|
25
25
|
If Claude Code 2.x or newer is the only reason you added that mapping, you can remove it, unless you want to use Claude Code in tmux, where it still requires that Ghostty mapping.
|
|
26
26
|
|
|
27
|
-
If you want `Shift+Enter` to keep working in tmux via that remap, add `ctrl+j` to your
|
|
27
|
+
If you want `Shift+Enter` to keep working in tmux via that remap, add `ctrl+j` to your pi `newLine` keybinding in `~/.aery/agent/keybindings.json`:
|
|
28
28
|
|
|
29
29
|
```json
|
|
30
30
|
{
|
|
@@ -63,7 +63,7 @@ Add to `keybindings.json` to enable `Shift+Enter` for multi-line input:
|
|
|
63
63
|
|
|
64
64
|
## Windows Terminal
|
|
65
65
|
|
|
66
|
-
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys
|
|
66
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys pi uses:
|
|
67
67
|
|
|
68
68
|
```json
|
|
69
69
|
{
|
|
@@ -81,8 +81,8 @@ Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward
|
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
- `Shift+Enter` inserts a new line.
|
|
84
|
-
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents
|
|
85
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to
|
|
84
|
+
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents pi from receiving `Alt+Enter` for follow-up queueing.
|
|
85
|
+
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to pi instead.
|
|
86
86
|
|
|
87
87
|
If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
|
|
88
88
|
|
|
@@ -101,6 +101,6 @@ For the best experience, use a terminal that supports the Kitty keyboard protoco
|
|
|
101
101
|
|
|
102
102
|
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
103
103
|
|
|
104
|
-
If you want the hardware cursor visible, set `AERY_HARDWARE_CURSOR=1` before running
|
|
104
|
+
If you want the hardware cursor visible, set `AERY_HARDWARE_CURSOR=1` before running pi (disabled by default for compatibility).
|
|
105
105
|
|
|
106
106
|
Consider using a dedicated terminal emulator for the best experience.
|