@shapeshift-labs/frontier-loom-ui 0.1.0

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.
@@ -0,0 +1,113 @@
1
+ import http from 'node:http';
2
+ import { type FrontierCodexDashboardSnapshotInput } from '@shapeshift-labs/frontier-swarm-codex';
3
+ export interface FrontierLoomUiServerOptions extends FrontierCodexDashboardSnapshotInput {
4
+ host?: string;
5
+ port?: number;
6
+ staticDir?: string;
7
+ }
8
+ export type FrontierLoomUiHealthSourceStatus = 'not-configured' | 'ready' | 'missing' | 'invalid';
9
+ export interface FrontierLoomUiHealthSource {
10
+ configured: boolean;
11
+ status: FrontierLoomUiHealthSourceStatus;
12
+ input?: string;
13
+ file?: string;
14
+ dir?: string;
15
+ error?: string;
16
+ }
17
+ export interface FrontierLoomUiHealthResponse {
18
+ ok: boolean;
19
+ service: 'frontier-loom-ui';
20
+ generatedAt: number;
21
+ cwd: string;
22
+ sources: {
23
+ run: FrontierLoomUiHealthSource;
24
+ collection: FrontierLoomUiHealthSource;
25
+ continuation: FrontierLoomUiHealthSource;
26
+ };
27
+ }
28
+ export interface FrontierLoomUiTaskFileDiff {
29
+ path: string;
30
+ additions: number;
31
+ deletions: number;
32
+ diff: string;
33
+ language: string;
34
+ artifactPath: string;
35
+ hunks: FrontierLoomUiDiffHunk[];
36
+ truncated: boolean;
37
+ }
38
+ export type FrontierLoomUiDiffLineKind = 'meta' | 'hunk' | 'context' | 'add' | 'delete';
39
+ export interface FrontierLoomUiDiffLine {
40
+ kind: FrontierLoomUiDiffLineKind;
41
+ oldLine?: number;
42
+ newLine?: number;
43
+ content: string;
44
+ }
45
+ export interface FrontierLoomUiDiffHunk {
46
+ header: string;
47
+ lines: FrontierLoomUiDiffLine[];
48
+ }
49
+ export interface FrontierLoomUiTaskArtifact {
50
+ path: string;
51
+ label: string;
52
+ kind?: 'file' | 'directory' | 'missing';
53
+ }
54
+ export interface FrontierLoomUiTaskDetailsResponse {
55
+ ok: boolean;
56
+ jobId: string;
57
+ patchArtifact?: FrontierLoomUiTaskArtifact;
58
+ files: FrontierLoomUiTaskFileDiff[];
59
+ commandsPassed: Array<Record<string, unknown>>;
60
+ commandsFailed: Array<Record<string, unknown>>;
61
+ evidenceArtifacts: FrontierLoomUiTaskArtifact[];
62
+ error?: string;
63
+ }
64
+ export interface FrontierLoomUiArtifactEntry {
65
+ name: string;
66
+ path: string;
67
+ kind: 'file' | 'directory';
68
+ size?: number;
69
+ }
70
+ export interface FrontierLoomUiArtifactResponse {
71
+ ok: boolean;
72
+ path: string;
73
+ label: string;
74
+ kind?: 'file' | 'directory';
75
+ size?: number;
76
+ contentType?: string;
77
+ content?: string;
78
+ truncated?: boolean;
79
+ entries?: FrontierLoomUiArtifactEntry[];
80
+ error?: string;
81
+ }
82
+ export interface FrontierLoomUiArtifactRevealResponse {
83
+ ok: boolean;
84
+ path: string;
85
+ revealedPath?: string;
86
+ command?: string;
87
+ args?: string[];
88
+ dryRun?: boolean;
89
+ error?: string;
90
+ }
91
+ export interface FrontierLoomUiHumanActionAnswerResponse {
92
+ ok: boolean;
93
+ code: string;
94
+ answerPath?: string;
95
+ error?: string;
96
+ }
97
+ export interface FrontierLoomUiHumanActionAnswerRecord {
98
+ type: 'human-action.answer';
99
+ at: number;
100
+ code: string;
101
+ answer: string;
102
+ source: 'frontier-loom-ui';
103
+ }
104
+ export interface FrontierLoomUiServer {
105
+ server: http.Server;
106
+ url?: string;
107
+ close(): Promise<void>;
108
+ }
109
+ export interface FrontierLoomUiStartResult extends FrontierLoomUiServer {
110
+ url: string;
111
+ }
112
+ export declare function createLoomUiServer(options?: FrontierLoomUiServerOptions): FrontierLoomUiServer;
113
+ export declare function startLoomUiServer(options?: FrontierLoomUiServerOptions): Promise<FrontierLoomUiStartResult>;