@reforma/types 1.2.1 → 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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@reforma/types",
3
3
  "author": "Reforma, Inc. <dev@reforma.ai>",
4
4
  "description": "Shared types between Reforma apps/packages",
5
- "version": "1.2.1",
5
+ "version": "1.4.0",
6
6
  "license": "UNLICENSED",
7
7
  "repository": {
8
8
  "type": "git",
@@ -12,4 +12,6 @@ export interface CreateSandboxCluster {
12
12
  kubeconfig: string;
13
13
  status?: SandboxClusterStatusEnum;
14
14
  maxSandboxes?: number;
15
+ /** Kubelet `Localhost` seccomp profile path for sandbox pods; omit for `Unconfined`. */
16
+ seccompProfile?: string | null;
15
17
  }
@@ -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;
@@ -12,4 +12,6 @@ export interface UpdateSandboxCluster {
12
12
  kubeconfig?: string;
13
13
  status?: SandboxClusterStatusEnum;
14
14
  maxSandboxes?: number;
15
+ /** Kubelet `Localhost` seccomp profile path for sandbox pods; `null` for `Unconfined`. */
16
+ seccompProfile?: string | null;
15
17
  }
@@ -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
+ }
@@ -3,6 +3,8 @@ export interface ComponentCatalogEntry {
3
3
  key: string;
4
4
  /** Component label. */
5
5
  name: string;
6
+ /** Short line under the name. Absent when the story declares no `description`. */
7
+ description?: string;
6
8
  /** List section title. Absent when the story declares no `group`. */
7
9
  group?: string;
8
10
  /** Variant key. Absent when the story has no `variants` array. */
@@ -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';
@@ -10,7 +10,7 @@ export type ReadLintsDiagnostic = {
10
10
  endColumn?: number;
11
11
  severity: LintSeverity;
12
12
  message: string;
13
- source: 'biome' | 'typescript' | 'tokens';
13
+ source: 'biome' | 'typescript' | 'tokens' | 'stories';
14
14
  code?: string;
15
15
  };
16
16
 
@@ -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;
@@ -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
- /** Flip Code ↔ last persisted canvas mode (`exitCodeMode` / enter Code). */
37
+ /** Cycle Editor → Design → Code. Preview counts as Editor. */
38
38
  toggleCodeShell: () => void;
39
39
  };
40
40