@keystrokehq/cli 0.1.94 → 0.1.96
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/{dist-CBsyHVC6.mjs → dist-BChg8kdu.mjs} +7 -4
- package/dist/dist-BChg8kdu.mjs.map +1 -0
- package/dist/{dist-CfP2xmH2.mjs → dist-BbKeSmsJ.mjs} +3 -3
- package/dist/{dist-CfP2xmH2.mjs.map → dist-BbKeSmsJ.mjs.map} +1 -1
- package/dist/{dist-BlQZgnhc.mjs → dist-CRQZ6dUM.mjs} +2 -2
- package/dist/{dist-BlQZgnhc.mjs.map → dist-CRQZ6dUM.mjs.map} +1 -1
- package/dist/dist-CyFwRToz.mjs +3 -0
- package/dist/{dist-DB7DcawF.mjs → dist-yxSyWJLs.mjs} +11 -3
- package/dist/{dist-DB7DcawF.mjs.map → dist-yxSyWJLs.mjs.map} +1 -1
- package/dist/index.mjs +119 -17
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-DkzXCNws.mjs → maybe-auto-update-CRIaoRBQ.mjs} +2 -2
- package/dist/{maybe-auto-update-DkzXCNws.mjs.map → maybe-auto-update-CRIaoRBQ.mjs.map} +1 -1
- package/dist/{run-package-manager-update-ldoANUl4.mjs → run-package-manager-update-CEE3gsWX.mjs} +2 -2
- package/dist/{run-package-manager-update-ldoANUl4.mjs.map → run-package-manager-update-CEE3gsWX.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +6 -3
- package/dist/skills-bundle/_AGENTS.md +8 -2
- package/package.json +1 -1
- package/dist/dist-CBsyHVC6.mjs.map +0 -1
- package/dist/dist-CUutFRjp.mjs +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as CredentialInstanceRecordSchema, $n as
|
|
3
|
-
import { i as packProjectArtifact, n as withMcpReadClient, r as mergeFilteredArtifact, t as mapInParallelBatches } from "./dist-
|
|
4
|
-
import { C as getWebUrl, E as resolvePlatformUrlForWebUrl, S as getPlatformUrl, _ as isNewerVersion, a as formatReleaseAgeBlockMessage, b as getConfigDir, c as detectManagerFromLockfile, d as detectPackageManager, f as installDependencies$1, g as resolveCliRoot, h as resolvePackageManager, i as fetchLatestCliRelease, l as readCliVersion, m as resolveGithubPackagesToken, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, p as installPlaygroundDependencies, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, u as buildPlaygroundWorkspace, v as createCliConfig, w as DEFAULT_PLATFORM_URL, x as getEffectiveApiTarget, y as getCliConfigDir } from "./run-package-manager-update-
|
|
2
|
+
import { $ as CredentialInstanceRecordSchema, $n as WorkflowCanvasSchema, $t as PresignProjectSourceRequestSchema, A as ConnectManagedServiceCredentialRequestSchema, An as TriggerRunDetailResponseSchema, At as ListCredentialsPageResponseSchema, B as CreateCustomAppResponseSchema, Bn as UpdateProjectMemberRequestSchema, Bt as ListProjectsResponseSchema, C as ChannelConnectionListResponseSchema, Cn as StartOAuthConnectionResultSchema, Cr as parseErrorResponse, D as ConfirmCheckoutRequestSchema, Dn as TriggerInvokeInputsSchema, Dr as resolveDocsMcpUrl, Dt as ListAppsResponseSchema, E as CompleteProjectArtifactResponseSchema, En as TriggerDetailResponseSchema, Er as resolveConnectAppSlug, Et as ListApiKeysResponseSchema, F as CreateCredentialInstanceBodySchema, Fn as UpdateCredentialRequestSchema, Ft as ListOrganizationsResponseSchema, G as CreateProjectResponseSchema, Gn as UploadProjectSourceResponseSchema, Gt as OrganizationSidebarBrandingPatchSchema, H as CreateOrganizationResponseSchema, Hn as UpdateProjectRequestSchema, Ht as ManagedServiceKindSchema, I as CreateCredentialsRequestSchema, In as UpdateManagedServiceCredentialRequestSchema, It as ListProjectDeploymentsResponseSchema, J as CredentialAssignmentListResponseSchema, Jn as UserAvatarSchema, Jt as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, K as CreateSubscriptionCheckoutRequestSchema, Kn as UpsertGatewayAttachmentBodySchema, Kt as OrganizationSidebarBrandingSchema, L as CreateCredentialsResponseSchema, Ln as UpdateOrganizationMemberRequestSchema, Lt as ListProjectFilesResponseSchema, M as CreateApiKeyRequestSchema, Mn as UpdateAutoTopupRequestSchema, Mt as ListOrganizationInvitationsResponseSchema, N as CreateApiKeyResponseSchema, Nn as UpdateChannelBindingBodySchema, Nt as ListOrganizationMembersPageQuerySchema, O as ConfirmCheckoutResponseSchema, On as TriggerInvokeResponseSchema, Or as resolvePublicPlatformOrigin, Ot as ListChannelPlatformsResponseSchema, P as CreateBillingPortalRequestSchema, Pn as UpdateCredentialInstanceBodySchema, Pt as ListOrganizationMembersPageResponseSchema, Q as CredentialInstanceListResponseSchema, Qn as WorkflowCanvasRunSchema, Qt as PresignOrgLogoResponseSchema, R as CreateCreditsCheckoutRequestSchema, Rn as UpdateOrganizationMemberResponseSchema, Rt as ListProjectMembersResponseSchema, S as ChannelAccountListResponseSchema, Sn as StartOAuthConnectionInputSchema, Sr as parseAppSlug, St as InviteProjectMembersResponseSchema, T as ChannelDirectoryListResponseSchema, Tn as SubmitTeamRequestRequestSchema, Tt as ListAgentWorkspaceFilesResponseSchema, U as CreateProjectArtifactResponseSchema, Un as UpdateProjectSettingsRequestSchema, Ut as McpDiscoverResponseSchema, V as CreateOrganizationRequestSchema, Vn as UpdateProjectMemberResponseSchema, Vt as ManagedServiceCredentialSchema, W as CreateProjectRequestSchema, Wn as UploadProjectSourceManifestRequestSchema, Wt as OpenApiDiscoverResponseSchema, X as CredentialConsumerListQuerySchema, Xn as UserPreferencesSchema, Xt as PresignChatAttachmentResponseSchema, Y as CredentialAssignmentRecordSchema, Yn as UserPreferencesPatchSchema, Yt as PresignChatAttachmentRequestSchema, Z as CredentialConsumerListResponseSchema, Zn as WorkflowCanvasCredentialBindingsSchema, Zt as PresignOrgLogoRequestSchema, _ as BindChannelBodySchema, _n as SlugAvailabilityResponseSchema, _r as detectProjectPackageManagerFromSnapshot, _t as HistoryRunListQuerySchema, a as AgentSessionListResponseSchema, an as ProjectResponseSchema, ar as WorkflowRunResponseSchema, at as DownloadActiveProjectSourceResponseSchema, b as CatalogAppDetailResponseSchema, bn as StartMcpOAuthConnectionInputSchema, bt as InviteOrganizationMembersResponseSchema, c as AgentTriggerSummaryListResponseSchema, cn as PromptInputSchema, cr as WorkspaceTriggerDetailSchema, d as AutoTopupSummarySchema, dn as QueuedAgentPromptResponseSchema, dr as WorkspaceTriggerOverviewSchema, dt as GetCredentialResponseSchema, en as PresignProjectSourceResponseSchema, er as WorkflowRunDetailResponseSchema, f as BillingActivityResponseSchema, fn as QueuedRunResponseSchema, fr as WorkspaceTriggerRunListResponseSchema, ft as GetCustomAppResponseSchema, g as BillingUsageResponseSchema, gn as SkillSummaryListResponseSchema, gr as deriveCustomAppDisplay, gt as HistoryRunDetailResponseSchema, h as BillingSummaryResponseSchema, hn as SkillSummaryDetailResponseSchema, ht as HistoryRunCancelResponseSchema, i as AgentSessionDetailResponseSchema, in as ProjectReachabilityResponseSchema, ir as WorkflowRunListResponseSchema, it as DownloadActiveProjectArtifactResponseSchema, j as ConnectProvidersResponseSchema, jn as TriggerRunListResponseSchema, jt as ListManagedServiceCredentialsResponseSchema, k as ConnectAuthorizeUrlResponseSchema, kn as TriggerListResponseSchema, kr as slugifyAppName, kt as ListCredentialsPageQuerySchema, l as AppSlugAvailabilityResponseSchema, ln as PromptResponseSchema, lr as WorkspaceTriggerFileSchema, lt as GatewayAttachmentRecordSchema, m as BillingRedirectResponseSchema, mn as RecentResourceListResponseSchema, mr as buildConnectDeeplink, mt as HealthResponseSchema, n as AcceptOrganizationInvitationResponseSchema, nn as PresignUserAvatarResponseSchema, nr as WorkflowRunInputsPutBodySchema, nt as DOCS_SEARCH_TOOL, o as AgentSummaryDetailResponseSchema, on as ProjectSettingsResponseSchema, or as WorkflowSummaryDetailResponseSchema, ot as ErrorResponseSchema, p as BillingInvoiceUrlResponseSchema, pr as WorkspaceWorkflowOverviewSchema, pt as GraphqlDiscoverResponseSchema, q as CredentialAssignmentListQuerySchema, qn as UserAvatarPatchSchema, qt as PROJECT_PULL_STATE_RELATIVE_PATH, r as ActiveOrganizationResponseSchema, rn as ProjectPullStateSchema, rr as WorkflowRunInputsSchema, rt as DeclineOrganizationInvitationResponseSchema, s as AgentSummaryListResponseSchema, sn as ProjectSlugAvailabilityResponseSchema, sr as WorkflowSummaryListResponseSchema, st as ExecuteKeystrokeToolRequestSchema, t as ACTIVE_ORG_HEADER, tn as PresignUserAvatarRequestSchema, tr as WorkflowRunHooksResponseSchema, tt as DOCS_QUERY_TOOL, u as AssignCredentialBodySchema, ur as WorkspaceTriggerListResponseSchema, ut as GetAppCatalogEntryResponseSchema, v as CatalogActionDetailResponseSchema, vn as StartKeystrokeConnectionInputSchema, vr as isAcceptableInstallExit, vt as HistoryRunListResponseSchema, w as ChannelConnectionSchema, wn as SubmitMarketingContactRequestSchema, wt as ListAgentMemoryFilesResponseSchema, x as CatalogAppsPageResponseSchema, xn as StartMcpOAuthConnectionResultSchema, xt as InviteProjectMembersRequestSchema, y as CatalogActionsPageResponseSchema, yn as StartKeystrokeConnectionResultSchema, yr as listenPortFromPublicUrl, yt as InviteOrganizationMembersRequestSchema, z as CreateCustomAppRequestSchema, zn as UpdateOrganizationRequestSchema, zt as ListProjectMetricsResponseSchema } from "./dist-yxSyWJLs.mjs";
|
|
3
|
+
import { i as packProjectArtifact, n as withMcpReadClient, r as mergeFilteredArtifact, t as mapInParallelBatches } from "./dist-CRQZ6dUM.mjs";
|
|
4
|
+
import { C as getWebUrl, E as resolvePlatformUrlForWebUrl, S as getPlatformUrl, _ as isNewerVersion, a as formatReleaseAgeBlockMessage, b as getConfigDir, c as detectManagerFromLockfile, d as detectPackageManager, f as installDependencies$1, g as resolveCliRoot, h as resolvePackageManager, i as fetchLatestCliRelease, l as readCliVersion, m as resolveGithubPackagesToken, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, p as installPlaygroundDependencies, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, u as buildPlaygroundWorkspace, v as createCliConfig, w as DEFAULT_PLATFORM_URL, x as getEffectiveApiTarget, y as getCliConfigDir } from "./run-package-manager-update-CEE3gsWX.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
@@ -3929,6 +3929,16 @@ function createWorkflowsResource(http) {
|
|
|
3929
3929
|
throw await toPlatformError(error);
|
|
3930
3930
|
}
|
|
3931
3931
|
},
|
|
3932
|
+
/** Presign an upload for a file attached to a manual workflow run. */
|
|
3933
|
+
async presignAttachment(workflowId, input) {
|
|
3934
|
+
try {
|
|
3935
|
+
const payload = PresignChatAttachmentRequestSchema.parse(input);
|
|
3936
|
+
const data = await http.post(`api/workflows/${encodeURIComponent(workflowId)}/attachments/presign`, { json: payload }).json();
|
|
3937
|
+
return PresignChatAttachmentResponseSchema.parse(data);
|
|
3938
|
+
} catch (error) {
|
|
3939
|
+
throw await toPlatformError(error);
|
|
3940
|
+
}
|
|
3941
|
+
},
|
|
3932
3942
|
async cancelRun(runId) {
|
|
3933
3943
|
try {
|
|
3934
3944
|
const response = await http.post(`api/workflows/runs/${encodeURIComponent(runId)}/cancel`);
|
|
@@ -5387,6 +5397,80 @@ function registerAgentPromptCommand(agent) {
|
|
|
5387
5397
|
}));
|
|
5388
5398
|
}
|
|
5389
5399
|
//#endregion
|
|
5400
|
+
//#region src/commands/inspect-detail.ts
|
|
5401
|
+
const WORKFLOW_RUN_FIELDS = [
|
|
5402
|
+
"id",
|
|
5403
|
+
"status",
|
|
5404
|
+
"input",
|
|
5405
|
+
"output",
|
|
5406
|
+
"error"
|
|
5407
|
+
];
|
|
5408
|
+
const AGENT_SESSION_FIELDS = [
|
|
5409
|
+
"id",
|
|
5410
|
+
"status",
|
|
5411
|
+
"title",
|
|
5412
|
+
"error",
|
|
5413
|
+
"activeRunId",
|
|
5414
|
+
"messageCount"
|
|
5415
|
+
];
|
|
5416
|
+
function parseInspectDetailOptions(options) {
|
|
5417
|
+
const summary = Boolean(options.summary);
|
|
5418
|
+
const field = options.field?.trim() || void 0;
|
|
5419
|
+
const include = options.include;
|
|
5420
|
+
if (summary && field) throw new Error("Use --summary or --field, not both");
|
|
5421
|
+
if ((summary || field) && include !== void 0) throw new Error("Do not combine --include with --summary or --field");
|
|
5422
|
+
if (summary) return { kind: "summary" };
|
|
5423
|
+
if (field) return {
|
|
5424
|
+
kind: "field",
|
|
5425
|
+
field
|
|
5426
|
+
};
|
|
5427
|
+
return {
|
|
5428
|
+
kind: "raw",
|
|
5429
|
+
include
|
|
5430
|
+
};
|
|
5431
|
+
}
|
|
5432
|
+
function includeForInspectMode(mode) {
|
|
5433
|
+
if (mode.kind === "raw") return mode.include;
|
|
5434
|
+
return "none";
|
|
5435
|
+
}
|
|
5436
|
+
function writeInspectJson(value) {
|
|
5437
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
5438
|
+
}
|
|
5439
|
+
function projectWorkflowRunSummary(detail) {
|
|
5440
|
+
return {
|
|
5441
|
+
id: detail.run.id,
|
|
5442
|
+
status: detail.run.status,
|
|
5443
|
+
input: detail.run.input,
|
|
5444
|
+
output: detail.run.output,
|
|
5445
|
+
error: detail.run.error
|
|
5446
|
+
};
|
|
5447
|
+
}
|
|
5448
|
+
function projectWorkflowRunField(detail, field) {
|
|
5449
|
+
if (!isWorkflowRunField(field)) throw new Error(`Unknown --field ${field}. Allowed: ${WORKFLOW_RUN_FIELDS.join(", ")}`);
|
|
5450
|
+
return detail.run[field];
|
|
5451
|
+
}
|
|
5452
|
+
function projectAgentSessionSummary(detail) {
|
|
5453
|
+
return {
|
|
5454
|
+
id: detail.session.id,
|
|
5455
|
+
status: detail.session.status,
|
|
5456
|
+
title: detail.session.title,
|
|
5457
|
+
error: detail.session.error,
|
|
5458
|
+
activeRunId: detail.activeRunId,
|
|
5459
|
+
messageCount: detail.session.messageCount
|
|
5460
|
+
};
|
|
5461
|
+
}
|
|
5462
|
+
function projectAgentSessionField(detail, field) {
|
|
5463
|
+
if (!isAgentSessionField(field)) throw new Error(`Unknown --field ${field}. Allowed: ${AGENT_SESSION_FIELDS.join(", ")}`);
|
|
5464
|
+
if (field === "activeRunId") return detail.activeRunId;
|
|
5465
|
+
return detail.session[field];
|
|
5466
|
+
}
|
|
5467
|
+
function isWorkflowRunField(field) {
|
|
5468
|
+
return WORKFLOW_RUN_FIELDS.includes(field);
|
|
5469
|
+
}
|
|
5470
|
+
function isAgentSessionField(field) {
|
|
5471
|
+
return AGENT_SESSION_FIELDS.includes(field);
|
|
5472
|
+
}
|
|
5473
|
+
//#endregion
|
|
5390
5474
|
//#region src/commands/projects/run-project.ts
|
|
5391
5475
|
async function withActivePlatformClient(config, fn, fromDir = process.cwd()) {
|
|
5392
5476
|
await resolveActiveOrganization(config, fromDir);
|
|
@@ -5473,9 +5557,18 @@ function registerAgentSessionsCommand(agent) {
|
|
|
5473
5557
|
});
|
|
5474
5558
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
5475
5559
|
}));
|
|
5476
|
-
sessions.command("get").description("Get full details for an agent session").argument("<agentId>", "Agent key / route id").argument("<sessionId>", "Agent session id").option("--include <parts>", "Comma-separated: gateway, messages, events, trace").action((agentId, sessionId, options) => runProjectCliCommand("Get agent session failed", async ({ client }) => {
|
|
5477
|
-
const
|
|
5478
|
-
|
|
5560
|
+
sessions.command("get").description("Get full details for an agent session").argument("<agentId>", "Agent key / route id").argument("<sessionId>", "Agent session id").option("--include <parts>", "Comma-separated: gateway, messages, events, trace, or none").option("--summary", "Print a concise JSON summary (status, title, error, activeRunId, messageCount)").option("--field <field>", "Print one field: id, status, title, error, activeRunId, messageCount").action((agentId, sessionId, options) => runProjectCliCommand("Get agent session failed", async ({ client }) => {
|
|
5561
|
+
const mode = parseInspectDetailOptions(options);
|
|
5562
|
+
const result = await client.agents.getSession(agentId, sessionId, { include: includeForInspectMode(mode) });
|
|
5563
|
+
if (mode.kind === "summary") {
|
|
5564
|
+
writeInspectJson(projectAgentSessionSummary(result));
|
|
5565
|
+
return;
|
|
5566
|
+
}
|
|
5567
|
+
if (mode.kind === "field") {
|
|
5568
|
+
writeInspectJson(projectAgentSessionField(result, mode.field));
|
|
5569
|
+
return;
|
|
5570
|
+
}
|
|
5571
|
+
writeInspectJson(result);
|
|
5479
5572
|
}));
|
|
5480
5573
|
sessions.command("cancel").description("Cancel a running agent session").argument("<agentId>", "Agent key / route id").argument("<sessionId>", "Agent session id").action(async (agentId, sessionId) => {
|
|
5481
5574
|
const config = createCliConfig();
|
|
@@ -6760,7 +6853,7 @@ function registerBuildCommand(program) {
|
|
|
6760
6853
|
try {
|
|
6761
6854
|
const root = resolveProjectRoot(options.dir);
|
|
6762
6855
|
await ensureSdkCurrent(root);
|
|
6763
|
-
const { buildApp } = await import("./dist-
|
|
6856
|
+
const { buildApp } = await import("./dist-BbKeSmsJ.mjs");
|
|
6764
6857
|
await buildApp({ root });
|
|
6765
6858
|
process.stdout.write(`Built ${root}\n`);
|
|
6766
6859
|
} catch (error) {
|
|
@@ -6885,7 +6978,7 @@ async function sleep(ms) {
|
|
|
6885
6978
|
}
|
|
6886
6979
|
async function buildDeployArchive(client, root, projectId, filter) {
|
|
6887
6980
|
if (filter?.length) {
|
|
6888
|
-
const { buildFilteredApp } = await import("./dist-
|
|
6981
|
+
const { buildFilteredApp } = await import("./dist-BbKeSmsJ.mjs");
|
|
6889
6982
|
const filtered = await buildFilteredApp({
|
|
6890
6983
|
root,
|
|
6891
6984
|
filter,
|
|
@@ -6907,7 +7000,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
|
|
|
6907
7000
|
sourceFiles: filtered.sourceFiles
|
|
6908
7001
|
};
|
|
6909
7002
|
}
|
|
6910
|
-
const { buildApp } = await import("./dist-
|
|
7003
|
+
const { buildApp } = await import("./dist-BbKeSmsJ.mjs");
|
|
6911
7004
|
const { sourceFiles } = await buildApp({
|
|
6912
7005
|
root,
|
|
6913
7006
|
collectSources: true,
|
|
@@ -7029,7 +7122,7 @@ function runtimeChildEnv(parentEnv, overrides) {
|
|
|
7029
7122
|
//#region src/project/bootstrap-run.ts
|
|
7030
7123
|
/** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
|
|
7031
7124
|
async function resolveBootstrapRun(options) {
|
|
7032
|
-
const { resolveRuntimeBuildArtifact } = await import("./dist-
|
|
7125
|
+
const { resolveRuntimeBuildArtifact } = await import("./dist-BbKeSmsJ.mjs");
|
|
7033
7126
|
const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
|
|
7034
7127
|
const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
|
|
7035
7128
|
const args = [`--import=${loader}`];
|
|
@@ -7178,7 +7271,7 @@ async function runDev(options) {
|
|
|
7178
7271
|
process.on("SIGINT", shutdown);
|
|
7179
7272
|
process.on("SIGTERM", shutdown);
|
|
7180
7273
|
try {
|
|
7181
|
-
const { watchApp } = await import("./dist-
|
|
7274
|
+
const { watchApp } = await import("./dist-BbKeSmsJ.mjs");
|
|
7182
7275
|
await watchApp({
|
|
7183
7276
|
root,
|
|
7184
7277
|
clean: false,
|
|
@@ -8220,7 +8313,7 @@ async function runStart(options) {
|
|
|
8220
8313
|
const apiPort = Number(new URL(serverUrl).port || 80);
|
|
8221
8314
|
const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
|
|
8222
8315
|
ensureNativeDeps(runtimeNodeModules);
|
|
8223
|
-
const { buildApp } = await import("./dist-
|
|
8316
|
+
const { buildApp } = await import("./dist-BbKeSmsJ.mjs");
|
|
8224
8317
|
await buildApp({
|
|
8225
8318
|
root,
|
|
8226
8319
|
clean: false
|
|
@@ -8682,7 +8775,7 @@ Examples:
|
|
|
8682
8775
|
const input = parseJsonOption(options.input, "--input");
|
|
8683
8776
|
const result = await client.workflows.run(workflowId, input);
|
|
8684
8777
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
8685
|
-
if (isQueuedRunResponse(result)) process.stderr.write(`Run queued. Track progress:\n ${cliBinaryName()} workflows runs get ${workflowId} ${result.runId} --
|
|
8778
|
+
if (isQueuedRunResponse(result)) process.stderr.write(`Run queued. Track progress:\n ${cliBinaryName()} workflows runs get ${workflowId} ${result.runId} --summary\n`);
|
|
8686
8779
|
}, { usage: {
|
|
8687
8780
|
command: `${cliBinaryName()} workflows run ${workflowId}`,
|
|
8688
8781
|
flag: "--input"
|
|
@@ -8709,9 +8802,18 @@ function registerWorkflowRunsCommand(workflow) {
|
|
|
8709
8802
|
});
|
|
8710
8803
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
8711
8804
|
}));
|
|
8712
|
-
runs.command("get").description("Get full details for a workflow run").argument("<workflowId>", "Workflow key / route id").argument("<runId>", "Workflow run id").option("--include <parts>", "Comma-separated: trigger, steps, trace").action((workflowId, runId, options) => runProjectCliCommand("Get workflow run failed", async ({ client }) => {
|
|
8713
|
-
const
|
|
8714
|
-
|
|
8805
|
+
runs.command("get").description("Get full details for a workflow run").argument("<workflowId>", "Workflow key / route id").argument("<runId>", "Workflow run id").option("--include <parts>", "Comma-separated: trigger, steps, trace, or none").option("--summary", "Print a concise JSON summary (status, input, output, error)").option("--field <field>", "Print one field: id, status, input, output, error").action((workflowId, runId, options) => runProjectCliCommand("Get workflow run failed", async ({ client }) => {
|
|
8806
|
+
const mode = parseInspectDetailOptions(options);
|
|
8807
|
+
const result = await client.workflows.getRun(workflowId, runId, { include: includeForInspectMode(mode) });
|
|
8808
|
+
if (mode.kind === "summary") {
|
|
8809
|
+
writeInspectJson(projectWorkflowRunSummary(result));
|
|
8810
|
+
return;
|
|
8811
|
+
}
|
|
8812
|
+
if (mode.kind === "field") {
|
|
8813
|
+
writeInspectJson(projectWorkflowRunField(result, mode.field));
|
|
8814
|
+
return;
|
|
8815
|
+
}
|
|
8816
|
+
writeInspectJson(result);
|
|
8715
8817
|
}));
|
|
8716
8818
|
runs.command("hooks").description("List hook tokens and resume URLs for a workflow run").argument("<workflowId>", "Workflow key / route id").argument("<runId>", "Workflow run id").action((workflowId, runId) => runProjectCliCommand("List workflow run hooks failed", async ({ client }) => {
|
|
8717
8819
|
const result = await client.workflows.listHooks(workflowId, runId);
|
|
@@ -9022,7 +9124,7 @@ function createProgram() {
|
|
|
9022
9124
|
return program;
|
|
9023
9125
|
}
|
|
9024
9126
|
async function runCli(argv) {
|
|
9025
|
-
const { maybeAutoUpdate } = await import("./maybe-auto-update-
|
|
9127
|
+
const { maybeAutoUpdate } = await import("./maybe-auto-update-CRIaoRBQ.mjs");
|
|
9026
9128
|
await maybeAutoUpdate(argv);
|
|
9027
9129
|
createProgram().parse(argv);
|
|
9028
9130
|
}
|