Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
608d3f2
Add Claude Code-like terminal UI features to interactiveApp
steveluc Feb 3, 2026
8d016b9
Merge remote-tracking branch 'origin/main' into add-terminal-ui-featu…
steveluc Feb 3, 2026
6893912
Add enhanced CLI console with debug logging and grammar result display
steveluc Feb 3, 2026
93938c4
Fix grammar file paths and entity validation for dynamic rule generation
steveluc Feb 3, 2026
a15f0f3
Add grammar generation result logging and clean up startup noise
steveluc Feb 3, 2026
e178dd1
Show generated rule on rejection for debugging
steveluc Feb 3, 2026
90d57c7
Register built-in entities and fix case-insensitive type matching
steveluc Feb 3, 2026
be61861
Register lowercase aliases for paramSpec types instead of case-insens…
steveluc Feb 3, 2026
8b266d2
Format CLI files with prettier
steveluc Feb 3, 2026
c7721c3
Fix grammar notifications and entity wildcard handling
steveluc Feb 3, 2026
339ef52
Fix list grammar: add specific rule for "what's on" pattern
steveluc Feb 3, 2026
8d8b198
Fix list grammar to handle 'the' as optional article, add markdown te…
steveluc Feb 3, 2026
573b42a
Fix actions without parameters getting empty parameters object
steveluc Feb 3, 2026
4d33b2b
Add next/skip commands to player grammar
steveluc Feb 3, 2026
98ca810
Fix package.json sorting for repo policy check
steveluc Feb 3, 2026
107b840
Fix html-to-text configuration with invalid format names
steveluc Feb 3, 2026
7d40d17
Fix getList grammar rule that was too permissive
steveluc Feb 3, 2026
f589747
Strip trailing punctuation in NFA tokenizer for better matching
steveluc Feb 3, 2026
8f446ee
Fix prettier formatting in listGrammar.spec.ts
steveluc Feb 3, 2026
f774d73
Fix CodeQL polynomial regex warning with linear-time approach
steveluc Feb 3, 2026
b7e4f00
Fix ordinal value propagation in NFA grammar matching
steveluc Feb 6, 2026
be59330
Merge remote-tracking branch 'origin/main' into fix-ordinal-environme…
steveluc Feb 6, 2026
a0da74c
Add 50 Windows settings actions to desktop agent
steveluc Feb 6, 2026
6c4468c
Add missing copyright header to test-grammar-matching.mjs
steveluc Feb 6, 2026
35bc3ec
Remove incomplete desktopGrammar.test.ts causing build failures
steveluc Feb 6, 2026
5136e02
Refactor desktop agent actions into sub-categories
steveluc Feb 6, 2026
e78b714
Merge main into fix-ordinal-environment-pop
steveluc Feb 6, 2026
68540dc
Add comprehensive end-to-end testing instructions for desktop agent
steveluc Feb 6, 2026
cb8cd06
Add sub-schema compilation and manifest configuration for desktop agent
steveluc Feb 6, 2026
58a4ee6
Merge add-terminal-ui-features-v2 to get latest CLI enhancements
steveluc Feb 6, 2026
6c96283
Add inline command completion to CLI interactive mode
steveluc Feb 6, 2026
bdf6a8d
Merge remote-tracking branch 'origin/main' into desktop-agent-improve…
steveluc Feb 6, 2026
77717f2
Run prettier:fix and fix policy violations
steveluc Feb 6, 2026
46f0594
Update pnpm lockfile
steveluc Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
328 changes: 328 additions & 0 deletions ts/packages/agents/desktop/END_TO_END_TEST_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
# Desktop Agent End-to-End Testing Instructions

## ✅ Pre-Test Verification

**Grammar Test Status:** ✅ All 32 tests passing (100% success rate)
**Build Status:** ✅ TypeScript, Action Schema, Grammar compiled successfully
**C# Backend:** ✅ autoShell.exe (148KB) ready at `dotnet/autoShell/bin/Debug/autoShell.exe`

---

## 🚀 Starting TypeAgent CLI

### Option 1: From the CLI package

```bash
cd ts/packages/cli
pnpm start
```

### Option 2: Using the root script (if available)

```bash
cd ts
pnpm run cli
```

---

## 🧪 Test Commands

### Category 1: Network Settings (3 actions)

```
@desktop turn on bluetooth
@desktop disable wifi
@desktop enable metered connection
```

