@h-rig/contracts 0.0.6-alpha.8 → 0.0.6-alpha.80
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/dist/index.cjs +5277 -0
- package/dist/index.mjs +5234 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/baseSchemas.d.ts +57 -0
- package/dist/src/cli-output.d.ts +234 -0
- package/dist/src/cli-output.js +154 -0
- package/dist/src/config.d.ts +316 -0
- package/dist/src/config.js +14 -2
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/engine.d.ts +2789 -0
- package/dist/src/engine.js +4 -2
- package/dist/src/git.d.ts +144 -0
- package/dist/src/graph.d.ts +39 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/index.js +1906 -1219
- package/dist/src/ipc.d.ts +247 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/model.d.ts +77 -0
- package/dist/src/orchestration.d.ts +3695 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +112 -0
- package/dist/src/plugin.d.ts +230 -0
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/providerRuntime.d.ts +3949 -0
- package/dist/src/remote.d.ts +326 -0
- package/dist/src/remote.js +4 -2
- package/dist/src/review.d.ts +18 -0
- package/dist/src/rig.d.ts +753 -0
- package/dist/src/rig.js +32 -4
- package/dist/src/run-journal.d.ts +763 -0
- package/dist/src/run-journal.js +1506 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +4 -2
- package/dist/src/server.d.ts +106 -0
- package/dist/src/serviceFabric.d.ts +62 -0
- package/dist/src/task-source.d.ts +28 -0
- package/dist/src/terminal.d.ts +130 -0
- package/dist/src/validation.d.ts +14 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/ws.d.ts +733 -0
- package/dist/src/ws.js +27 -3
- package/package.json +6 -3
|
@@ -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;
|
package/dist/src/runtime.js
CHANGED
|
@@ -921,12 +921,14 @@ var RunStatus = Schema4.Literals([
|
|
|
921
921
|
"running",
|
|
922
922
|
"waiting-approval",
|
|
923
923
|
"waiting-user-input",
|
|
924
|
+
"paused",
|
|
924
925
|
"validating",
|
|
925
926
|
"reviewing",
|
|
927
|
+
"closing-out",
|
|
928
|
+
"needs-attention",
|
|
926
929
|
"completed",
|
|
927
930
|
"failed",
|
|
928
|
-
"
|
|
929
|
-
"paused"
|
|
931
|
+
"stopped"
|
|
930
932
|
]);
|
|
931
933
|
var EngineSandboxMode = Schema4.Literals([
|
|
932
934
|
"read-only",
|
|
@@ -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;
|