Skip to content

Conversation

@steveluc
Copy link
Contributor

@steveluc steveluc commented Feb 3, 2026

Summary

  • Add --testUI flag to CLI interactive command for enhanced terminal UI with spinners and visual prompts
  • Convert debug output across grammar/cache modules to use the debug npm package (controlled via DEBUG=typeagent:* env var)
  • Restore async grammar generation mode (fire-and-forget) for faster command responses
  • Add visible grammar result display when new rules are added to cache
  • Fix terminal input double-echo and cursor position issues in enhanced CLI
  • Fix prompt bracket overlap with emoji icons

Test plan

  • Run node packages/cli/bin/run.js interactive --testUI and verify enhanced UI displays correctly
  • Verify typing works without character duplication
  • Verify grammar rule additions show [Grammar] messages
  • Run without --testUI to verify standard console still works
  • Set DEBUG=typeagent:cache to verify debug logging works

🤖 Generated with Claude Code

steveluc and others added 3 commits February 2, 2026 21:51
- Add terminalUI module with EnhancedSpinner, TerminalLayout, InputBox,
  CompletionMenu classes
- EnhancedSpinner supports output-above-spinner pattern and streaming text
- InputBox provides bordered input areas with emoji-aware width handling
- CompletionMenu adds trigger-based autocompletion (@ for agents, / for commands)
- Add ESM module support and string-width dependency for Unicode handling
- Include demo script and design documentation

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add --testUI flag to CLI interactive command for enhanced terminal UI
- Convert debug output to use 'debug' npm package across grammar/cache modules
- Restore async grammar generation mode (fire-and-forget) for faster command responses
- Add grammar result display when new rules are added to cache
- Fix terminal input double-echo and cursor position issues
- Fix prompt bracket overlap with emoji icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix manifest grammarFile paths to be manifest-relative (for patchPaths resolution)
- Add NFA type extraction in AgentGrammar.validateEntityReferences to allow
  generated rules to reference types like TrackName, ArtistName from base grammar
- Remove diagnostic console.log statements, keep debug() logging

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add single console.log showing generated rule or rejection reason
- Remove verbose startup logging from setupGrammarGeneration
- Keep debug() logging for detailed tracing when needed

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Include the generated rule in rejection messages to help diagnose
entity validation failures and other rule addition errors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Call registerBuiltInEntities() in setupGrammarGeneration to register
  Ordinal, Cardinal, CalendarDate converters
- Make entity registry check case-insensitive (ordinal matches Ordinal)
- Include generated rule in rejection messages for debugging

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…itive matching

- Revert case-insensitive entity validation (too dangerous for all symbols)
- Register lowercase aliases (ordinal, cardinal, calendarDate) alongside
  PascalCase versions to match paramSpec convention from .pas.json schemas

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Use ClientIO notify for grammar rule notifications instead of console.log
- Log grammar notifications to ~/.typeagent/grammar.log in CLI
- Suppress startup agent errors (use debug logging instead of error notifications)
- Fix entityWildcardPropertyNames: exclude basic wildcard types (wildcard, word, number, string) from being treated as entity wildcards

The entity wildcard fix resolves the smoke test failure where $(listName:wildcard) was incorrectly added to entityWildcardPropertyNames, causing "Invalid entity wildcard property name" errors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The first getList rule was too greedy - "what's on the shopping list?"
was matching with wildcard capturing "on the shopping" instead of
just "shopping".

Added a more specific rule for "what's on (my)? $(listName) (list)?"
that takes precedence over the generic pattern.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…rminal rendering

- Fix smoke test failure: "what's on the shopping list" was parsing "the shopping"
  as list name instead of "shopping" - added (the)? as optional article in grammar rules
- Add marked and marked-terminal dependencies for CLI markdown rendering
- Add convertMarkdownToTerminal function for styled terminal markdown output
- Enhance HTML-to-text conversion with better formatting for track lists
- Support DisplayType "markdown" in CLI content rendering

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Actions like pause, resume, next, previous, status don't have parameters
in their schema. The evaluators in dfaMatcher.ts and environment.ts were
always adding `parameters: {}` which caused validation to fail with:
"Action schema parameter type mismatch: player.pause"

Now only include parameters if there are any to include.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add grammar rules for:
- next -> nextTrack
- skip -> nextTrack
- skip track -> nextTrack

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Remove custom selectors using invalid format names (orderedList,
unorderedList, listItem, dataTable) that caused "format is not a
function" errors. Use only valid built-in formats (block, inline, skip).

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The rule (what's)? (show)? (me)? (the)? (my)? $(listName:wildcard) list
could match with ALL optionals empty, becoming just $(listName:wildcard) list
which captured everything before "list" as the list name.

Split into specific rules that each require at least one fixed word:
- what's (the)? (my)? $(listName:wildcard) list
- show (me)? (the)? $(listName:wildcard) list
- the $(listName:wildcard) list
- my $(listName:wildcard) list

This prevents "add bread, milk, flour to the shopping list" from being
incorrectly parsed as getList with listName="add bread, milk, flour to the shopping"

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix issue where "list?" wouldn't match "list" in grammar rules. Also adds
local test file for faster grammar testing.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace regex-based punctuation stripping with a simple loop that
runs in O(n) time where n is the number of trailing punctuation chars.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@steveluc steveluc temporarily deployed to development-fork February 3, 2026 23:49 — with GitHub Actions Inactive
@steveluc steveluc temporarily deployed to development-fork February 3, 2026 23:49 — with GitHub Actions Inactive
@steveluc steveluc added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit 3c51778 Feb 4, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants