Skip to content

Commit c13877d

Browse files
committed
refactor: migrate entrypoint and handlers to typescript
1 parent aac4d1f commit c13877d

10 files changed

Lines changed: 221 additions & 143 deletions

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Repo Structure
44

5-
- `src/index.js`: application entrypoint and subsystem wiring.
5+
- `src/index.ts`: application entrypoint and subsystem wiring.
66
- `src/bot/`: Telegram handlers, formatting, command parsing, i18n, middleware.
77
- `src/orchestrator/`: routing, MCP client, skill registry, GitHub/MCP skills.
88
- `src/runner/`: Codex PTY/exec management and restricted shell execution.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ npm run healthcheck
102102

103103
```text
104104
Telegram Message
105-
-> src/bot/handlers.js
105+
-> src/bot/handlers.ts
106106
-> src/orchestrator/router.ts
107107
-> src/runner/ptyManager.ts (coding tasks -> Codex CLI)
108108
-> src/orchestrator/skills/*.js (general tasks -> MCP/GitHub subagents)
@@ -112,7 +112,7 @@ Telegram Message
112112

113113
Core modules:
114114

115-
- `src/index.js`: bootstrap and lifecycle
115+
- `src/index.ts`: bootstrap and lifecycle
116116
- `src/config.ts`: env parsing and validation
117117
- `src/bot/`: auth middleware, formatting, command handlers
118118
- `src/orchestrator/`: routing + MCP client + skills
@@ -156,7 +156,7 @@ Where this happens:
156156

157157
- Router decision order: [router.ts](/Users/ding/Documents/Code/Github/codex-telegram-claws/src/orchestrator/router.ts)
158158
- Skill toggles per chat: [skillRegistry.ts](/Users/ding/Documents/Code/Github/codex-telegram-claws/src/orchestrator/skillRegistry.ts)
159-
- Telegram command entrypoints: [handlers.js](/Users/ding/Documents/Code/Github/codex-telegram-claws/src/bot/handlers.js)
159+
- Telegram command entrypoints: [handlers.ts](/Users/ding/Documents/Code/Github/codex-telegram-claws/src/bot/handlers.ts)
160160

161161
Operationally, subagents are the bot's control plane. Codex remains the coding execution plane.
162162

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export default [
4444
rules: {
4545
...tsPlugin.configs.recommended.rules,
4646
"no-console": "off",
47-
"no-undef": "off"
47+
"no-undef": "off",
48+
"@typescript-eslint/no-explicit-any": "off"
4849
}
4950
}
5051
];

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "0.1.0",
44
"description": "A super Telegram bot that securely orchestrates Codex CLI with PTY streaming, MCP routing, and GitHub automation skills.",
55
"type": "module",
6-
"main": "src/index.js",
6+
"main": "src/index.ts",
77
"scripts": {
8-
"start": "tsx src/index.js",
9-
"dev": "tsx watch src/index.js",
8+
"start": "tsx src/index.ts",
9+
"dev": "tsx watch src/index.ts",
1010
"check": "npm run typecheck",
1111
"typecheck": "tsc --noEmit",
1212
"test": "node --import tsx --test",

0 commit comments

Comments
 (0)