@hasna/loops 0.4.13 → 0.4.14
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/CHANGELOG.md +74 -3
- package/README.md +54 -12
- package/dist/api/index.d.ts +35 -0
- package/dist/api/index.js +695 -10
- package/dist/cli/index.js +1633 -366
- package/dist/cli/ui.d.ts +44 -0
- package/dist/daemon/index.js +948 -212
- package/dist/generated/storage-kit/health.d.ts +19 -0
- package/dist/generated/storage-kit/index.d.ts +7 -0
- package/dist/generated/storage-kit/migrations.d.ts +47 -0
- package/dist/generated/storage-kit/mode.d.ts +47 -0
- package/dist/generated/storage-kit/pool.d.ts +33 -0
- package/dist/generated/storage-kit/query.d.ts +35 -0
- package/dist/generated/storage-kit/tls.d.ts +25 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3567 -2010
- package/dist/lib/health.d.ts +83 -3
- package/dist/lib/mode.js +14 -2
- package/dist/lib/scheduler.d.ts +5 -2
- package/dist/lib/storage/index.d.ts +1 -0
- package/dist/lib/storage/index.js +1329 -211
- package/dist/lib/storage/pg-executor.d.ts +27 -0
- package/dist/lib/storage/pg-runner-claim.d.ts +40 -0
- package/dist/lib/storage/postgres-loop-storage.d.ts +114 -0
- package/dist/lib/storage/sqlite.js +336 -8
- package/dist/lib/store.d.ts +234 -0
- package/dist/lib/store.js +350 -8
- package/dist/mcp/index.js +1067 -306
- package/dist/runner/index.js +124 -25
- package/dist/sdk/http.d.ts +115 -0
- package/dist/sdk/http.js +145 -0
- package/dist/sdk/index.d.ts +5 -1
- package/dist/sdk/index.js +1052 -312
- package/dist/serve/index.d.ts +4 -0
- package/dist/serve/index.js +7619 -0
- package/dist/types.d.ts +3 -0
- package/docs/CUTOVER-RUNBOOK.md +61 -0
- package/docs/USAGE.md +50 -11
- package/package.json +14 -2
package/dist/cli/ui.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Loop } from "../types.js";
|
|
2
|
+
import { Store } from "../lib/store.js";
|
|
3
|
+
export interface LoopUiRow {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
status: Loop["status"];
|
|
7
|
+
cadence: string;
|
|
8
|
+
nextRun: string;
|
|
9
|
+
lastRunOutcome: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
activeRuns: number;
|
|
12
|
+
}
|
|
13
|
+
export interface LoopUiStats {
|
|
14
|
+
activeLoops: number;
|
|
15
|
+
pausedLoops: number;
|
|
16
|
+
stoppedLoops: number;
|
|
17
|
+
runningRuns: number;
|
|
18
|
+
failedRuns: number;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
export interface LoopUiSnapshot {
|
|
22
|
+
rows: LoopUiRow[];
|
|
23
|
+
stats: LoopUiStats;
|
|
24
|
+
}
|
|
25
|
+
export interface BuildLoopUiSnapshotOptions {
|
|
26
|
+
now?: Date;
|
|
27
|
+
limit?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface RenderLoopUiFrameOptions {
|
|
30
|
+
columns?: number;
|
|
31
|
+
rows?: number;
|
|
32
|
+
now?: Date;
|
|
33
|
+
refreshMs?: number;
|
|
34
|
+
color?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface RunLoopsUiAppOptions {
|
|
37
|
+
refreshMs?: number;
|
|
38
|
+
input?: NodeJS.ReadStream;
|
|
39
|
+
output?: NodeJS.WriteStream;
|
|
40
|
+
storeFactory?: () => Store;
|
|
41
|
+
}
|
|
42
|
+
export declare function buildLoopUiSnapshot(store: Store, opts?: BuildLoopUiSnapshotOptions): LoopUiSnapshot;
|
|
43
|
+
export declare function renderLoopUiFrame(snapshot: LoopUiSnapshot, opts?: RenderLoopUiFrameOptions): string;
|
|
44
|
+
export declare function runLoopsUiApp(opts?: RunLoopsUiAppOptions): Promise<void>;
|