@eminent337/aery 0.1.19 → 0.1.20
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 +2 -2
- package/docs/compaction.md +3 -3
- package/docs/custom-provider.md +4 -4
- package/docs/development.md +2 -2
- package/docs/extensions.md +28 -28
- package/docs/packages.md +1 -1
- package/docs/rpc.md +1 -1
- package/docs/sdk.md +25 -25
- package/docs/session.md +2 -2
- package/docs/skills.md +1 -1
- package/docs/termux.md +1 -1
- package/docs/tui.md +20 -20
- package/examples/extensions/README.md +2 -2
- package/examples/extensions/doom-overlay/README.md +1 -1
- package/examples/extensions/overlay-qa-tests.ts +5 -5
- package/examples/sdk/README.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
### Initial Release
|
|
12
12
|
- First public release of Aery
|
|
13
|
-
- Built on
|
|
13
|
+
- Built on aery 0.67.68 (upstream base)
|
|
14
14
|
- 27 extensions: auto-router, model failover, agent teams, loop scheduler, session memory, health scoring, damage control, circuit breaker, and more
|
|
15
15
|
- Aery theme (sky blue accents)
|
|
16
16
|
- Multi-provider support: NVIDIA, OpenRouter, Anthropic, OpenAI, Gemini, and more
|
|
17
17
|
- Automatic model failover on rate limits (402/429)
|
|
18
|
-
- Weekly upstream sync from
|
|
18
|
+
- Weekly upstream sync from upstream
|
package/docs/compaction.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
LLMs have limited context windows. When conversations grow too long, pi uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization.
|
|
4
4
|
|
|
5
|
-
**Source files** ([
|
|
5
|
+
**Source files** ([aery](https://github.com/eminent337/aery)):
|
|
6
6
|
- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic
|
|
7
7
|
- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization
|
|
8
8
|
- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization)
|
|
9
9
|
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`)
|
|
10
10
|
- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/eminent337/aery/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types
|
|
11
11
|
|
|
12
|
-
For TypeScript definitions in your project, inspect `node_modules/@
|
|
12
|
+
For TypeScript definitions in your project, inspect `node_modules/@eminent337/aery/dist/`.
|
|
13
13
|
|
|
14
14
|
## Overview
|
|
15
15
|
|
|
@@ -309,7 +309,7 @@ pi.on("session_before_compact", async (event, ctx) => {
|
|
|
309
309
|
To generate a summary with your own model, convert messages to text using `serializeConversation`:
|
|
310
310
|
|
|
311
311
|
```typescript
|
|
312
|
-
import { convertToLlm, serializeConversation } from "@
|
|
312
|
+
import { convertToLlm, serializeConversation } from "@eminent337/aery";
|
|
313
313
|
|
|
314
314
|
pi.on("session_before_compact", async (event, ctx) => {
|
|
315
315
|
const { preparation } = event;
|
package/docs/custom-provider.md
CHANGED
|
@@ -31,7 +31,7 @@ See these complete provider examples:
|
|
|
31
31
|
## Quick Reference
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
|
-
import type { ExtensionAPI } from "@
|
|
34
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
35
35
|
|
|
36
36
|
export default function (pi: ExtensionAPI) {
|
|
37
37
|
// Override baseUrl for existing provider
|
|
@@ -96,7 +96,7 @@ To add a completely new provider, specify `models` along with the required confi
|
|
|
96
96
|
If the model list comes from a remote endpoint, use an async extension factory:
|
|
97
97
|
|
|
98
98
|
```typescript
|
|
99
|
-
import type { ExtensionAPI } from "@
|
|
99
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
100
100
|
|
|
101
101
|
export default async function (pi: ExtensionAPI) {
|
|
102
102
|
const response = await fetch("http://localhost:1234/v1/models");
|
|
@@ -252,7 +252,7 @@ pi.registerProvider("custom-api", {
|
|
|
252
252
|
Add OAuth/SSO authentication that integrates with `/login`:
|
|
253
253
|
|
|
254
254
|
```typescript
|
|
255
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "@
|
|
255
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "@eminent337/aery-ai";
|
|
256
256
|
|
|
257
257
|
pi.registerProvider("corporate-ai", {
|
|
258
258
|
baseUrl: "https://ai.corp.com/v1",
|
|
@@ -365,7 +365,7 @@ import {
|
|
|
365
365
|
type SimpleStreamOptions,
|
|
366
366
|
calculateCost,
|
|
367
367
|
createAssistantMessageEventStream,
|
|
368
|
-
} from "@
|
|
368
|
+
} from "@eminent337/aery-ai";
|
|
369
369
|
|
|
370
370
|
function streamMyProvider(
|
|
371
371
|
model: Model<any>,
|
package/docs/development.md
CHANGED
|
@@ -6,7 +6,7 @@ See [AGENTS.md](../../../AGENTS.md) for additional guidelines.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
git clone https://github.com/eminent337/aery
|
|
9
|
-
cd
|
|
9
|
+
cd aery
|
|
10
10
|
npm install
|
|
11
11
|
npm run build
|
|
12
12
|
```
|
|
@@ -14,7 +14,7 @@ npm run build
|
|
|
14
14
|
Run from source:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
/path/to/
|
|
17
|
+
/path/to/aery/install.sh
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
The script can be run from any directory. Pi keeps the caller's current working directory.
|
package/docs/extensions.md
CHANGED
|
@@ -56,7 +56,7 @@ See [examples/extensions/](../examples/extensions/) for working implementations.
|
|
|
56
56
|
Create `~/.pi/agent/extensions/my-extension.ts`:
|
|
57
57
|
|
|
58
58
|
```typescript
|
|
59
|
-
import type { ExtensionAPI } from "@
|
|
59
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
60
60
|
import { Type } from "@sinclair/typebox";
|
|
61
61
|
|
|
62
62
|
export default function (pi: ExtensionAPI) {
|
|
@@ -138,10 +138,10 @@ To share extensions via npm or git as pi packages, see [packages.md](packages.md
|
|
|
138
138
|
|
|
139
139
|
| Package | Purpose |
|
|
140
140
|
|---------|---------|
|
|
141
|
-
| `@
|
|
141
|
+
| `@eminent337/aery` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) |
|
|
142
142
|
| `@sinclair/typebox` | Schema definitions for tool parameters |
|
|
143
|
-
| `@
|
|
144
|
-
| `@
|
|
143
|
+
| `@eminent337/aery-ai` | AI utilities (`StringEnum` for Google-compatible enums) |
|
|
144
|
+
| `@eminent337/aery-tui` | TUI components for custom rendering |
|
|
145
145
|
|
|
146
146
|
npm dependencies work too. Add a `package.json` next to your extension (or in a parent directory), run `npm install`, and imports from `node_modules/` are resolved automatically.
|
|
147
147
|
|
|
@@ -154,7 +154,7 @@ Node.js built-ins (`node:fs`, `node:path`, etc.) are also available.
|
|
|
154
154
|
An extension exports a default factory function that receives `ExtensionAPI`. The factory can be synchronous or asynchronous:
|
|
155
155
|
|
|
156
156
|
```typescript
|
|
157
|
-
import type { ExtensionAPI } from "@
|
|
157
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
158
158
|
|
|
159
159
|
export default function (pi: ExtensionAPI) {
|
|
160
160
|
// Subscribe to events
|
|
@@ -183,7 +183,7 @@ If the factory returns a `Promise`, pi awaits it before continuing startup. That
|
|
|
183
183
|
Use an async factory for one-time startup work such as fetching remote configuration or dynamically discovering available models.
|
|
184
184
|
|
|
185
185
|
```typescript
|
|
186
|
-
import type { ExtensionAPI } from "@
|
|
186
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
187
187
|
|
|
188
188
|
export default async function (pi: ExtensionAPI) {
|
|
189
189
|
const response = await fetch("http://localhost:1234/v1/models");
|
|
@@ -635,7 +635,7 @@ Behavior guarantees:
|
|
|
635
635
|
- Return values from `tool_call` only control blocking via `{ block: true, reason?: string }`
|
|
636
636
|
|
|
637
637
|
```typescript
|
|
638
|
-
import { isToolCallEventType } from "@
|
|
638
|
+
import { isToolCallEventType } from "@eminent337/aery";
|
|
639
639
|
|
|
640
640
|
pi.on("tool_call", async (event, ctx) => {
|
|
641
641
|
// event.toolName - "bash", "read", "write", "edit", etc.
|
|
@@ -671,7 +671,7 @@ export type MyToolInput = Static<typeof myToolSchema>;
|
|
|
671
671
|
Use `isToolCallEventType` with explicit type parameters:
|
|
672
672
|
|
|
673
673
|
```typescript
|
|
674
|
-
import { isToolCallEventType } from "@
|
|
674
|
+
import { isToolCallEventType } from "@eminent337/aery";
|
|
675
675
|
import type { MyToolInput } from "my-extension";
|
|
676
676
|
|
|
677
677
|
pi.on("tool_call", (event) => {
|
|
@@ -693,7 +693,7 @@ Fired after tool execution finishes and before `tool_execution_end` plus the fin
|
|
|
693
693
|
Use `ctx.signal` for nested async work inside the handler. This lets Esc cancel model calls, `fetch()`, and other abort-aware operations started by the extension.
|
|
694
694
|
|
|
695
695
|
```typescript
|
|
696
|
-
import { isBashToolResult } from "@
|
|
696
|
+
import { isBashToolResult } from "@eminent337/aery";
|
|
697
697
|
|
|
698
698
|
pi.on("tool_result", async (event, ctx) => {
|
|
699
699
|
// event.toolName, event.toolCallId, event.input
|
|
@@ -721,7 +721,7 @@ pi.on("tool_result", async (event, ctx) => {
|
|
|
721
721
|
Fired when user executes `!` or `!!` commands. **Can intercept.**
|
|
722
722
|
|
|
723
723
|
```typescript
|
|
724
|
-
import { createLocalBashOperations } from "@
|
|
724
|
+
import { createLocalBashOperations } from "@eminent337/aery";
|
|
725
725
|
|
|
726
726
|
pi.on("user_bash", (event, ctx) => {
|
|
727
727
|
// event.command - the bash command
|
|
@@ -1002,7 +1002,7 @@ if (result.cancelled) {
|
|
|
1002
1002
|
To discover available sessions, use the static `SessionManager.list()` or `SessionManager.listAll()` methods:
|
|
1003
1003
|
|
|
1004
1004
|
```typescript
|
|
1005
|
-
import { SessionManager } from "@
|
|
1005
|
+
import { SessionManager } from "@eminent337/aery";
|
|
1006
1006
|
|
|
1007
1007
|
pi.registerCommand("switch", {
|
|
1008
1008
|
description: "Switch to another session",
|
|
@@ -1049,7 +1049,7 @@ Tools run with `ExtensionContext`, so they cannot call `ctx.reload()` directly.
|
|
|
1049
1049
|
Example tool the LLM can call to trigger reload:
|
|
1050
1050
|
|
|
1051
1051
|
```typescript
|
|
1052
|
-
import type { ExtensionAPI } from "@
|
|
1052
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
1053
1053
|
import { Type } from "@sinclair/typebox";
|
|
1054
1054
|
|
|
1055
1055
|
export default function (pi: ExtensionAPI) {
|
|
@@ -1096,7 +1096,7 @@ See [dynamic-tools.ts](../examples/extensions/dynamic-tools.ts) for a full examp
|
|
|
1096
1096
|
|
|
1097
1097
|
```typescript
|
|
1098
1098
|
import { Type } from "@sinclair/typebox";
|
|
1099
|
-
import { StringEnum } from "@
|
|
1099
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
1100
1100
|
|
|
1101
1101
|
pi.registerTool({
|
|
1102
1102
|
name: "my_tool",
|
|
@@ -1254,7 +1254,7 @@ pi.registerCommand("stats", {
|
|
|
1254
1254
|
Optional: add argument auto-completion for `/command ...`:
|
|
1255
1255
|
|
|
1256
1256
|
```typescript
|
|
1257
|
-
import type { AutocompleteItem } from "@
|
|
1257
|
+
import type { AutocompleteItem } from "@eminent337/aery-tui";
|
|
1258
1258
|
|
|
1259
1259
|
pi.registerCommand("deploy", {
|
|
1260
1260
|
description: "Deploy to an environment",
|
|
@@ -1540,7 +1540,7 @@ Pass the real target file path to `withFileMutationQueue()`, not the raw user ar
|
|
|
1540
1540
|
Queue the entire mutation window on that target path. That includes read-modify-write logic, not just the final write.
|
|
1541
1541
|
|
|
1542
1542
|
```typescript
|
|
1543
|
-
import { withFileMutationQueue } from "@
|
|
1543
|
+
import { withFileMutationQueue } from "@eminent337/aery";
|
|
1544
1544
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
1545
1545
|
import { dirname, resolve } from "node:path";
|
|
1546
1546
|
|
|
@@ -1565,8 +1565,8 @@ async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
|
1565
1565
|
|
|
1566
1566
|
```typescript
|
|
1567
1567
|
import { Type } from "@sinclair/typebox";
|
|
1568
|
-
import { StringEnum } from "@
|
|
1569
|
-
import { Text } from "@
|
|
1568
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
1569
|
+
import { Text } from "@eminent337/aery-tui";
|
|
1570
1570
|
|
|
1571
1571
|
pi.registerTool({
|
|
1572
1572
|
name: "my_tool",
|
|
@@ -1629,7 +1629,7 @@ async execute(toolCallId, params) {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
```
|
|
1631
1631
|
|
|
1632
|
-
**Important:** Use `StringEnum` from `@
|
|
1632
|
+
**Important:** Use `StringEnum` from `@eminent337/aery-ai` for string enums. `Type.Union`/`Type.Literal` doesn't work with Google's API.
|
|
1633
1633
|
|
|
1634
1634
|
**Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when pi resumes an older session whose stored tool call arguments no longer match the current schema. Return the object you want validated against `parameters`. Keep the public schema strict. Do not add deprecated compatibility fields to `parameters` just to keep old resumed sessions working.
|
|
1635
1635
|
|
|
@@ -1715,7 +1715,7 @@ Built-in tool implementations:
|
|
|
1715
1715
|
Built-in tools support pluggable operations for delegating to remote systems (SSH, containers, etc.):
|
|
1716
1716
|
|
|
1717
1717
|
```typescript
|
|
1718
|
-
import { createReadTool, createBashTool, type ReadOperations } from "@
|
|
1718
|
+
import { createReadTool, createBashTool, type ReadOperations } from "@eminent337/aery";
|
|
1719
1719
|
|
|
1720
1720
|
// Create tool with custom operations
|
|
1721
1721
|
const remoteRead = createReadTool(cwd, {
|
|
@@ -1746,7 +1746,7 @@ For `user_bash`, extensions can reuse pi's local shell backend via `createLocalB
|
|
|
1746
1746
|
The bash tool also supports a spawn hook to adjust the command, cwd, or env before execution:
|
|
1747
1747
|
|
|
1748
1748
|
```typescript
|
|
1749
|
-
import { createBashTool } from "@
|
|
1749
|
+
import { createBashTool } from "@eminent337/aery";
|
|
1750
1750
|
|
|
1751
1751
|
const bashTool = createBashTool(cwd, {
|
|
1752
1752
|
spawnHook: ({ command, cwd, env }) => ({
|
|
@@ -1776,7 +1776,7 @@ import {
|
|
|
1776
1776
|
formatSize, // Human-readable size (e.g., "50KB", "1.5MB")
|
|
1777
1777
|
DEFAULT_MAX_BYTES, // 50KB
|
|
1778
1778
|
DEFAULT_MAX_LINES, // 2000
|
|
1779
|
-
} from "@
|
|
1779
|
+
} from "@eminent337/aery";
|
|
1780
1780
|
|
|
1781
1781
|
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
1782
1782
|
const output = await runCommand();
|
|
@@ -1867,7 +1867,7 @@ Use `context.state` for cross-slot shared state. Keep slot-local caches on the r
|
|
|
1867
1867
|
Renders the tool call or header:
|
|
1868
1868
|
|
|
1869
1869
|
```typescript
|
|
1870
|
-
import { Text } from "@
|
|
1870
|
+
import { Text } from "@eminent337/aery-tui";
|
|
1871
1871
|
|
|
1872
1872
|
renderCall(args, theme, context) {
|
|
1873
1873
|
const text = (context.lastComponent as Text | undefined) ?? new Text("", 0, 0);
|
|
@@ -1912,7 +1912,7 @@ If a slot intentionally has no visible content, return an empty `Component` such
|
|
|
1912
1912
|
Use `keyHint()` to display keybinding hints that respect the active keybinding configuration:
|
|
1913
1913
|
|
|
1914
1914
|
```typescript
|
|
1915
|
-
import { keyHint } from "@
|
|
1915
|
+
import { keyHint } from "@eminent337/aery";
|
|
1916
1916
|
|
|
1917
1917
|
renderResult(result, { expanded }, theme, context) {
|
|
1918
1918
|
let text = theme.fg("success", "✓ Done");
|
|
@@ -2113,7 +2113,7 @@ Custom working-indicator frames are rendered verbatim. If you want colors, add t
|
|
|
2113
2113
|
For complex UI, use `ctx.ui.custom()`. This temporarily replaces the editor with your component until `done()` is called:
|
|
2114
2114
|
|
|
2115
2115
|
```typescript
|
|
2116
|
-
import { Text, Component } from "@
|
|
2116
|
+
import { Text, Component } from "@eminent337/aery-tui";
|
|
2117
2117
|
|
|
2118
2118
|
const result = await ctx.ui.custom<boolean>((tui, theme, keybindings, done) => {
|
|
2119
2119
|
const text = new Text("Press Enter to confirm, Escape to cancel", 1, 1);
|
|
@@ -2171,8 +2171,8 @@ See [tui.md](tui.md) for the full `OverlayOptions` API and [overlay-qa-tests.ts]
|
|
|
2171
2171
|
Replace the main input editor with a custom implementation (vim mode, emacs mode, etc.):
|
|
2172
2172
|
|
|
2173
2173
|
```typescript
|
|
2174
|
-
import { CustomEditor, type ExtensionAPI } from "@
|
|
2175
|
-
import { matchesKey } from "@
|
|
2174
|
+
import { CustomEditor, type ExtensionAPI } from "@eminent337/aery";
|
|
2175
|
+
import { matchesKey } from "@eminent337/aery-tui";
|
|
2176
2176
|
|
|
2177
2177
|
class VimEditor extends CustomEditor {
|
|
2178
2178
|
private mode: "normal" | "insert" = "insert";
|
|
@@ -2212,7 +2212,7 @@ See [tui.md](tui.md) Pattern 7 for a complete example with mode indicator.
|
|
|
2212
2212
|
Register a custom renderer for messages with your `customType`:
|
|
2213
2213
|
|
|
2214
2214
|
```typescript
|
|
2215
|
-
import { Text } from "@
|
|
2215
|
+
import { Text } from "@eminent337/aery-tui";
|
|
2216
2216
|
|
|
2217
2217
|
pi.registerMessageRenderer("my-extension", (message, options, theme) => {
|
|
2218
2218
|
const { expanded } = options;
|
|
@@ -2261,7 +2261,7 @@ theme.strikethrough(text)
|
|
|
2261
2261
|
For syntax highlighting in custom tool renderers:
|
|
2262
2262
|
|
|
2263
2263
|
```typescript
|
|
2264
|
-
import { highlightCode, getLanguageFromPath } from "@
|
|
2264
|
+
import { highlightCode, getLanguageFromPath } from "@eminent337/aery";
|
|
2265
2265
|
|
|
2266
2266
|
// Highlight code with explicit language
|
|
2267
2267
|
const highlighted = highlightCode("const x = 1;", "typescript", theme);
|
package/docs/packages.md
CHANGED
|
@@ -158,7 +158,7 @@ If no `pi` manifest is present, pi auto-discovers resources from these directori
|
|
|
158
158
|
|
|
159
159
|
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When pi installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
|
|
160
160
|
|
|
161
|
-
Pi bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@
|
|
161
|
+
Pi bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@eminent337/aery-ai`, `@eminent337/aery-core`, `@eminent337/aery`, `@eminent337/aery-tui`, `@sinclair/typebox`.
|
|
162
162
|
|
|
163
163
|
Other pi packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Pi loads packages with separate module roots, so separate installs do not collide or share modules.
|
|
164
164
|
|
package/docs/rpc.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs.
|
|
4
4
|
|
|
5
|
-
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@
|
|
5
|
+
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@eminent337/aery` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts).
|
|
6
6
|
|
|
7
7
|
## Starting RPC Mode
|
|
8
8
|
|
package/docs/sdk.md
CHANGED
|
@@ -16,7 +16,7 @@ See [examples/sdk/](../examples/sdk/) for working examples from minimal to full
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "@
|
|
19
|
+
import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "@eminent337/aery";
|
|
20
20
|
|
|
21
21
|
// Set up credential storage and model registry
|
|
22
22
|
const authStorage = AuthStorage.create();
|
|
@@ -40,7 +40,7 @@ await session.prompt("What files are in the current directory?");
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npm install @
|
|
43
|
+
npm install @eminent337/aery
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
The SDK is included in the main package. No separate installation needed.
|
|
@@ -54,7 +54,7 @@ The main factory function for a single `AgentSession`.
|
|
|
54
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.
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
|
-
import { createAgentSession } from "@
|
|
57
|
+
import { createAgentSession } from "@eminent337/aery";
|
|
58
58
|
|
|
59
59
|
// Minimal: defaults with DefaultResourceLoader
|
|
60
60
|
const { session } = await createAgentSession();
|
|
@@ -132,7 +132,7 @@ import {
|
|
|
132
132
|
createAgentSessionServices,
|
|
133
133
|
getAgentDir,
|
|
134
134
|
SessionManager,
|
|
135
|
-
} from "@
|
|
135
|
+
} from "@eminent337/aery";
|
|
136
136
|
|
|
137
137
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
138
138
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -239,7 +239,7 @@ Both `steer()` and `followUp()` expand file-based prompt templates but error on
|
|
|
239
239
|
|
|
240
240
|
### Agent and AgentState
|
|
241
241
|
|
|
242
|
-
The `Agent` class (from `@
|
|
242
|
+
The `Agent` class (from `@eminent337/aery-core`) handles the core LLM interaction. Access it via `session.agent`.
|
|
243
243
|
|
|
244
244
|
```typescript
|
|
245
245
|
// Access current state
|
|
@@ -368,8 +368,8 @@ When you pass a custom `ResourceLoader`, `cwd` and `agentDir` no longer control
|
|
|
368
368
|
### Model
|
|
369
369
|
|
|
370
370
|
```typescript
|
|
371
|
-
import { getModel } from "@
|
|
372
|
-
import { AuthStorage, ModelRegistry } from "@
|
|
371
|
+
import { getModel } from "@eminent337/aery-ai";
|
|
372
|
+
import { AuthStorage, ModelRegistry } from "@eminent337/aery";
|
|
373
373
|
|
|
374
374
|
const authStorage = AuthStorage.create();
|
|
375
375
|
const modelRegistry = ModelRegistry.create(authStorage);
|
|
@@ -416,7 +416,7 @@ API key resolution priority (handled by AuthStorage):
|
|
|
416
416
|
4. Fallback resolver (for custom provider keys from `models.json`)
|
|
417
417
|
|
|
418
418
|
```typescript
|
|
419
|
-
import { AuthStorage, ModelRegistry } from "@
|
|
419
|
+
import { AuthStorage, ModelRegistry } from "@eminent337/aery";
|
|
420
420
|
|
|
421
421
|
// Default: uses ~/.pi/agent/auth.json and ~/.pi/agent/models.json
|
|
422
422
|
const authStorage = AuthStorage.create();
|
|
@@ -452,7 +452,7 @@ const simpleRegistry = ModelRegistry.inMemory(authStorage);
|
|
|
452
452
|
Use a `ResourceLoader` to override the system prompt:
|
|
453
453
|
|
|
454
454
|
```typescript
|
|
455
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
455
|
+
import { createAgentSession, DefaultResourceLoader } from "@eminent337/aery";
|
|
456
456
|
|
|
457
457
|
const loader = new DefaultResourceLoader({
|
|
458
458
|
systemPromptOverride: () => "You are a helpful assistant.",
|
|
@@ -472,7 +472,7 @@ import {
|
|
|
472
472
|
readOnlyTools, // read, grep, find, ls
|
|
473
473
|
readTool, bashTool, editTool, writeTool,
|
|
474
474
|
grepTool, findTool, lsTool,
|
|
475
|
-
} from "@
|
|
475
|
+
} from "@eminent337/aery";
|
|
476
476
|
|
|
477
477
|
// Use built-in tool set
|
|
478
478
|
const { session } = await createAgentSession({
|
|
@@ -500,7 +500,7 @@ import {
|
|
|
500
500
|
createGrepTool,
|
|
501
501
|
createFindTool,
|
|
502
502
|
createLsTool,
|
|
503
|
-
} from "@
|
|
503
|
+
} from "@eminent337/aery";
|
|
504
504
|
|
|
505
505
|
const cwd = "/path/to/project";
|
|
506
506
|
|
|
@@ -530,7 +530,7 @@ const { session } = await createAgentSession({
|
|
|
530
530
|
|
|
531
531
|
```typescript
|
|
532
532
|
import { Type } from "@sinclair/typebox";
|
|
533
|
-
import { createAgentSession, defineTool } from "@
|
|
533
|
+
import { createAgentSession, defineTool } from "@eminent337/aery";
|
|
534
534
|
|
|
535
535
|
// Inline custom tool
|
|
536
536
|
const myTool = defineTool({
|
|
@@ -563,7 +563,7 @@ Custom tools passed via `customTools` are combined with extension-registered too
|
|
|
563
563
|
Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.pi/agent/extensions/`, `.pi/extensions/`, and settings.json extension sources.
|
|
564
564
|
|
|
565
565
|
```typescript
|
|
566
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
566
|
+
import { createAgentSession, DefaultResourceLoader } from "@eminent337/aery";
|
|
567
567
|
|
|
568
568
|
const loader = new DefaultResourceLoader({
|
|
569
569
|
additionalExtensionPaths: ["/path/to/my-extension.ts"],
|
|
@@ -585,7 +585,7 @@ Extensions can register tools, subscribe to events, add commands, and more. See
|
|
|
585
585
|
**Event Bus:** Extensions can communicate via `pi.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside:
|
|
586
586
|
|
|
587
587
|
```typescript
|
|
588
|
-
import { createEventBus, DefaultResourceLoader } from "@
|
|
588
|
+
import { createEventBus, DefaultResourceLoader } from "@eminent337/aery";
|
|
589
589
|
|
|
590
590
|
const eventBus = createEventBus();
|
|
591
591
|
const loader = new DefaultResourceLoader({
|
|
@@ -605,7 +605,7 @@ import {
|
|
|
605
605
|
createAgentSession,
|
|
606
606
|
DefaultResourceLoader,
|
|
607
607
|
type Skill,
|
|
608
|
-
} from "@
|
|
608
|
+
} from "@eminent337/aery";
|
|
609
609
|
|
|
610
610
|
const customSkill: Skill = {
|
|
611
611
|
name: "my-skill",
|
|
@@ -631,7 +631,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
631
631
|
### Context Files
|
|
632
632
|
|
|
633
633
|
```typescript
|
|
634
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
634
|
+
import { createAgentSession, DefaultResourceLoader } from "@eminent337/aery";
|
|
635
635
|
|
|
636
636
|
const loader = new DefaultResourceLoader({
|
|
637
637
|
agentsFilesOverride: (current) => ({
|
|
@@ -655,7 +655,7 @@ import {
|
|
|
655
655
|
createAgentSession,
|
|
656
656
|
DefaultResourceLoader,
|
|
657
657
|
type PromptTemplate,
|
|
658
|
-
} from "@
|
|
658
|
+
} from "@eminent337/aery";
|
|
659
659
|
|
|
660
660
|
const customCommand: PromptTemplate = {
|
|
661
661
|
name: "deploy",
|
|
@@ -690,7 +690,7 @@ import {
|
|
|
690
690
|
createAgentSessionServices,
|
|
691
691
|
getAgentDir,
|
|
692
692
|
SessionManager,
|
|
693
|
-
} from "@
|
|
693
|
+
} from "@eminent337/aery";
|
|
694
694
|
|
|
695
695
|
// In-memory (no persistence)
|
|
696
696
|
const { session } = await createAgentSession({
|
|
@@ -784,7 +784,7 @@ sm.createBranchedSession(leafId); // Extract path to new file
|
|
|
784
784
|
### Settings Management
|
|
785
785
|
|
|
786
786
|
```typescript
|
|
787
|
-
import { createAgentSession, SettingsManager, SessionManager } from "@
|
|
787
|
+
import { createAgentSession, SettingsManager, SessionManager } from "@eminent337/aery";
|
|
788
788
|
|
|
789
789
|
// Default: loads from files (global + project merged)
|
|
790
790
|
const { session } = await createAgentSession({
|
|
@@ -840,7 +840,7 @@ Use `DefaultResourceLoader` to discover extensions, skills, prompts, themes, and
|
|
|
840
840
|
import {
|
|
841
841
|
DefaultResourceLoader,
|
|
842
842
|
getAgentDir,
|
|
843
|
-
} from "@
|
|
843
|
+
} from "@eminent337/aery";
|
|
844
844
|
|
|
845
845
|
const loader = new DefaultResourceLoader({
|
|
846
846
|
cwd,
|
|
@@ -881,7 +881,7 @@ interface LoadExtensionsResult {
|
|
|
881
881
|
## Complete Example
|
|
882
882
|
|
|
883
883
|
```typescript
|
|
884
|
-
import { getModel } from "@
|
|
884
|
+
import { getModel } from "@eminent337/aery-ai";
|
|
885
885
|
import { Type } from "@sinclair/typebox";
|
|
886
886
|
import {
|
|
887
887
|
AuthStorage,
|
|
@@ -893,7 +893,7 @@ import {
|
|
|
893
893
|
readTool,
|
|
894
894
|
SessionManager,
|
|
895
895
|
SettingsManager,
|
|
896
|
-
} from "@
|
|
896
|
+
} from "@eminent337/aery";
|
|
897
897
|
|
|
898
898
|
// Set up auth storage (custom location)
|
|
899
899
|
const authStorage = AuthStorage.create("/custom/agent/auth.json");
|
|
@@ -978,7 +978,7 @@ import {
|
|
|
978
978
|
getAgentDir,
|
|
979
979
|
InteractiveMode,
|
|
980
980
|
SessionManager,
|
|
981
|
-
} from "@
|
|
981
|
+
} from "@eminent337/aery";
|
|
982
982
|
|
|
983
983
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
984
984
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -1018,7 +1018,7 @@ import {
|
|
|
1018
1018
|
getAgentDir,
|
|
1019
1019
|
runPrintMode,
|
|
1020
1020
|
SessionManager,
|
|
1021
|
-
} from "@
|
|
1021
|
+
} from "@eminent337/aery";
|
|
1022
1022
|
|
|
1023
1023
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
1024
1024
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -1055,7 +1055,7 @@ import {
|
|
|
1055
1055
|
getAgentDir,
|
|
1056
1056
|
runRpcMode,
|
|
1057
1057
|
SessionManager,
|
|
1058
|
-
} from "@
|
|
1058
|
+
} from "@eminent337/aery";
|
|
1059
1059
|
|
|
1060
1060
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
1061
1061
|
const services = await createAgentSessionServices({ cwd });
|
package/docs/session.md
CHANGED
|
@@ -28,13 +28,13 @@ Existing sessions are automatically migrated to the current version (v3) when lo
|
|
|
28
28
|
|
|
29
29
|
## Source Files
|
|
30
30
|
|
|
31
|
-
Source on GitHub ([
|
|
31
|
+
Source on GitHub ([aery](https://github.com/eminent337/aery)):
|
|
32
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
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
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
35
|
- [`packages/agent/src/types.ts`](https://github.com/eminent337/aery/blob/main/packages/agent/src/types.ts) - AgentMessage union type
|
|
36
36
|
|
|
37
|
-
For TypeScript definitions in your project, inspect `node_modules/@
|
|
37
|
+
For TypeScript definitions in your project, inspect `node_modules/@eminent337/aery/dist/` and `node_modules/@eminent337/aery-ai/dist/`.
|
|
38
38
|
|
|
39
39
|
## Message Types
|
|
40
40
|
|
package/docs/skills.md
CHANGED
|
@@ -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
|
+
- [Aery Extensions](https://github.com/eminent337/aery-extensions) - Web search, browser automation, Google APIs, transcription
|
package/docs/termux.md
CHANGED
package/docs/tui.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks.
|
|
6
6
|
|
|
7
|
-
**Source:** [`@
|
|
7
|
+
**Source:** [`@eminent337/aery-tui`](https://github.com/eminent337/aery/tree/main/packages/tui)
|
|
8
8
|
|
|
9
9
|
## Component Interface
|
|
10
10
|
|
|
@@ -33,7 +33,7 @@ The TUI appends a full SGR reset and OSC 8 reset at the end of each rendered lin
|
|
|
33
33
|
Components that display a text cursor and need IME (Input Method Editor) support should implement the `Focusable` interface:
|
|
34
34
|
|
|
35
35
|
```typescript
|
|
36
|
-
import { CURSOR_MARKER, type Component, type Focusable } from "@
|
|
36
|
+
import { CURSOR_MARKER, type Component, type Focusable } from "@eminent337/aery-tui";
|
|
37
37
|
|
|
38
38
|
class MyInput implements Component, Focusable {
|
|
39
39
|
focused: boolean = false; // Set by TUI when focus changes
|
|
@@ -59,7 +59,7 @@ This enables IME candidate windows to appear at the correct position for CJK inp
|
|
|
59
59
|
When a container component (dialog, selector, etc.) contains an `Input` or `Editor` child, the container must implement `Focusable` and propagate the focus state to the child. Otherwise, the hardware cursor won't be positioned correctly for IME input.
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
|
-
import { Container, type Focusable, Input } from "@
|
|
62
|
+
import { Container, type Focusable, Input } from "@eminent337/aery-tui";
|
|
63
63
|
|
|
64
64
|
class SearchDialog extends Container implements Focusable {
|
|
65
65
|
private searchInput: Input;
|
|
@@ -179,10 +179,10 @@ See [overlay-qa-tests.ts](../examples/extensions/overlay-qa-tests.ts) for compre
|
|
|
179
179
|
|
|
180
180
|
## Built-in Components
|
|
181
181
|
|
|
182
|
-
Import from `@
|
|
182
|
+
Import from `@eminent337/aery-tui`:
|
|
183
183
|
|
|
184
184
|
```typescript
|
|
185
|
-
import { Text, Box, Container, Spacer, Markdown } from "@
|
|
185
|
+
import { Text, Box, Container, Spacer, Markdown } from "@eminent337/aery-tui";
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
### Text
|
|
@@ -264,7 +264,7 @@ const image = new Image(
|
|
|
264
264
|
Use `matchesKey()` for key detection:
|
|
265
265
|
|
|
266
266
|
```typescript
|
|
267
|
-
import { matchesKey, Key } from "@
|
|
267
|
+
import { matchesKey, Key } from "@eminent337/aery-tui";
|
|
268
268
|
|
|
269
269
|
handleInput(data: string) {
|
|
270
270
|
if (matchesKey(data, Key.up)) {
|
|
@@ -290,7 +290,7 @@ handleInput(data: string) {
|
|
|
290
290
|
**Critical:** Each line from `render()` must not exceed the `width` parameter.
|
|
291
291
|
|
|
292
292
|
```typescript
|
|
293
|
-
import { visibleWidth, truncateToWidth } from "@
|
|
293
|
+
import { visibleWidth, truncateToWidth } from "@eminent337/aery-tui";
|
|
294
294
|
|
|
295
295
|
render(width: number): string[] {
|
|
296
296
|
// Truncate long lines
|
|
@@ -311,7 +311,7 @@ Example: Interactive selector
|
|
|
311
311
|
import {
|
|
312
312
|
matchesKey, Key,
|
|
313
313
|
truncateToWidth, visibleWidth
|
|
314
|
-
} from "@
|
|
314
|
+
} from "@eminent337/aery-tui";
|
|
315
315
|
|
|
316
316
|
class MySelector {
|
|
317
317
|
private items: string[];
|
|
@@ -425,8 +425,8 @@ renderResult(result, options, theme, context) {
|
|
|
425
425
|
**For Markdown**, use `getMarkdownTheme()`:
|
|
426
426
|
|
|
427
427
|
```typescript
|
|
428
|
-
import { getMarkdownTheme } from "@
|
|
429
|
-
import { Markdown } from "@
|
|
428
|
+
import { getMarkdownTheme } from "@eminent337/aery";
|
|
429
|
+
import { Markdown } from "@eminent337/aery-tui";
|
|
430
430
|
|
|
431
431
|
renderResult(result, options, theme, context) {
|
|
432
432
|
const mdTheme = getMarkdownTheme();
|
|
@@ -587,12 +587,12 @@ These patterns cover the most common UI needs in extensions. **Copy these patter
|
|
|
587
587
|
|
|
588
588
|
### Pattern 1: Selection Dialog (SelectList)
|
|
589
589
|
|
|
590
|
-
For letting users pick from a list of options. Use `SelectList` from `@
|
|
590
|
+
For letting users pick from a list of options. Use `SelectList` from `@eminent337/aery-tui` with `DynamicBorder` for framing.
|
|
591
591
|
|
|
592
592
|
```typescript
|
|
593
|
-
import type { ExtensionAPI } from "@
|
|
594
|
-
import { DynamicBorder } from "@
|
|
595
|
-
import { Container, type SelectItem, SelectList, Text } from "@
|
|
593
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
594
|
+
import { DynamicBorder } from "@eminent337/aery";
|
|
595
|
+
import { Container, type SelectItem, SelectList, Text } from "@eminent337/aery-tui";
|
|
596
596
|
|
|
597
597
|
pi.registerCommand("pick", {
|
|
598
598
|
handler: async (_args, ctx) => {
|
|
@@ -650,7 +650,7 @@ pi.registerCommand("pick", {
|
|
|
650
650
|
For operations that take time and should be cancellable. `BorderedLoader` shows a spinner and handles escape to cancel.
|
|
651
651
|
|
|
652
652
|
```typescript
|
|
653
|
-
import { BorderedLoader } from "@
|
|
653
|
+
import { BorderedLoader } from "@eminent337/aery";
|
|
654
654
|
|
|
655
655
|
pi.registerCommand("fetch", {
|
|
656
656
|
handler: async (_args, ctx) => {
|
|
@@ -679,11 +679,11 @@ pi.registerCommand("fetch", {
|
|
|
679
679
|
|
|
680
680
|
### Pattern 3: Settings/Toggles (SettingsList)
|
|
681
681
|
|
|
682
|
-
For toggling multiple settings. Use `SettingsList` from `@
|
|
682
|
+
For toggling multiple settings. Use `SettingsList` from `@eminent337/aery-tui` with `getSettingsListTheme()`.
|
|
683
683
|
|
|
684
684
|
```typescript
|
|
685
|
-
import { getSettingsListTheme } from "@
|
|
686
|
-
import { Container, type SettingItem, SettingsList, Text } from "@
|
|
685
|
+
import { getSettingsListTheme } from "@eminent337/aery";
|
|
686
|
+
import { Container, type SettingItem, SettingsList, Text } from "@eminent337/aery-tui";
|
|
687
687
|
|
|
688
688
|
pi.registerCommand("settings", {
|
|
689
689
|
handler: async (_args, ctx) => {
|
|
@@ -822,8 +822,8 @@ Token stats available via `ctx.sessionManager.getBranch()` and `ctx.model`.
|
|
|
822
822
|
Replace the main input editor with a custom implementation. Useful for modal editing (vim), different keybindings (emacs), or specialized input handling.
|
|
823
823
|
|
|
824
824
|
```typescript
|
|
825
|
-
import { CustomEditor, type ExtensionAPI } from "@
|
|
826
|
-
import { matchesKey, truncateToWidth } from "@
|
|
825
|
+
import { CustomEditor, type ExtensionAPI } from "@eminent337/aery";
|
|
826
|
+
import { matchesKey, truncateToWidth } from "@eminent337/aery-tui";
|
|
827
827
|
|
|
828
828
|
type Mode = "normal" | "insert";
|
|
829
829
|
|
|
@@ -137,7 +137,7 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
|
|
137
137
|
See [docs/extensions.md](../../docs/extensions.md) for full documentation.
|
|
138
138
|
|
|
139
139
|
```typescript
|
|
140
|
-
import type { ExtensionAPI } from "@
|
|
140
|
+
import type { ExtensionAPI } from "@eminent337/aery";
|
|
141
141
|
import { Type } from "@sinclair/typebox";
|
|
142
142
|
|
|
143
143
|
export default function (pi: ExtensionAPI) {
|
|
@@ -179,7 +179,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
179
179
|
|
|
180
180
|
**Use StringEnum for string parameters** (required for Google API compatibility):
|
|
181
181
|
```typescript
|
|
182
|
-
import { StringEnum } from "@
|
|
182
|
+
import { StringEnum } from "@eminent337/aery-ai";
|
|
183
183
|
|
|
184
184
|
// Good
|
|
185
185
|
action: StringEnum(["list", "add"] as const)
|
|
@@ -43,4 +43,4 @@ Height is calculated from width to maintain DOOM's 3.2:1 aspect ratio (accountin
|
|
|
43
43
|
|
|
44
44
|
- [id Software](https://github.com/id-Software/DOOM) for the original DOOM
|
|
45
45
|
- [doomgeneric](https://github.com/ozkl/doomgeneric) for the portable DOOM implementation
|
|
46
|
-
- [
|
|
46
|
+
- [aery-doom](https://github.com/eminent337/aery) for the original pi integration
|
|
@@ -28,7 +28,7 @@ import { spawn } from "child_process";
|
|
|
28
28
|
let globalToggleHandle: OverlayHandle | null = null;
|
|
29
29
|
|
|
30
30
|
export default function (pi: ExtensionAPI) {
|
|
31
|
-
// Animation demo - proves overlays can handle real-time updates (like
|
|
31
|
+
// Animation demo - proves overlays can handle real-time updates (like aery-doom would need)
|
|
32
32
|
pi.registerCommand("overlay-animation", {
|
|
33
33
|
description: "Test real-time animation in overlay (~30 FPS)",
|
|
34
34
|
handler: async (_args: string, ctx: ExtensionCommandContext) => {
|
|
@@ -473,13 +473,13 @@ class StreamingOverflowComponent extends BaseOverlay {
|
|
|
473
473
|
echo ""
|
|
474
474
|
for i in $(seq 1 100); do
|
|
475
475
|
# Simulate long file paths with OSC 8 hyperlinks (clickable) - tests width overflow
|
|
476
|
-
DIR="/Users/nicobailon/Documents/development/
|
|
476
|
+
DIR="/Users/nicobailon/Documents/development/aery/packages/coding-agent/src/modes/interactive"
|
|
477
477
|
FILE="\${DIR}/components/very-long-component-name-that-exceeds-width-\${i}.ts"
|
|
478
478
|
echo -e "\\033]8;;file://\${FILE}\\007▶ read: \${FILE}\\033]8;;\\007"
|
|
479
479
|
|
|
480
480
|
# Add some colored status messages with long text
|
|
481
481
|
if [ $((i % 5)) -eq 0 ]; then
|
|
482
|
-
echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/
|
|
482
|
+
echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/aery\\033[0m"
|
|
483
483
|
fi
|
|
484
484
|
if [ $((i % 7)) -eq 0 ]; then
|
|
485
485
|
echo -e " \\033[33m⚠ Warning: potential issue detected at line \${i} in very-long-component-name-that-exceeds-width.ts\\033[0m"
|
|
@@ -743,7 +743,7 @@ class SidepanelComponent extends BaseOverlay {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
-
// Animation demo - proves overlays can handle real-time updates like
|
|
746
|
+
// Animation demo - proves overlays can handle real-time updates like aery-doom
|
|
747
747
|
class AnimationDemoComponent extends BaseOverlay {
|
|
748
748
|
private frame = 0;
|
|
749
749
|
private interval: ReturnType<typeof setInterval> | null = null;
|
|
@@ -819,7 +819,7 @@ class AnimationDemoComponent extends BaseOverlay {
|
|
|
819
819
|
lines.push(border("│") + padLine(``) + border("│"));
|
|
820
820
|
lines.push(border("│") + padLine(th.fg("dim", " This proves overlays can handle")) + border("│"));
|
|
821
821
|
lines.push(border("│") + padLine(th.fg("dim", " real-time game-like rendering.")) + border("│"));
|
|
822
|
-
lines.push(border("│") + padLine(th.fg("dim", " (
|
|
822
|
+
lines.push(border("│") + padLine(th.fg("dim", " (aery-doom uses same approach)")) + border("│"));
|
|
823
823
|
lines.push(border("│") + padLine(``) + border("│"));
|
|
824
824
|
lines.push(border("│") + padLine(th.fg("dim", " Press Esc to close")) + border("│"));
|
|
825
825
|
lines.push(border(`╰${"─".repeat(innerW)}╯`));
|
package/examples/sdk/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npx tsx examples/sdk/01-minimal.ts
|
|
|
32
32
|
## Quick Reference
|
|
33
33
|
|
|
34
34
|
```typescript
|
|
35
|
-
import { getModel } from "@
|
|
35
|
+
import { getModel } from "@eminent337/aery-ai";
|
|
36
36
|
import {
|
|
37
37
|
AuthStorage,
|
|
38
38
|
createAgentSession,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
codingTools,
|
|
44
44
|
readOnlyTools,
|
|
45
45
|
readTool, bashTool, editTool, writeTool,
|
|
46
|
-
} from "@
|
|
46
|
+
} from "@eminent337/aery";
|
|
47
47
|
|
|
48
48
|
// Auth and models setup
|
|
49
49
|
const authStorage = AuthStorage.create();
|