@lovenyberg/ove 0.2.0 → 0.2.2
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.
- package/README.md +10 -5
- package/bin/ove.ts +21 -2
- package/bun.lock +63 -263
- package/config.example.json +13 -2
- package/docs/examples.md +28 -0
- package/docs/favicon.ico +0 -0
- package/docs/index.html +15 -9
- package/docs/plans/2026-02-22-repo-autodiscovery-design.md +98 -0
- package/docs/plans/2026-02-22-repo-autodiscovery-plan.md +826 -0
- package/package.json +2 -2
- package/src/adapters/telegram.ts +38 -6
- package/src/adapters/whatsapp.ts +49 -11
- package/src/config.test.ts +70 -0
- package/src/config.ts +12 -3
- package/src/index.ts +244 -42
- package/src/queue.ts +25 -0
- package/src/repo-registry.test.ts +130 -0
- package/src/repo-registry.ts +183 -0
- package/src/repos.ts +19 -5
- package/src/router.test.ts +125 -1
- package/src/router.ts +46 -3
- package/src/runner.ts +1 -0
- package/src/runners/claude.ts +4 -0
- package/src/runners/codex.ts +4 -0
- package/docs/CNAME +0 -1
package/README.md
CHANGED
|
@@ -56,6 +56,10 @@ Scheduling:
|
|
|
56
56
|
list schedules See your scheduled tasks
|
|
57
57
|
remove schedule #N Remove a scheduled task
|
|
58
58
|
|
|
59
|
+
Task management:
|
|
60
|
+
tasks List running and pending tasks
|
|
61
|
+
cancel <id> Kill a running or pending task
|
|
62
|
+
|
|
59
63
|
Meta:
|
|
60
64
|
status Queue stats
|
|
61
65
|
history Recent tasks
|
|
@@ -202,11 +206,12 @@ bun test # 150 tests
|
|
|
202
206
|
1. Message arrives via any transport (Slack, WhatsApp, Telegram, Discord, CLI, HTTP API, or GitHub comment)
|
|
203
207
|
2. Chat adapters use `handleMessage`, event adapters use `handleEvent`
|
|
204
208
|
3. Router parses intent and extracts repo/args
|
|
205
|
-
4. Task gets queued in SQLite (one per repo at a time)
|
|
206
|
-
5. Worker
|
|
207
|
-
6.
|
|
208
|
-
7.
|
|
209
|
-
8.
|
|
209
|
+
4. Task gets queued in SQLite (one per repo at a time, different repos run in parallel)
|
|
210
|
+
5. Worker loop picks up tasks concurrently (up to 5 parallel tasks across different repos)
|
|
211
|
+
6. Each task gets an isolated git worktree
|
|
212
|
+
7. Runs the configured agent runner (`claude -p` or `codex exec`) with streaming JSON output
|
|
213
|
+
8. Status updates stream back (chat: edits a message, HTTP: SSE, GitHub: single comment)
|
|
214
|
+
9. Result sent back, worktree cleaned up
|
|
210
215
|
|
|
211
216
|
See [example conversations](docs/examples.md) for all flows.
|
|
212
217
|
|
package/bin/ove.ts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { createInterface } from "node:readline/promises";
|
|
6
6
|
import { validateConfig, runSetup } from "../src/setup";
|
|
7
7
|
|
|
8
|
+
async function checkForUpdate(): Promise<void> {
|
|
9
|
+
try {
|
|
10
|
+
const pkgPath = join(import.meta.dir, "..", "package.json");
|
|
11
|
+
const { name, version: current } = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
12
|
+
const res = await fetch(`https://registry.npmjs.org/${name}/latest`, {
|
|
13
|
+
signal: AbortSignal.timeout(3000),
|
|
14
|
+
});
|
|
15
|
+
if (!res.ok) return;
|
|
16
|
+
const { version: latest } = await res.json() as { version: string };
|
|
17
|
+
if (latest && latest !== current) {
|
|
18
|
+
process.stdout.write(`\n Update available: ${current} → ${latest}\n`);
|
|
19
|
+
process.stdout.write(` Run: npm install -g ${name}\n\n`);
|
|
20
|
+
}
|
|
21
|
+
} catch {
|
|
22
|
+
// Silent fail — don't block startup for update checks
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
8
26
|
const args = process.argv.slice(2);
|
|
9
27
|
const command = args[0];
|
|
10
28
|
|
|
@@ -23,7 +41,8 @@ if (command === "init") {
|
|
|
23
41
|
}
|
|
24
42
|
|
|
25
43
|
if (command === "start" || !command) {
|
|
26
|
-
|
|
44
|
+
await checkForUpdate();
|
|
45
|
+
process.stdout.write(" Checking config...\n");
|
|
27
46
|
const { valid, issues } = validateConfig();
|
|
28
47
|
|
|
29
48
|
if (!valid) {
|