@h-rig/contracts 0.0.0-e2e-live.20260630085347
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/README.md +14 -0
- package/dist/index.cjs +3442 -0
- package/dist/index.mjs +3401 -0
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/agent-roles.js +1 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +56 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +72 -0
- package/dist/src/blocker-classifier.d.ts +21 -0
- package/dist/src/blocker-classifier.js +13 -0
- package/dist/src/browser.d.ts +80 -0
- package/dist/src/browser.js +13 -0
- package/dist/src/capability-id.d.ts +22 -0
- package/dist/src/capability-id.js +8 -0
- package/dist/src/cli-output.d.ts +348 -0
- package/dist/src/cli-output.js +190 -0
- package/dist/src/cli-runner.d.ts +43 -0
- package/dist/src/cli-runner.js +13 -0
- package/dist/src/cockpit.d.ts +58 -0
- package/dist/src/cockpit.js +13 -0
- package/dist/src/collab-session-viewer.d.ts +36 -0
- package/dist/src/collab-session-viewer.js +13 -0
- package/dist/src/config.d.ts +553 -0
- package/dist/src/config.js +822 -0
- package/dist/src/control-plane-types.d.ts +323 -0
- package/dist/src/control-plane-types.js +13 -0
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +98 -0
- package/dist/src/dependency-preflight.d.ts +43 -0
- package/dist/src/dependency-preflight.js +13 -0
- package/dist/src/docs-drift.d.ts +10 -0
- package/dist/src/docs-drift.js +12 -0
- package/dist/src/doctor.d.ts +90 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/drift.d.ts +28 -0
- package/dist/src/drift.js +69 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/editor.js +58 -0
- package/dist/src/errors.d.ts +13 -0
- package/dist/src/errors.js +17 -0
- package/dist/src/git.d.ts +152 -0
- package/dist/src/git.js +196 -0
- package/dist/src/github.d.ts +295 -0
- package/dist/src/github.js +17 -0
- package/dist/src/graph.d.ts +360 -0
- package/dist/src/graph.js +229 -0
- package/dist/src/guard.d.ts +118 -0
- package/dist/src/guard.js +15 -0
- package/dist/src/harness-events.d.ts +8 -0
- package/dist/src/harness-events.js +1 -0
- package/dist/src/harness-profile-state.d.ts +10 -0
- package/dist/src/harness-profile-state.js +13 -0
- package/dist/src/help-catalog.d.ts +41 -0
- package/dist/src/help-catalog.js +13 -0
- package/dist/src/host.d.ts +41 -0
- package/dist/src/host.js +13 -0
- package/dist/src/identity.d.ts +44 -0
- package/dist/src/identity.js +1 -0
- package/dist/src/index.d.ts +98 -0
- package/dist/src/index.js +3401 -0
- package/dist/src/isolation.d.ts +213 -0
- package/dist/src/isolation.js +13 -0
- package/dist/src/kernel.d.ts +200 -0
- package/dist/src/kernel.js +261 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/keybindings.js +122 -0
- package/dist/src/layout.d.ts +44 -0
- package/dist/src/layout.js +8 -0
- package/dist/src/lifecycle-capabilities.d.ts +224 -0
- package/dist/src/lifecycle-capabilities.js +45 -0
- package/dist/src/managed-repos.d.ts +339 -0
- package/dist/src/managed-repos.js +37 -0
- package/dist/src/memory.d.ts +199 -0
- package/dist/src/memory.js +15 -0
- package/dist/src/model.d.ts +13 -0
- package/dist/src/model.js +9 -0
- package/dist/src/native-toolchain.d.ts +46 -0
- package/dist/src/native-toolchain.js +13 -0
- package/dist/src/notify.d.ts +46 -0
- package/dist/src/notify.js +13 -0
- package/dist/src/orchestration.d.ts +43 -0
- package/dist/src/orchestration.js +98 -0
- package/dist/src/panel-protocol.d.ts +17 -0
- package/dist/src/panel-protocol.js +10 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/placement.d.ts +47 -0
- package/dist/src/placement.js +13 -0
- package/dist/src/planning.d.ts +64 -0
- package/dist/src/planning.js +90 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +386 -0
- package/dist/src/plugin.d.ts +476 -0
- package/dist/src/plugin.js +384 -0
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +59 -0
- package/dist/src/product-entrypoint.d.ts +22 -0
- package/dist/src/product-entrypoint.js +13 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/project.js +110 -0
- package/dist/src/prompt.d.ts +29 -0
- package/dist/src/prompt.js +13 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider-instructions.d.ts +41 -0
- package/dist/src/provider-instructions.js +13 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/provider.js +194 -0
- package/dist/src/remote-control.d.ts +93 -0
- package/dist/src/remote-control.js +26 -0
- package/dist/src/remote.d.ts +318 -0
- package/dist/src/remote.js +634 -0
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +61 -0
- package/dist/src/rollups.d.ts +41 -0
- package/dist/src/rollups.js +70 -0
- package/dist/src/run-control.d.ts +164 -0
- package/dist/src/run-control.js +13 -0
- package/dist/src/run-discovery.d.ts +83 -0
- package/dist/src/run-discovery.js +13 -0
- package/dist/src/run-dispatch.d.ts +34 -0
- package/dist/src/run-dispatch.js +13 -0
- package/dist/src/run-identity.d.ts +47 -0
- package/dist/src/run-identity.js +13 -0
- package/dist/src/run-journal.d.ts +694 -0
- package/dist/src/run-journal.js +569 -0
- package/dist/src/run-queue.d.ts +36 -0
- package/dist/src/run-queue.js +13 -0
- package/dist/src/run-read-model.d.ts +200 -0
- package/dist/src/run-read-model.js +13 -0
- package/dist/src/run-record.d.ts +45 -0
- package/dist/src/run-record.js +1 -0
- package/dist/src/run-registry-backbone.d.ts +56 -0
- package/dist/src/run-registry-backbone.js +13 -0
- package/dist/src/run-session-journal.d.ts +154 -0
- package/dist/src/run-session-journal.js +87 -0
- package/dist/src/run-status.d.ts +10 -0
- package/dist/src/run-status.js +27 -0
- package/dist/src/run-timeline.d.ts +7 -0
- package/dist/src/run-timeline.js +1 -0
- package/dist/src/runtime-secrets.d.ts +10 -0
- package/dist/src/runtime-secrets.js +13 -0
- package/dist/src/runtime-task-context.d.ts +82 -0
- package/dist/src/runtime-task-context.js +1 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +210 -0
- package/dist/src/session-asset-materializer.d.ts +35 -0
- package/dist/src/session-asset-materializer.js +13 -0
- package/dist/src/session-hook-materializer.d.ts +41 -0
- package/dist/src/session-hook-materializer.js +13 -0
- package/dist/src/setup.d.ts +154 -0
- package/dist/src/setup.js +13 -0
- package/dist/src/stage.d.ts +245 -0
- package/dist/src/stage.js +169 -0
- package/dist/src/supervisor-journal.d.ts +204 -0
- package/dist/src/supervisor-journal.js +336 -0
- package/dist/src/supervisor-loop.d.ts +40 -0
- package/dist/src/supervisor-loop.js +13 -0
- package/dist/src/task-artifacts.d.ts +53 -0
- package/dist/src/task-artifacts.js +13 -0
- package/dist/src/task-config.d.ts +22 -0
- package/dist/src/task-config.js +1 -0
- package/dist/src/task-context-renderer.d.ts +29 -0
- package/dist/src/task-context-renderer.js +13 -0
- package/dist/src/task-data.d.ts +196 -0
- package/dist/src/task-data.js +13 -0
- package/dist/src/task-graph-primitives.d.ts +47 -0
- package/dist/src/task-graph-primitives.js +1 -0
- package/dist/src/task-source.d.ts +167 -0
- package/dist/src/task-source.js +25 -0
- package/dist/src/task-state-metadata.d.ts +21 -0
- package/dist/src/task-state-metadata.js +1 -0
- package/dist/src/task-state-paths.d.ts +14 -0
- package/dist/src/task-state-paths.js +13 -0
- package/dist/src/task-state-store.d.ts +36 -0
- package/dist/src/task-state-store.js +17 -0
- package/dist/src/task-tracker-state.d.ts +101 -0
- package/dist/src/task-tracker-state.js +39 -0
- package/dist/src/terminal.d.ts +130 -0
- package/dist/src/terminal.js +161 -0
- package/dist/src/tool-materializer.d.ts +36 -0
- package/dist/src/tool-materializer.js +13 -0
- package/dist/src/tool-registry.d.ts +3 -0
- package/dist/src/tool-registry.js +58 -0
- package/dist/src/toolchain-sources.d.ts +54 -0
- package/dist/src/toolchain-sources.js +17 -0
- package/dist/src/transport-config.d.ts +161 -0
- package/dist/src/transport-config.js +15 -0
- package/dist/src/validation.d.ts +14 -0
- package/dist/src/validation.js +63 -0
- package/dist/src/workflow-journal.d.ts +125 -0
- package/dist/src/workflow-journal.js +27 -0
- package/dist/src/workspace-config.d.ts +18 -0
- package/dist/src/workspace-config.js +13 -0
- package/dist/src/workspace-service.d.ts +16 -0
- package/dist/src/workspace-service.js +13 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +195 -0
- package/package.json +79 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const CLI_OUTPUT_VERSION: 1;
|
|
3
|
+
/** Loose envelope shape shared by every schematized command. */
|
|
4
|
+
export declare const RigCliOutputEnvelope: Schema.Struct<{
|
|
5
|
+
readonly v: Schema.Literal<1>;
|
|
6
|
+
readonly command: Schema.String;
|
|
7
|
+
readonly data: Schema.Unknown;
|
|
8
|
+
}>;
|
|
9
|
+
export type RigCliOutputEnvelope = typeof RigCliOutputEnvelope.Type;
|
|
10
|
+
/** Task summary as emitted by `rig task list|show|next` (summarizeTask). */
|
|
11
|
+
export declare const CliTaskSummary: Schema.Struct<{
|
|
12
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
13
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
14
|
+
readonly status: Schema.NullOr<Schema.String>;
|
|
15
|
+
readonly source: Schema.optional<Schema.String>;
|
|
16
|
+
readonly url: Schema.optional<Schema.String>;
|
|
17
|
+
readonly number: Schema.optional<Schema.Number>;
|
|
18
|
+
readonly labels: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
19
|
+
readonly assignees: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
20
|
+
readonly readiness: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Boolean]>>;
|
|
21
|
+
readonly validators: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
22
|
+
readonly raw: Schema.optional<Schema.Unknown>;
|
|
23
|
+
}>;
|
|
24
|
+
export type CliTaskSummary = typeof CliTaskSummary.Type;
|
|
25
|
+
export declare const CliTaskFilters: Schema.Struct<{
|
|
26
|
+
readonly assignee: Schema.optional<Schema.String>;
|
|
27
|
+
readonly state: Schema.optional<Schema.String>;
|
|
28
|
+
readonly status: Schema.optional<Schema.String>;
|
|
29
|
+
readonly limit: Schema.optional<Schema.Number>;
|
|
30
|
+
}>;
|
|
31
|
+
export type CliTaskFilters = typeof CliTaskFilters.Type;
|
|
32
|
+
/**
|
|
33
|
+
* Run records cross local disk state and remote server payloads, so the
|
|
34
|
+
* record itself stays an open map; identity fields are validated where the
|
|
35
|
+
* emitting command guarantees them.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CliRunRecord: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
38
|
+
export type CliRunRecord = typeof CliRunRecord.Type;
|
|
39
|
+
export declare const CliInboxRecord: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
40
|
+
export type CliInboxRecord = typeof CliInboxRecord.Type;
|
|
41
|
+
export declare const CliDoctorCheck: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.String;
|
|
43
|
+
readonly label: Schema.String;
|
|
44
|
+
readonly status: Schema.Literals<readonly ["pass", "warn", "fail"]>;
|
|
45
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
46
|
+
readonly remediation: Schema.optional<Schema.String>;
|
|
47
|
+
}>;
|
|
48
|
+
export type CliDoctorCheck = typeof CliDoctorCheck.Type;
|
|
49
|
+
export declare const CliServerConnection: Schema.Union<readonly [Schema.Struct<{
|
|
50
|
+
readonly kind: Schema.Literal<"local">;
|
|
51
|
+
readonly mode: Schema.Literal<"auto">;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
readonly kind: Schema.Literal<"remote">;
|
|
54
|
+
readonly baseUrl: Schema.String;
|
|
55
|
+
}>]>;
|
|
56
|
+
export type CliServerConnection = typeof CliServerConnection.Type;
|
|
57
|
+
export declare const CliRepoConnectionState: Schema.Struct<{
|
|
58
|
+
readonly selected: Schema.String;
|
|
59
|
+
readonly project: Schema.optional<Schema.String>;
|
|
60
|
+
readonly linkedAt: Schema.optional<Schema.String>;
|
|
61
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
62
|
+
readonly serverProjectRootAlias: Schema.optional<Schema.String>;
|
|
63
|
+
readonly serverProjectRootBaseUrl: Schema.optional<Schema.String>;
|
|
64
|
+
}>;
|
|
65
|
+
export type CliRepoConnectionState = typeof CliRepoConnectionState.Type;
|
|
66
|
+
export declare const CliRemoteProjectLink: Schema.Struct<{
|
|
67
|
+
readonly ok: Schema.Boolean;
|
|
68
|
+
readonly status: Schema.String;
|
|
69
|
+
readonly alias: Schema.optional<Schema.String>;
|
|
70
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
71
|
+
readonly repoSlug: Schema.optional<Schema.String>;
|
|
72
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
73
|
+
readonly source: Schema.optional<Schema.String>;
|
|
74
|
+
readonly prepared: Schema.optional<Schema.Boolean>;
|
|
75
|
+
readonly validated: Schema.optional<Schema.Boolean>;
|
|
76
|
+
readonly statusCode: Schema.optional<Schema.Number>;
|
|
77
|
+
readonly message: Schema.String;
|
|
78
|
+
readonly hint: Schema.String;
|
|
79
|
+
readonly next: Schema.optional<Schema.String>;
|
|
80
|
+
readonly skippedCandidates: Schema.optional<Schema.$Array<Schema.String>>;
|
|
81
|
+
}>;
|
|
82
|
+
export type CliRemoteProjectLink = typeof CliRemoteProjectLink.Type;
|
|
83
|
+
export declare const RigTaskListOutput: Schema.Struct<{
|
|
84
|
+
readonly v: Schema.Literal<1>;
|
|
85
|
+
readonly command: Schema.Literal<"task list">;
|
|
86
|
+
readonly data: Schema.Struct<{
|
|
87
|
+
readonly count: Schema.Number;
|
|
88
|
+
readonly filters: Schema.Struct<{
|
|
89
|
+
readonly assignee: Schema.optional<Schema.String>;
|
|
90
|
+
readonly state: Schema.optional<Schema.String>;
|
|
91
|
+
readonly status: Schema.optional<Schema.String>;
|
|
92
|
+
readonly limit: Schema.optional<Schema.Number>;
|
|
93
|
+
}>;
|
|
94
|
+
readonly raw: Schema.Boolean;
|
|
95
|
+
readonly tasks: Schema.$Array<Schema.Struct<{
|
|
96
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
97
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
98
|
+
readonly status: Schema.NullOr<Schema.String>;
|
|
99
|
+
readonly source: Schema.optional<Schema.String>;
|
|
100
|
+
readonly url: Schema.optional<Schema.String>;
|
|
101
|
+
readonly number: Schema.optional<Schema.Number>;
|
|
102
|
+
readonly labels: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
103
|
+
readonly assignees: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
104
|
+
readonly readiness: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Boolean]>>;
|
|
105
|
+
readonly validators: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
106
|
+
readonly raw: Schema.optional<Schema.Unknown>;
|
|
107
|
+
}>>;
|
|
108
|
+
}>;
|
|
109
|
+
}>;
|
|
110
|
+
export type RigTaskListOutput = typeof RigTaskListOutput.Type;
|
|
111
|
+
export declare const RigTaskShowOutput: Schema.Struct<{
|
|
112
|
+
readonly v: Schema.Literal<1>;
|
|
113
|
+
readonly command: Schema.Literal<"task show">;
|
|
114
|
+
readonly data: Schema.Struct<{
|
|
115
|
+
readonly task: Schema.Struct<{
|
|
116
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
117
|
+
readonly title: Schema.NullOr<Schema.String>;
|
|
118
|
+
readonly status: Schema.NullOr<Schema.String>;
|
|
119
|
+
readonly source: Schema.optional<Schema.String>;
|
|
120
|
+
readonly url: Schema.optional<Schema.String>;
|
|
121
|
+
readonly number: Schema.optional<Schema.Number>;
|
|
122
|
+
readonly labels: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
123
|
+
readonly assignees: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
124
|
+
readonly readiness: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Boolean]>>;
|
|
125
|
+
readonly validators: Schema.optional<Schema.$Array<Schema.Unknown>>;
|
|
126
|
+
readonly raw: Schema.optional<Schema.Unknown>;
|
|
127
|
+
}>;
|
|
128
|
+
readonly raw: Schema.Boolean;
|
|
129
|
+
}>;
|
|
130
|
+
}>;
|
|
131
|
+
export type RigTaskShowOutput = typeof RigTaskShowOutput.Type;
|
|
132
|
+
export declare const RigRunListOutput: Schema.Struct<{
|
|
133
|
+
readonly v: Schema.Literal<1>;
|
|
134
|
+
readonly command: Schema.Literal<"run list">;
|
|
135
|
+
readonly data: Schema.Struct<{
|
|
136
|
+
readonly runs: Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
137
|
+
readonly source: Schema.Literals<readonly ["local", "server"]>;
|
|
138
|
+
}>;
|
|
139
|
+
}>;
|
|
140
|
+
export type RigRunListOutput = typeof RigRunListOutput.Type;
|
|
141
|
+
export declare const RigRunShowOutput: Schema.Struct<{
|
|
142
|
+
readonly v: Schema.Literal<1>;
|
|
143
|
+
readonly command: Schema.Literal<"run show">;
|
|
144
|
+
readonly data: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
145
|
+
}>;
|
|
146
|
+
export type RigRunShowOutput = typeof RigRunShowOutput.Type;
|
|
147
|
+
export declare const RigServerUseOutput: Schema.Struct<{
|
|
148
|
+
readonly v: Schema.Literal<1>;
|
|
149
|
+
readonly command: Schema.Literal<"server use">;
|
|
150
|
+
readonly data: Schema.Struct<{
|
|
151
|
+
readonly selected: Schema.String;
|
|
152
|
+
readonly repo: Schema.NullOr<Schema.Struct<{
|
|
153
|
+
readonly selected: Schema.String;
|
|
154
|
+
readonly project: Schema.optional<Schema.String>;
|
|
155
|
+
readonly linkedAt: Schema.optional<Schema.String>;
|
|
156
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
157
|
+
readonly serverProjectRootAlias: Schema.optional<Schema.String>;
|
|
158
|
+
readonly serverProjectRootBaseUrl: Schema.optional<Schema.String>;
|
|
159
|
+
}>>;
|
|
160
|
+
readonly remoteProjectLink: Schema.NullOr<Schema.Struct<{
|
|
161
|
+
readonly ok: Schema.Boolean;
|
|
162
|
+
readonly status: Schema.String;
|
|
163
|
+
readonly alias: Schema.optional<Schema.String>;
|
|
164
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
165
|
+
readonly repoSlug: Schema.optional<Schema.String>;
|
|
166
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
167
|
+
readonly source: Schema.optional<Schema.String>;
|
|
168
|
+
readonly prepared: Schema.optional<Schema.Boolean>;
|
|
169
|
+
readonly validated: Schema.optional<Schema.Boolean>;
|
|
170
|
+
readonly statusCode: Schema.optional<Schema.Number>;
|
|
171
|
+
readonly message: Schema.String;
|
|
172
|
+
readonly hint: Schema.String;
|
|
173
|
+
readonly next: Schema.optional<Schema.String>;
|
|
174
|
+
readonly skippedCandidates: Schema.optional<Schema.$Array<Schema.String>>;
|
|
175
|
+
}>>;
|
|
176
|
+
}>;
|
|
177
|
+
}>;
|
|
178
|
+
export type RigServerUseOutput = typeof RigServerUseOutput.Type;
|
|
179
|
+
export declare const RigServerStatusOutput: Schema.Struct<{
|
|
180
|
+
readonly v: Schema.Literal<1>;
|
|
181
|
+
readonly command: Schema.Literal<"server status">;
|
|
182
|
+
readonly data: Schema.Struct<{
|
|
183
|
+
readonly selected: Schema.String;
|
|
184
|
+
readonly repo: Schema.NullOr<Schema.Struct<{
|
|
185
|
+
readonly selected: Schema.String;
|
|
186
|
+
readonly project: Schema.optional<Schema.String>;
|
|
187
|
+
readonly linkedAt: Schema.optional<Schema.String>;
|
|
188
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
189
|
+
readonly serverProjectRootAlias: Schema.optional<Schema.String>;
|
|
190
|
+
readonly serverProjectRootBaseUrl: Schema.optional<Schema.String>;
|
|
191
|
+
}>>;
|
|
192
|
+
readonly connections: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
193
|
+
readonly kind: Schema.Literal<"local">;
|
|
194
|
+
readonly mode: Schema.Literal<"auto">;
|
|
195
|
+
}>, Schema.Struct<{
|
|
196
|
+
readonly kind: Schema.Literal<"remote">;
|
|
197
|
+
readonly baseUrl: Schema.String;
|
|
198
|
+
}>]>>;
|
|
199
|
+
readonly remoteProjectLink: Schema.NullOr<Schema.Struct<{
|
|
200
|
+
readonly ok: Schema.Boolean;
|
|
201
|
+
readonly status: Schema.String;
|
|
202
|
+
readonly alias: Schema.optional<Schema.String>;
|
|
203
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
204
|
+
readonly repoSlug: Schema.optional<Schema.String>;
|
|
205
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
206
|
+
readonly source: Schema.optional<Schema.String>;
|
|
207
|
+
readonly prepared: Schema.optional<Schema.Boolean>;
|
|
208
|
+
readonly validated: Schema.optional<Schema.Boolean>;
|
|
209
|
+
readonly statusCode: Schema.optional<Schema.Number>;
|
|
210
|
+
readonly message: Schema.String;
|
|
211
|
+
readonly hint: Schema.String;
|
|
212
|
+
readonly next: Schema.optional<Schema.String>;
|
|
213
|
+
readonly skippedCandidates: Schema.optional<Schema.$Array<Schema.String>>;
|
|
214
|
+
}>>;
|
|
215
|
+
}>;
|
|
216
|
+
}>;
|
|
217
|
+
export type RigServerStatusOutput = typeof RigServerStatusOutput.Type;
|
|
218
|
+
export declare const RigServerRepairLinkOutput: Schema.Struct<{
|
|
219
|
+
readonly v: Schema.Literal<1>;
|
|
220
|
+
readonly command: Schema.Literal<"server repair-link">;
|
|
221
|
+
readonly data: Schema.Struct<{
|
|
222
|
+
readonly ok: Schema.Boolean;
|
|
223
|
+
readonly status: Schema.String;
|
|
224
|
+
readonly alias: Schema.optional<Schema.String>;
|
|
225
|
+
readonly baseUrl: Schema.optional<Schema.String>;
|
|
226
|
+
readonly repoSlug: Schema.optional<Schema.String>;
|
|
227
|
+
readonly serverProjectRoot: Schema.optional<Schema.String>;
|
|
228
|
+
readonly source: Schema.optional<Schema.String>;
|
|
229
|
+
readonly prepared: Schema.optional<Schema.Boolean>;
|
|
230
|
+
readonly validated: Schema.optional<Schema.Boolean>;
|
|
231
|
+
readonly statusCode: Schema.optional<Schema.Number>;
|
|
232
|
+
readonly message: Schema.String;
|
|
233
|
+
readonly hint: Schema.String;
|
|
234
|
+
readonly next: Schema.optional<Schema.String>;
|
|
235
|
+
readonly skippedCandidates: Schema.optional<Schema.$Array<Schema.String>>;
|
|
236
|
+
}>;
|
|
237
|
+
}>;
|
|
238
|
+
export type RigServerRepairLinkOutput = typeof RigServerRepairLinkOutput.Type;
|
|
239
|
+
export declare const RigInboxApprovalsOutput: Schema.Struct<{
|
|
240
|
+
readonly v: Schema.Literal<1>;
|
|
241
|
+
readonly command: Schema.Literal<"inbox approvals">;
|
|
242
|
+
readonly data: Schema.Struct<{
|
|
243
|
+
readonly approvals: Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
244
|
+
}>;
|
|
245
|
+
}>;
|
|
246
|
+
export type RigInboxApprovalsOutput = typeof RigInboxApprovalsOutput.Type;
|
|
247
|
+
export declare const RigInboxInputsOutput: Schema.Struct<{
|
|
248
|
+
readonly v: Schema.Literal<1>;
|
|
249
|
+
readonly command: Schema.Literal<"inbox inputs">;
|
|
250
|
+
readonly data: Schema.Struct<{
|
|
251
|
+
readonly requests: Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
252
|
+
}>;
|
|
253
|
+
}>;
|
|
254
|
+
export type RigInboxInputsOutput = typeof RigInboxInputsOutput.Type;
|
|
255
|
+
export declare const RigDoctorCheckOutput: Schema.Struct<{
|
|
256
|
+
readonly v: Schema.Literal<1>;
|
|
257
|
+
readonly command: Schema.Literal<"doctor check">;
|
|
258
|
+
readonly data: Schema.Struct<{
|
|
259
|
+
readonly checks: Schema.$Array<Schema.Struct<{
|
|
260
|
+
readonly id: Schema.String;
|
|
261
|
+
readonly label: Schema.String;
|
|
262
|
+
readonly status: Schema.Literals<readonly ["pass", "warn", "fail"]>;
|
|
263
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
264
|
+
readonly remediation: Schema.optional<Schema.String>;
|
|
265
|
+
}>>;
|
|
266
|
+
readonly failures: Schema.Number;
|
|
267
|
+
}>;
|
|
268
|
+
}>;
|
|
269
|
+
export type RigDoctorCheckOutput = typeof RigDoctorCheckOutput.Type;
|
|
270
|
+
/** Fleet metrics computed from on-disk run journals (`rig stats`). */
|
|
271
|
+
export declare const RigStatsData: Schema.Struct<{
|
|
272
|
+
/** ISO timestamp of the window start, or null for all-time. */
|
|
273
|
+
readonly since: Schema.NullOr<Schema.String>;
|
|
274
|
+
readonly totalRuns: Schema.Number;
|
|
275
|
+
/** Run count per terminal/current status. */
|
|
276
|
+
readonly statusCounts: Schema.$Record<Schema.String, Schema.Number>;
|
|
277
|
+
readonly completedRuns: Schema.Number;
|
|
278
|
+
readonly failedRuns: Schema.Number;
|
|
279
|
+
readonly needsAttentionRuns: Schema.Number;
|
|
280
|
+
/** Rates over totalRuns; null when there are no runs in the window. */
|
|
281
|
+
readonly completionRate: Schema.NullOr<Schema.Number>;
|
|
282
|
+
readonly failureRate: Schema.NullOr<Schema.Number>;
|
|
283
|
+
readonly needsAttentionRate: Schema.NullOr<Schema.Number>;
|
|
284
|
+
/** Median createdAt -> completedAt for completed runs, in milliseconds. */
|
|
285
|
+
readonly medianCompletionMs: Schema.NullOr<Schema.Number>;
|
|
286
|
+
readonly steeringTotal: Schema.Number;
|
|
287
|
+
/** Average steering interventions per run; null when there are no runs. */
|
|
288
|
+
readonly steeringPerRun: Schema.NullOr<Schema.Number>;
|
|
289
|
+
readonly stallTotal: Schema.Number;
|
|
290
|
+
readonly approvalsRequested: Schema.Number;
|
|
291
|
+
readonly approvalsApproved: Schema.Number;
|
|
292
|
+
readonly approvalsRejected: Schema.Number;
|
|
293
|
+
readonly approvalsPending: Schema.Number;
|
|
294
|
+
}>;
|
|
295
|
+
export type RigStatsData = typeof RigStatsData.Type;
|
|
296
|
+
export declare const RigStatsOutput: Schema.Struct<{
|
|
297
|
+
readonly v: Schema.Literal<1>;
|
|
298
|
+
readonly command: Schema.Literal<"stats show">;
|
|
299
|
+
readonly data: Schema.Struct<{
|
|
300
|
+
/** ISO timestamp of the window start, or null for all-time. */
|
|
301
|
+
readonly since: Schema.NullOr<Schema.String>;
|
|
302
|
+
readonly totalRuns: Schema.Number;
|
|
303
|
+
/** Run count per terminal/current status. */
|
|
304
|
+
readonly statusCounts: Schema.$Record<Schema.String, Schema.Number>;
|
|
305
|
+
readonly completedRuns: Schema.Number;
|
|
306
|
+
readonly failedRuns: Schema.Number;
|
|
307
|
+
readonly needsAttentionRuns: Schema.Number;
|
|
308
|
+
/** Rates over totalRuns; null when there are no runs in the window. */
|
|
309
|
+
readonly completionRate: Schema.NullOr<Schema.Number>;
|
|
310
|
+
readonly failureRate: Schema.NullOr<Schema.Number>;
|
|
311
|
+
readonly needsAttentionRate: Schema.NullOr<Schema.Number>;
|
|
312
|
+
/** Median createdAt -> completedAt for completed runs, in milliseconds. */
|
|
313
|
+
readonly medianCompletionMs: Schema.NullOr<Schema.Number>;
|
|
314
|
+
readonly steeringTotal: Schema.Number;
|
|
315
|
+
/** Average steering interventions per run; null when there are no runs. */
|
|
316
|
+
readonly steeringPerRun: Schema.NullOr<Schema.Number>;
|
|
317
|
+
readonly stallTotal: Schema.Number;
|
|
318
|
+
readonly approvalsRequested: Schema.Number;
|
|
319
|
+
readonly approvalsApproved: Schema.Number;
|
|
320
|
+
readonly approvalsRejected: Schema.Number;
|
|
321
|
+
readonly approvalsPending: Schema.Number;
|
|
322
|
+
}>;
|
|
323
|
+
}>;
|
|
324
|
+
export type RigStatsOutput = typeof RigStatsOutput.Type;
|
|
325
|
+
export type OutputMode = "text" | "json";
|
|
326
|
+
export type CommandExecutionResult = {
|
|
327
|
+
command: string[];
|
|
328
|
+
formattedCommand: string;
|
|
329
|
+
exitCode: number;
|
|
330
|
+
durationMs: number;
|
|
331
|
+
startedAt: string;
|
|
332
|
+
finishedAt: string;
|
|
333
|
+
stdout?: string;
|
|
334
|
+
stderr?: string;
|
|
335
|
+
};
|
|
336
|
+
/** Structured outcome a `rig <group> <command>` handler returns to the runner. */
|
|
337
|
+
export type CommandOutcome = {
|
|
338
|
+
readonly ok: boolean;
|
|
339
|
+
readonly group: string;
|
|
340
|
+
readonly command: string;
|
|
341
|
+
readonly details?: Record<string, unknown>;
|
|
342
|
+
};
|
|
343
|
+
export type PluginValidatorResult = {
|
|
344
|
+
id: string;
|
|
345
|
+
passed: boolean;
|
|
346
|
+
summary: string;
|
|
347
|
+
details?: string;
|
|
348
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/cli-output.ts
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
var CLI_OUTPUT_VERSION = 1;
|
|
5
|
+
var RigCliOutputEnvelope = Schema.Struct({
|
|
6
|
+
v: Schema.Literal(1),
|
|
7
|
+
command: Schema.String,
|
|
8
|
+
data: Schema.Unknown
|
|
9
|
+
});
|
|
10
|
+
var CliTaskSummary = Schema.Struct({
|
|
11
|
+
id: Schema.NullOr(Schema.String),
|
|
12
|
+
title: Schema.NullOr(Schema.String),
|
|
13
|
+
status: Schema.NullOr(Schema.String),
|
|
14
|
+
source: Schema.optional(Schema.String),
|
|
15
|
+
url: Schema.optional(Schema.String),
|
|
16
|
+
number: Schema.optional(Schema.Number),
|
|
17
|
+
labels: Schema.optional(Schema.Array(Schema.Unknown)),
|
|
18
|
+
assignees: Schema.optional(Schema.Array(Schema.Unknown)),
|
|
19
|
+
readiness: Schema.optional(Schema.Union([Schema.String, Schema.Boolean])),
|
|
20
|
+
validators: Schema.optional(Schema.Array(Schema.Unknown)),
|
|
21
|
+
raw: Schema.optional(Schema.Unknown)
|
|
22
|
+
});
|
|
23
|
+
var CliTaskFilters = Schema.Struct({
|
|
24
|
+
assignee: Schema.optional(Schema.String),
|
|
25
|
+
state: Schema.optional(Schema.String),
|
|
26
|
+
status: Schema.optional(Schema.String),
|
|
27
|
+
limit: Schema.optional(Schema.Number)
|
|
28
|
+
});
|
|
29
|
+
var CliRunRecord = Schema.Record(Schema.String, Schema.Unknown);
|
|
30
|
+
var CliInboxRecord = Schema.Record(Schema.String, Schema.Unknown);
|
|
31
|
+
var CliDoctorCheck = Schema.Struct({
|
|
32
|
+
id: Schema.String,
|
|
33
|
+
label: Schema.String,
|
|
34
|
+
status: Schema.Literals(["pass", "warn", "fail"]),
|
|
35
|
+
detail: Schema.optional(Schema.String),
|
|
36
|
+
remediation: Schema.optional(Schema.String)
|
|
37
|
+
});
|
|
38
|
+
var CliServerConnection = Schema.Union([
|
|
39
|
+
Schema.Struct({ kind: Schema.Literal("local"), mode: Schema.Literal("auto") }),
|
|
40
|
+
Schema.Struct({ kind: Schema.Literal("remote"), baseUrl: Schema.String })
|
|
41
|
+
]);
|
|
42
|
+
var CliRepoConnectionState = Schema.Struct({
|
|
43
|
+
selected: Schema.String,
|
|
44
|
+
project: Schema.optional(Schema.String),
|
|
45
|
+
linkedAt: Schema.optional(Schema.String),
|
|
46
|
+
serverProjectRoot: Schema.optional(Schema.String),
|
|
47
|
+
serverProjectRootAlias: Schema.optional(Schema.String),
|
|
48
|
+
serverProjectRootBaseUrl: Schema.optional(Schema.String)
|
|
49
|
+
});
|
|
50
|
+
var CliRemoteProjectLink = Schema.Struct({
|
|
51
|
+
ok: Schema.Boolean,
|
|
52
|
+
status: Schema.String,
|
|
53
|
+
alias: Schema.optional(Schema.String),
|
|
54
|
+
baseUrl: Schema.optional(Schema.String),
|
|
55
|
+
repoSlug: Schema.optional(Schema.String),
|
|
56
|
+
serverProjectRoot: Schema.optional(Schema.String),
|
|
57
|
+
source: Schema.optional(Schema.String),
|
|
58
|
+
prepared: Schema.optional(Schema.Boolean),
|
|
59
|
+
validated: Schema.optional(Schema.Boolean),
|
|
60
|
+
statusCode: Schema.optional(Schema.Number),
|
|
61
|
+
message: Schema.String,
|
|
62
|
+
hint: Schema.String,
|
|
63
|
+
next: Schema.optional(Schema.String),
|
|
64
|
+
skippedCandidates: Schema.optional(Schema.Array(Schema.String))
|
|
65
|
+
});
|
|
66
|
+
var RigTaskListOutput = Schema.Struct({
|
|
67
|
+
v: Schema.Literal(1),
|
|
68
|
+
command: Schema.Literal("task list"),
|
|
69
|
+
data: Schema.Struct({
|
|
70
|
+
count: Schema.Number,
|
|
71
|
+
filters: CliTaskFilters,
|
|
72
|
+
raw: Schema.Boolean,
|
|
73
|
+
tasks: Schema.Array(CliTaskSummary)
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
var RigTaskShowOutput = Schema.Struct({
|
|
77
|
+
v: Schema.Literal(1),
|
|
78
|
+
command: Schema.Literal("task show"),
|
|
79
|
+
data: Schema.Struct({
|
|
80
|
+
task: CliTaskSummary,
|
|
81
|
+
raw: Schema.Boolean
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
var RigRunListOutput = Schema.Struct({
|
|
85
|
+
v: Schema.Literal(1),
|
|
86
|
+
command: Schema.Literal("run list"),
|
|
87
|
+
data: Schema.Struct({
|
|
88
|
+
runs: Schema.Array(CliRunRecord),
|
|
89
|
+
source: Schema.Literals(["local", "server"])
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
var RigRunShowOutput = Schema.Struct({
|
|
93
|
+
v: Schema.Literal(1),
|
|
94
|
+
command: Schema.Literal("run show"),
|
|
95
|
+
data: CliRunRecord
|
|
96
|
+
});
|
|
97
|
+
var RigServerUseOutput = Schema.Struct({
|
|
98
|
+
v: Schema.Literal(1),
|
|
99
|
+
command: Schema.Literal("server use"),
|
|
100
|
+
data: Schema.Struct({
|
|
101
|
+
selected: Schema.String,
|
|
102
|
+
repo: Schema.NullOr(CliRepoConnectionState),
|
|
103
|
+
remoteProjectLink: Schema.NullOr(CliRemoteProjectLink)
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
var RigServerStatusOutput = Schema.Struct({
|
|
107
|
+
v: Schema.Literal(1),
|
|
108
|
+
command: Schema.Literal("server status"),
|
|
109
|
+
data: Schema.Struct({
|
|
110
|
+
selected: Schema.String,
|
|
111
|
+
repo: Schema.NullOr(CliRepoConnectionState),
|
|
112
|
+
connections: Schema.Record(Schema.String, CliServerConnection),
|
|
113
|
+
remoteProjectLink: Schema.NullOr(CliRemoteProjectLink)
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
var RigServerRepairLinkOutput = Schema.Struct({
|
|
117
|
+
v: Schema.Literal(1),
|
|
118
|
+
command: Schema.Literal("server repair-link"),
|
|
119
|
+
data: CliRemoteProjectLink
|
|
120
|
+
});
|
|
121
|
+
var RigInboxApprovalsOutput = Schema.Struct({
|
|
122
|
+
v: Schema.Literal(1),
|
|
123
|
+
command: Schema.Literal("inbox approvals"),
|
|
124
|
+
data: Schema.Struct({
|
|
125
|
+
approvals: Schema.Array(CliInboxRecord)
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
var RigInboxInputsOutput = Schema.Struct({
|
|
129
|
+
v: Schema.Literal(1),
|
|
130
|
+
command: Schema.Literal("inbox inputs"),
|
|
131
|
+
data: Schema.Struct({
|
|
132
|
+
requests: Schema.Array(CliInboxRecord)
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
var RigDoctorCheckOutput = Schema.Struct({
|
|
136
|
+
v: Schema.Literal(1),
|
|
137
|
+
command: Schema.Literal("doctor check"),
|
|
138
|
+
data: Schema.Struct({
|
|
139
|
+
checks: Schema.Array(CliDoctorCheck),
|
|
140
|
+
failures: Schema.Number
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
var RigStatsData = Schema.Struct({
|
|
144
|
+
since: Schema.NullOr(Schema.String),
|
|
145
|
+
totalRuns: Schema.Number,
|
|
146
|
+
statusCounts: Schema.Record(Schema.String, Schema.Number),
|
|
147
|
+
completedRuns: Schema.Number,
|
|
148
|
+
failedRuns: Schema.Number,
|
|
149
|
+
needsAttentionRuns: Schema.Number,
|
|
150
|
+
completionRate: Schema.NullOr(Schema.Number),
|
|
151
|
+
failureRate: Schema.NullOr(Schema.Number),
|
|
152
|
+
needsAttentionRate: Schema.NullOr(Schema.Number),
|
|
153
|
+
medianCompletionMs: Schema.NullOr(Schema.Number),
|
|
154
|
+
steeringTotal: Schema.Number,
|
|
155
|
+
steeringPerRun: Schema.NullOr(Schema.Number),
|
|
156
|
+
stallTotal: Schema.Number,
|
|
157
|
+
approvalsRequested: Schema.Number,
|
|
158
|
+
approvalsApproved: Schema.Number,
|
|
159
|
+
approvalsRejected: Schema.Number,
|
|
160
|
+
approvalsPending: Schema.Number
|
|
161
|
+
});
|
|
162
|
+
var RigStatsOutput = Schema.Struct({
|
|
163
|
+
v: Schema.Literal(1),
|
|
164
|
+
command: Schema.Literal("stats show"),
|
|
165
|
+
data: RigStatsData
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
RigTaskShowOutput,
|
|
169
|
+
RigTaskListOutput,
|
|
170
|
+
RigStatsOutput,
|
|
171
|
+
RigStatsData,
|
|
172
|
+
RigServerUseOutput,
|
|
173
|
+
RigServerStatusOutput,
|
|
174
|
+
RigServerRepairLinkOutput,
|
|
175
|
+
RigRunShowOutput,
|
|
176
|
+
RigRunListOutput,
|
|
177
|
+
RigInboxInputsOutput,
|
|
178
|
+
RigInboxApprovalsOutput,
|
|
179
|
+
RigDoctorCheckOutput,
|
|
180
|
+
RigCliOutputEnvelope,
|
|
181
|
+
CliTaskSummary,
|
|
182
|
+
CliTaskFilters,
|
|
183
|
+
CliServerConnection,
|
|
184
|
+
CliRunRecord,
|
|
185
|
+
CliRepoConnectionState,
|
|
186
|
+
CliRemoteProjectLink,
|
|
187
|
+
CliInboxRecord,
|
|
188
|
+
CliDoctorCheck,
|
|
189
|
+
CLI_OUTPUT_VERSION
|
|
190
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CapabilityId } from "./capability-id";
|
|
2
|
+
import type { CommandExecutionResult, OutputMode } from "./cli-output";
|
|
3
|
+
import type { HarnessEvent, HarnessEventType } from "./harness-events";
|
|
4
|
+
import type { PolicyConfig, PolicyMode } from "./guard";
|
|
5
|
+
export type CliRuntimeInitializeOptions = {
|
|
6
|
+
readonly projectRoot: string;
|
|
7
|
+
readonly dryRun: boolean;
|
|
8
|
+
readonly outputMode: OutputMode;
|
|
9
|
+
readonly runId?: string;
|
|
10
|
+
readonly policyMode?: PolicyMode;
|
|
11
|
+
};
|
|
12
|
+
export type CliRuntimeContext = {
|
|
13
|
+
readonly projectRoot: string;
|
|
14
|
+
readonly dryRun: boolean;
|
|
15
|
+
readonly outputMode: OutputMode;
|
|
16
|
+
readonly runId: string;
|
|
17
|
+
readonly policyMode?: PolicyMode;
|
|
18
|
+
readonly eventBus: {
|
|
19
|
+
getRunId(): string;
|
|
20
|
+
getEventsFile(): string;
|
|
21
|
+
getMemoryEvents(): HarnessEvent[];
|
|
22
|
+
emit<TPayload extends Record<string, unknown>>(type: HarnessEventType, payload: TPayload): Promise<HarnessEvent<TPayload>>;
|
|
23
|
+
};
|
|
24
|
+
readonly emitEvent: <TPayload extends Record<string, unknown>>(type: HarnessEventType, payload: TPayload) => Promise<void>;
|
|
25
|
+
readonly runCommand: (parts: string[]) => Promise<CommandExecutionResult>;
|
|
26
|
+
};
|
|
27
|
+
export type AgentShellMaterializationOptions = {
|
|
28
|
+
readonly env?: Record<string, string | undefined>;
|
|
29
|
+
readonly cwd?: string;
|
|
30
|
+
readonly moduleDir?: string;
|
|
31
|
+
readonly build?: (entrypoint: string, output: string, cwd: string, define?: Record<string, string>) => Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
export interface CliRunnerService {
|
|
34
|
+
initializeRuntime(options: CliRuntimeInitializeOptions): Promise<CliRuntimeContext>;
|
|
35
|
+
runCommand(context: CliRuntimeContext, parts: string[]): Promise<CommandExecutionResult>;
|
|
36
|
+
ensureAgentShellBinary(projectRoot: string, options?: AgentShellMaterializationOptions): Promise<string>;
|
|
37
|
+
resolveAgentMaterializationSourceRoot(projectRoot: string, options?: AgentShellMaterializationOptions): string;
|
|
38
|
+
withProjectRoot(projectRoot: string): void;
|
|
39
|
+
formatCommand(parts: string[]): string;
|
|
40
|
+
loadPolicy(projectRoot: string): PolicyConfig;
|
|
41
|
+
}
|
|
42
|
+
export declare const CLI_RUNNER_CAPABILITY_ID = "rig.cli.runner";
|
|
43
|
+
export declare const CLI_RUNNER: CapabilityId<CliRunnerService>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/cli-runner.ts
|
|
8
|
+
var CLI_RUNNER_CAPABILITY_ID = "rig.cli.runner";
|
|
9
|
+
var CLI_RUNNER = makeCapabilityId(CLI_RUNNER_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
CLI_RUNNER_CAPABILITY_ID,
|
|
12
|
+
CLI_RUNNER
|
|
13
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TaskStatus } from "./graph";
|
|
2
|
+
import type { TaskDependencyProjection } from "./task-graph-primitives";
|
|
3
|
+
import type { RigTask } from "./task-source";
|
|
4
|
+
export type RigTaskBadgeProjection = TaskDependencyProjection & {
|
|
5
|
+
readonly source?: string | null | undefined;
|
|
6
|
+
readonly url?: string | null | undefined;
|
|
7
|
+
readonly body?: string | null | undefined;
|
|
8
|
+
readonly assignedTo?: string | readonly string[] | null | undefined;
|
|
9
|
+
readonly assignees?: readonly string[] | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type TaskProjectionListInput = {
|
|
12
|
+
readonly tasks?: readonly RigTask[];
|
|
13
|
+
readonly currentUserLogin?: string | null;
|
|
14
|
+
readonly nextReadyTaskId?: string | null;
|
|
15
|
+
readonly assignedToMe?: boolean;
|
|
16
|
+
readonly limit?: number;
|
|
17
|
+
};
|
|
18
|
+
export type TaskProjectionListRow = {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly currentValue: string;
|
|
22
|
+
readonly description: string;
|
|
23
|
+
};
|
|
24
|
+
export type TaskProjectionBoardTask = {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly status: string;
|
|
27
|
+
readonly title: string;
|
|
28
|
+
readonly badge?: string;
|
|
29
|
+
readonly description?: string;
|
|
30
|
+
};
|
|
31
|
+
export type TaskProjectionStats = {
|
|
32
|
+
readonly total: number;
|
|
33
|
+
readonly ready: number;
|
|
34
|
+
readonly running: number;
|
|
35
|
+
};
|
|
36
|
+
export interface TaskProjectionCapability {
|
|
37
|
+
normalizeStatus(value: string | null | undefined): TaskStatus;
|
|
38
|
+
normalizePriority(value: number | string | null | undefined): number | null;
|
|
39
|
+
project(task: RigTask): RigTaskBadgeProjection;
|
|
40
|
+
assigneeText(task: RigTask): string;
|
|
41
|
+
title(task: RigTask | null | undefined): string;
|
|
42
|
+
id(task: RigTask | null | undefined): string | null;
|
|
43
|
+
status(task: RigTask | null | undefined): string;
|
|
44
|
+
description(task: RigTask): string;
|
|
45
|
+
listRows(input: TaskProjectionListInput): readonly TaskProjectionListRow[];
|
|
46
|
+
boardTasks(input: TaskProjectionListInput): readonly TaskProjectionBoardTask[];
|
|
47
|
+
stats(tasks: readonly RigTask[] | undefined): TaskProjectionStats | null;
|
|
48
|
+
}
|
|
49
|
+
export interface DispatchOutcomeCapability {
|
|
50
|
+
/** Map a raw engine error to a typed operator message, or null to fall back. */
|
|
51
|
+
humanize(error: unknown): string | null;
|
|
52
|
+
}
|
|
53
|
+
export interface CockpitCapabilities {
|
|
54
|
+
readonly taskProjection: TaskProjectionCapability;
|
|
55
|
+
readonly dispatchOutcome: DispatchOutcomeCapability;
|
|
56
|
+
}
|
|
57
|
+
export declare const TASK_PROJECTION_CAPABILITY_ID: import("./capability-id").CapabilityId<TaskProjectionCapability>;
|
|
58
|
+
export declare const DISPATCH_OUTCOME_CAPABILITY_ID: import("./capability-id").CapabilityId<DispatchOutcomeCapability>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/cockpit.ts
|
|
8
|
+
var TASK_PROJECTION_CAPABILITY_ID = makeCapabilityId("rig:task-projection");
|
|
9
|
+
var DISPATCH_OUTCOME_CAPABILITY_ID = makeCapabilityId("rig:dispatch-outcome");
|
|
10
|
+
export {
|
|
11
|
+
TASK_PROJECTION_CAPABILITY_ID,
|
|
12
|
+
DISPATCH_OUTCOME_CAPABILITY_ID
|
|
13
|
+
};
|