@ricsam/r5d-api 0.0.34 → 0.0.35
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/cjs/index.cjs +21 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +21 -1
- package/dist/mjs/package.json +1 -1
- package/dist/types/index.d.ts +40 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -164,7 +164,27 @@ class R5dctlClient {
|
|
|
164
164
|
list: (input = {}) => this.request({
|
|
165
165
|
method: "GET",
|
|
166
166
|
path: "/api/r5dctl/processes",
|
|
167
|
-
query:
|
|
167
|
+
query: {
|
|
168
|
+
project: input.project,
|
|
169
|
+
branch: input.branch,
|
|
170
|
+
session: input.session,
|
|
171
|
+
worker: input.worker
|
|
172
|
+
}
|
|
173
|
+
}),
|
|
174
|
+
history: (input = {}) => this.request({
|
|
175
|
+
method: "GET",
|
|
176
|
+
path: "/api/r5dctl/processes/history",
|
|
177
|
+
query: {
|
|
178
|
+
project: input.project,
|
|
179
|
+
branch: input.branch,
|
|
180
|
+
session: input.session,
|
|
181
|
+
worker: input.worker,
|
|
182
|
+
limit: input.limit?.toString()
|
|
183
|
+
}
|
|
184
|
+
}),
|
|
185
|
+
inspect: (runId) => this.request({
|
|
186
|
+
method: "GET",
|
|
187
|
+
path: `/api/r5dctl/processes/${encodeURIComponent(runId)}`
|
|
168
188
|
}),
|
|
169
189
|
stop: (runId) => this.request({
|
|
170
190
|
method: "POST",
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/index.mjs
CHANGED
|
@@ -140,7 +140,27 @@ class R5dctlClient {
|
|
|
140
140
|
list: (input = {}) => this.request({
|
|
141
141
|
method: "GET",
|
|
142
142
|
path: "/api/r5dctl/processes",
|
|
143
|
-
query:
|
|
143
|
+
query: {
|
|
144
|
+
project: input.project,
|
|
145
|
+
branch: input.branch,
|
|
146
|
+
session: input.session,
|
|
147
|
+
worker: input.worker
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
history: (input = {}) => this.request({
|
|
151
|
+
method: "GET",
|
|
152
|
+
path: "/api/r5dctl/processes/history",
|
|
153
|
+
query: {
|
|
154
|
+
project: input.project,
|
|
155
|
+
branch: input.branch,
|
|
156
|
+
session: input.session,
|
|
157
|
+
worker: input.worker,
|
|
158
|
+
limit: input.limit?.toString()
|
|
159
|
+
}
|
|
160
|
+
}),
|
|
161
|
+
inspect: (runId) => this.request({
|
|
162
|
+
method: "GET",
|
|
163
|
+
path: `/api/r5dctl/processes/${encodeURIComponent(runId)}`
|
|
144
164
|
}),
|
|
145
165
|
stop: (runId) => this.request({
|
|
146
166
|
method: "POST",
|
package/dist/mjs/package.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -167,6 +167,21 @@ export type R5dctlApiKey = {
|
|
|
167
167
|
lastUsedAt: string | null;
|
|
168
168
|
};
|
|
169
169
|
export type R5dctlProcessRunStatus = "starting" | "running" | "exited" | "cancelled" | "failed";
|
|
170
|
+
export type R5dctlProcessRepositoryOutcome = {
|
|
171
|
+
projectId: string;
|
|
172
|
+
projectPath?: string;
|
|
173
|
+
branchName: string;
|
|
174
|
+
observedDuringSynchronization: true;
|
|
175
|
+
status: "clean" | "published" | "no_change" | "blocked_large_diff" | "blocked_remediation" | "failed";
|
|
176
|
+
startCommitHash?: string;
|
|
177
|
+
publishedCommitHash?: string;
|
|
178
|
+
diffSizeBytes?: number;
|
|
179
|
+
principalSynchronizationState?: "pending" | "synced" | "failed";
|
|
180
|
+
fanOutState?: "scheduled" | "failed";
|
|
181
|
+
branchActionId?: string;
|
|
182
|
+
largeDiffIncidentId?: string;
|
|
183
|
+
error?: string;
|
|
184
|
+
};
|
|
170
185
|
export type R5dctlProcessRun = {
|
|
171
186
|
runId: string;
|
|
172
187
|
projectId: string;
|
|
@@ -174,12 +189,27 @@ export type R5dctlProcessRun = {
|
|
|
174
189
|
sessionId: string;
|
|
175
190
|
branchName: string;
|
|
176
191
|
workerLabel: string;
|
|
192
|
+
platform?: string;
|
|
193
|
+
arch?: string;
|
|
194
|
+
mode: "foreground" | "detached";
|
|
195
|
+
pid?: number;
|
|
196
|
+
processGroupId?: number;
|
|
197
|
+
startCommitHash: string;
|
|
198
|
+
launchWorkspaceActionId?: string;
|
|
199
|
+
terminalWorkspaceActionId?: string;
|
|
200
|
+
terminalSyncClaimedAt?: string;
|
|
201
|
+
repositoryOutcomes: R5dctlProcessRepositoryOutcome[];
|
|
202
|
+
syncState: "pending_process_exit" | "synced" | "blocked_large_diff" | "waiting_for_worker" | "stale_workspace";
|
|
203
|
+
publishedCommitHash?: string;
|
|
204
|
+
principalSynchronizationState?: "pending" | "synced" | "failed";
|
|
177
205
|
argv: string[];
|
|
178
206
|
command: string;
|
|
179
207
|
cwd?: string;
|
|
180
208
|
status: R5dctlProcessRunStatus;
|
|
181
209
|
startedAt: string;
|
|
182
210
|
updatedAt: string;
|
|
211
|
+
completedAt?: string;
|
|
212
|
+
exitCode?: number;
|
|
183
213
|
logPath: string;
|
|
184
214
|
stdoutBytes: number;
|
|
185
215
|
stderrBytes: number;
|
|
@@ -191,6 +221,14 @@ export type R5dctlProcessListInput = {
|
|
|
191
221
|
branch?: string;
|
|
192
222
|
session?: string;
|
|
193
223
|
worker?: string;
|
|
224
|
+
limit?: number;
|
|
225
|
+
};
|
|
226
|
+
export type R5dctlProcessInspection = R5dctlProcessRun & {
|
|
227
|
+
stdoutTail: string;
|
|
228
|
+
stderrTail: string;
|
|
229
|
+
outputTailMaxBytes: number;
|
|
230
|
+
stdoutTailTruncated: boolean;
|
|
231
|
+
stderrTailTruncated: boolean;
|
|
194
232
|
};
|
|
195
233
|
export type R5dctlProjectUpdateInput = {
|
|
196
234
|
mode?: "greenfield" | "prod";
|
|
@@ -268,6 +306,8 @@ export declare class R5dctlClient {
|
|
|
268
306
|
};
|
|
269
307
|
readonly processes: {
|
|
270
308
|
list: (input?: R5dctlProcessListInput) => Promise<R5dctlProcessRun[]>;
|
|
309
|
+
history: (input?: R5dctlProcessListInput) => Promise<R5dctlProcessRun[]>;
|
|
310
|
+
inspect: (runId: string) => Promise<R5dctlProcessInspection>;
|
|
271
311
|
stop: (runId: string) => Promise<R5dctlProcessRun>;
|
|
272
312
|
};
|
|
273
313
|
readonly projects: {
|