steroids-api 0.2.7
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/dist/API/src/index.d.ts +10 -0
- package/dist/API/src/index.d.ts.map +1 -0
- package/dist/API/src/index.js +130 -0
- package/dist/API/src/index.js.map +1 -0
- package/dist/API/src/routes/activity.d.ts +7 -0
- package/dist/API/src/routes/activity.d.ts.map +1 -0
- package/dist/API/src/routes/activity.js +252 -0
- package/dist/API/src/routes/activity.js.map +1 -0
- package/dist/API/src/routes/config.d.ts +7 -0
- package/dist/API/src/routes/config.d.ts.map +1 -0
- package/dist/API/src/routes/config.js +521 -0
- package/dist/API/src/routes/config.js.map +1 -0
- package/dist/API/src/routes/health.d.ts +7 -0
- package/dist/API/src/routes/health.d.ts.map +1 -0
- package/dist/API/src/routes/health.js +172 -0
- package/dist/API/src/routes/health.js.map +1 -0
- package/dist/API/src/routes/incidents.d.ts +7 -0
- package/dist/API/src/routes/incidents.d.ts.map +1 -0
- package/dist/API/src/routes/incidents.js +117 -0
- package/dist/API/src/routes/incidents.js.map +1 -0
- package/dist/API/src/routes/projects.d.ts +7 -0
- package/dist/API/src/routes/projects.d.ts.map +1 -0
- package/dist/API/src/routes/projects.js +398 -0
- package/dist/API/src/routes/projects.js.map +1 -0
- package/dist/API/src/routes/runners.d.ts +7 -0
- package/dist/API/src/routes/runners.d.ts.map +1 -0
- package/dist/API/src/routes/runners.js +242 -0
- package/dist/API/src/routes/runners.js.map +1 -0
- package/dist/API/src/routes/tasks.d.ts +7 -0
- package/dist/API/src/routes/tasks.d.ts.map +1 -0
- package/dist/API/src/routes/tasks.js +1007 -0
- package/dist/API/src/routes/tasks.js.map +1 -0
- package/dist/API/src/utils/validation.d.ts +22 -0
- package/dist/API/src/utils/validation.d.ts.map +1 -0
- package/dist/API/src/utils/validation.js +50 -0
- package/dist/API/src/utils/validation.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +184 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/activity.d.ts +7 -0
- package/dist/routes/activity.d.ts.map +1 -0
- package/dist/routes/activity.js +252 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/config.d.ts +7 -0
- package/dist/routes/config.d.ts.map +1 -0
- package/dist/routes/config.js +647 -0
- package/dist/routes/config.js.map +1 -0
- package/dist/routes/credit-alerts.d.ts +2 -0
- package/dist/routes/credit-alerts.d.ts.map +1 -0
- package/dist/routes/credit-alerts.js +97 -0
- package/dist/routes/credit-alerts.js.map +1 -0
- package/dist/routes/health.d.ts +7 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +200 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/incidents.d.ts +7 -0
- package/dist/routes/incidents.d.ts.map +1 -0
- package/dist/routes/incidents.js +117 -0
- package/dist/routes/incidents.js.map +1 -0
- package/dist/routes/projects.d.ts +7 -0
- package/dist/routes/projects.d.ts.map +1 -0
- package/dist/routes/projects.js +643 -0
- package/dist/routes/projects.js.map +1 -0
- package/dist/routes/runners.d.ts +7 -0
- package/dist/routes/runners.d.ts.map +1 -0
- package/dist/routes/runners.js +299 -0
- package/dist/routes/runners.js.map +1 -0
- package/dist/routes/skills.d.ts +3 -0
- package/dist/routes/skills.d.ts.map +1 -0
- package/dist/routes/skills.js +109 -0
- package/dist/routes/skills.js.map +1 -0
- package/dist/routes/storage.d.ts +7 -0
- package/dist/routes/storage.d.ts.map +1 -0
- package/dist/routes/storage.js +93 -0
- package/dist/routes/storage.js.map +1 -0
- package/dist/routes/tasks.d.ts +7 -0
- package/dist/routes/tasks.d.ts.map +1 -0
- package/dist/routes/tasks.js +1145 -0
- package/dist/routes/tasks.js.map +1 -0
- package/dist/src/cleanup/invocation-logs.d.ts +30 -0
- package/dist/src/cleanup/invocation-logs.d.ts.map +1 -0
- package/dist/src/cleanup/invocation-logs.js +66 -0
- package/dist/src/cleanup/invocation-logs.js.map +1 -0
- package/dist/src/commands/loop-phases.d.ts +11 -0
- package/dist/src/commands/loop-phases.d.ts.map +1 -0
- package/dist/src/commands/loop-phases.js +304 -0
- package/dist/src/commands/loop-phases.js.map +1 -0
- package/dist/src/config/loader.d.ts +160 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +276 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/database/connection.d.ts +35 -0
- package/dist/src/database/connection.d.ts.map +1 -0
- package/dist/src/database/connection.js +197 -0
- package/dist/src/database/connection.js.map +1 -0
- package/dist/src/database/queries.d.ts +220 -0
- package/dist/src/database/queries.d.ts.map +1 -0
- package/dist/src/database/queries.js +589 -0
- package/dist/src/database/queries.js.map +1 -0
- package/dist/src/database/schema.d.ts +8 -0
- package/dist/src/database/schema.d.ts.map +1 -0
- package/dist/src/database/schema.js +184 -0
- package/dist/src/database/schema.js.map +1 -0
- package/dist/src/git/push.d.ts +26 -0
- package/dist/src/git/push.d.ts.map +1 -0
- package/dist/src/git/push.js +91 -0
- package/dist/src/git/push.js.map +1 -0
- package/dist/src/git/status.d.ts +83 -0
- package/dist/src/git/status.d.ts.map +1 -0
- package/dist/src/git/status.js +315 -0
- package/dist/src/git/status.js.map +1 -0
- package/dist/src/health/stuck-task-detector.d.ts +131 -0
- package/dist/src/health/stuck-task-detector.d.ts.map +1 -0
- package/dist/src/health/stuck-task-detector.js +233 -0
- package/dist/src/health/stuck-task-detector.js.map +1 -0
- package/dist/src/health/stuck-task-recovery.d.ts +45 -0
- package/dist/src/health/stuck-task-recovery.d.ts.map +1 -0
- package/dist/src/health/stuck-task-recovery.js +309 -0
- package/dist/src/health/stuck-task-recovery.js.map +1 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +130 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/locking/queries.d.ts +116 -0
- package/dist/src/locking/queries.d.ts.map +1 -0
- package/dist/src/locking/queries.js +232 -0
- package/dist/src/locking/queries.js.map +1 -0
- package/dist/src/locking/section-lock.d.ts +74 -0
- package/dist/src/locking/section-lock.d.ts.map +1 -0
- package/dist/src/locking/section-lock.js +196 -0
- package/dist/src/locking/section-lock.js.map +1 -0
- package/dist/src/locking/task-lock.d.ts +92 -0
- package/dist/src/locking/task-lock.d.ts.map +1 -0
- package/dist/src/locking/task-lock.js +233 -0
- package/dist/src/locking/task-lock.js.map +1 -0
- package/dist/src/migrations/index.d.ts +7 -0
- package/dist/src/migrations/index.d.ts.map +1 -0
- package/dist/src/migrations/index.js +9 -0
- package/dist/src/migrations/index.js.map +1 -0
- package/dist/src/migrations/manifest.d.ts +92 -0
- package/dist/src/migrations/manifest.d.ts.map +1 -0
- package/dist/src/migrations/manifest.js +255 -0
- package/dist/src/migrations/manifest.js.map +1 -0
- package/dist/src/migrations/runner.d.ts +84 -0
- package/dist/src/migrations/runner.d.ts.map +1 -0
- package/dist/src/migrations/runner.js +338 -0
- package/dist/src/migrations/runner.js.map +1 -0
- package/dist/src/orchestrator/coder.d.ts +32 -0
- package/dist/src/orchestrator/coder.d.ts.map +1 -0
- package/dist/src/orchestrator/coder.js +170 -0
- package/dist/src/orchestrator/coder.js.map +1 -0
- package/dist/src/orchestrator/coordinator.d.ts +28 -0
- package/dist/src/orchestrator/coordinator.d.ts.map +1 -0
- package/dist/src/orchestrator/coordinator.js +252 -0
- package/dist/src/orchestrator/coordinator.js.map +1 -0
- package/dist/src/orchestrator/fallback-handler.d.ts +24 -0
- package/dist/src/orchestrator/fallback-handler.d.ts.map +1 -0
- package/dist/src/orchestrator/fallback-handler.js +280 -0
- package/dist/src/orchestrator/fallback-handler.js.map +1 -0
- package/dist/src/orchestrator/invoke.d.ts +14 -0
- package/dist/src/orchestrator/invoke.d.ts.map +1 -0
- package/dist/src/orchestrator/invoke.js +76 -0
- package/dist/src/orchestrator/invoke.js.map +1 -0
- package/dist/src/orchestrator/post-coder.d.ts +10 -0
- package/dist/src/orchestrator/post-coder.d.ts.map +1 -0
- package/dist/src/orchestrator/post-coder.js +198 -0
- package/dist/src/orchestrator/post-coder.js.map +1 -0
- package/dist/src/orchestrator/post-reviewer.d.ts +10 -0
- package/dist/src/orchestrator/post-reviewer.d.ts.map +1 -0
- package/dist/src/orchestrator/post-reviewer.js +199 -0
- package/dist/src/orchestrator/post-reviewer.js.map +1 -0
- package/dist/src/orchestrator/reviewer.d.ts +35 -0
- package/dist/src/orchestrator/reviewer.d.ts.map +1 -0
- package/dist/src/orchestrator/reviewer.js +237 -0
- package/dist/src/orchestrator/reviewer.js.map +1 -0
- package/dist/src/orchestrator/schemas.d.ts +10 -0
- package/dist/src/orchestrator/schemas.d.ts.map +1 -0
- package/dist/src/orchestrator/schemas.js +81 -0
- package/dist/src/orchestrator/schemas.js.map +1 -0
- package/dist/src/orchestrator/task-selector.d.ts +102 -0
- package/dist/src/orchestrator/task-selector.d.ts.map +1 -0
- package/dist/src/orchestrator/task-selector.js +326 -0
- package/dist/src/orchestrator/task-selector.js.map +1 -0
- package/dist/src/orchestrator/types.d.ts +74 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -0
- package/dist/src/orchestrator/types.js +5 -0
- package/dist/src/orchestrator/types.js.map +1 -0
- package/dist/src/prompts/coder.d.ts +36 -0
- package/dist/src/prompts/coder.d.ts.map +1 -0
- package/dist/src/prompts/coder.js +303 -0
- package/dist/src/prompts/coder.js.map +1 -0
- package/dist/src/prompts/prompt-helpers.d.ts +51 -0
- package/dist/src/prompts/prompt-helpers.d.ts.map +1 -0
- package/dist/src/prompts/prompt-helpers.js +299 -0
- package/dist/src/prompts/prompt-helpers.js.map +1 -0
- package/dist/src/prompts/reviewer.d.ts +40 -0
- package/dist/src/prompts/reviewer.d.ts.map +1 -0
- package/dist/src/prompts/reviewer.js +416 -0
- package/dist/src/prompts/reviewer.js.map +1 -0
- package/dist/src/providers/claude.d.ts +53 -0
- package/dist/src/providers/claude.d.ts.map +1 -0
- package/dist/src/providers/claude.js +227 -0
- package/dist/src/providers/claude.js.map +1 -0
- package/dist/src/providers/codex.d.ts +53 -0
- package/dist/src/providers/codex.d.ts.map +1 -0
- package/dist/src/providers/codex.js +253 -0
- package/dist/src/providers/codex.js.map +1 -0
- package/dist/src/providers/gemini.d.ts +58 -0
- package/dist/src/providers/gemini.d.ts.map +1 -0
- package/dist/src/providers/gemini.js +240 -0
- package/dist/src/providers/gemini.js.map +1 -0
- package/dist/src/providers/interface.d.ts +185 -0
- package/dist/src/providers/interface.d.ts.map +1 -0
- package/dist/src/providers/interface.js +92 -0
- package/dist/src/providers/interface.js.map +1 -0
- package/dist/src/providers/invocation-logger.d.ts +97 -0
- package/dist/src/providers/invocation-logger.d.ts.map +1 -0
- package/dist/src/providers/invocation-logger.js +378 -0
- package/dist/src/providers/invocation-logger.js.map +1 -0
- package/dist/src/providers/openai.d.ts +53 -0
- package/dist/src/providers/openai.d.ts.map +1 -0
- package/dist/src/providers/openai.js +230 -0
- package/dist/src/providers/openai.js.map +1 -0
- package/dist/src/providers/registry.d.ts +100 -0
- package/dist/src/providers/registry.d.ts.map +1 -0
- package/dist/src/providers/registry.js +170 -0
- package/dist/src/providers/registry.js.map +1 -0
- package/dist/src/routes/activity.d.ts +7 -0
- package/dist/src/routes/activity.d.ts.map +1 -0
- package/dist/src/routes/activity.js +252 -0
- package/dist/src/routes/activity.js.map +1 -0
- package/dist/src/routes/config.d.ts +7 -0
- package/dist/src/routes/config.d.ts.map +1 -0
- package/dist/src/routes/config.js +521 -0
- package/dist/src/routes/config.js.map +1 -0
- package/dist/src/routes/health.d.ts +7 -0
- package/dist/src/routes/health.d.ts.map +1 -0
- package/dist/src/routes/health.js +172 -0
- package/dist/src/routes/health.js.map +1 -0
- package/dist/src/routes/incidents.d.ts +7 -0
- package/dist/src/routes/incidents.d.ts.map +1 -0
- package/dist/src/routes/incidents.js +117 -0
- package/dist/src/routes/incidents.js.map +1 -0
- package/dist/src/routes/projects.d.ts +7 -0
- package/dist/src/routes/projects.d.ts.map +1 -0
- package/dist/src/routes/projects.js +398 -0
- package/dist/src/routes/projects.js.map +1 -0
- package/dist/src/routes/runners.d.ts +7 -0
- package/dist/src/routes/runners.d.ts.map +1 -0
- package/dist/src/routes/runners.js +242 -0
- package/dist/src/routes/runners.js.map +1 -0
- package/dist/src/routes/tasks.d.ts +7 -0
- package/dist/src/routes/tasks.d.ts.map +1 -0
- package/dist/src/routes/tasks.js +1007 -0
- package/dist/src/routes/tasks.js.map +1 -0
- package/dist/src/runners/activity-log.d.ts +65 -0
- package/dist/src/runners/activity-log.d.ts.map +1 -0
- package/dist/src/runners/activity-log.js +140 -0
- package/dist/src/runners/activity-log.js.map +1 -0
- package/dist/src/runners/cron.d.ts +30 -0
- package/dist/src/runners/cron.d.ts.map +1 -0
- package/dist/src/runners/cron.js +333 -0
- package/dist/src/runners/cron.js.map +1 -0
- package/dist/src/runners/daemon.d.ts +71 -0
- package/dist/src/runners/daemon.d.ts.map +1 -0
- package/dist/src/runners/daemon.js +233 -0
- package/dist/src/runners/daemon.js.map +1 -0
- package/dist/src/runners/global-db.d.ts +31 -0
- package/dist/src/runners/global-db.d.ts.map +1 -0
- package/dist/src/runners/global-db.js +220 -0
- package/dist/src/runners/global-db.js.map +1 -0
- package/dist/src/runners/hang-detector.d.ts +38 -0
- package/dist/src/runners/hang-detector.d.ts.map +1 -0
- package/dist/src/runners/hang-detector.js +130 -0
- package/dist/src/runners/hang-detector.js.map +1 -0
- package/dist/src/runners/heartbeat.d.ts +39 -0
- package/dist/src/runners/heartbeat.d.ts.map +1 -0
- package/dist/src/runners/heartbeat.js +71 -0
- package/dist/src/runners/heartbeat.js.map +1 -0
- package/dist/src/runners/lock.d.ts +47 -0
- package/dist/src/runners/lock.d.ts.map +1 -0
- package/dist/src/runners/lock.js +140 -0
- package/dist/src/runners/lock.js.map +1 -0
- package/dist/src/runners/orchestrator-loop.d.ts +20 -0
- package/dist/src/runners/orchestrator-loop.d.ts.map +1 -0
- package/dist/src/runners/orchestrator-loop.js +208 -0
- package/dist/src/runners/orchestrator-loop.js.map +1 -0
- package/dist/src/runners/projects.d.ts +96 -0
- package/dist/src/runners/projects.d.ts.map +1 -0
- package/dist/src/runners/projects.js +243 -0
- package/dist/src/runners/projects.js.map +1 -0
- package/dist/src/runners/wakeup.d.ts +37 -0
- package/dist/src/runners/wakeup.d.ts.map +1 -0
- package/dist/src/runners/wakeup.js +355 -0
- package/dist/src/runners/wakeup.js.map +1 -0
- package/dist/src/utils/validation.d.ts +22 -0
- package/dist/src/utils/validation.d.ts.map +1 -0
- package/dist/src/utils/validation.js +50 -0
- package/dist/src/utils/validation.js.map +1 -0
- package/dist/utils/sqlite.d.ts +17 -0
- package/dist/utils/sqlite.d.ts.map +1 -0
- package/dist/utils/sqlite.js +27 -0
- package/dist/utils/sqlite.js.map +1 -0
- package/dist/utils/storage-cache.d.ts +33 -0
- package/dist/utils/storage-cache.d.ts.map +1 -0
- package/dist/utils/storage-cache.js +81 -0
- package/dist/utils/storage-cache.js.map +1 -0
- package/dist/utils/validation.d.ts +22 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +51 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +39 -0
- package/src/index.ts +199 -0
- package/src/routes/activity.ts +302 -0
- package/src/routes/config.ts +723 -0
- package/src/routes/credit-alerts.ts +73 -0
- package/src/routes/health.ts +219 -0
- package/src/routes/incidents.ts +131 -0
- package/src/routes/projects.ts +854 -0
- package/src/routes/runners.ts +357 -0
- package/src/routes/skills.ts +127 -0
- package/src/routes/storage.ts +108 -0
- package/src/routes/tasks.ts +1372 -0
- package/src/utils/sqlite.ts +36 -0
- package/src/utils/storage-cache.ts +107 -0
- package/src/utils/validation.ts +61 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database schema definitions for Steroids CLI
|
|
3
|
+
* Creates all required tables with proper constraints
|
|
4
|
+
*/
|
|
5
|
+
export const SCHEMA_VERSION = '0.1.0';
|
|
6
|
+
export const SCHEMA_SQL = `
|
|
7
|
+
-- Schema metadata (version tracking)
|
|
8
|
+
CREATE TABLE IF NOT EXISTS _schema (
|
|
9
|
+
key TEXT PRIMARY KEY,
|
|
10
|
+
value TEXT NOT NULL
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
-- Applied migrations log
|
|
14
|
+
CREATE TABLE IF NOT EXISTS _migrations (
|
|
15
|
+
id INTEGER PRIMARY KEY,
|
|
16
|
+
name TEXT NOT NULL UNIQUE,
|
|
17
|
+
checksum TEXT NOT NULL,
|
|
18
|
+
applied_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
-- Sections (task groups)
|
|
22
|
+
CREATE TABLE IF NOT EXISTS sections (
|
|
23
|
+
id TEXT PRIMARY KEY,
|
|
24
|
+
name TEXT NOT NULL,
|
|
25
|
+
position INTEGER NOT NULL,
|
|
26
|
+
priority INTEGER DEFAULT 50,
|
|
27
|
+
skipped INTEGER DEFAULT 0,
|
|
28
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
CREATE INDEX IF NOT EXISTS idx_sections_priority ON sections(priority);
|
|
32
|
+
|
|
33
|
+
-- Tasks
|
|
34
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
35
|
+
id TEXT PRIMARY KEY,
|
|
36
|
+
title TEXT NOT NULL,
|
|
37
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
38
|
+
section_id TEXT REFERENCES sections(id),
|
|
39
|
+
source_file TEXT,
|
|
40
|
+
file_path TEXT,
|
|
41
|
+
file_line INTEGER,
|
|
42
|
+
file_commit_sha TEXT,
|
|
43
|
+
file_content_hash TEXT,
|
|
44
|
+
rejection_count INTEGER NOT NULL DEFAULT 0,
|
|
45
|
+
failure_count INTEGER NOT NULL DEFAULT 0,
|
|
46
|
+
last_failure_at TEXT,
|
|
47
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
48
|
+
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_status ON tasks(status);
|
|
52
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_section ON tasks(section_id);
|
|
53
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_failures ON tasks(failure_count) WHERE failure_count > 0;
|
|
54
|
+
|
|
55
|
+
-- Audit trail (immutable log of status changes)
|
|
56
|
+
CREATE TABLE IF NOT EXISTS audit (
|
|
57
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
58
|
+
task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
59
|
+
from_status TEXT,
|
|
60
|
+
to_status TEXT NOT NULL,
|
|
61
|
+
actor TEXT NOT NULL,
|
|
62
|
+
actor_type TEXT DEFAULT 'human',
|
|
63
|
+
model TEXT,
|
|
64
|
+
notes TEXT,
|
|
65
|
+
commit_sha TEXT,
|
|
66
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
CREATE INDEX IF NOT EXISTS idx_audit_task ON audit(task_id);
|
|
70
|
+
CREATE INDEX IF NOT EXISTS idx_audit_commit ON audit(commit_sha);
|
|
71
|
+
|
|
72
|
+
-- Disputes
|
|
73
|
+
CREATE TABLE IF NOT EXISTS disputes (
|
|
74
|
+
id TEXT PRIMARY KEY,
|
|
75
|
+
task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
76
|
+
type TEXT NOT NULL,
|
|
77
|
+
status TEXT NOT NULL DEFAULT 'open',
|
|
78
|
+
reason TEXT NOT NULL,
|
|
79
|
+
coder_position TEXT,
|
|
80
|
+
reviewer_position TEXT,
|
|
81
|
+
resolution TEXT,
|
|
82
|
+
resolution_notes TEXT,
|
|
83
|
+
created_by TEXT NOT NULL,
|
|
84
|
+
resolved_by TEXT,
|
|
85
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
86
|
+
resolved_at TEXT
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
CREATE INDEX IF NOT EXISTS idx_disputes_task ON disputes(task_id);
|
|
90
|
+
CREATE INDEX IF NOT EXISTS idx_disputes_status ON disputes(status);
|
|
91
|
+
|
|
92
|
+
-- Task locks (for orchestrator coordination)
|
|
93
|
+
CREATE TABLE IF NOT EXISTS task_locks (
|
|
94
|
+
task_id TEXT PRIMARY KEY REFERENCES tasks(id),
|
|
95
|
+
runner_id TEXT NOT NULL,
|
|
96
|
+
acquired_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
97
|
+
expires_at TEXT NOT NULL,
|
|
98
|
+
heartbeat_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
CREATE INDEX IF NOT EXISTS idx_task_locks_expires ON task_locks(expires_at);
|
|
102
|
+
|
|
103
|
+
-- Section locks (for orchestrator coordination)
|
|
104
|
+
CREATE TABLE IF NOT EXISTS section_locks (
|
|
105
|
+
section_id TEXT PRIMARY KEY REFERENCES sections(id),
|
|
106
|
+
runner_id TEXT NOT NULL,
|
|
107
|
+
acquired_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
108
|
+
expires_at TEXT NOT NULL
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
CREATE INDEX IF NOT EXISTS idx_section_locks_expires ON section_locks(expires_at);
|
|
112
|
+
|
|
113
|
+
-- Section dependencies (ordering constraints between sections)
|
|
114
|
+
CREATE TABLE IF NOT EXISTS section_dependencies (
|
|
115
|
+
id TEXT PRIMARY KEY,
|
|
116
|
+
section_id TEXT NOT NULL REFERENCES sections(id),
|
|
117
|
+
depends_on_section_id TEXT NOT NULL REFERENCES sections(id),
|
|
118
|
+
created_at TEXT DEFAULT (datetime('now')),
|
|
119
|
+
UNIQUE(section_id, depends_on_section_id)
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
CREATE INDEX IF NOT EXISTS idx_section_dependencies_section ON section_dependencies(section_id);
|
|
123
|
+
CREATE INDEX IF NOT EXISTS idx_section_dependencies_depends_on ON section_dependencies(depends_on_section_id);
|
|
124
|
+
|
|
125
|
+
-- Task invocations (LLM calls per task)
|
|
126
|
+
CREATE TABLE IF NOT EXISTS task_invocations (
|
|
127
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
128
|
+
task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
129
|
+
role TEXT NOT NULL,
|
|
130
|
+
provider TEXT NOT NULL,
|
|
131
|
+
model TEXT NOT NULL,
|
|
132
|
+
prompt TEXT NOT NULL,
|
|
133
|
+
response TEXT,
|
|
134
|
+
error TEXT,
|
|
135
|
+
started_at_ms INTEGER,
|
|
136
|
+
completed_at_ms INTEGER,
|
|
137
|
+
status TEXT DEFAULT 'completed' CHECK(status IN ('running', 'completed', 'failed', 'timeout')),
|
|
138
|
+
exit_code INTEGER NOT NULL DEFAULT 0,
|
|
139
|
+
duration_ms INTEGER NOT NULL DEFAULT 0,
|
|
140
|
+
success INTEGER NOT NULL DEFAULT 0,
|
|
141
|
+
timed_out INTEGER NOT NULL DEFAULT 0,
|
|
142
|
+
rejection_number INTEGER,
|
|
143
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
CREATE INDEX IF NOT EXISTS idx_task_invocations_task ON task_invocations(task_id);
|
|
147
|
+
CREATE INDEX IF NOT EXISTS idx_task_invocations_role ON task_invocations(role);
|
|
148
|
+
CREATE INDEX IF NOT EXISTS idx_task_invocations_created ON task_invocations(created_at DESC);
|
|
149
|
+
CREATE INDEX IF NOT EXISTS idx_task_invocations_task_status ON task_invocations(task_id, status, started_at_ms DESC);
|
|
150
|
+
|
|
151
|
+
-- Incidents (stuck-task detection/recovery)
|
|
152
|
+
CREATE TABLE IF NOT EXISTS incidents (
|
|
153
|
+
id TEXT PRIMARY KEY,
|
|
154
|
+
task_id TEXT REFERENCES tasks(id),
|
|
155
|
+
runner_id TEXT,
|
|
156
|
+
failure_mode TEXT NOT NULL,
|
|
157
|
+
detected_at TEXT NOT NULL,
|
|
158
|
+
resolved_at TEXT,
|
|
159
|
+
resolution TEXT,
|
|
160
|
+
details TEXT,
|
|
161
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
CREATE INDEX IF NOT EXISTS idx_incidents_task ON incidents(task_id);
|
|
165
|
+
CREATE INDEX IF NOT EXISTS idx_incidents_detected ON incidents(detected_at);
|
|
166
|
+
CREATE INDEX IF NOT EXISTS idx_incidents_unresolved ON incidents(resolved_at) WHERE resolved_at IS NULL;
|
|
167
|
+
`;
|
|
168
|
+
export const INITIAL_SCHEMA_DATA = `
|
|
169
|
+
INSERT OR REPLACE INTO _schema (key, value) VALUES ('version', '${SCHEMA_VERSION}');
|
|
170
|
+
INSERT OR REPLACE INTO _schema (key, value) VALUES ('created_at', datetime('now'));
|
|
171
|
+
|
|
172
|
+
-- Mark all migrations as applied since new databases have the full schema
|
|
173
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (1, '001_initial_schema', 'builtin');
|
|
174
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (2, '002_add_commit_sha', 'builtin');
|
|
175
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (3, '003_add_section_priority', 'builtin');
|
|
176
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (4, '004_add_section_dependencies', 'builtin');
|
|
177
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (5, '005_add_audit_actor_model', 'builtin');
|
|
178
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (6, '006_add_task_invocations', 'builtin');
|
|
179
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (7, '007_add_file_anchor', 'builtin');
|
|
180
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (8, '008_add_section_skipped', 'builtin');
|
|
181
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (9, '009_add_incidents_and_failure_tracking', 'builtin');
|
|
182
|
+
INSERT OR IGNORE INTO _migrations (id, name, checksum) VALUES (10, '010_add_lifecycle_timestamps', 'builtin');
|
|
183
|
+
`;
|
|
184
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/database/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiKzB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;kEAC+B,cAAc;;;;;;;;;;;;;;CAc/E,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git push operations
|
|
3
|
+
* Handles pushing completed work with resilience
|
|
4
|
+
*/
|
|
5
|
+
export interface PushResult {
|
|
6
|
+
success: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
commitHash?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get the current commit hash
|
|
12
|
+
*/
|
|
13
|
+
export declare function getCurrentCommitHash(projectPath?: string): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Push to remote repository
|
|
16
|
+
*/
|
|
17
|
+
export declare function pushToRemote(projectPath?: string, remote?: string, branch?: string): PushResult;
|
|
18
|
+
/**
|
|
19
|
+
* Get remote URL for logging
|
|
20
|
+
*/
|
|
21
|
+
export declare function getRemoteUrl(projectPath?: string, remote?: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Check if we're on a branch that tracks a remote
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasRemoteTracking(projectPath?: string): boolean;
|
|
26
|
+
//# sourceMappingURL=push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../../src/git/push.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,GAAE,MAAsB,GAClC,MAAM,GAAG,IAAI,CAUf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,GAAE,MAAsB,EACnC,MAAM,GAAE,MAAiB,EACzB,MAAM,GAAE,MAAe,GACtB,UAAU,CAqCZ;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,GAAE,MAAsB,EACnC,MAAM,GAAE,MAAiB,GACxB,MAAM,GAAG,IAAI,CAUf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,GAAE,MAAsB,GAClC,OAAO,CAWT"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git push operations
|
|
3
|
+
* Handles pushing completed work with resilience
|
|
4
|
+
*/
|
|
5
|
+
import { execSync } from 'node:child_process';
|
|
6
|
+
/**
|
|
7
|
+
* Get the current commit hash
|
|
8
|
+
*/
|
|
9
|
+
export function getCurrentCommitHash(projectPath = process.cwd()) {
|
|
10
|
+
try {
|
|
11
|
+
return execSync('git rev-parse HEAD', {
|
|
12
|
+
cwd: projectPath,
|
|
13
|
+
encoding: 'utf-8',
|
|
14
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
15
|
+
}).trim();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Push to remote repository
|
|
23
|
+
*/
|
|
24
|
+
export function pushToRemote(projectPath = process.cwd(), remote = 'origin', branch = 'main') {
|
|
25
|
+
try {
|
|
26
|
+
execSync(`git push ${remote} ${branch}`, {
|
|
27
|
+
cwd: projectPath,
|
|
28
|
+
encoding: 'utf-8',
|
|
29
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
30
|
+
timeout: 120_000, // 2 minute timeout
|
|
31
|
+
});
|
|
32
|
+
const commitHash = getCurrentCommitHash(projectPath);
|
|
33
|
+
console.log(`Successfully pushed to ${remote}/${branch}`);
|
|
34
|
+
return {
|
|
35
|
+
success: true,
|
|
36
|
+
commitHash: commitHash ?? undefined,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
const err = error;
|
|
41
|
+
const errorMsg = err.stderr ?? err.message ?? 'Unknown push error';
|
|
42
|
+
console.error(`Push failed: ${errorMsg}`);
|
|
43
|
+
// Classify the error
|
|
44
|
+
const lowerError = errorMsg.toLowerCase();
|
|
45
|
+
if (lowerError.includes('non-fast-forward') || lowerError.includes('rejected')) {
|
|
46
|
+
console.warn('Push rejected due to conflict. Human intervention required.');
|
|
47
|
+
}
|
|
48
|
+
else if (lowerError.includes('connection') || lowerError.includes('timeout')) {
|
|
49
|
+
console.warn('Network error. Will retry on next task completion.');
|
|
50
|
+
}
|
|
51
|
+
else if (lowerError.includes('auth')) {
|
|
52
|
+
console.warn('Authentication error. Check git credentials.');
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
success: false,
|
|
56
|
+
error: errorMsg,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get remote URL for logging
|
|
62
|
+
*/
|
|
63
|
+
export function getRemoteUrl(projectPath = process.cwd(), remote = 'origin') {
|
|
64
|
+
try {
|
|
65
|
+
return execSync(`git remote get-url ${remote}`, {
|
|
66
|
+
cwd: projectPath,
|
|
67
|
+
encoding: 'utf-8',
|
|
68
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
69
|
+
}).trim();
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Check if we're on a branch that tracks a remote
|
|
77
|
+
*/
|
|
78
|
+
export function hasRemoteTracking(projectPath = process.cwd()) {
|
|
79
|
+
try {
|
|
80
|
+
execSync('git rev-parse --abbrev-ref --symbolic-full-name @{u}', {
|
|
81
|
+
cwd: projectPath,
|
|
82
|
+
encoding: 'utf-8',
|
|
83
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
84
|
+
});
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/git/push.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git status and diff utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Get the current HEAD commit SHA
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCurrentCommitSha(projectPath?: string): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Get short (7 char) commit SHA
|
|
10
|
+
*/
|
|
11
|
+
export declare function getShortCommitSha(projectPath?: string): string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Get git status output
|
|
14
|
+
*/
|
|
15
|
+
export declare function getGitStatus(projectPath?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Get git diff output
|
|
18
|
+
*/
|
|
19
|
+
export declare function getGitDiff(projectPath?: string, ref?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get list of modified files
|
|
22
|
+
*/
|
|
23
|
+
export declare function getModifiedFiles(projectPath?: string, ref?: string): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Check if there are uncommitted changes
|
|
26
|
+
*/
|
|
27
|
+
export declare function hasUncommittedChanges(projectPath?: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Check if we're in a git repository
|
|
30
|
+
*/
|
|
31
|
+
export declare function isGitRepo(projectPath?: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Find the commit hash for a task by searching commit messages
|
|
34
|
+
* Returns the most recent commit that mentions the task title
|
|
35
|
+
*/
|
|
36
|
+
export declare function findTaskCommit(projectPath: string, taskTitle: string): string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Get the diff of a specific commit
|
|
39
|
+
*/
|
|
40
|
+
export declare function getCommitDiff(projectPath: string, commitHash: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get files changed in a specific commit
|
|
43
|
+
*/
|
|
44
|
+
export declare function getCommitFiles(projectPath: string, commitHash: string): string[];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a specific file is tracked by git
|
|
47
|
+
*/
|
|
48
|
+
export declare function isFileTracked(filePath: string, projectPath?: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Check if a specific file has uncommitted changes (staged or unstaged)
|
|
51
|
+
*/
|
|
52
|
+
export declare function isFileDirty(filePath: string, projectPath?: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Get the SHA of the most recent commit that modified a file
|
|
55
|
+
*/
|
|
56
|
+
export declare function getFileLastCommit(filePath: string, projectPath?: string): string | null;
|
|
57
|
+
/**
|
|
58
|
+
* Get the git blob hash of a file at HEAD (content-addressable hash)
|
|
59
|
+
*/
|
|
60
|
+
export declare function getFileContentHash(filePath: string, projectPath?: string): string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Get recent commits with SHA and message
|
|
63
|
+
*/
|
|
64
|
+
export declare function getRecentCommits(projectPath?: string, count?: number): Array<{
|
|
65
|
+
sha: string;
|
|
66
|
+
message: string;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Get changed files since last commit
|
|
70
|
+
*/
|
|
71
|
+
export declare function getChangedFiles(projectPath?: string): string[];
|
|
72
|
+
/**
|
|
73
|
+
* Get diff summary (additions/deletions)
|
|
74
|
+
*/
|
|
75
|
+
export declare function getDiffSummary(projectPath?: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Get diff additions and deletions count
|
|
78
|
+
*/
|
|
79
|
+
export declare function getDiffStats(projectPath?: string, ref?: string): {
|
|
80
|
+
additions: number;
|
|
81
|
+
deletions: number;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../src/git/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAUtF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAUpF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,CAUxE;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,WAAW,GAAE,MAAsB,EACnC,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,GAAE,MAAsB,EACnC,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,EAAE,CAYV;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,GAAE,MAAsB,GAClC,OAAO,CAGT;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAWtE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CA+Bf;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,MAAM,EAAE,CAWV;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAsB,GAClC,MAAM,GAAG,IAAI,CAUf;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAsB,GAClC,MAAM,GAAG,IAAI,CAUf;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,GAAE,MAAsB,EACnC,KAAK,GAAE,MAAU,GAChB,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAczC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,WAAW,GAAE,MAAsB,GAClC,MAAM,EAAE,CAYV;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,WAAW,GAAE,MAAsB,GAClC,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,WAAW,GAAE,MAAsB,EACnC,GAAG,CAAC,EAAE,MAAM,GACX;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAyB1C"}
|