Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d5009ce
Initial plan
Copilot Dec 10, 2025
dbdea53
Add browser mode infrastructure with WebSocket support
Copilot Dec 10, 2025
4422742
Fix browser client to not import server-side dependencies
Copilot Dec 10, 2025
2941728
Fix server initialization issues and lazy-load dependencies
Copilot Dec 10, 2025
bcd4cda
Fix static file serving path and complete browser mode implementation
Copilot Dec 10, 2025
3bba60e
Address code review feedback: improve path security and fix comments
Copilot Dec 10, 2025
d9bc4c1
Refactor UI components and add Tailwind CSS
ClickerMonkey Dec 11, 2025
14149d6
Add chat UI components and selectors for new features
ClickerMonkey Dec 12, 2025
9c1288e
Add operation approval UI and server support
ClickerMonkey Dec 14, 2025
1d2444f
Enhance chat settings and operation display UX
ClickerMonkey Dec 15, 2025
33030e6
Add operation approval UI and refactor operation renderers
ClickerMonkey Dec 15, 2025
20622bf
Add QuestionsModal component and integrate with ChatPage
ClickerMonkey Dec 16, 2025
21fc26a
Add ToolsetSelector and improve question answer flow
ClickerMonkey Dec 16, 2025
cb678f7
Add user profile modal and persistent tool tracking
ClickerMonkey Dec 17, 2025
2343393
Refactor chat UI to unified layout and improve operation renderers
ClickerMonkey Dec 17, 2025
4c83e03
Consistent web operation rendering
ClickerMonkey Dec 18, 2025
9e2d87c
Refactor chat orchestration and operation rendering
ClickerMonkey Dec 18, 2025
f1d9acf
Improve operation approval UX and add processing states
ClickerMonkey Dec 18, 2025
e6967a9
Improve chat message persistence and error handling
ClickerMonkey Dec 18, 2025
dab7a69
Refactor chat UI and logic for unified layout
ClickerMonkey Dec 18, 2025
6f87612
Refactor WebSocket handling with context provider
ClickerMonkey Dec 18, 2025
cc6f6e3
Refactor WebSocketContext to use state for ws instance
ClickerMonkey Dec 19, 2025
651f028
Fix message handling and improve chat state updates
ClickerMonkey Dec 19, 2025
c9c8188
Add image viewer and local file serving support
ClickerMonkey Dec 19, 2025
2866e57
Implement chat-scoped operation and broadcast management
ClickerMonkey Dec 20, 2025
04765b1
Remove unused chat UI components and refactor operations
ClickerMonkey Dec 20, 2025
8fba633
Update cletus agent guidelines and tool instructions
ClickerMonkey Dec 20, 2025
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
47 changes: 32 additions & 15 deletions .github/agents/cletus.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,35 @@ description: An agent that understands the cletus package.

# Cletus Developer

This agent updates the packages/cletus package which is a CLI AI agent focused on file and data management.
Before creating a new function, look throughout codebase for a similar function/behavior. Try to reuse that.
Try to parallelize operations where possible.
Long running operations should have chatStatus updates.
Importing files should be done with searchFiles + processFile.

### Adding Tools
How to:
1. Add tool name to OperationKindSchema in schemas.ts
2. Add tool definition in tools/[agent].ts, add it to tool list at the bottom
3. Add tool operation implementation in operations/[agent].tsx

### Update Tools
1. Update tool definition in tools/[agent].ts
2. Update tool operation implementation in operations/[agent].tsx
This agent updates the packages/cletus package which is a CLI & browser AI agent focused on file and data management.

The browser version has a TypeScript & Node backend that communicates with the frontend via websockets. The front-end is built with TypeScript & React.

## aeye Coding Guidelines:
1. Avoid using `any`, `unknown`, or `as X` casts. These methods hide type issues and make code less safe.
2. Types should not be redefined - import them from their source. Most types are in packages/cletus/src/common/types or packages/cletus/src/common/schemas.
3. If you need a subset or transformed version of a type - use TypeScript utility types (Pick, Omit, etc) over redefining.
4. When you see duplicate code, consider refactoring it into a reusable function or component.
5. A lot of utility functions are in packages/cletus/src/shared. Check there before creating new ones (`pluralize`, `formatName`, `abbreviate`, `formatSize`, `formatTime`, `formatSize`, `chunk`, `group`, `gate`, `paginateText`, etc).


## Adding Tools & Operations

Some tools have operation counterparts. Operations are an action that could require user approval before execution. An analysis is run if the user needs to give permission and informs the LLM of what will be done. Once approved, the operation is executed.

The tools that don't fit into the operation model (like utility tools) can be added as regular tools in the utility tools section.

### Operation Guidelines

- The base operation types are in packages/cletus/src/operations/types.ts
- The operation implementation and CLI rendering are in packages/cletus/src/operations/[toolset].tsx
- Each operation should be defined in OperationKindSchema in packages/cletus/src/schemas.ts
- The web renderers for operations are in packages/cletus/src/browser/operations/[toolset].tsx. A web renderer must be defined.
- The tool definition is in packages/cletus/src/tools/[toolset].ts

### Operation Execution

- Try to parallelize operations in `do` where possible.
- Long running operations should have chatStatus updates. (if it involves iterating over long running tasks, embedding, file processing, making prompt calls, etc)
- Importing files should be done with searchFiles + processFile.
- If something in any render function depends on certain things existing (files, types, etc) the parts that should be rendered can be placed in the operation's cache during analysis/execution and rendered conditionally based on their presence. That way when things change or are removed the rendering is consistent.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/

# Build outputs
dist/
dist-browser/
*.tsbuildinfo
# Build artifacts in source directories
packages/*/src/**/*.js
Expand Down
Loading