mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 22:49:41 +02:00
docs: fix repo URLs, rewrite npm README, add Published Packages to Claudeman README
- Fix repository URL: nicobailon/claudeman → Ark0N/Claudeman - Rewrite xterm-zerolag-input README with badges, origin story, architecture diagrams, better API docs, integration patterns, and "Why This Is Hard" - Add Published Packages section to Claudeman README with quick start example - Add callout in Claudeman's local echo section linking to the npm package - Publish as xterm-zerolag-input@0.1.2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -358,6 +358,8 @@ Typing over a 200-300ms connection feels identical to localhost. The overlay pro
|
||||
|
||||
Enabled by default. Works during both idle and busy sessions.
|
||||
|
||||
> **Open Source:** The local echo overlay has been extracted into a standalone library — [`xterm-zerolag-input`](https://www.npmjs.com/package/xterm-zerolag-input) — so any developer can add zero-latency input to their xterm.js application. See [Published Packages](#-published-packages) below.
|
||||
|
||||
---
|
||||
|
||||
### 📈 Run Summary ("What Happened While You Were Away")
|
||||
@@ -677,6 +679,50 @@ See [CLAUDE.md](./CLAUDE.md) for full documentation.
|
||||
|
||||
---
|
||||
|
||||
## Published Packages
|
||||
|
||||
Standalone libraries extracted from Claudeman, available on npm for use in any project:
|
||||
|
||||
### [`xterm-zerolag-input`](https://www.npmjs.com/package/xterm-zerolag-input)
|
||||
|
||||
[](https://www.npmjs.com/package/xterm-zerolag-input)
|
||||
|
||||
Instant keystroke feedback overlay for xterm.js. Eliminates perceived input latency over high-RTT connections (SSH web clients, cloud IDEs, mobile terminals) by rendering typed characters immediately as a pixel-perfect DOM overlay.
|
||||
|
||||
- **Zero dependencies** — works with both `xterm` (pre-5.4) and `@xterm/xterm` (5.4+)
|
||||
- **Configurable prompt detection** — character (`$`, `>`, `❯`), regex, or custom function
|
||||
- **Full state machine** — pending text, flushed text tracking, tab-switch save/restore, tab completion detection
|
||||
- **78 tests** covering every state transition
|
||||
|
||||
```bash
|
||||
npm install xterm-zerolag-input
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { ZerolagInputAddon } from 'xterm-zerolag-input';
|
||||
|
||||
const zerolag = new ZerolagInputAddon({
|
||||
prompt: { type: 'character', char: '$', offset: 2 },
|
||||
});
|
||||
terminal.loadAddon(zerolag);
|
||||
|
||||
terminal.onData((data) => {
|
||||
if (data === '\r') {
|
||||
const text = zerolag.pendingText;
|
||||
zerolag.clear();
|
||||
ws.send(text + '\r');
|
||||
} else if (data === '\x7f') {
|
||||
if (zerolag.removeChar() === 'flushed') ws.send(data);
|
||||
} else if (data.length === 1 && data.charCodeAt(0) >= 32) {
|
||||
zerolag.addChar(data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
[Full documentation](packages/xterm-zerolag-input/README.md)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [LICENSE](LICENSE)
|
||||
|
||||
Reference in New Issue
Block a user