@keystrokehq/cli 1.0.32 → 1.0.34
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-CvnH5UO5.mjs +3 -0
- package/dist/{dist-BIWbmT4y.mjs → dist-DMTzqeKF.mjs} +6621 -8
- package/dist/dist-DMTzqeKF.mjs.map +1 -0
- package/dist/{dist-CRP2joPp.mjs → dist-DpvOEjMA.mjs} +3 -3
- package/dist/{dist-CRP2joPp.mjs.map → dist-DpvOEjMA.mjs.map} +1 -1
- package/dist/{dist-BUK3crkq.mjs → dist-M3vmU-M6.mjs} +130 -8
- package/dist/{dist-BUK3crkq.mjs.map → dist-M3vmU-M6.mjs.map} +1 -1
- package/dist/index.mjs +40 -11
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-BD5o34qG.mjs → maybe-auto-update-CVR31Kbj.mjs} +2 -2
- package/dist/{maybe-auto-update-BD5o34qG.mjs.map → maybe-auto-update-CVR31Kbj.mjs.map} +1 -1
- package/dist/{pack-artifact-DVnIKrsg-CZTT2aF_.mjs → pack-artifact-DVnIKrsg-eIiQQrre.mjs} +2 -2
- package/dist/{pack-artifact-DVnIKrsg-CZTT2aF_.mjs.map → pack-artifact-DVnIKrsg-eIiQQrre.mjs.map} +1 -1
- package/dist/{version-SEE2eWz0.mjs → version-BD-HVk5p.mjs} +2 -2
- package/dist/{version-SEE2eWz0.mjs.map → version-BD-HVk5p.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-BIWbmT4y.mjs.map +0 -1
- package/dist/dist-Bacq9ds5.mjs +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as HistoryRunListQuerySchema, $t as
|
|
3
|
-
import { a as installPlaygroundDependencies, c as createCliConfig, d as getEffectiveApiTarget, f as getPlatformUrl, g as resolvePlatformUrlForWebUrl, i as installDependencies, l as getCliConfigDir, m as DEFAULT_PLATFORM_URL, n as buildPlaygroundWorkspace, o as resolvePackageManager, p as getWebUrl, s as resolveCliRoot, t as readCliVersion, u as getConfigDir } from "./version-
|
|
4
|
-
import { n as packProjectArtifact, t as mergeFilteredArtifact } from "./pack-artifact-DVnIKrsg-
|
|
2
|
+
import { $ as HistoryRunListQuerySchema, $t as TriggerListResponseSchema, A as CreateCustomAppRequestSchema, An as listenPortFromPublicUrl, At as PresignUserAvatarResponseSchema, B as CredentialConsumerListQuerySchema, Bt as RecentResourceListResponseSchema, C as ConnectAuthorizeUrlResponseSchema, Cn as WorkspaceTriggerDetailSchema, Ct as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, D as CreateCredentialInstanceBodySchema, Dn as WorkspaceTriggerRunListResponseSchema, Dt as PresignProjectSourceRequestSchema, E as CreateApiKeyResponseSchema, En as WorkspaceTriggerOverviewSchema, Et as PresignOrgLogoResponseSchema, F as CreateProjectRequestSchema, Ft as PromptInputSchema, G as DownloadActiveProjectArtifactResponseSchema, Gt as StartKeystrokeConnectionResultSchema, H as CredentialInstanceListResponseSchema, Ht as SkillSummaryListResponseSchema, I as CreateProjectResponseSchema, In as resolvePublicPlatformOrigin, It as PromptResponseSchema, J as GetCredentialResponseSchema, Jt as StartOAuthConnectionInputSchema, K as ErrorResponseSchema, Kt as StartMcpOAuthConnectionInputSchema, L as CredentialAssignmentListQuerySchema, Ln as slugifyAppName, Lt as QueuedAgentPromptResponseSchema, M as CreateOrganizationRequestSchema, Mt as ProjectResponseSchema, N as CreateOrganizationResponseSchema, Nn as parseAppSlug, Nt as ProjectSettingsResponseSchema, O as CreateCredentialsRequestSchema, On as buildConnectDeeplink, Ot as PresignProjectSourceResponseSchema, P as CreateProjectArtifactResponseSchema, Pn as parseErrorResponse, Pt as ProjectSlugAvailabilityResponseSchema, Q as HistoryRunDetailResponseSchema, Qt as TriggerDetailResponseSchema, R as CredentialAssignmentListResponseSchema, Rt as QueuedRunResponseSchema, S as CompleteProjectArtifactResponseSchema, Sn as WorkflowSummaryListResponseSchema, St as OrganizationSidebarBrandingSchema, T as CreateApiKeyRequestSchema, Tn as WorkspaceTriggerListResponseSchema, Tt as PresignOrgLogoRequestSchema, U as CredentialInstanceRecordSchema, Ut as SlugAvailabilityResponseSchema, V as CredentialConsumerListResponseSchema, Vt as SkillSummaryDetailResponseSchema, W as DeclineOrganizationInvitationResponseSchema, Wt as StartKeystrokeConnectionInputSchema, X as HealthResponseSchema, Xt as SubmitMarketingContactRequestSchema, Y as GetCustomAppResponseSchema, Yt as StartOAuthConnectionResultSchema, Z as HistoryRunCancelResponseSchema, Zt as SubmitTeamRequestRequestSchema, _ as ChannelAccountListResponseSchema, _n as UserPreferencesPatchSchema, _t as ListProjectMetricsResponseSchema, a as AgentSessionDetailResponseSchema, an as UpdateOrganizationMemberRequestSchema, b as ChannelDirectoryListResponseSchema, bn as WorkflowRunListResponseSchema, bt as OpenApiDiscoverResponseSchema, c as AgentSummaryListResponseSchema, cn as UpdateProjectMemberRequestSchema, ct as ListApiKeysResponseSchema, d as AssignCredentialBodySchema, dn as UpdateProjectSettingsRequestSchema, dt as ListOrganizationInvitationsResponseSchema, en as TriggerRunDetailResponseSchema, et as HistoryRunListResponseSchema, f as BindChannelBodySchema, fn as UploadProjectSourceManifestRequestSchema, ft as ListOrganizationMembersResponseSchema, g as CatalogAppsPageResponseSchema, gn as UserAvatarSchema, gt as ListProjectMembersResponseSchema, h as CatalogAppDetailResponseSchema, hn as UserAvatarPatchSchema, ht as ListProjectFilesResponseSchema, i as AgentSessionChatStateResponseSchema, in as UpdateCredentialRequestSchema, it as InviteProjectMembersResponseSchema, j as CreateCustomAppResponseSchema, jt as ProjectReachabilityResponseSchema, k as CreateCredentialsResponseSchema, kt as PresignUserAvatarRequestSchema, l as AgentTriggerSummaryListResponseSchema, ln as UpdateProjectMemberResponseSchema, lt as ListAppsResponseSchema, m as CatalogActionsPageResponseSchema, mn as UpsertGatewayAttachmentBodySchema, mt as ListProjectDeploymentsResponseSchema, n as AcceptOrganizationInvitationResponseSchema, nn as UpdateChannelBindingBodySchema, nt as InviteOrganizationMembersResponseSchema, o as AgentSessionListResponseSchema, on as UpdateOrganizationMemberResponseSchema, ot as ListAgentMemoryFilesResponseSchema, p as CatalogActionDetailResponseSchema, pn as UploadProjectSourceResponseSchema, pt as ListOrganizationsResponseSchema, q as GatewayAttachmentRecordSchema, qt as StartMcpOAuthConnectionResultSchema, r as ActiveOrganizationResponseSchema, rn as UpdateCredentialInstanceBodySchema, rt as InviteProjectMembersRequestSchema, s as AgentSummaryDetailResponseSchema, sn as UpdateOrganizationRequestSchema, st as ListAgentWorkspaceFilesResponseSchema, t as ACTIVE_ORG_HEADER, tn as TriggerRunListResponseSchema, tt as InviteOrganizationMembersRequestSchema, u as AppSlugAvailabilityResponseSchema, un as UpdateProjectRequestSchema, ut as ListCredentialsResponseSchema, v as ChannelConnectionListResponseSchema, vn as UserPreferencesSchema, vt as ListProjectsResponseSchema, w as ConnectProvidersResponseSchema, wn as WorkspaceTriggerFileSchema, wt as PollRunResponseSchema, x as ChannelPlatformSchema, xn as WorkflowSummaryDetailResponseSchema, xt as OrganizationSidebarBrandingPatchSchema, y as ChannelConnectionSchema, yn as WorkflowRunDetailResponseSchema, yt as McpDiscoverResponseSchema, z as CredentialAssignmentRecordSchema } from "./dist-M3vmU-M6.mjs";
|
|
3
|
+
import { a as installPlaygroundDependencies, c as createCliConfig, d as getEffectiveApiTarget, f as getPlatformUrl, g as resolvePlatformUrlForWebUrl, i as installDependencies, l as getCliConfigDir, m as DEFAULT_PLATFORM_URL, n as buildPlaygroundWorkspace, o as resolvePackageManager, p as getWebUrl, s as resolveCliRoot, t as readCliVersion, u as getConfigDir } from "./version-BD-HVk5p.mjs";
|
|
4
|
+
import { n as packProjectArtifact, t as mergeFilteredArtifact } from "./pack-artifact-DVnIKrsg-eIiQQrre.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { platform } from "node:os";
|
|
@@ -4104,6 +4104,34 @@ function createAppsResource(http) {
|
|
|
4104
4104
|
} catch (error) {
|
|
4105
4105
|
throw await toPlatformError(error);
|
|
4106
4106
|
}
|
|
4107
|
+
},
|
|
4108
|
+
async discoverMcp(input) {
|
|
4109
|
+
try {
|
|
4110
|
+
const data = await http.post("/api/apps/discover", { json: input }).json();
|
|
4111
|
+
return McpDiscoverResponseSchema.parse(data);
|
|
4112
|
+
} catch (error) {
|
|
4113
|
+
throw await toPlatformError(error);
|
|
4114
|
+
}
|
|
4115
|
+
},
|
|
4116
|
+
async discoverOpenApi(input) {
|
|
4117
|
+
try {
|
|
4118
|
+
const data = await http.post("/api/apps/discover-openapi", { json: input }).json();
|
|
4119
|
+
return OpenApiDiscoverResponseSchema.parse(data);
|
|
4120
|
+
} catch (error) {
|
|
4121
|
+
throw await toPlatformError(error);
|
|
4122
|
+
}
|
|
4123
|
+
},
|
|
4124
|
+
async startMcpOAuthConnection(slug, input) {
|
|
4125
|
+
try {
|
|
4126
|
+
const body = StartMcpOAuthConnectionInputSchema.parse({
|
|
4127
|
+
...input,
|
|
4128
|
+
appSlug: slug
|
|
4129
|
+
});
|
|
4130
|
+
const data = await http.post(`/api/apps/${encodeURIComponent(slug)}/mcp/oauth/connections`, { json: body }).json();
|
|
4131
|
+
return StartMcpOAuthConnectionResultSchema.parse(data);
|
|
4132
|
+
} catch (error) {
|
|
4133
|
+
throw await toPlatformError(error);
|
|
4134
|
+
}
|
|
4107
4135
|
}
|
|
4108
4136
|
};
|
|
4109
4137
|
}
|
|
@@ -5320,6 +5348,7 @@ function registerAppCreateCommand(app) {
|
|
|
5320
5348
|
name: options.name.trim(),
|
|
5321
5349
|
slug,
|
|
5322
5350
|
description: options.description,
|
|
5351
|
+
source: "custom",
|
|
5323
5352
|
fields: parseCustomAppFields(options.field)
|
|
5324
5353
|
});
|
|
5325
5354
|
process.stdout.write(`${JSON.stringify(created, null, 2)}\n`);
|
|
@@ -5393,7 +5422,7 @@ function resolveSyncedAppDirName(slug) {
|
|
|
5393
5422
|
}
|
|
5394
5423
|
function generateAppStub(app) {
|
|
5395
5424
|
const exportName = resolveSyncedAppExportName(app.slug);
|
|
5396
|
-
const credentialLines = Object.entries(app.credentialFields).map(([key, field]) => {
|
|
5425
|
+
const credentialLines = Object.entries(app.credentialFields ?? {}).map(([key, field]) => {
|
|
5397
5426
|
return ` ${key}: ${field.optional ? "z.string().optional()" : "z.string()"},`;
|
|
5398
5427
|
}).join("\n");
|
|
5399
5428
|
return `import { defineApp } from "@keystrokehq/keystroke/app";
|
|
@@ -6058,7 +6087,7 @@ function registerBuildCommand(program) {
|
|
|
6058
6087
|
program.command("build").description("Build the keystroke project for production").option("--dir <path>", "Project directory", process.cwd()).action(async (options) => {
|
|
6059
6088
|
try {
|
|
6060
6089
|
const root = resolveProjectRoot(options.dir);
|
|
6061
|
-
const { buildApp } = await import("./dist-
|
|
6090
|
+
const { buildApp } = await import("./dist-DpvOEjMA.mjs");
|
|
6062
6091
|
await buildApp({ root });
|
|
6063
6092
|
process.stdout.write(`Built ${root}\n`);
|
|
6064
6093
|
} catch (error) {
|
|
@@ -6112,7 +6141,7 @@ async function sleep(ms) {
|
|
|
6112
6141
|
}
|
|
6113
6142
|
async function buildDeployArchive(client, root, projectId, filter) {
|
|
6114
6143
|
if (filter?.length) {
|
|
6115
|
-
const { buildFilteredApp } = await import("./dist-
|
|
6144
|
+
const { buildFilteredApp } = await import("./dist-DpvOEjMA.mjs");
|
|
6116
6145
|
const filtered = await buildFilteredApp({
|
|
6117
6146
|
root,
|
|
6118
6147
|
filter,
|
|
@@ -6134,7 +6163,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
|
|
|
6134
6163
|
sourceFiles: filtered.sourceFiles
|
|
6135
6164
|
};
|
|
6136
6165
|
}
|
|
6137
|
-
const { buildApp } = await import("./dist-
|
|
6166
|
+
const { buildApp } = await import("./dist-DpvOEjMA.mjs");
|
|
6138
6167
|
const { sourceFiles } = await buildApp({
|
|
6139
6168
|
root,
|
|
6140
6169
|
collectSources: true,
|
|
@@ -6253,7 +6282,7 @@ function runtimeChildEnv(parentEnv, overrides) {
|
|
|
6253
6282
|
//#region src/project/bootstrap-run.ts
|
|
6254
6283
|
/** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
|
|
6255
6284
|
async function resolveBootstrapRun(options) {
|
|
6256
|
-
const { resolveRuntimeBuildArtifact } = await import("./dist-
|
|
6285
|
+
const { resolveRuntimeBuildArtifact } = await import("./dist-DpvOEjMA.mjs");
|
|
6257
6286
|
const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
|
|
6258
6287
|
const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
|
|
6259
6288
|
const args = [`--import=${loader}`];
|
|
@@ -6402,7 +6431,7 @@ async function runDev(options) {
|
|
|
6402
6431
|
process.on("SIGINT", shutdown);
|
|
6403
6432
|
process.on("SIGTERM", shutdown);
|
|
6404
6433
|
try {
|
|
6405
|
-
const { watchApp } = await import("./dist-
|
|
6434
|
+
const { watchApp } = await import("./dist-DpvOEjMA.mjs");
|
|
6406
6435
|
await watchApp({
|
|
6407
6436
|
root,
|
|
6408
6437
|
clean: false,
|
|
@@ -7228,7 +7257,7 @@ async function runStart(options) {
|
|
|
7228
7257
|
const apiPort = Number(new URL(serverUrl).port || 80);
|
|
7229
7258
|
const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
|
|
7230
7259
|
ensureNativeDeps(runtimeNodeModules);
|
|
7231
|
-
const { buildApp } = await import("./dist-
|
|
7260
|
+
const { buildApp } = await import("./dist-DpvOEjMA.mjs");
|
|
7232
7261
|
await buildApp({
|
|
7233
7262
|
root,
|
|
7234
7263
|
clean: false
|
|
@@ -7751,7 +7780,7 @@ function createProgram() {
|
|
|
7751
7780
|
return program;
|
|
7752
7781
|
}
|
|
7753
7782
|
async function runCli(argv) {
|
|
7754
|
-
const { maybeAutoUpdate } = await import("./maybe-auto-update-
|
|
7783
|
+
const { maybeAutoUpdate } = await import("./maybe-auto-update-CVR31Kbj.mjs");
|
|
7755
7784
|
await maybeAutoUpdate(argv);
|
|
7756
7785
|
createProgram().parse(argv);
|
|
7757
7786
|
}
|