aiden-runtime 4.1.1 → 4.1.3
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 +78 -26
- package/dist/cli/v4/aidenCLI.js +169 -9
- package/dist/cli/v4/callbacks.js +20 -2
- package/dist/cli/v4/chatSession.js +644 -16
- package/dist/cli/v4/commands/auth.js +6 -3
- package/dist/cli/v4/commands/doctor.js +23 -27
- package/dist/cli/v4/commands/help.js +4 -0
- package/dist/cli/v4/commands/index.js +10 -1
- package/dist/cli/v4/commands/model.js +30 -1
- package/dist/cli/v4/commands/reloadSoul.js +37 -0
- package/dist/cli/v4/commands/update.js +102 -0
- package/dist/cli/v4/defaultSoul.js +68 -2
- package/dist/cli/v4/display/capabilityCard.js +135 -0
- package/dist/cli/v4/display/sessionEndCard.js +127 -0
- package/dist/cli/v4/display/toolTrail.js +172 -0
- package/dist/cli/v4/display.js +492 -142
- package/dist/cli/v4/doctor.js +472 -58
- package/dist/cli/v4/doctorLiveness.js +65 -10
- package/dist/cli/v4/promotionPrompt.js +332 -0
- package/dist/cli/v4/providerBootSelector.js +144 -0
- package/dist/cli/v4/replyRenderer.js +311 -20
- package/dist/cli/v4/sessionSummaryGate.js +66 -0
- package/dist/cli/v4/skinEngine.js +14 -3
- package/dist/cli/v4/toolPreview.js +153 -0
- package/dist/core/tools/nowPlaying.js +7 -15
- package/dist/core/v4/aidenAgent.js +91 -29
- package/dist/core/v4/capabilities.js +89 -0
- package/dist/core/v4/contextCompressor.js +25 -8
- package/dist/core/v4/distillationIndex.js +167 -0
- package/dist/core/v4/distillationStore.js +98 -0
- package/dist/core/v4/logger/logger.js +40 -9
- package/dist/core/v4/promotionCandidates.js +234 -0
- package/dist/core/v4/promptBuilder.js +145 -1
- package/dist/core/v4/sessionDistiller.js +452 -0
- package/dist/core/v4/skillMining/skillMiner.js +43 -6
- package/dist/core/v4/skillOutcomeTracker.js +323 -0
- package/dist/core/v4/subsystemHealth.js +143 -0
- package/dist/core/v4/toolRegistry.js +16 -1
- package/dist/core/v4/update/executeInstall.js +233 -0
- package/dist/core/version.js +1 -1
- package/dist/moat/memoryGuard.js +111 -0
- package/dist/moat/plannerGuard.js +19 -0
- package/dist/moat/skillTeacher.js +14 -5
- package/dist/providers/v4/chatCompletionsAdapter.js +9 -0
- package/dist/providers/v4/errors.js +112 -4
- package/dist/providers/v4/modelDefaults.js +65 -0
- package/dist/providers/v4/registry.js +9 -2
- package/dist/providers/v4/runtimeResolver.js +6 -0
- package/dist/tools/v4/index.js +80 -1
- package/dist/tools/v4/memory/memoryRemove.js +57 -2
- package/dist/tools/v4/memory/sessionSummary.js +151 -0
- package/dist/tools/v4/sessions/recallSession.js +177 -0
- package/dist/tools/v4/sessions/sessionSearch.js +5 -1
- package/dist/tools/v4/system/_psHelpers.js +123 -0
- package/dist/tools/v4/system/aidenSelfUpdate.js +162 -0
- package/dist/tools/v4/system/appClose.js +79 -0
- package/dist/tools/v4/system/appInput.js +154 -0
- package/dist/tools/v4/system/appLaunch.js +218 -0
- package/dist/tools/v4/system/clipboardRead.js +54 -0
- package/dist/tools/v4/system/clipboardWrite.js +84 -0
- package/dist/tools/v4/system/mediaKey.js +109 -0
- package/dist/tools/v4/system/mediaSessions.js +163 -0
- package/dist/tools/v4/system/mediaTransport.js +211 -0
- package/dist/tools/v4/system/osProcessList.js +99 -0
- package/dist/tools/v4/system/screenshot.js +106 -0
- package/dist/tools/v4/system/volumeSet.js +157 -0
- package/package.json +4 -1
- package/skills/system_control.md +185 -69
package/skills/system_control.md
CHANGED
|
@@ -1,69 +1,185 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: system_control
|
|
3
|
-
description: Windows desktop control — clipboard,
|
|
4
|
-
version:
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Skill: System Control
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
---
|
|
2
|
+
name: system_control
|
|
3
|
+
description: Windows desktop control — clipboard, screenshots, media, volume, apps
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: System Control
|
|
8
|
+
|
|
9
|
+
Interact with the Windows desktop: clipboard, screenshots, media playback,
|
|
10
|
+
volume, app launch/close, OS-wide process listing. All eight verbs below
|
|
11
|
+
are real registered tools — call them directly. The two verbs in the
|
|
12
|
+
"Not a tool yet" section route through `shell_exec` with the PowerShell
|
|
13
|
+
snippet shown.
|
|
14
|
+
|
|
15
|
+
Windows-only in v4.1.2. macOS/Linux callers get a structured error
|
|
16
|
+
pointing at the issue tracker; route to the user's clarifying-question
|
|
17
|
+
path if they need cross-platform coverage.
|
|
18
|
+
|
|
19
|
+
## Read-only verbs
|
|
20
|
+
|
|
21
|
+
### clipboard_read
|
|
22
|
+
Read the current clipboard contents as text. Empty string for non-text
|
|
23
|
+
clipboard data (image, RTF, file list). Privacy-sensitive — the
|
|
24
|
+
clipboard often holds passwords, OTPs, or personal text. Only call when
|
|
25
|
+
the user has clearly asked.
|
|
26
|
+
```json
|
|
27
|
+
{ "tool": "clipboard_read", "input": {} }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### screenshot
|
|
31
|
+
Capture the primary monitor as a PNG. Saves to
|
|
32
|
+
`<aidenHome>/screenshots/<timestamp>.png` and returns the absolute path.
|
|
33
|
+
Telegram / Discord channel adapters can attach the file directly via
|
|
34
|
+
the returned path. Privacy-sensitive — captures everything visible.
|
|
35
|
+
```json
|
|
36
|
+
{ "tool": "screenshot", "input": {} }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### os_process_list
|
|
40
|
+
List OS-wide running processes (top by CPU). Use this to answer
|
|
41
|
+
"is X running?" or "what's hogging my CPU?". Distinct from `process_list`
|
|
42
|
+
which only shows processes Aiden itself spawned via `process_spawn`.
|
|
43
|
+
```json
|
|
44
|
+
{ "tool": "os_process_list", "input": { "name": "claude" } }
|
|
45
|
+
{ "tool": "os_process_list", "input": { "limit": 50 } }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Mutating verbs (approval-gated)
|
|
49
|
+
|
|
50
|
+
### clipboard_write
|
|
51
|
+
Replace the clipboard with new text. Handles multi-line strings safely
|
|
52
|
+
(text routed via stdin to PowerShell, no shell-quoting issues).
|
|
53
|
+
```json
|
|
54
|
+
{ "tool": "clipboard_write", "input": { "text": "Hello, world!" } }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### media_sessions
|
|
58
|
+
Enumerate every Windows media session registered with the OS (Spotify,
|
|
59
|
+
YouTube in browser, VLC, etc.). One entry per app, with which one is
|
|
60
|
+
the OS-routed target for global media keys. Use this BEFORE
|
|
61
|
+
`media_transport` when controlling a specific app.
|
|
62
|
+
```json
|
|
63
|
+
{ "tool": "media_sessions", "input": {} }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### media_transport
|
|
67
|
+
Verified play / pause / skip against a specific GSMTC media session.
|
|
68
|
+
Targets by `AppUserModelId` substring (case-insensitive — "spotify"
|
|
69
|
+
matches `Spotify.exe`), then by track title as a softer fallback. Omit
|
|
70
|
+
`target` to act on the OS-routed current session. Returns OS-level
|
|
71
|
+
success/failure — NOT a blind keystroke like `media_key`.
|
|
72
|
+
```json
|
|
73
|
+
{ "tool": "media_transport", "input": { "action": "pause", "target": "spotify" } }
|
|
74
|
+
{ "tool": "media_transport", "input": { "action": "play", "target": "spotify" } }
|
|
75
|
+
{ "tool": "media_transport", "input": { "action": "next", "target": "youtube" } }
|
|
76
|
+
{ "tool": "media_transport", "input": { "action": "toggle" } }
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### media_key
|
|
80
|
+
Blind global media keypress (`VK_MEDIA_PLAY_PAUSE` and friends). Layer-3
|
|
81
|
+
fallback for the rare case where neither a semantic API nor GSMTC can
|
|
82
|
+
act. Prefer `media_transport` whenever the user names an app — this
|
|
83
|
+
tool returns `degraded:true` because Windows doesn't surface the SMTC
|
|
84
|
+
routing outcome to user-mode, so we can't verify any app received it.
|
|
85
|
+
```json
|
|
86
|
+
{ "tool": "media_key", "input": { "action": "play_pause" } }
|
|
87
|
+
{ "tool": "media_key", "input": { "action": "next" } }
|
|
88
|
+
{ "tool": "media_key", "input": { "action": "previous" } }
|
|
89
|
+
{ "tool": "media_key", "input": { "action": "stop" } }
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### app_input
|
|
93
|
+
Focus a Windows application by process name and send a SendKeys
|
|
94
|
+
sequence to it. Escape hatch when GSMTC doesn't enumerate the surface
|
|
95
|
+
("press space in Chrome to pause this YouTube tab"). Always returns
|
|
96
|
+
`degraded:true` — SendKeys cannot verify receipt at the target window.
|
|
97
|
+
```json
|
|
98
|
+
{ "tool": "app_input", "input": { "app": "chrome", "keys": "{SPACE}" } }
|
|
99
|
+
{ "tool": "app_input", "input": { "app": "notepad", "keys": "Hello{ENTER}" } }
|
|
100
|
+
{ "tool": "app_input", "input": { "app": "Spotify", "keys": "^{RIGHT}" } }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### volume_set
|
|
104
|
+
Set Windows master volume to a percentage, or mute / unmute / toggle.
|
|
105
|
+
```json
|
|
106
|
+
{ "tool": "volume_set", "input": { "action": "set", "percent": 30 } }
|
|
107
|
+
{ "tool": "volume_set", "input": { "action": "mute" } }
|
|
108
|
+
{ "tool": "volume_set", "input": { "action": "toggle_mute" } }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### app_launch
|
|
112
|
+
Launch a Windows application by exe name, friendly name (resolved via
|
|
113
|
+
App Paths registry), or absolute path. Returns the PID when available.
|
|
114
|
+
```json
|
|
115
|
+
{ "tool": "app_launch", "input": { "app": "spotify" } }
|
|
116
|
+
{ "tool": "app_launch", "input": { "app": "notepad", "args": ["C:\\temp\\note.txt"] } }
|
|
117
|
+
{ "tool": "app_launch", "input": { "app": "C:\\Program Files\\App\\app.exe" } }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### app_close
|
|
121
|
+
Close one or more processes by name (with or without the `.exe`
|
|
122
|
+
suffix). Matches all running instances. Set `force: true` to skip the
|
|
123
|
+
app's graceful-shutdown prompt.
|
|
124
|
+
```json
|
|
125
|
+
{ "tool": "app_close", "input": { "app": "notepad" } }
|
|
126
|
+
{ "tool": "app_close", "input": { "app": "chrome.exe", "force": true } }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Not a tool yet — route via `shell_exec`
|
|
130
|
+
|
|
131
|
+
### Focus a window by title
|
|
132
|
+
v4.1.2 does not ship a `window_focus` tool — Win32 P/Invoke complexity
|
|
133
|
+
isn't worth a dedicated tool when shell_exec covers the same ground.
|
|
134
|
+
```powershell
|
|
135
|
+
(New-Object -ComObject WScript.Shell).AppActivate('Notepad')
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### List visible windows
|
|
139
|
+
Same reasoning. The MainWindowTitle filter excludes background services.
|
|
140
|
+
```powershell
|
|
141
|
+
Get-Process | Where-Object { $_.MainWindowTitle } |
|
|
142
|
+
Select-Object Id, ProcessName, MainWindowTitle |
|
|
143
|
+
ConvertTo-Json -Compress
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Wrap either snippet in `shell_exec` when the user explicitly asks for
|
|
147
|
+
window manipulation. Track v4.1.3+ for native tool wrappers if these
|
|
148
|
+
turn into common requests.
|
|
149
|
+
|
|
150
|
+
## Usage Patterns
|
|
151
|
+
|
|
152
|
+
**Copy file content to clipboard after writing it:**
|
|
153
|
+
1. `file_write` → write the content
|
|
154
|
+
2. `clipboard_write` → copy the file path or content
|
|
155
|
+
|
|
156
|
+
**Confirm an app launched:**
|
|
157
|
+
1. `app_launch` → returns PID
|
|
158
|
+
2. `os_process_list` with the app's name → verify it's still running
|
|
159
|
+
|
|
160
|
+
**"Is X running?" workflow:**
|
|
161
|
+
1. `os_process_list` with `name: "<substring>"` → returns matching processes
|
|
162
|
+
2. If `count === 0` → tell the user honestly, suggest `app_launch`
|
|
163
|
+
|
|
164
|
+
## Media control — strict order
|
|
165
|
+
|
|
166
|
+
1. If the user names an app ("Spotify", "YouTube", "VLC") — ALWAYS try
|
|
167
|
+
`media_transport({action, target})` first. Verified, OS-confirmed.
|
|
168
|
+
2. If `media_transport` returns `NoSession` OR the user didn't name an app
|
|
169
|
+
— fall back to `media_key({action})`. Blind global keystroke, returns
|
|
170
|
+
`degraded:true` because Windows can't tell us if anything received it.
|
|
171
|
+
3. If GSMTC doesn't enumerate the surface at all (e.g. a YouTube tab the
|
|
172
|
+
browser hasn't registered with SMTC) — last resort: `app_input({app,
|
|
173
|
+
keys})` to focus the window and send a keystroke directly.
|
|
174
|
+
|
|
175
|
+
Never call `media_key` and `media_transport` in the same turn — redundant.
|
|
176
|
+
First call gives you the answer; second is noise the user has to read.
|
|
177
|
+
|
|
178
|
+
Honesty contract:
|
|
179
|
+
- `media_transport` success is OS-confirmed → trail row is silent (success).
|
|
180
|
+
- `media_key` and `app_input` always report `degraded:true` → yellow trail
|
|
181
|
+
row, because neither can verify receipt at the target app.
|
|
182
|
+
|
|
183
|
+
**Volume change with feedback:**
|
|
184
|
+
1. `volume_set` → returns the resulting volume percent in `result`
|
|
185
|
+
2. Surface it to the user so they know the change landed.
|