@ricsam/r5dctl 0.0.126 → 0.0.128
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 +36 -18
- package/dist/cjs/cli.cjs +63 -313
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/cli.mjs +63 -307
- package/dist/mjs/package.json +1 -1
- package/dist/types/account.d.ts +67 -0
- package/dist/types/cli.d.ts +5 -43
- package/package.json +2 -2
package/dist/types/cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { R5dctlApiError, R5dctlClient, type R5dctlConversationForkResponse, type R5dctlConversationHeadResponse, type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationNodeResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type
|
|
1
|
+
import { R5dctlApiError, R5dctlClient, type R5dctlConversationForkResponse, type R5dctlConversationHeadResponse, type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationNodeResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type R5dctlProcessInspection, type R5dctlProcessListInput, type R5dctlProcessLog, type R5dctlProcessRun, type R5dctlWorkerCapacityReport, type R5dctlBranch, type R5dctlBranchDeletionStatus, type R5dctlBranchDescription, type R5dctlBranchOperation, type R5dctlSessionSummary, type R5dctlSessionClaim, type R5dctlSessionClaimListResponse, type R5dctlSessionEvent, type R5dctlSessionStartInput, type R5dctlWorkspaceStatus, type R5dctlWorkspaceSyncResult, type R5dctlWorkingTreeMode, type R5dctlWorktreeSource, type R5dctlPromptDelivery, type R5dctlSessionMode, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
|
|
2
|
+
import { type AccountCommand } from "./account";
|
|
2
3
|
export type GlobalOptions = {
|
|
3
4
|
baseUrl?: string;
|
|
4
5
|
json: boolean;
|
|
@@ -17,6 +18,9 @@ export type R5dctlConfig = {
|
|
|
17
18
|
apiKey?: string;
|
|
18
19
|
};
|
|
19
20
|
type CommandExecutionPlan = {
|
|
21
|
+
kind: "account";
|
|
22
|
+
command: AccountCommand;
|
|
23
|
+
} | {
|
|
20
24
|
kind: "plugin";
|
|
21
25
|
pluginArgs: string[];
|
|
22
26
|
clearAuthOnSuccess?: boolean;
|
|
@@ -260,13 +264,6 @@ export declare function parseShellArgs(args: string[]): {
|
|
|
260
264
|
};
|
|
261
265
|
export declare function parsePsListArgs(args: string[]): R5dctlProcessListInput;
|
|
262
266
|
export declare function parsePsHistoryArgs(args: string[]): R5dctlProcessListInput;
|
|
263
|
-
export type K8sUsageOptions = {
|
|
264
|
-
namespace?: string;
|
|
265
|
-
workload?: string;
|
|
266
|
-
container?: string;
|
|
267
|
-
window: "24h" | "7d";
|
|
268
|
-
};
|
|
269
|
-
export declare function parseK8sUsageArgs(args: string[]): K8sUsageOptions;
|
|
270
267
|
export declare function renderDeviceAuthorizationPrompt(input: {
|
|
271
268
|
verificationUri: string;
|
|
272
269
|
userCode: string;
|
|
@@ -283,41 +280,6 @@ export declare function renderWorkerCapacity(workerLabel: string, capacity: R5dc
|
|
|
283
280
|
export declare function renderWorkspaceStatus(status: R5dctlWorkspaceStatus): string;
|
|
284
281
|
export declare function renderBranchList(branches: R5dctlBranch[]): string;
|
|
285
282
|
export declare function renderWorkspaceSync(result: R5dctlWorkspaceSyncResult): string;
|
|
286
|
-
export type K8sUsageSummary = {
|
|
287
|
-
cpuMinNanoCores: number | null;
|
|
288
|
-
cpuMaxNanoCores: number | null;
|
|
289
|
-
memoryMinBytes: number | null;
|
|
290
|
-
memoryMaxBytes: number | null;
|
|
291
|
-
sampleCount: number;
|
|
292
|
-
};
|
|
293
|
-
export type K8sUsageReport = {
|
|
294
|
-
window: "24h" | "7d";
|
|
295
|
-
collectedAt: string;
|
|
296
|
-
metricsFreshAt: string | null;
|
|
297
|
-
metricsStale: boolean;
|
|
298
|
-
filters: Omit<K8sUsageOptions, "window">;
|
|
299
|
-
entries: Array<{
|
|
300
|
-
workload: Pick<R5dctlK8sWorkload, "uid" | "kind" | "namespace" | "name" | "replicas" | "readyReplicas">;
|
|
301
|
-
container: {
|
|
302
|
-
name: string;
|
|
303
|
-
currentUsage: R5dctlK8sUsage;
|
|
304
|
-
pods: Array<R5dctlK8sUsage & {
|
|
305
|
-
podUid: string;
|
|
306
|
-
podName: string;
|
|
307
|
-
phase: string | null;
|
|
308
|
-
}>;
|
|
309
|
-
};
|
|
310
|
-
sampledPodCount: number;
|
|
311
|
-
summary: K8sUsageSummary;
|
|
312
|
-
history: R5dctlK8sResourceHistory;
|
|
313
|
-
}>;
|
|
314
|
-
};
|
|
315
|
-
export declare function collectK8sUsage(client: Pick<R5dctlClient, "k8s">, options: K8sUsageOptions): Promise<K8sUsageReport>;
|
|
316
|
-
export declare function formatK8sCpu(value: number | null): string;
|
|
317
|
-
export declare function formatK8sMemory(value: number | null): string;
|
|
318
|
-
export type K8sUsageState = "healthy" | "partial" | "stale" | "inactive" | "warming" | "no data" | "no current";
|
|
319
|
-
export declare function getK8sUsageState(entry: K8sUsageReport["entries"][number]): K8sUsageState;
|
|
320
|
-
export declare function renderK8sUsageReport(report: K8sUsageReport): string;
|
|
321
283
|
export declare function formatProcessAge(startedAt: string, nowMs?: number): string;
|
|
322
284
|
export declare function renderProcessList(processes: R5dctlProcessRun[], nowMs?: number): string;
|
|
323
285
|
/** `general`, `control`, `queued:general`, or `-` when the worker reported nothing for this run. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5dctl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.128",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/cli.cjs",
|
|
6
6
|
"module": "./dist/mjs/cli.mjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"r5dctl": "dist/cjs/main.cjs"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ricsam/r5d-api": "^0.0.
|
|
29
|
+
"@ricsam/r5d-api": "^0.0.128",
|
|
30
30
|
"dotenv": "^17",
|
|
31
31
|
"qrcode": "^1.5.4",
|
|
32
32
|
"ws": "^8.18.3"
|