@eminent337/aery 0.1.18 → 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/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/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +7 -7
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +2 -2
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +4 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +2 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- 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/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();
|