@h-rig/contracts 0.0.6-alpha.77 → 0.0.6-alpha.79

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,103 @@
1
+ import { Schema } from "effect";
2
+ export declare const RunKind: Schema.Literals<readonly ["adhoc", "task", "batch", "validation", "review"]>;
3
+ export type RunKind = typeof RunKind.Type;
4
+ export declare const RunMode: Schema.Literals<readonly ["interactive", "autonomous", "supervised"]>;
5
+ export type RunMode = typeof RunMode.Type;
6
+ export declare const RunStatus: Schema.Literals<readonly ["created", "queued", "preparing", "running", "waiting-approval", "waiting-user-input", "paused", "validating", "reviewing", "closing-out", "needs-attention", "completed", "failed", "stopped"]>;
7
+ export type RunStatus = typeof RunStatus.Type;
8
+ export declare const EngineSandboxMode: Schema.Literals<readonly ["read-only", "workspace-write", "danger-full-access"]>;
9
+ export type EngineSandboxMode = typeof EngineSandboxMode.Type;
10
+ export declare const IsolationMode: Schema.Literals<readonly ["none", "env", "worktree"]>;
11
+ export type IsolationMode = typeof IsolationMode.Type;
12
+ export declare const RuntimeStatus: Schema.Literals<readonly ["prepared", "starting", "running", "interrupted", "exited", "failed", "destroyed"]>;
13
+ export type RuntimeStatus = typeof RuntimeStatus.Type;
14
+ export declare const RunExecutionTarget: Schema.Literals<readonly ["local", "remote"]>;
15
+ export type RunExecutionTarget = typeof RunExecutionTarget.Type;
16
+ export declare const RunSummary: Schema.Struct<{
17
+ readonly id: Schema.brand<Schema.Trim, "RunId">;
18
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
19
+ readonly taskId: Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>;
20
+ readonly title: Schema.Trim;
21
+ readonly runKind: Schema.Literals<readonly ["adhoc", "task", "batch", "validation", "review"]>;
22
+ readonly mode: Schema.Literals<readonly ["interactive", "autonomous", "supervised"]>;
23
+ readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
24
+ readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
25
+ readonly status: Schema.Literals<readonly ["created", "queued", "preparing", "running", "waiting-approval", "waiting-user-input", "paused", "validating", "reviewing", "closing-out", "needs-attention", "completed", "failed", "stopped"]>;
26
+ readonly runtimeAdapter: Schema.Trim;
27
+ readonly model: Schema.NullOr<Schema.Trim>;
28
+ readonly initialPrompt: Schema.NullOr<Schema.String>;
29
+ readonly executionTarget: Schema.optional<Schema.Literals<readonly ["local", "remote"]>>;
30
+ readonly remoteHostId: Schema.optional<Schema.NullOr<Schema.Trim>>;
31
+ readonly remoteLeaseId: Schema.optional<Schema.NullOr<Schema.Trim>>;
32
+ readonly remoteLeaseClaimedAt: Schema.optional<Schema.NullOr<Schema.String>>;
33
+ readonly activeRuntimeId: Schema.NullOr<Schema.brand<Schema.Trim, "EngineRuntimeId">>;
34
+ readonly latestMessageId: Schema.NullOr<Schema.Trim>;
35
+ readonly pendingApprovalCount: Schema.Int;
36
+ readonly pendingUserInputCount: Schema.Int;
37
+ readonly branch: Schema.NullOr<Schema.Trim>;
38
+ readonly worktreePath: Schema.NullOr<Schema.Trim>;
39
+ readonly errorText: Schema.NullOr<Schema.String>;
40
+ readonly createdAt: Schema.String;
41
+ readonly updatedAt: Schema.String;
42
+ readonly startedAt: Schema.NullOr<Schema.String>;
43
+ readonly completedAt: Schema.NullOr<Schema.String>;
44
+ }>;
45
+ export type RunSummary = typeof RunSummary.Type;
46
+ export declare const RuntimeSummary: Schema.Struct<{
47
+ readonly id: Schema.brand<Schema.Trim, "EngineRuntimeId">;
48
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
49
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
50
+ readonly adapterKind: Schema.Trim;
51
+ readonly executionTarget: Schema.optional<Schema.Literals<readonly ["local", "remote"]>>;
52
+ readonly remoteHostId: Schema.optional<Schema.NullOr<Schema.Trim>>;
53
+ readonly status: Schema.Literals<readonly ["prepared", "starting", "running", "interrupted", "exited", "failed", "destroyed"]>;
54
+ readonly sandboxMode: Schema.Literals<readonly ["read-only", "workspace-write", "danger-full-access"]>;
55
+ readonly isolationMode: Schema.Literals<readonly ["none", "env", "worktree"]>;
56
+ readonly workspaceDir: Schema.NullOr<Schema.Trim>;
57
+ readonly homeDir: Schema.NullOr<Schema.Trim>;
58
+ readonly tmpDir: Schema.NullOr<Schema.Trim>;
59
+ readonly cacheDir: Schema.NullOr<Schema.Trim>;
60
+ readonly logsDir: Schema.NullOr<Schema.Trim>;
61
+ readonly stateDir: Schema.NullOr<Schema.Trim>;
62
+ readonly sessionDir: Schema.NullOr<Schema.Trim>;
63
+ readonly sessionLogPath: Schema.NullOr<Schema.Trim>;
64
+ readonly pid: Schema.NullOr<Schema.Int>;
65
+ readonly startedAt: Schema.NullOr<Schema.String>;
66
+ readonly updatedAt: Schema.String;
67
+ readonly exitedAt: Schema.NullOr<Schema.String>;
68
+ }>;
69
+ export type RuntimeSummary = typeof RuntimeSummary.Type;
70
+ export declare const ApprovalStatus: Schema.Literals<readonly ["pending", "resolved"]>;
71
+ export type ApprovalStatus = typeof ApprovalStatus.Type;
72
+ export declare const ApprovalSummary: Schema.Struct<{
73
+ readonly id: Schema.Trim;
74
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
75
+ readonly actionId: Schema.NullOr<Schema.Trim>;
76
+ readonly requestKind: Schema.Trim;
77
+ readonly status: Schema.Literals<readonly ["pending", "resolved"]>;
78
+ readonly payload: Schema.Unknown;
79
+ readonly createdAt: Schema.String;
80
+ readonly resolvedAt: Schema.NullOr<Schema.String>;
81
+ }>;
82
+ export type ApprovalSummary = typeof ApprovalSummary.Type;
83
+ export declare const UserInputRequestSummary: Schema.Struct<{
84
+ readonly id: Schema.Trim;
85
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
86
+ readonly status: Schema.Literals<readonly ["pending", "resolved"]>;
87
+ readonly payload: Schema.Unknown;
88
+ readonly createdAt: Schema.String;
89
+ readonly resolvedAt: Schema.NullOr<Schema.String>;
90
+ }>;
91
+ export type UserInputRequestSummary = typeof UserInputRequestSummary.Type;
92
+ export declare const WorktreeSummary: Schema.Struct<{
93
+ readonly id: Schema.brand<Schema.Trim, "WorktreeId">;
94
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
95
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
96
+ readonly taskId: Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>;
97
+ readonly branchName: Schema.Trim;
98
+ readonly path: Schema.Trim;
99
+ readonly status: Schema.Trim;
100
+ readonly createdAt: Schema.String;
101
+ readonly cleanedAt: Schema.NullOr<Schema.String>;
102
+ }>;
103
+ export type WorktreeSummary = typeof WorktreeSummary.Type;
@@ -0,0 +1,106 @@
1
+ import { Schema } from "effect";
2
+ export declare const ServerConfigIssue: Schema.Union<readonly [Schema.Struct<{
3
+ readonly kind: Schema.Literal<"keybindings.malformed-config">;
4
+ readonly message: Schema.Trim;
5
+ }>, Schema.Struct<{
6
+ readonly kind: Schema.Literal<"keybindings.invalid-entry">;
7
+ readonly message: Schema.Trim;
8
+ readonly index: Schema.Number;
9
+ }>]>;
10
+ export type ServerConfigIssue = typeof ServerConfigIssue.Type;
11
+ export declare const ServerProviderStatusState: Schema.Literals<readonly ["ready", "warning", "error"]>;
12
+ export type ServerProviderStatusState = typeof ServerProviderStatusState.Type;
13
+ export declare const ServerProviderAuthStatus: Schema.Literals<readonly ["authenticated", "unauthenticated", "unknown"]>;
14
+ export type ServerProviderAuthStatus = typeof ServerProviderAuthStatus.Type;
15
+ export declare const ServerProviderStatus: Schema.Struct<{
16
+ readonly provider: Schema.Literals<readonly ["codex", "claude"]>;
17
+ readonly status: Schema.Literals<readonly ["ready", "warning", "error"]>;
18
+ readonly available: Schema.Boolean;
19
+ readonly authStatus: Schema.Literals<readonly ["authenticated", "unauthenticated", "unknown"]>;
20
+ readonly checkedAt: Schema.String;
21
+ readonly message: Schema.optional<Schema.Trim>;
22
+ }>;
23
+ export type ServerProviderStatus = typeof ServerProviderStatus.Type;
24
+ export declare const ServerConfig: Schema.Struct<{
25
+ readonly cwd: Schema.Trim;
26
+ readonly rigRoot: Schema.NullOr<Schema.Trim>;
27
+ readonly keybindingsConfigPath: Schema.Trim;
28
+ readonly keybindings: Schema.$Array<Schema.Struct<{
29
+ readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
30
+ readonly shortcut: Schema.Struct<{
31
+ readonly key: Schema.Trim;
32
+ readonly metaKey: Schema.Boolean;
33
+ readonly ctrlKey: Schema.Boolean;
34
+ readonly shiftKey: Schema.Boolean;
35
+ readonly altKey: Schema.Boolean;
36
+ readonly modKey: Schema.Boolean;
37
+ }>;
38
+ readonly whenAst: Schema.optional<Schema.Schema<import("./keybindings").KeybindingWhenNode>>;
39
+ }>>;
40
+ readonly issues: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
41
+ readonly kind: Schema.Literal<"keybindings.malformed-config">;
42
+ readonly message: Schema.Trim;
43
+ }>, Schema.Struct<{
44
+ readonly kind: Schema.Literal<"keybindings.invalid-entry">;
45
+ readonly message: Schema.Trim;
46
+ readonly index: Schema.Number;
47
+ }>]>>;
48
+ readonly providers: Schema.$Array<Schema.Struct<{
49
+ readonly provider: Schema.Literals<readonly ["codex", "claude"]>;
50
+ readonly status: Schema.Literals<readonly ["ready", "warning", "error"]>;
51
+ readonly available: Schema.Boolean;
52
+ readonly authStatus: Schema.Literals<readonly ["authenticated", "unauthenticated", "unknown"]>;
53
+ readonly checkedAt: Schema.String;
54
+ readonly message: Schema.optional<Schema.Trim>;
55
+ }>>;
56
+ readonly availableEditors: Schema.$Array<Schema.Literals<("cursor" | "vscode" | "zed" | "file-manager")[]>>;
57
+ }>;
58
+ export type ServerConfig = typeof ServerConfig.Type;
59
+ export declare const ServerUpsertKeybindingInput: Schema.Struct<{
60
+ readonly key: Schema.Trim;
61
+ readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
62
+ readonly when: Schema.optional<Schema.Trim>;
63
+ }>;
64
+ export type ServerUpsertKeybindingInput = typeof ServerUpsertKeybindingInput.Type;
65
+ export declare const ServerUpsertKeybindingResult: Schema.Struct<{
66
+ readonly keybindings: Schema.$Array<Schema.Struct<{
67
+ readonly command: Schema.Union<readonly [Schema.Literals<readonly ["terminal.toggle", "terminal.split", "terminal.new", "terminal.close", "diff.toggle", "chat.new", "chat.newLocal", "editor.openFavorite"]>, Schema.TemplateLiteral<readonly [Schema.Literal<"script.">, Schema.String, Schema.Literal<".run">]>]>;
68
+ readonly shortcut: Schema.Struct<{
69
+ readonly key: Schema.Trim;
70
+ readonly metaKey: Schema.Boolean;
71
+ readonly ctrlKey: Schema.Boolean;
72
+ readonly shiftKey: Schema.Boolean;
73
+ readonly altKey: Schema.Boolean;
74
+ readonly modKey: Schema.Boolean;
75
+ }>;
76
+ readonly whenAst: Schema.optional<Schema.Schema<import("./keybindings").KeybindingWhenNode>>;
77
+ }>>;
78
+ readonly issues: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
79
+ readonly kind: Schema.Literal<"keybindings.malformed-config">;
80
+ readonly message: Schema.Trim;
81
+ }>, Schema.Struct<{
82
+ readonly kind: Schema.Literal<"keybindings.invalid-entry">;
83
+ readonly message: Schema.Trim;
84
+ readonly index: Schema.Number;
85
+ }>]>>;
86
+ }>;
87
+ export type ServerUpsertKeybindingResult = typeof ServerUpsertKeybindingResult.Type;
88
+ export declare const ServerConfigUpdatedPayload: Schema.Struct<{
89
+ readonly issues: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
90
+ readonly kind: Schema.Literal<"keybindings.malformed-config">;
91
+ readonly message: Schema.Trim;
92
+ }>, Schema.Struct<{
93
+ readonly kind: Schema.Literal<"keybindings.invalid-entry">;
94
+ readonly message: Schema.Trim;
95
+ readonly index: Schema.Number;
96
+ }>]>>;
97
+ readonly providers: Schema.$Array<Schema.Struct<{
98
+ readonly provider: Schema.Literals<readonly ["codex", "claude"]>;
99
+ readonly status: Schema.Literals<readonly ["ready", "warning", "error"]>;
100
+ readonly available: Schema.Boolean;
101
+ readonly authStatus: Schema.Literals<readonly ["authenticated", "unauthenticated", "unknown"]>;
102
+ readonly checkedAt: Schema.String;
103
+ readonly message: Schema.optional<Schema.Trim>;
104
+ }>>;
105
+ }>;
106
+ export type ServerConfigUpdatedPayload = typeof ServerConfigUpdatedPayload.Type;
@@ -0,0 +1,62 @@
1
+ import { Schema } from "effect";
2
+ export declare const ServiceFabricWorkspaceInput: Schema.Struct<{
3
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
4
+ }>;
5
+ export type ServiceFabricWorkspaceInput = typeof ServiceFabricWorkspaceInput.Type;
6
+ export declare const ServiceFabricUpInput: Schema.Struct<{
7
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
8
+ readonly services: Schema.optional<Schema.$Array<Schema.Trim>>;
9
+ }>;
10
+ export type ServiceFabricUpInput = typeof ServiceFabricUpInput.Type;
11
+ export declare const ServiceFabricUpResult: Schema.Struct<{
12
+ readonly plan: Schema.Struct<{
13
+ readonly generatedAt: Schema.String;
14
+ readonly serviceCount: Schema.Number;
15
+ readonly services: Schema.$Array<Schema.Struct<{
16
+ readonly name: Schema.Trim;
17
+ readonly relativeRootPath: Schema.Trim;
18
+ readonly absoluteRootPath: Schema.Trim;
19
+ readonly port: Schema.Number;
20
+ readonly healthcheck: Schema.Trim;
21
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
22
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
23
+ readonly command: Schema.NullOr<Schema.String>;
24
+ readonly environment: Schema.Unknown;
25
+ }>>;
26
+ readonly warnings: Schema.$Array<Schema.String>;
27
+ }>;
28
+ readonly state: Schema.Struct<{
29
+ readonly generatedAt: Schema.String;
30
+ readonly rootPath: Schema.Trim;
31
+ readonly services: Schema.$Array<Schema.Struct<{
32
+ readonly name: Schema.Trim;
33
+ readonly pid: Schema.Number;
34
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
35
+ readonly port: Schema.Number;
36
+ readonly healthcheck: Schema.Trim;
37
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
38
+ readonly relativeRootPath: Schema.Trim;
39
+ readonly logPath: Schema.Trim;
40
+ }>>;
41
+ }>;
42
+ readonly summary: Schema.Struct<{
43
+ readonly updatedAt: Schema.String;
44
+ readonly status: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
45
+ readonly serviceCount: Schema.Number;
46
+ readonly healthyServiceCount: Schema.Number;
47
+ readonly stateDir: Schema.Trim;
48
+ readonly services: Schema.$Array<Schema.Struct<{
49
+ readonly name: Schema.Trim;
50
+ readonly relativeRootPath: Schema.Trim;
51
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
52
+ readonly port: Schema.Number;
53
+ readonly healthcheck: Schema.Trim;
54
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
55
+ readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
56
+ readonly pid: Schema.NullOr<Schema.Number>;
57
+ readonly logPath: Schema.NullOr<Schema.Trim>;
58
+ }>>;
59
+ readonly warnings: Schema.$Array<Schema.String>;
60
+ }>;
61
+ }>;
62
+ export type ServiceFabricUpResult = typeof ServiceFabricUpResult.Type;
@@ -0,0 +1,28 @@
1
+ import type { TaskSourceRegistration } from "./plugin";
2
+ /**
3
+ * A single task record returned by a task source adapter.
4
+ * Open-ended to allow adapters to include source-specific fields.
5
+ */
6
+ export interface TaskRecord {
7
+ id: string;
8
+ deps: readonly string[];
9
+ status: "ready" | "in_progress" | "closed" | "blocked" | "open" | string;
10
+ [extra: string]: unknown;
11
+ }
12
+ /**
13
+ * A registered task source adapter — combines the plugin-level registration
14
+ * metadata with the runtime-callable interface.
15
+ */
16
+ export interface TaskSourceUpdate {
17
+ status?: TaskRecord["status"];
18
+ title?: string;
19
+ body?: string;
20
+ comment?: string;
21
+ metadata?: Record<string, unknown>;
22
+ }
23
+ export interface RegisteredTaskSource extends TaskSourceRegistration {
24
+ list(): Promise<readonly TaskRecord[]>;
25
+ get?(id: string): Promise<TaskRecord | undefined>;
26
+ updateStatus?(id: string, status: TaskRecord["status"]): Promise<void>;
27
+ updateTask?(id: string, update: TaskSourceUpdate): Promise<void>;
28
+ }
@@ -0,0 +1,130 @@
1
+ import { Schema } from "effect";
2
+ export declare const DEFAULT_TERMINAL_ID = "default";
3
+ export declare const TerminalThreadInput: Schema.Struct<{
4
+ readonly threadId: Schema.Trim;
5
+ }>;
6
+ export type TerminalThreadInput = Schema.Codec.Encoded<typeof TerminalThreadInput>;
7
+ declare const TerminalSessionInput: Schema.Struct<{
8
+ readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
9
+ readonly threadId: Schema.Trim;
10
+ }>;
11
+ export type TerminalSessionInput = Schema.Codec.Encoded<typeof TerminalSessionInput>;
12
+ export declare const TerminalOpenInput: Schema.Struct<{
13
+ readonly cwd: Schema.Trim;
14
+ readonly cols: Schema.optional<Schema.Int>;
15
+ readonly rows: Schema.optional<Schema.Int>;
16
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
17
+ readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
18
+ readonly threadId: Schema.Trim;
19
+ }>;
20
+ export type TerminalOpenInput = Schema.Codec.Encoded<typeof TerminalOpenInput>;
21
+ export declare const TerminalWriteInput: Schema.Struct<{
22
+ readonly data: Schema.String;
23
+ readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
24
+ readonly threadId: Schema.Trim;
25
+ }>;
26
+ export type TerminalWriteInput = Schema.Codec.Encoded<typeof TerminalWriteInput>;
27
+ export declare const TerminalResizeInput: Schema.Struct<{
28
+ readonly cols: Schema.Int;
29
+ readonly rows: Schema.Int;
30
+ readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
31
+ readonly threadId: Schema.Trim;
32
+ }>;
33
+ export type TerminalResizeInput = Schema.Codec.Encoded<typeof TerminalResizeInput>;
34
+ export declare const TerminalClearInput: Schema.Struct<{
35
+ readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
36
+ readonly threadId: Schema.Trim;
37
+ }>;
38
+ export type TerminalClearInput = Schema.Codec.Encoded<typeof TerminalClearInput>;
39
+ export declare const TerminalRestartInput: Schema.Struct<{
40
+ readonly cwd: Schema.Trim;
41
+ readonly cols: Schema.Int;
42
+ readonly rows: Schema.Int;
43
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
44
+ readonly threadId: Schema.Trim;
45
+ }>;
46
+ export declare const TerminalCloseInput: Schema.Struct<{
47
+ readonly terminalId: Schema.optional<Schema.Trim>;
48
+ readonly deleteHistory: Schema.optional<Schema.Boolean>;
49
+ readonly threadId: Schema.Trim;
50
+ }>;
51
+ export type TerminalCloseInput = Schema.Codec.Encoded<typeof TerminalCloseInput>;
52
+ export declare const TerminalSessionStatus: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
53
+ export type TerminalSessionStatus = typeof TerminalSessionStatus.Type;
54
+ export declare const TerminalSessionSnapshot: Schema.Struct<{
55
+ readonly threadId: Schema.String;
56
+ readonly terminalId: Schema.String;
57
+ readonly cwd: Schema.String;
58
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
59
+ readonly pid: Schema.NullOr<Schema.Int>;
60
+ readonly history: Schema.String;
61
+ readonly exitCode: Schema.NullOr<Schema.Int>;
62
+ readonly exitSignal: Schema.NullOr<Schema.String>;
63
+ readonly updatedAt: Schema.String;
64
+ }>;
65
+ export type TerminalSessionSnapshot = typeof TerminalSessionSnapshot.Type;
66
+ export declare const TerminalEvent: Schema.Union<readonly [Schema.Struct<{
67
+ readonly type: Schema.Literal<"started">;
68
+ readonly snapshot: Schema.Struct<{
69
+ readonly threadId: Schema.String;
70
+ readonly terminalId: Schema.String;
71
+ readonly cwd: Schema.String;
72
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
73
+ readonly pid: Schema.NullOr<Schema.Int>;
74
+ readonly history: Schema.String;
75
+ readonly exitCode: Schema.NullOr<Schema.Int>;
76
+ readonly exitSignal: Schema.NullOr<Schema.String>;
77
+ readonly updatedAt: Schema.String;
78
+ }>;
79
+ readonly threadId: Schema.String;
80
+ readonly terminalId: Schema.String;
81
+ readonly createdAt: Schema.String;
82
+ }>, Schema.Struct<{
83
+ readonly type: Schema.Literal<"output">;
84
+ readonly data: Schema.String;
85
+ readonly threadId: Schema.String;
86
+ readonly terminalId: Schema.String;
87
+ readonly createdAt: Schema.String;
88
+ }>, Schema.Struct<{
89
+ readonly type: Schema.Literal<"exited">;
90
+ readonly exitCode: Schema.NullOr<Schema.Int>;
91
+ readonly exitSignal: Schema.NullOr<Schema.String>;
92
+ readonly threadId: Schema.String;
93
+ readonly terminalId: Schema.String;
94
+ readonly createdAt: Schema.String;
95
+ }>, Schema.Struct<{
96
+ readonly type: Schema.Literal<"error">;
97
+ readonly message: Schema.String;
98
+ readonly threadId: Schema.String;
99
+ readonly terminalId: Schema.String;
100
+ readonly createdAt: Schema.String;
101
+ }>, Schema.Struct<{
102
+ readonly type: Schema.Literal<"cleared">;
103
+ readonly threadId: Schema.String;
104
+ readonly terminalId: Schema.String;
105
+ readonly createdAt: Schema.String;
106
+ }>, Schema.Struct<{
107
+ readonly type: Schema.Literal<"restarted">;
108
+ readonly snapshot: Schema.Struct<{
109
+ readonly threadId: Schema.String;
110
+ readonly terminalId: Schema.String;
111
+ readonly cwd: Schema.String;
112
+ readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
113
+ readonly pid: Schema.NullOr<Schema.Int>;
114
+ readonly history: Schema.String;
115
+ readonly exitCode: Schema.NullOr<Schema.Int>;
116
+ readonly exitSignal: Schema.NullOr<Schema.String>;
117
+ readonly updatedAt: Schema.String;
118
+ }>;
119
+ readonly threadId: Schema.String;
120
+ readonly terminalId: Schema.String;
121
+ readonly createdAt: Schema.String;
122
+ }>, Schema.Struct<{
123
+ readonly type: Schema.Literal<"activity">;
124
+ readonly hasRunningSubprocess: Schema.Boolean;
125
+ readonly threadId: Schema.String;
126
+ readonly terminalId: Schema.String;
127
+ readonly createdAt: Schema.String;
128
+ }>]>;
129
+ export type TerminalEvent = typeof TerminalEvent.Type;
130
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Schema } from "effect";
2
+ export declare const ValidationStatus: Schema.Literals<readonly ["pending", "running", "passed", "failed", "skipped"]>;
3
+ export type ValidationStatus = typeof ValidationStatus.Type;
4
+ export declare const ValidationSummary: Schema.Struct<{
5
+ readonly id: Schema.brand<Schema.Trim, "ValidationResultId">;
6
+ readonly runId: Schema.brand<Schema.Trim, "RunId">;
7
+ readonly taskId: Schema.NullOr<Schema.brand<Schema.Trim, "TaskId">>;
8
+ readonly validatorKey: Schema.Trim;
9
+ readonly status: Schema.Literals<readonly ["pending", "running", "passed", "failed", "skipped"]>;
10
+ readonly output: Schema.Unknown;
11
+ readonly startedAt: Schema.String;
12
+ readonly completedAt: Schema.NullOr<Schema.String>;
13
+ }>;
14
+ export type ValidationSummary = typeof ValidationSummary.Type;
@@ -0,0 +1,204 @@
1
+ import { Schema } from "effect";
2
+ export declare const WorkspaceSourceKind: Schema.Literals<readonly ["native", "rig-import", "manual", "remote"]>;
3
+ export type WorkspaceSourceKind = typeof WorkspaceSourceKind.Type;
4
+ export declare const WorkspaceTopologyStatus: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
5
+ export type WorkspaceTopologyStatus = typeof WorkspaceTopologyStatus.Type;
6
+ export declare const WorkspaceRemoteFleetStatus: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
7
+ export type WorkspaceRemoteFleetStatus = typeof WorkspaceRemoteFleetStatus.Type;
8
+ export declare const WorkspaceServiceFabricStatus: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
9
+ export type WorkspaceServiceFabricStatus = typeof WorkspaceServiceFabricStatus.Type;
10
+ export declare const WorkspaceRemoteHostStatus: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
11
+ export type WorkspaceRemoteHostStatus = typeof WorkspaceRemoteHostStatus.Type;
12
+ export declare const WorkspaceTopologyServiceSummary: Schema.Struct<{
13
+ readonly name: Schema.Trim;
14
+ readonly relativeRootPath: Schema.Trim;
15
+ readonly runtime: Schema.Trim;
16
+ readonly port: Schema.NullOr<Schema.Number>;
17
+ readonly healthcheck: Schema.NullOr<Schema.Trim>;
18
+ readonly sourceOfTruth: Schema.Struct<{
19
+ readonly code: Schema.NullOr<Schema.Trim>;
20
+ readonly tests: Schema.NullOr<Schema.Trim>;
21
+ readonly infra: Schema.NullOr<Schema.Trim>;
22
+ readonly deploy: Schema.NullOr<Schema.Trim>;
23
+ readonly dependencies: Schema.NullOr<Schema.Trim>;
24
+ }>;
25
+ readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
26
+ }>;
27
+ export type WorkspaceTopologyServiceSummary = typeof WorkspaceTopologyServiceSummary.Type;
28
+ export declare const WorkspaceTopologySummary: Schema.Struct<{
29
+ readonly compiledAt: Schema.String;
30
+ readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
31
+ readonly manifestCount: Schema.Number;
32
+ readonly serviceCount: Schema.Number;
33
+ readonly services: Schema.$Array<Schema.Struct<{
34
+ readonly name: Schema.Trim;
35
+ readonly relativeRootPath: Schema.Trim;
36
+ readonly runtime: Schema.Trim;
37
+ readonly port: Schema.NullOr<Schema.Number>;
38
+ readonly healthcheck: Schema.NullOr<Schema.Trim>;
39
+ readonly sourceOfTruth: Schema.Struct<{
40
+ readonly code: Schema.NullOr<Schema.Trim>;
41
+ readonly tests: Schema.NullOr<Schema.Trim>;
42
+ readonly infra: Schema.NullOr<Schema.Trim>;
43
+ readonly deploy: Schema.NullOr<Schema.Trim>;
44
+ readonly dependencies: Schema.NullOr<Schema.Trim>;
45
+ }>;
46
+ readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
47
+ }>>;
48
+ readonly warnings: Schema.$Array<Schema.String>;
49
+ }>;
50
+ export type WorkspaceTopologySummary = typeof WorkspaceTopologySummary.Type;
51
+ export declare const WorkspaceRemoteHostSummary: Schema.Struct<{
52
+ readonly id: Schema.Trim;
53
+ readonly name: Schema.Trim;
54
+ readonly baseUrl: Schema.Trim;
55
+ readonly workspacePath: Schema.NullOr<Schema.Trim>;
56
+ readonly transport: Schema.Trim;
57
+ readonly hostname: Schema.NullOr<Schema.Trim>;
58
+ readonly region: Schema.NullOr<Schema.Trim>;
59
+ readonly labels: Schema.$Array<Schema.Trim>;
60
+ readonly capabilities: Schema.$Array<Schema.Trim>;
61
+ readonly runtimeAdapters: Schema.$Array<Schema.Trim>;
62
+ readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
63
+ readonly currentLeaseCount: Schema.Number;
64
+ readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
65
+ readonly registeredAt: Schema.String;
66
+ readonly manifestPath: Schema.Trim;
67
+ }>;
68
+ export type WorkspaceRemoteHostSummary = typeof WorkspaceRemoteHostSummary.Type;
69
+ export declare const WorkspaceRemoteFleetSummary: Schema.Struct<{
70
+ readonly updatedAt: Schema.String;
71
+ readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
72
+ readonly manifestCount: Schema.Number;
73
+ readonly hostCount: Schema.Number;
74
+ readonly onlineHostCount: Schema.Number;
75
+ readonly hosts: Schema.$Array<Schema.Struct<{
76
+ readonly id: Schema.Trim;
77
+ readonly name: Schema.Trim;
78
+ readonly baseUrl: Schema.Trim;
79
+ readonly workspacePath: Schema.NullOr<Schema.Trim>;
80
+ readonly transport: Schema.Trim;
81
+ readonly hostname: Schema.NullOr<Schema.Trim>;
82
+ readonly region: Schema.NullOr<Schema.Trim>;
83
+ readonly labels: Schema.$Array<Schema.Trim>;
84
+ readonly capabilities: Schema.$Array<Schema.Trim>;
85
+ readonly runtimeAdapters: Schema.$Array<Schema.Trim>;
86
+ readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
87
+ readonly currentLeaseCount: Schema.Number;
88
+ readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
89
+ readonly registeredAt: Schema.String;
90
+ readonly manifestPath: Schema.Trim;
91
+ }>>;
92
+ readonly warnings: Schema.$Array<Schema.String>;
93
+ }>;
94
+ export type WorkspaceRemoteFleetSummary = typeof WorkspaceRemoteFleetSummary.Type;
95
+ export declare const WorkspaceServiceFabricServiceSummary: Schema.Struct<{
96
+ readonly name: Schema.Trim;
97
+ readonly relativeRootPath: Schema.Trim;
98
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
99
+ readonly port: Schema.Number;
100
+ readonly healthcheck: Schema.Trim;
101
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
102
+ readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
103
+ readonly pid: Schema.NullOr<Schema.Number>;
104
+ readonly logPath: Schema.NullOr<Schema.Trim>;
105
+ }>;
106
+ export type WorkspaceServiceFabricServiceSummary = typeof WorkspaceServiceFabricServiceSummary.Type;
107
+ export declare const WorkspaceServiceFabricSummary: Schema.Struct<{
108
+ readonly updatedAt: Schema.String;
109
+ readonly status: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
110
+ readonly serviceCount: Schema.Number;
111
+ readonly healthyServiceCount: Schema.Number;
112
+ readonly stateDir: Schema.Trim;
113
+ readonly services: Schema.$Array<Schema.Struct<{
114
+ readonly name: Schema.Trim;
115
+ readonly relativeRootPath: Schema.Trim;
116
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
117
+ readonly port: Schema.Number;
118
+ readonly healthcheck: Schema.Trim;
119
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
120
+ readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
121
+ readonly pid: Schema.NullOr<Schema.Number>;
122
+ readonly logPath: Schema.NullOr<Schema.Trim>;
123
+ }>>;
124
+ readonly warnings: Schema.$Array<Schema.String>;
125
+ }>;
126
+ export type WorkspaceServiceFabricSummary = typeof WorkspaceServiceFabricSummary.Type;
127
+ export declare const WorkspaceSummary: Schema.Struct<{
128
+ readonly id: Schema.brand<Schema.Trim, "WorkspaceId">;
129
+ readonly title: Schema.Trim;
130
+ readonly rootPath: Schema.Trim;
131
+ readonly sourceKind: Schema.Literals<readonly ["native", "rig-import", "manual", "remote"]>;
132
+ readonly defaultRuntimeAdapter: Schema.optional<Schema.Trim>;
133
+ readonly defaultProvider: Schema.optional<Schema.Literals<readonly ["codex", "claude"]>>;
134
+ readonly defaultModel: Schema.NullOr<Schema.Trim>;
135
+ readonly topology: Schema.optional<Schema.Struct<{
136
+ readonly compiledAt: Schema.String;
137
+ readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
138
+ readonly manifestCount: Schema.Number;
139
+ readonly serviceCount: Schema.Number;
140
+ readonly services: Schema.$Array<Schema.Struct<{
141
+ readonly name: Schema.Trim;
142
+ readonly relativeRootPath: Schema.Trim;
143
+ readonly runtime: Schema.Trim;
144
+ readonly port: Schema.NullOr<Schema.Number>;
145
+ readonly healthcheck: Schema.NullOr<Schema.Trim>;
146
+ readonly sourceOfTruth: Schema.Struct<{
147
+ readonly code: Schema.NullOr<Schema.Trim>;
148
+ readonly tests: Schema.NullOr<Schema.Trim>;
149
+ readonly infra: Schema.NullOr<Schema.Trim>;
150
+ readonly deploy: Schema.NullOr<Schema.Trim>;
151
+ readonly dependencies: Schema.NullOr<Schema.Trim>;
152
+ }>;
153
+ readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
154
+ }>>;
155
+ readonly warnings: Schema.$Array<Schema.String>;
156
+ }>>;
157
+ readonly remoteFleet: Schema.optional<Schema.Struct<{
158
+ readonly updatedAt: Schema.String;
159
+ readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
160
+ readonly manifestCount: Schema.Number;
161
+ readonly hostCount: Schema.Number;
162
+ readonly onlineHostCount: Schema.Number;
163
+ readonly hosts: Schema.$Array<Schema.Struct<{
164
+ readonly id: Schema.Trim;
165
+ readonly name: Schema.Trim;
166
+ readonly baseUrl: Schema.Trim;
167
+ readonly workspacePath: Schema.NullOr<Schema.Trim>;
168
+ readonly transport: Schema.Trim;
169
+ readonly hostname: Schema.NullOr<Schema.Trim>;
170
+ readonly region: Schema.NullOr<Schema.Trim>;
171
+ readonly labels: Schema.$Array<Schema.Trim>;
172
+ readonly capabilities: Schema.$Array<Schema.Trim>;
173
+ readonly runtimeAdapters: Schema.$Array<Schema.Trim>;
174
+ readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
175
+ readonly currentLeaseCount: Schema.Number;
176
+ readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
177
+ readonly registeredAt: Schema.String;
178
+ readonly manifestPath: Schema.Trim;
179
+ }>>;
180
+ readonly warnings: Schema.$Array<Schema.String>;
181
+ }>>;
182
+ readonly serviceFabric: Schema.optional<Schema.Struct<{
183
+ readonly updatedAt: Schema.String;
184
+ readonly status: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
185
+ readonly serviceCount: Schema.Number;
186
+ readonly healthyServiceCount: Schema.Number;
187
+ readonly stateDir: Schema.Trim;
188
+ readonly services: Schema.$Array<Schema.Struct<{
189
+ readonly name: Schema.Trim;
190
+ readonly relativeRootPath: Schema.Trim;
191
+ readonly mode: Schema.Literals<readonly ["stub", "process"]>;
192
+ readonly port: Schema.Number;
193
+ readonly healthcheck: Schema.Trim;
194
+ readonly routePrefix: Schema.NullOr<Schema.Trim>;
195
+ readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
196
+ readonly pid: Schema.NullOr<Schema.Number>;
197
+ readonly logPath: Schema.NullOr<Schema.Trim>;
198
+ }>>;
199
+ readonly warnings: Schema.$Array<Schema.String>;
200
+ }>>;
201
+ readonly createdAt: Schema.String;
202
+ readonly updatedAt: Schema.String;
203
+ }>;
204
+ export type WorkspaceSummary = typeof WorkspaceSummary.Type;