@reforma/types 1.3.0 → 1.4.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.
- package/package.json +1 -1
- package/src/api/sandbox-clusters/create-sandbox-cluster.ts +2 -0
- package/src/api/sandbox-clusters/sandbox-cluster.ts +6 -0
- package/src/api/sandbox-clusters/update-sandbox-cluster.ts +2 -0
- package/src/api/screenshot/screenshot.ts +24 -0
- package/src/sandbox/tools/check-page.ts +29 -0
- package/src/sandbox/tools/index.ts +1 -0
- package/src/sandbox/tools/read-lints.ts +1 -1
- package/src/sandbox/ui-message.ts +2 -0
- package/src/theia/bridge.ts +1 -1
package/package.json
CHANGED
|
@@ -12,6 +12,12 @@ export interface SandboxCluster {
|
|
|
12
12
|
version: string | null;
|
|
13
13
|
status: SandboxClusterStatusEnum;
|
|
14
14
|
maxSandboxes: number;
|
|
15
|
+
/**
|
|
16
|
+
* Path of the kubelet `Localhost` seccomp profile the cluster's nodes carry,
|
|
17
|
+
* relative to the kubelet seccomp root. `null` runs sandbox pods
|
|
18
|
+
* `Unconfined`, for clusters where no profile is installed.
|
|
19
|
+
*/
|
|
20
|
+
seccompProfile: string | null;
|
|
15
21
|
lastHealthCheckAt: Date | null;
|
|
16
22
|
healthCheckError: string | null;
|
|
17
23
|
createdByUserId: number;
|
|
@@ -40,3 +40,27 @@ export interface ScreenshotUploadResponse {
|
|
|
40
40
|
mediaType: 'image/png' | 'image/jpeg';
|
|
41
41
|
size: number;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
/** Open a page without capturing it. Same URL rules and viewport defaults as a screenshot. */
|
|
45
|
+
export interface PageInspectRequest {
|
|
46
|
+
url: string;
|
|
47
|
+
headers?: Record<string, string>;
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
waitUntil?: ScreenshotWaitUntil;
|
|
51
|
+
/** Milliseconds to wait after the page loads. Default 500. Capped at 10000. */
|
|
52
|
+
delayMs?: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** What the browser reported while the page loaded and settled. Each list keeps the first 20 entries. */
|
|
56
|
+
export interface PageInspection {
|
|
57
|
+
/** HTTP status of the document. Omitted when navigation failed. */
|
|
58
|
+
status?: number;
|
|
59
|
+
/** Navigation failure, such as a timeout. */
|
|
60
|
+
error?: string;
|
|
61
|
+
/** Uncaught exceptions thrown in the page. */
|
|
62
|
+
pageErrors: string[];
|
|
63
|
+
console: { type: 'error' | 'warn'; text: string }[];
|
|
64
|
+
/** Subresources that failed or answered 4xx/5xx. */
|
|
65
|
+
failedRequests: { url: string; status?: number; error?: string }[];
|
|
66
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Matches sandbox `CheckPage` tool schemas. */
|
|
2
|
+
|
|
3
|
+
export type CheckPageToolInput = {
|
|
4
|
+
/** Preview paths, such as `/` or `/reforma/stories/ui/button?variant=outline`. */
|
|
5
|
+
paths: string[];
|
|
6
|
+
delayMs?: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/** One visited path. Empty fields are omitted. */
|
|
10
|
+
export type CheckPageReport = {
|
|
11
|
+
path: string;
|
|
12
|
+
status?: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
pageErrors?: string[];
|
|
15
|
+
console?: { type: 'error' | 'warn'; text: string }[];
|
|
16
|
+
failedRequests?: { url: string; status?: number; error?: string }[];
|
|
17
|
+
/** Dev server output written while the page loaded. */
|
|
18
|
+
serverLog?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type CheckPageToolOutput = {
|
|
22
|
+
pages?: CheckPageReport[];
|
|
23
|
+
error?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type CheckPageUITool = {
|
|
27
|
+
input: CheckPageToolInput;
|
|
28
|
+
output: CheckPageToolOutput;
|
|
29
|
+
};
|
|
@@ -3,6 +3,7 @@ export * from './ask-user-question';
|
|
|
3
3
|
export * from './bash';
|
|
4
4
|
export * from './build';
|
|
5
5
|
export * from './capture-screenshot';
|
|
6
|
+
export * from './check-page';
|
|
6
7
|
export * from './choose-design-direction';
|
|
7
8
|
export * from './commit';
|
|
8
9
|
export * from './commit-design-read';
|
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
BashUITool,
|
|
13
13
|
BuildUITool,
|
|
14
14
|
CallDynamicToolUITool,
|
|
15
|
+
CheckPageUITool,
|
|
15
16
|
ChooseDesignDirectionUITool,
|
|
16
17
|
CommitDesignReadUITool,
|
|
17
18
|
CommitUITool,
|
|
@@ -359,6 +360,7 @@ export type ReformaChatUITools = {
|
|
|
359
360
|
MoveFile: MoveFileUITool;
|
|
360
361
|
Navigate: NavigateUITool;
|
|
361
362
|
PageScreenshot: PageScreenshotUITool;
|
|
363
|
+
CheckPage: CheckPageUITool;
|
|
362
364
|
ReadPlan: ReadPlanUITool;
|
|
363
365
|
ReadTodo: ReadTodoUITool;
|
|
364
366
|
TodoWrite: TodoWriteUITool;
|
package/src/theia/bridge.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type TheiaHostMethods = {
|
|
|
34
34
|
onAttachFiles: (files: readonly CodeEditorState[]) => void;
|
|
35
35
|
/** Switch the parent shell/canvas mode, or activate commenting, while Theia holds keyboard focus. */
|
|
36
36
|
setViewMode: (mode: TheiaHostViewMode) => void;
|
|
37
|
-
/**
|
|
37
|
+
/** Cycle Editor → Design → Code. Preview counts as Editor. */
|
|
38
38
|
toggleCodeShell: () => void;
|
|
39
39
|
};
|
|
40
40
|
|