**Expected:**

- Bluetooth toggles on/off
- WiFi adapter enables/disables
- Metered connection setting changes

---

### Category 2: Display Settings (7 actions)

```
@desktop increase brightness
@desktop make the screen dimmer
@desktop enable night light
@desktop set orientation to landscape
@desktop lock rotation
```

**Expected:**

- Screen brightness adjusts
- Night light schedule configured
- Screen orientation changes

---

### Category 3: Personalization (3 actions)

```
@desktop enable transparency
@desktop show accent color on title bars
@desktop enable high contrast
```

**Expected:**

- Transparency effects toggle
- Title bar colors change
- High contrast settings dialog opens

---

### Category 4: Taskbar Settings (7 actions)

```
@desktop auto hide taskbar
@desktop center the taskbar
@desktop show task view button
@desktop hide widgets
@desktop show seconds in clock
```

**Expected:**

- Taskbar auto-hides or shows
- Taskbar moves to center/left
- Task view button visibility changes
- Widgets button hides
- Clock shows/hides seconds

---

### Category 5: Mouse Settings (8 actions)

```
@desktop set mouse speed to 12
@desktop scroll 5 lines per notch
@desktop swap mouse buttons
@desktop enable mouse acceleration
```

**Expected:**

- Mouse cursor speed changes
- Scroll wheel behavior adjusts
- Primary mouse button switches
- Pointer precision toggles

---

### Category 6: Privacy Settings (3 actions)

```
@desktop allow microphone access
@desktop deny camera access
@desktop enable location services
```

**Expected:**

- Privacy settings dialogs open or settings change
- App permissions for mic/camera/location adjust

---

### Category 7: Power Settings (3 actions)

```
@desktop set battery saver to 20 percent
@desktop set power mode to best performance
```

**Expected:**

- Battery saver threshold changes
- Power mode switches (performance/balanced/efficiency)

---

### Category 8: Accessibility Settings (5 actions)

```
@desktop start narrator
@desktop turn off magnifier
@desktop enable sticky keys
```

**Expected:**

- Narrator starts/stops
- Magnifier launches or closes
- Sticky keys toggles on/off

---

### Category 9: File Explorer Settings (2 actions)

```
@desktop show file extensions
@desktop show hidden files
```

**Expected:**

- File Explorer shows/hides file extensions
- Hidden and system files become visible/hidden

---

### Category 10: Existing Actions (baseline test)

```
@desktop set theme to dark
@desktop set volume to 50
@desktop launch notepad
```

**Expected:**

- Windows theme switches to dark mode
- System volume changes to 50%
- Notepad application launches

---

## 🔍 What to Verify

### 1. Grammar Matching

- [ ] TypeAgent correctly interprets natural language commands
- [ ] Action names and parameters extracted correctly
- [ ] Confirmation messages displayed

### 2. JSON Protocol

- [ ] TypeScript → C# communication works
- [ ] autoShell.exe receives correct JSON commands
- [ ] Parameters passed correctly (numbers, booleans, enums)

### 3. Windows API Execution

- [ ] Registry changes persist
- [ ] Win32 API calls succeed
- [ ] WMI commands execute (brightness)
- [ ] COM interop works (Bluetooth)

### 4. Error Handling

- [ ] Invalid parameters handled gracefully
- [ ] Missing autoShell.exe detected
- [ ] Permission errors reported clearly

---

## 🐛 Debugging Tips

### Check autoShell.exe Output

The C# process outputs debug information. Look for:

```
Received: {"actionName": "...", "parameters": {...}}
```

### Enable Debug Logging

Set environment variable:

```bash
set DEBUG=typeagent:desktop*
```

### Verify Grammar Matching

Use the standalone test script:

```bash
cd ts/packages/agents/desktop
node test-grammar-matching.mjs
```

### Check Compiled Files

Verify these exist:

- `dist/desktopSchema.ag.json` (53KB) - Compiled grammar
- `dist/desktopSchema.pas.json` (37KB) - Parsed action schema
- `../../dotnet/autoShell/bin/Debug/autoShell.exe` (148KB) - C# backend

---

## 📊 Success Criteria

