@link-assistant/agent 0.8.15 → 0.8.17
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/README.md +63 -4
- package/package.json +1 -1
- package/src/cli/event-handler.js +1 -1
- package/src/session/processor.ts +3 -3
package/README.md
CHANGED
|
@@ -46,18 +46,77 @@ This is an MVP implementation of an OpenCode-compatible CLI agent, focused on ma
|
|
|
46
46
|
|
|
47
47
|
## Installation
|
|
48
48
|
|
|
49
|
+
### Step-by-step (recommended for first-time users)
|
|
50
|
+
|
|
49
51
|
```bash
|
|
50
|
-
# Install Bun
|
|
52
|
+
# Step 1: Install Bun (skip if already installed)
|
|
51
53
|
curl -fsSL https://bun.sh/install | bash
|
|
52
54
|
|
|
53
|
-
#
|
|
55
|
+
# Step 2: Apply PATH changes (IMPORTANT — required before using bun)
|
|
56
|
+
source ~/.bashrc # For Bash (default on most Linux systems)
|
|
57
|
+
# source ~/.zshrc # For Zsh (default on macOS)
|
|
58
|
+
|
|
59
|
+
# Step 3: Verify Bun is installed
|
|
60
|
+
bun --version
|
|
61
|
+
|
|
62
|
+
# Step 4: Install the agent globally
|
|
63
|
+
bun install -g @link-assistant/agent
|
|
64
|
+
|
|
65
|
+
# Step 5: Verify the agent is installed
|
|
66
|
+
agent --version
|
|
67
|
+
|
|
68
|
+
# Step 6: Run for a test
|
|
69
|
+
echo "hi" | agent
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Quick install (if you already have Bun)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
54
75
|
bun install -g @link-assistant/agent
|
|
76
|
+
```
|
|
55
77
|
|
|
56
|
-
|
|
78
|
+
### Local install (in your project)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
57
81
|
bun add @link-assistant/agent
|
|
58
82
|
```
|
|
59
83
|
|
|
60
|
-
After installation, the `agent` command will be available
|
|
84
|
+
After global installation, the `agent` command will be available in any terminal session.
|
|
85
|
+
|
|
86
|
+
### Troubleshooting
|
|
87
|
+
|
|
88
|
+
**`bun: command not found` after installation:**
|
|
89
|
+
|
|
90
|
+
The Bun installer adds `~/.bun/bin` to your shell configuration file, but the change only takes effect after reloading it. Run:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
source ~/.bashrc # or source ~/.zshrc for Zsh
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Or restart your terminal.
|
|
97
|
+
|
|
98
|
+
**`agent: command not found` after `bun install -g`:**
|
|
99
|
+
|
|
100
|
+
Global packages installed by Bun are placed in `~/.bun/bin`. If this directory is not in your PATH, the `agent` command won't be found. Ensure your shell configuration includes:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
export BUN_INSTALL="$HOME/.bun"
|
|
104
|
+
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Then reload with `source ~/.bashrc` (or `~/.zshrc`), or restart your terminal.
|
|
108
|
+
|
|
109
|
+
**Still not working?**
|
|
110
|
+
|
|
111
|
+
Try reinstalling Bun from scratch:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
rm -rf ~/.bun
|
|
115
|
+
curl -fsSL https://bun.sh/install | bash
|
|
116
|
+
source ~/.bashrc
|
|
117
|
+
bun install -g @link-assistant/agent
|
|
118
|
+
agent --version
|
|
119
|
+
```
|
|
61
120
|
|
|
62
121
|
## Uninstallation
|
|
63
122
|
|
package/package.json
CHANGED
package/src/cli/event-handler.js
CHANGED
package/src/session/processor.ts
CHANGED
|
@@ -188,7 +188,7 @@ export namespace SessionProcessor {
|
|
|
188
188
|
await Session.updatePart({
|
|
189
189
|
...match,
|
|
190
190
|
state: {
|
|
191
|
-
status: '
|
|
191
|
+
status: 'error',
|
|
192
192
|
input: value.input,
|
|
193
193
|
error: (value.error as any).toString(),
|
|
194
194
|
metadata: undefined,
|
|
@@ -377,13 +377,13 @@ export namespace SessionProcessor {
|
|
|
377
377
|
if (
|
|
378
378
|
part.type === 'tool' &&
|
|
379
379
|
part.state.status !== 'completed' &&
|
|
380
|
-
part.state.status !== '
|
|
380
|
+
part.state.status !== 'error'
|
|
381
381
|
) {
|
|
382
382
|
await Session.updatePart({
|
|
383
383
|
...part,
|
|
384
384
|
state: {
|
|
385
385
|
...part.state,
|
|
386
|
-
status: '
|
|
386
|
+
status: 'error',
|
|
387
387
|
error: 'Tool execution aborted',
|
|
388
388
|
time: {
|
|
389
389
|
start: Date.now(),
|