aiden-runtime 4.1.1 → 4.1.2

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.
Files changed (55) hide show
  1. package/README.md +78 -26
  2. package/dist/cli/v4/aidenCLI.js +159 -9
  3. package/dist/cli/v4/callbacks.js +5 -2
  4. package/dist/cli/v4/chatSession.js +525 -15
  5. package/dist/cli/v4/commands/auth.js +6 -3
  6. package/dist/cli/v4/commands/help.js +4 -0
  7. package/dist/cli/v4/commands/index.js +10 -1
  8. package/dist/cli/v4/commands/reloadSoul.js +37 -0
  9. package/dist/cli/v4/commands/update.js +102 -0
  10. package/dist/cli/v4/defaultSoul.js +68 -2
  11. package/dist/cli/v4/display.js +28 -10
  12. package/dist/cli/v4/doctor.js +112 -0
  13. package/dist/cli/v4/doctorLiveness.js +65 -10
  14. package/dist/cli/v4/promotionPrompt.js +202 -0
  15. package/dist/cli/v4/providerBootSelector.js +144 -0
  16. package/dist/cli/v4/sessionSummaryGate.js +66 -0
  17. package/dist/cli/v4/toolPreview.js +139 -0
  18. package/dist/core/v4/aidenAgent.js +91 -29
  19. package/dist/core/v4/capabilities.js +89 -0
  20. package/dist/core/v4/contextCompressor.js +25 -8
  21. package/dist/core/v4/distillationIndex.js +167 -0
  22. package/dist/core/v4/distillationStore.js +98 -0
  23. package/dist/core/v4/logger/logger.js +40 -9
  24. package/dist/core/v4/promotionCandidates.js +234 -0
  25. package/dist/core/v4/promptBuilder.js +145 -1
  26. package/dist/core/v4/sessionDistiller.js +405 -0
  27. package/dist/core/v4/skillMining/skillMiner.js +43 -6
  28. package/dist/core/v4/skillOutcomeTracker.js +323 -0
  29. package/dist/core/v4/subsystemHealth.js +143 -0
  30. package/dist/core/v4/update/executeInstall.js +233 -0
  31. package/dist/core/version.js +1 -1
  32. package/dist/moat/memoryGuard.js +111 -0
  33. package/dist/moat/skillTeacher.js +14 -5
  34. package/dist/providers/v4/chatCompletionsAdapter.js +9 -0
  35. package/dist/providers/v4/errors.js +20 -4
  36. package/dist/providers/v4/modelDefaults.js +65 -0
  37. package/dist/providers/v4/registry.js +9 -2
  38. package/dist/providers/v4/runtimeResolver.js +6 -0
  39. package/dist/tools/v4/index.js +57 -1
  40. package/dist/tools/v4/memory/memoryRemove.js +57 -2
  41. package/dist/tools/v4/memory/sessionSummary.js +151 -0
  42. package/dist/tools/v4/sessions/recallSession.js +163 -0
  43. package/dist/tools/v4/sessions/sessionSearch.js +5 -1
  44. package/dist/tools/v4/system/_psHelpers.js +55 -0
  45. package/dist/tools/v4/system/aidenSelfUpdate.js +162 -0
  46. package/dist/tools/v4/system/appClose.js +79 -0
  47. package/dist/tools/v4/system/appLaunch.js +92 -0
  48. package/dist/tools/v4/system/clipboardRead.js +54 -0
  49. package/dist/tools/v4/system/clipboardWrite.js +84 -0
  50. package/dist/tools/v4/system/mediaKey.js +78 -0
  51. package/dist/tools/v4/system/osProcessList.js +99 -0
  52. package/dist/tools/v4/system/screenshot.js +106 -0
  53. package/dist/tools/v4/system/volumeSet.js +157 -0
  54. package/package.json +4 -1
  55. package/skills/system_control.md +135 -69
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiden-runtime",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -77,6 +77,9 @@
77
77
  "dist:linux": "node scripts/prepare-electron.js && electron-builder --linux --x64 --publish never && node -e \"const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.main='./dist/index.js';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n');console.log(' main restored')\"",
78
78
  "test": "vitest run",
79
79
  "test:ui": "vitest --ui",
80
+ "eval": "ts-node evals/cli.ts",
81
+ "eval:honesty": "ts-node evals/cli.ts --suite honesty",
82
+ "eval:scenario": "ts-node evals/cli.ts --scenario",
80
83
  "stress-test": "npx ts-node tests/stressTest.ts",
81
84
  "test:all": "npx ts-node tests/e2e/masterTestSuite.ts",
82
85
  "test:unit": "npx ts-node tests/e2e/masterTestSuite.ts --part1",