- ✅ All grammar test phrases (32/32) match correctly
- ✅ TypeAgent CLI launches without errors
- ✅ @desktop agent is available and responding
- ✅ At least 10 different actions execute successfully
- ✅ Settings actually change in Windows (verify in Settings app)
- ✅ No crashes or exceptions in autoShell.exe
- ✅ Confirmation messages accurate and helpful

---

## ⚠️ Known Limitations

1. Some actions require **Administrator privileges** (e.g., Bluetooth, WiFi)
2. **WMI-based actions** (brightness) may fail on some hardware
3. Some settings open **dialogs** rather than changing directly (by design)
4. **Windows 11 specific** features may not work on Windows 10

---

## 📝 Test Results Template

After testing, document results:

```markdown
## Test Session: [Date]

**Environment:**

- OS: Windows 11/10
- TypeAgent CLI Version:
- Node Version:

**Results:**

- Network Settings: [ ] Pass [ ] Fail [ ] N/A
- Display Settings: [ ] Pass [ ] Fail [ ] N/A
- Personalization: [ ] Pass [ ] Fail [ ] N/A
- Taskbar: [ ] Pass [ ] Fail [ ] N/A
- Mouse: [ ] Pass [ ] Fail [ ] N/A
- Privacy: [ ] Pass [ ] Fail [ ] N/A
- Power: [ ] Pass [ ] Fail [ ] N/A
- Accessibility: [ ] Pass [ ] Fail [ ] N/A
- File Explorer: [ ] Pass [ ] Fail [ ] N/A

**Issues Found:**

1. [Describe any issues]

**Notes:**
[Additional observations]
```

---

## 🎯 Quick Smoke Test (5 minutes)

Run these 5 commands to verify basic functionality:

```
@desktop set theme to dark
@desktop increase brightness
@desktop center the taskbar
@desktop set mouse speed to 15
@desktop show file extensions
```

If all 5 work, the integration is solid! 🎉
10 changes: 9 additions & 1 deletion ts/packages/agents/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
"scripts": {
"agc": "agc -i ./src/desktopSchema.agr -o ./dist/desktopSchema.ag.json",
"asc": "asc -i ./src/actionsSchema.ts -o ./dist/desktopSchema.pas.json -t DesktopActions",
"build": "concurrently npm:tsc npm:asc npm:agc",
"asc:all": "concurrently npm:asc npm:asc:display npm:asc:personalization npm:asc:taskbar npm:asc:input npm:asc:privacy npm:asc:power npm:asc:system",
"asc:display": "asc -i ./src/windows/displayActionsSchema.ts -o ./dist/displaySchema.pas.json -t DesktopDisplayActions",
"asc:input": "asc -i ./src/windows/inputActionsSchema.ts -o ./dist/inputSchema.pas.json -t DesktopInputActions",
"asc:personalization": "asc -i ./src/windows/personalizationActionsSchema.ts -o ./dist/personalizationSchema.pas.json -t DesktopPersonalizationActions",
"asc:power": "asc -i ./src/windows/powerActionsSchema.ts -o ./dist/powerSchema.pas.json -t DesktopPowerActions",
"asc:privacy": "asc -i ./src/windows/privacyActionsSchema.ts -o ./dist/privacySchema.pas.json -t DesktopPrivacyActions",
"asc:system": "asc -i ./src/windows/systemActionsSchema.ts -o ./dist/systemSchema.pas.json -t DesktopSystemActions",
"asc:taskbar": "asc -i ./src/windows/taskbarActionsSchema.ts -o ./dist/taskbarSchema.pas.json -t DesktopTaskbarActions",
"build": "concurrently npm:tsc npm:asc:all npm:agc",
"clean": "rimraf --glob dist *.tsbuildinfo *.done.build.log",
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
Expand Down
4 changes: 2 additions & 2 deletions ts/packages/agents/desktop/src/actionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
runDesktopActions,
setupDesktopActionContext,
} from "./connector.js";
import { DesktopActions } from "./actionsSchema.js";
import { AllDesktopActions } from "./allActionsSchema.js";
export function instantiate(): AppAgent {
return {
initializeAgentContext: initializeDesktopContext,
Expand Down Expand Up @@ -50,7 +50,7 @@ async function executeDesktopAction(
context: ActionContext<DesktopActionContext>,
) {
const message = await runDesktopActions(
action as DesktopActions,
action as AllDesktopActions,
context.sessionContext.agentContext,
context.sessionContext.sessionStorage!,
);
Expand Down
Loading
Loading