codex-autorunner 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codex_autorunner/__init__.py +3 -0
- codex_autorunner/bootstrap.py +151 -0
- codex_autorunner/cli.py +886 -0
- codex_autorunner/codex_cli.py +79 -0
- codex_autorunner/codex_runner.py +17 -0
- codex_autorunner/core/__init__.py +1 -0
- codex_autorunner/core/about_car.py +125 -0
- codex_autorunner/core/codex_runner.py +100 -0
- codex_autorunner/core/config.py +1465 -0
- codex_autorunner/core/doc_chat.py +547 -0
- codex_autorunner/core/docs.py +37 -0
- codex_autorunner/core/engine.py +720 -0
- codex_autorunner/core/git_utils.py +206 -0
- codex_autorunner/core/hub.py +756 -0
- codex_autorunner/core/injected_context.py +9 -0
- codex_autorunner/core/locks.py +57 -0
- codex_autorunner/core/logging_utils.py +158 -0
- codex_autorunner/core/notifications.py +465 -0
- codex_autorunner/core/optional_dependencies.py +41 -0
- codex_autorunner/core/prompt.py +107 -0
- codex_autorunner/core/prompts.py +275 -0
- codex_autorunner/core/request_context.py +21 -0
- codex_autorunner/core/runner_controller.py +116 -0
- codex_autorunner/core/runner_process.py +29 -0
- codex_autorunner/core/snapshot.py +576 -0
- codex_autorunner/core/state.py +156 -0
- codex_autorunner/core/update.py +567 -0
- codex_autorunner/core/update_runner.py +44 -0
- codex_autorunner/core/usage.py +1221 -0
- codex_autorunner/core/utils.py +108 -0
- codex_autorunner/discovery.py +102 -0
- codex_autorunner/housekeeping.py +423 -0
- codex_autorunner/integrations/__init__.py +1 -0
- codex_autorunner/integrations/app_server/__init__.py +6 -0
- codex_autorunner/integrations/app_server/client.py +1386 -0
- codex_autorunner/integrations/app_server/supervisor.py +206 -0
- codex_autorunner/integrations/github/__init__.py +10 -0
- codex_autorunner/integrations/github/service.py +889 -0
- codex_autorunner/integrations/telegram/__init__.py +1 -0
- codex_autorunner/integrations/telegram/adapter.py +1401 -0
- codex_autorunner/integrations/telegram/commands_registry.py +104 -0
- codex_autorunner/integrations/telegram/config.py +450 -0
- codex_autorunner/integrations/telegram/constants.py +154 -0
- codex_autorunner/integrations/telegram/dispatch.py +162 -0
- codex_autorunner/integrations/telegram/handlers/__init__.py +0 -0
- codex_autorunner/integrations/telegram/handlers/approvals.py +241 -0
- codex_autorunner/integrations/telegram/handlers/callbacks.py +72 -0
- codex_autorunner/integrations/telegram/handlers/commands.py +160 -0
- codex_autorunner/integrations/telegram/handlers/commands_runtime.py +5262 -0
- codex_autorunner/integrations/telegram/handlers/messages.py +477 -0
- codex_autorunner/integrations/telegram/handlers/selections.py +545 -0
- codex_autorunner/integrations/telegram/helpers.py +2084 -0
- codex_autorunner/integrations/telegram/notifications.py +164 -0
- codex_autorunner/integrations/telegram/outbox.py +174 -0
- codex_autorunner/integrations/telegram/rendering.py +102 -0
- codex_autorunner/integrations/telegram/retry.py +37 -0
- codex_autorunner/integrations/telegram/runtime.py +270 -0
- codex_autorunner/integrations/telegram/service.py +921 -0
- codex_autorunner/integrations/telegram/state.py +1223 -0
- codex_autorunner/integrations/telegram/transport.py +318 -0
- codex_autorunner/integrations/telegram/types.py +57 -0
- codex_autorunner/integrations/telegram/voice.py +413 -0
- codex_autorunner/manifest.py +150 -0
- codex_autorunner/routes/__init__.py +53 -0
- codex_autorunner/routes/base.py +470 -0
- codex_autorunner/routes/docs.py +275 -0
- codex_autorunner/routes/github.py +197 -0
- codex_autorunner/routes/repos.py +121 -0
- codex_autorunner/routes/sessions.py +137 -0
- codex_autorunner/routes/shared.py +137 -0
- codex_autorunner/routes/system.py +175 -0
- codex_autorunner/routes/terminal_images.py +107 -0
- codex_autorunner/routes/voice.py +128 -0
- codex_autorunner/server.py +23 -0
- codex_autorunner/spec_ingest.py +113 -0
- codex_autorunner/static/app.js +95 -0
- codex_autorunner/static/autoRefresh.js +209 -0
- codex_autorunner/static/bootstrap.js +105 -0
- codex_autorunner/static/bus.js +23 -0
- codex_autorunner/static/cache.js +52 -0
- codex_autorunner/static/constants.js +48 -0
- codex_autorunner/static/dashboard.js +795 -0
- codex_autorunner/static/docs.js +1514 -0
- codex_autorunner/static/env.js +99 -0
- codex_autorunner/static/github.js +168 -0
- codex_autorunner/static/hub.js +1511 -0
- codex_autorunner/static/index.html +622 -0
- codex_autorunner/static/loader.js +28 -0
- codex_autorunner/static/logs.js +690 -0
- codex_autorunner/static/mobileCompact.js +300 -0
- codex_autorunner/static/snapshot.js +116 -0
- codex_autorunner/static/state.js +87 -0
- codex_autorunner/static/styles.css +4966 -0
- codex_autorunner/static/tabs.js +50 -0
- codex_autorunner/static/terminal.js +21 -0
- codex_autorunner/static/terminalManager.js +3535 -0
- codex_autorunner/static/todoPreview.js +25 -0
- codex_autorunner/static/types.d.ts +8 -0
- codex_autorunner/static/utils.js +597 -0
- codex_autorunner/static/vendor/LICENSE.xterm +24 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-cyrillic-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-cyrillic.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-greek.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-latin-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-latin.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-vietnamese.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-cyrillic-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-cyrillic.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-greek.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-latin-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-latin.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-vietnamese.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-cyrillic-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-cyrillic.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-greek.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-latin-ext.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-latin.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-vietnamese.woff2 +0 -0
- codex_autorunner/static/vendor/fonts/jetbrains-mono/OFL.txt +93 -0
- codex_autorunner/static/vendor/xterm-addon-fit.js +2 -0
- codex_autorunner/static/vendor/xterm.css +209 -0
- codex_autorunner/static/vendor/xterm.js +2 -0
- codex_autorunner/static/voice.js +591 -0
- codex_autorunner/voice/__init__.py +39 -0
- codex_autorunner/voice/capture.py +349 -0
- codex_autorunner/voice/config.py +167 -0
- codex_autorunner/voice/provider.py +66 -0
- codex_autorunner/voice/providers/__init__.py +7 -0
- codex_autorunner/voice/providers/openai_whisper.py +345 -0
- codex_autorunner/voice/resolver.py +36 -0
- codex_autorunner/voice/service.py +210 -0
- codex_autorunner/web/__init__.py +1 -0
- codex_autorunner/web/app.py +1037 -0
- codex_autorunner/web/hub_jobs.py +181 -0
- codex_autorunner/web/middleware.py +552 -0
- codex_autorunner/web/pty_session.py +357 -0
- codex_autorunner/web/runner_manager.py +25 -0
- codex_autorunner/web/schemas.py +253 -0
- codex_autorunner/web/static_assets.py +430 -0
- codex_autorunner/web/terminal_sessions.py +78 -0
- codex_autorunner/workspace.py +16 -0
- codex_autorunner-0.1.0.dist-info/METADATA +240 -0
- codex_autorunner-0.1.0.dist-info/RECORD +147 -0
- codex_autorunner-0.1.0.dist-info/WHEEL +5 -0
- codex_autorunner-0.1.0.dist-info/entry_points.txt +3 -0
- codex_autorunner-0.1.0.dist-info/licenses/LICENSE +21 -0
- codex_autorunner-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Any, Awaitable, Callable
|
|
5
|
+
|
|
6
|
+
from ..adapter import TelegramMessage
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class CommandSpec:
|
|
11
|
+
name: str
|
|
12
|
+
description: str
|
|
13
|
+
handler: Callable[[TelegramMessage, str, Any], Awaitable[None]]
|
|
14
|
+
allow_during_turn: bool = False
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def build_command_specs(handlers: Any) -> dict[str, CommandSpec]:
|
|
18
|
+
return {
|
|
19
|
+
"bind": CommandSpec(
|
|
20
|
+
"bind",
|
|
21
|
+
"bind this topic to a workspace",
|
|
22
|
+
lambda message, args, _runtime: handlers._handle_bind(message, args),
|
|
23
|
+
),
|
|
24
|
+
"new": CommandSpec(
|
|
25
|
+
"new",
|
|
26
|
+
"start a new session",
|
|
27
|
+
lambda message, _args, _runtime: handlers._handle_new(message),
|
|
28
|
+
),
|
|
29
|
+
"resume": CommandSpec(
|
|
30
|
+
"resume",
|
|
31
|
+
"list or resume a previous session",
|
|
32
|
+
lambda message, args, _runtime: handlers._handle_resume(message, args),
|
|
33
|
+
),
|
|
34
|
+
"review": CommandSpec(
|
|
35
|
+
"review",
|
|
36
|
+
"run a code review",
|
|
37
|
+
handlers._handle_review,
|
|
38
|
+
),
|
|
39
|
+
"model": CommandSpec(
|
|
40
|
+
"model",
|
|
41
|
+
"list or set the model",
|
|
42
|
+
handlers._handle_model,
|
|
43
|
+
),
|
|
44
|
+
"approvals": CommandSpec(
|
|
45
|
+
"approvals",
|
|
46
|
+
"set approval and sandbox policy",
|
|
47
|
+
handlers._handle_approvals,
|
|
48
|
+
),
|
|
49
|
+
"status": CommandSpec(
|
|
50
|
+
"status",
|
|
51
|
+
"show current binding and thread status",
|
|
52
|
+
handlers._handle_status,
|
|
53
|
+
allow_during_turn=True,
|
|
54
|
+
),
|
|
55
|
+
"files": CommandSpec(
|
|
56
|
+
"files",
|
|
57
|
+
"list or manage Telegram file inbox/outbox",
|
|
58
|
+
handlers._handle_files,
|
|
59
|
+
allow_during_turn=True,
|
|
60
|
+
),
|
|
61
|
+
"debug": CommandSpec(
|
|
62
|
+
"debug",
|
|
63
|
+
"show topic debug info",
|
|
64
|
+
handlers._handle_debug,
|
|
65
|
+
allow_during_turn=True,
|
|
66
|
+
),
|
|
67
|
+
"ids": CommandSpec(
|
|
68
|
+
"ids",
|
|
69
|
+
"show chat/user/thread IDs",
|
|
70
|
+
handlers._handle_ids,
|
|
71
|
+
allow_during_turn=True,
|
|
72
|
+
),
|
|
73
|
+
"diff": CommandSpec(
|
|
74
|
+
"diff",
|
|
75
|
+
"show git diff for the bound workspace",
|
|
76
|
+
handlers._handle_diff,
|
|
77
|
+
allow_during_turn=True,
|
|
78
|
+
),
|
|
79
|
+
"mention": CommandSpec(
|
|
80
|
+
"mention",
|
|
81
|
+
"include a file in a new request",
|
|
82
|
+
handlers._handle_mention,
|
|
83
|
+
allow_during_turn=True,
|
|
84
|
+
),
|
|
85
|
+
"skills": CommandSpec(
|
|
86
|
+
"skills",
|
|
87
|
+
"list available skills",
|
|
88
|
+
handlers._handle_skills,
|
|
89
|
+
allow_during_turn=True,
|
|
90
|
+
),
|
|
91
|
+
"mcp": CommandSpec(
|
|
92
|
+
"mcp",
|
|
93
|
+
"list MCP server status",
|
|
94
|
+
handlers._handle_mcp,
|
|
95
|
+
allow_during_turn=True,
|
|
96
|
+
),
|
|
97
|
+
"experimental": CommandSpec(
|
|
98
|
+
"experimental",
|
|
99
|
+
"toggle experimental features",
|
|
100
|
+
handlers._handle_experimental,
|
|
101
|
+
),
|
|
102
|
+
"init": CommandSpec(
|
|
103
|
+
"init",
|
|
104
|
+
"generate AGENTS.md guidance",
|
|
105
|
+
handlers._handle_init,
|
|
106
|
+
),
|
|
107
|
+
"compact": CommandSpec(
|
|
108
|
+
"compact",
|
|
109
|
+
"compact the conversation (summary)",
|
|
110
|
+
handlers._handle_compact,
|
|
111
|
+
),
|
|
112
|
+
"rollout": CommandSpec(
|
|
113
|
+
"rollout",
|
|
114
|
+
"show current thread rollout path",
|
|
115
|
+
handlers._handle_rollout,
|
|
116
|
+
allow_during_turn=True,
|
|
117
|
+
),
|
|
118
|
+
"update": CommandSpec(
|
|
119
|
+
"update",
|
|
120
|
+
"update CAR (prompt or both|web|telegram)",
|
|
121
|
+
handlers._handle_update,
|
|
122
|
+
),
|
|
123
|
+
"logout": CommandSpec(
|
|
124
|
+
"logout",
|
|
125
|
+
"log out of the Codex account",
|
|
126
|
+
handlers._handle_logout,
|
|
127
|
+
),
|
|
128
|
+
"feedback": CommandSpec(
|
|
129
|
+
"feedback",
|
|
130
|
+
"send feedback and logs",
|
|
131
|
+
handlers._handle_feedback,
|
|
132
|
+
allow_during_turn=True,
|
|
133
|
+
),
|
|
134
|
+
"interrupt": CommandSpec(
|
|
135
|
+
"interrupt",
|
|
136
|
+
"stop the active turn",
|
|
137
|
+
lambda message, _args, runtime: handlers._handle_interrupt(
|
|
138
|
+
message, runtime
|
|
139
|
+
),
|
|
140
|
+
allow_during_turn=True,
|
|
141
|
+
),
|
|
142
|
+
"quit": CommandSpec(
|
|
143
|
+
"quit",
|
|
144
|
+
"end the session (Telegram-local)",
|
|
145
|
+
handlers._handle_quit,
|
|
146
|
+
allow_during_turn=True,
|
|
147
|
+
),
|
|
148
|
+
"exit": CommandSpec(
|
|
149
|
+
"exit",
|
|
150
|
+
"end the session (Telegram-local)",
|
|
151
|
+
handlers._handle_quit,
|
|
152
|
+
allow_during_turn=True,
|
|
153
|
+
),
|
|
154
|
+
"help": CommandSpec(
|
|
155
|
+
"help",
|
|
156
|
+
"show this help message",
|
|
157
|
+
handlers._handle_help,
|
|
158
|
+
allow_during_turn=True,
|
|
159
|
+
),
|
|
160
|
+
}
|