@@ -1,69 +1,135 @@
1
- ---
2
- name: system_control
3
- description: Windows desktop control — clipboard, windows, running applications
4
- version: 1.0.0
5
- ---
6
-
7
- # Skill: System Control
8
-
9
- Use these tools to interact with the Windows desktop environment — clipboard, open windows, and running applications.
10
-
11
- ## Tools
12
-
13
- ### clipboard_read
14
- Read the current contents of the Windows clipboard.
15
- ```json
16
- { "tool": "clipboard_read", "input": {} }
17
- ```
18
-
19
- ### clipboard_write
20
- Write text to the Windows clipboard.
21
- ```json
22
- { "tool": "clipboard_write", "input": { "text": "Hello, world!" } }
23
- ```
24
-
25
- ### window_list
26
- List all visible windows currently open on the desktop, with their process IDs, process names, and window titles.
27
- ```json
28
- { "tool": "window_list", "input": {} }
29
- ```
30
-
31
- ### window_focus
32
- Bring a specific window to the foreground by its title (or partial title).
33
- ```json
34
- { "tool": "window_focus", "input": { "title": "Notepad" } }
35
- ```
36
-
37
- ### app_launch
38
- Launch an application by executable name or full path.
39
- ```json
40
- { "tool": "app_launch", "input": { "app": "notepad.exe" } }
41
- { "tool": "app_launch", "input": { "app": "C:\\Program Files\\App\\app.exe" } }
42
- ```
43
-
44
- ### app_close
45
- Close a running process by its process name (without .exe extension is also accepted).
46
- ```json
47
- { "tool": "app_close", "input": { "app": "notepad" } }
48
- ```
49
-
50
- ## Usage Patterns
51
-
52
- **Copy result to clipboard after creating a file:**
53
- 1. `file_write` → write the content
54
- 2. `clipboard_write` copy the file path or content to clipboard
55
-
56
- **Open an app and confirm it's running:**
57
- 1. `app_launch` → launch the app
58
- 2. `window_list` verify window appears
59
-
60
- **Switch focus during automation:**
61
- 1. `window_list` → find the correct window title
62
- 2. `window_focus` bring it forward
63
- 3. `keyboard_type` type into it
64
-
65
- ## Notes
66
- - `app_close` uses `Stop-Process -Force`; the process terminates immediately without a save prompt.
67
- - `window_focus` uses `Microsoft.VisualBasic.Interaction.AppActivate`; partial title matches work.
68
- - All tools are Windows-only (PowerShell-backed).
69
- - `app_launch` is gated by CommandGate dangerous executables are blocked automatically.
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_key
58
+ Send a media-control key to the active media session (Spotify, YouTube
59
+ in browser, Windows Media Player, etc.). Pair with `now_playing` to
60
+ inspect state first.
61
+ ```json
62
+ { "tool": "media_key", "input": { "action": "play_pause" } }
63
+ { "tool": "media_key", "input": { "action": "next" } }
64
+ { "tool": "media_key", "input": { "action": "previous" } }
65
+ { "tool": "media_key", "input": { "action": "stop" } }
66
+ ```
67
+
68
+ ### volume_set
69
+ Set Windows master volume to a percentage, or mute / unmute / toggle.
70
+ ```json
71
+ { "tool": "volume_set", "input": { "action": "set", "percent": 30 } }
72
+ { "tool": "volume_set", "input": { "action": "mute" } }
73
+ { "tool": "volume_set", "input": { "action": "toggle_mute" } }
74
+ ```
75
+
76
+ ### app_launch
77
+ Launch a Windows application by exe name, friendly name (resolved via
78
+ App Paths registry), or absolute path. Returns the PID when available.
79
+ ```json
80
+ { "tool": "app_launch", "input": { "app": "spotify" } }
81
+ { "tool": "app_launch", "input": { "app": "notepad", "args": ["C:\\temp\\note.txt"] } }
82
+ { "tool": "app_launch", "input": { "app": "C:\\Program Files\\App\\app.exe" } }
83
+ ```
84
+
85
+ ### app_close
86
+ Close one or more processes by name (with or without the `.exe`
87
+ suffix). Matches all running instances. Set `force: true` to skip the
88
+ app's graceful-shutdown prompt.
89
+ ```json
90
+ { "tool": "app_close", "input": { "app": "notepad" } }
91
+ { "tool": "app_close", "input": { "app": "chrome.exe", "force": true } }
92
+ ```
93
+
94
+ ## Not a tool yet — route via `shell_exec`
95
+
96
+ ### Focus a window by title
97
+ v4.1.2 does not ship a `window_focus` tool — Win32 P/Invoke complexity
98
+ isn't worth a dedicated tool when shell_exec covers the same ground.
99
+ ```powershell
100
+ (New-Object -ComObject WScript.Shell).AppActivate('Notepad')
101
+ ```
102
+
103
+ ### List visible windows
104
+ Same reasoning. The MainWindowTitle filter excludes background services.
105
+ ```powershell
106
+ Get-Process | Where-Object { $_.MainWindowTitle } |
107
+ Select-Object Id, ProcessName, MainWindowTitle |
108
+ ConvertTo-Json -Compress
109
+ ```
110
+
111
+ Wrap either snippet in `shell_exec` when the user explicitly asks for
112
+ window manipulation. Track v4.1.3+ for native tool wrappers if these
113
+ turn into common requests.
114
+
115
+ ## Usage Patterns
116
+
117
+ **Copy file content to clipboard after writing it:**
118
+ 1. `file_write` → write the content
119
+ 2. `clipboard_write` → copy the file path or content
120
+
121
+ **Confirm an app launched:**
122
+ 1. `app_launch` → returns PID
123
+ 2. `os_process_list` with the app's name → verify it's still running
124
+
125
+ **"Is X running?" workflow:**
126
+ 1. `os_process_list` with `name: "<substring>"` → returns matching processes
127
+ 2. If `count === 0` → tell the user honestly, suggest `app_launch`
128
+
129
+ **Media control workflow:**
130
+ 1. `now_playing` → see what's currently playing
131
+ 2. `media_key` → control it (play_pause / next / previous / stop)
132
+
133
+ **Volume change with feedback:**
134
+ 1. `volume_set` → returns the resulting volume percent in `result`
135
+ 2. Surface it to the user so they know the change landed.