@keystrokehq/cli 1.0.25 → 1.0.26
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-BYEZ5-PQ.mjs → dist-6-Bdz4wY.mjs} +205 -123
- package/dist/dist-6-Bdz4wY.mjs.map +1 -0
- package/dist/{dist-CgCbpYcH.mjs → dist-B3MtYrDr.mjs} +3 -3
- package/dist/{dist-CgCbpYcH.mjs.map → dist-B3MtYrDr.mjs.map} +1 -1
- package/dist/{dist-CBr6Vyut.mjs → dist-BUK3crkq.mjs} +320 -5
- package/dist/{dist-CBr6Vyut.mjs.map → dist-BUK3crkq.mjs.map} +1 -1
- package/dist/dist-zR2BWACn.mjs +3 -0
- package/dist/index.mjs +75 -14
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-BD2JOXRV.mjs → maybe-auto-update-HA7HooH4.mjs} +2 -2
- package/dist/{maybe-auto-update-BD2JOXRV.mjs.map → maybe-auto-update-HA7HooH4.mjs.map} +1 -1
- package/dist/{pack-artifact-NGxvGcXq-D2YwPA8E.mjs → pack-artifact-DVnIKrsg-CZTT2aF_.mjs} +4 -4
- package/dist/pack-artifact-DVnIKrsg-CZTT2aF_.mjs.map +1 -0
- package/dist/{version-CAakjwNm.mjs → version-CQ7xeQi9.mjs} +2 -2
- package/dist/{version-CAakjwNm.mjs.map → version-CQ7xeQi9.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-BE84On70.mjs +0 -3
- package/dist/dist-BYEZ5-PQ.mjs.map +0 -1
- package/dist/pack-artifact-NGxvGcXq-D2YwPA8E.mjs.map +0 -1
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-
|
|
2
|
+
import { $ as HistoryRunListQuerySchema, $t as UpdateCredentialInstanceBodySchema, A as CreateCustomAppRequestSchema, An as parseErrorResponse, At as ProjectResponseSchema, B as CredentialConsumerListQuerySchema, Bt as SkillSummaryListResponseSchema, C as ConnectAuthorizeUrlResponseSchema, Cn as WorkspaceTriggerRunListResponseSchema, Ct as PresignOrgLogoRequestSchema, D as CreateCredentialInstanceBodySchema, Dt as PresignUserAvatarRequestSchema, E as CreateApiKeyResponseSchema, En as listenPortFromPublicUrl, Et as PresignProjectSourceResponseSchema, F as CreateProjectRequestSchema, Ft as QueuedAgentPromptResponseSchema, G as DownloadActiveProjectArtifactResponseSchema, Gt as StartOAuthConnectionResultSchema, H as CredentialInstanceListResponseSchema, Ht as StartKeystrokeConnectionInputSchema, I as CreateProjectResponseSchema, It as QueuedRunResponseSchema, J as GetCredentialResponseSchema, Jt as TriggerDetailResponseSchema, K as ErrorResponseSchema, Kt as SubmitMarketingContactRequestSchema, L as CredentialAssignmentListQuerySchema, M as CreateOrganizationRequestSchema, Mn as resolvePublicPlatformOrigin, Mt as ProjectSlugAvailabilityResponseSchema, N as CreateOrganizationResponseSchema, Nn as slugifyAppName, Nt as PromptInputSchema, O as CreateCredentialsRequestSchema, Ot as PresignUserAvatarResponseSchema, P as CreateProjectArtifactResponseSchema, Pt as PromptResponseSchema, Q as HistoryRunDetailResponseSchema, Qt as UpdateChannelBindingBodySchema, R as CredentialAssignmentListResponseSchema, Rt as RecentResourceListResponseSchema, S as CompleteProjectArtifactResponseSchema, Sn as WorkspaceTriggerOverviewSchema, St as PollRunResponseSchema, T as CreateApiKeyRequestSchema, Tt as PresignProjectSourceRequestSchema, U as CredentialInstanceRecordSchema, Ut as StartKeystrokeConnectionResultSchema, V as CredentialConsumerListResponseSchema, Vt as SlugAvailabilityResponseSchema, W as DeclineOrganizationInvitationResponseSchema, Wt as StartOAuthConnectionInputSchema, X as HealthResponseSchema, Xt as TriggerRunDetailResponseSchema, Y as GetCustomAppResponseSchema, Yt as TriggerListResponseSchema, Z as HistoryRunCancelResponseSchema, Zt as TriggerRunListResponseSchema, _ as ChannelAccountListResponseSchema, _n as WorkflowSummaryDetailResponseSchema, _t as ListProjectMetricsResponseSchema, a as AgentSessionDetailResponseSchema, an as UpdateProjectMemberResponseSchema, b as ChannelDirectoryListResponseSchema, bn as WorkspaceTriggerFileSchema, bt as OrganizationSidebarBrandingSchema, c as AgentSummaryListResponseSchema, cn as UploadProjectSourceManifestRequestSchema, ct as ListApiKeysResponseSchema, d as AssignCredentialBodySchema, dn as UserAvatarPatchSchema, dt as ListOrganizationInvitationsResponseSchema, en as UpdateCredentialRequestSchema, et as HistoryRunListResponseSchema, f as BindChannelBodySchema, fn as UserAvatarSchema, ft as ListOrganizationMembersResponseSchema, g as CatalogAppsPageResponseSchema, gn as WorkflowRunListResponseSchema, gt as ListProjectMembersResponseSchema, h as CatalogAppDetailResponseSchema, hn as WorkflowRunDetailResponseSchema, ht as ListProjectFilesResponseSchema, i as AgentSessionChatStateResponseSchema, in as UpdateProjectMemberRequestSchema, it as InviteProjectMembersResponseSchema, j as CreateCustomAppResponseSchema, jt as ProjectSettingsResponseSchema, k as CreateCredentialsResponseSchema, kn as parseAppSlug, kt as ProjectReachabilityResponseSchema, l as AgentTriggerSummaryListResponseSchema, ln as UploadProjectSourceResponseSchema, lt as ListAppsResponseSchema, m as CatalogActionsPageResponseSchema, mn as UserPreferencesSchema, mt as ListProjectDeploymentsResponseSchema, n as AcceptOrganizationInvitationResponseSchema, nn as UpdateOrganizationMemberResponseSchema, nt as InviteOrganizationMembersResponseSchema, o as AgentSessionListResponseSchema, on as UpdateProjectRequestSchema, ot as ListAgentMemoryFilesResponseSchema, p as CatalogActionDetailResponseSchema, pn as UserPreferencesPatchSchema, pt as ListOrganizationsResponseSchema, q as GatewayAttachmentRecordSchema, qt as SubmitTeamRequestRequestSchema, r as ActiveOrganizationResponseSchema, rn as UpdateOrganizationRequestSchema, rt as InviteProjectMembersRequestSchema, s as AgentSummaryDetailResponseSchema, sn as UpdateProjectSettingsRequestSchema, st as ListAgentWorkspaceFilesResponseSchema, t as ACTIVE_ORG_HEADER, tn as UpdateOrganizationMemberRequestSchema, tt as InviteOrganizationMembersRequestSchema, u as AppSlugAvailabilityResponseSchema, un as UpsertGatewayAttachmentBodySchema, ut as ListCredentialsResponseSchema, v as ChannelConnectionListResponseSchema, vn as WorkflowSummaryListResponseSchema, vt as ListProjectsResponseSchema, w as ConnectProvidersResponseSchema, wn as buildConnectDeeplink, wt as PresignOrgLogoResponseSchema, x as ChannelPlatformSchema, xn as WorkspaceTriggerListResponseSchema, xt as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, y as ChannelConnectionSchema, yn as WorkspaceTriggerDetailSchema, yt as OrganizationSidebarBrandingPatchSchema, z as CredentialAssignmentRecordSchema, zt as SkillSummaryDetailResponseSchema } from "./dist-BUK3crkq.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-CQ7xeQi9.mjs";
|
|
4
|
+
import { n as packProjectArtifact, t as mergeFilteredArtifact } from "./pack-artifact-DVnIKrsg-CZTT2aF_.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { platform } from "node:os";
|
|
@@ -1509,7 +1509,7 @@ function detailSearchParams$1(query) {
|
|
|
1509
1509
|
if (!query?.include) return {};
|
|
1510
1510
|
return { include: query.include };
|
|
1511
1511
|
}
|
|
1512
|
-
function createTriggersResource(http) {
|
|
1512
|
+
function createTriggersResource$1(http) {
|
|
1513
1513
|
return {
|
|
1514
1514
|
async list(query) {
|
|
1515
1515
|
try {
|
|
@@ -1587,7 +1587,7 @@ function createTriggersResource(http) {
|
|
|
1587
1587
|
function isQueuedRunResponse(value) {
|
|
1588
1588
|
return QueuedRunResponseSchema.safeParse(value).success;
|
|
1589
1589
|
}
|
|
1590
|
-
function listRunsSearchParams(query) {
|
|
1590
|
+
function listRunsSearchParams$2(query) {
|
|
1591
1591
|
if (!query) return {};
|
|
1592
1592
|
const params = {};
|
|
1593
1593
|
if (query.limit !== void 0) params.limit = String(query.limit);
|
|
@@ -1614,7 +1614,7 @@ function createWorkflowsResource$1(http) {
|
|
|
1614
1614
|
},
|
|
1615
1615
|
async listRuns(workflowId, query) {
|
|
1616
1616
|
try {
|
|
1617
|
-
const data = await http.get(`workflows/${workflowId}/runs`, { searchParams: listRunsSearchParams(query) }).json();
|
|
1617
|
+
const data = await http.get(`workflows/${workflowId}/runs`, { searchParams: listRunsSearchParams$2(query) }).json();
|
|
1618
1618
|
return WorkflowRunListResponseSchema.parse(data);
|
|
1619
1619
|
} catch (error) {
|
|
1620
1620
|
throw await toKeystrokeError(error);
|
|
@@ -1651,7 +1651,7 @@ function createKeystrokeClient(options) {
|
|
|
1651
1651
|
openapi: createOpenApiResource(http),
|
|
1652
1652
|
agents: createAgentsResource$1(http),
|
|
1653
1653
|
workflows: createWorkflowsResource$1(http),
|
|
1654
|
-
triggers: createTriggersResource(http)
|
|
1654
|
+
triggers: createTriggersResource$1(http)
|
|
1655
1655
|
};
|
|
1656
1656
|
}
|
|
1657
1657
|
//#endregion
|
|
@@ -3825,6 +3825,66 @@ function createSkillsResource(http) {
|
|
|
3825
3825
|
}
|
|
3826
3826
|
};
|
|
3827
3827
|
}
|
|
3828
|
+
function listRunsSearchParams(query) {
|
|
3829
|
+
if (!query) return {};
|
|
3830
|
+
const params = {};
|
|
3831
|
+
if (query.limit !== void 0) params.limit = String(query.limit);
|
|
3832
|
+
if (query.cursor) params.cursor = query.cursor;
|
|
3833
|
+
if (query.triggerType) params.triggerType = query.triggerType;
|
|
3834
|
+
return params;
|
|
3835
|
+
}
|
|
3836
|
+
function createTriggersResource(http) {
|
|
3837
|
+
return {
|
|
3838
|
+
/** Triggers across the projects the caller can access in the active org. */
|
|
3839
|
+
async list() {
|
|
3840
|
+
try {
|
|
3841
|
+
const data = await http.get("api/triggers").json();
|
|
3842
|
+
return WorkspaceTriggerListResponseSchema.parse(data);
|
|
3843
|
+
} catch (error) {
|
|
3844
|
+
throw await toPlatformError(error);
|
|
3845
|
+
}
|
|
3846
|
+
},
|
|
3847
|
+
async get(triggerId) {
|
|
3848
|
+
try {
|
|
3849
|
+
const data = await http.get(`api/triggers/${encodeURIComponent(triggerId)}`).json();
|
|
3850
|
+
return WorkspaceTriggerDetailSchema.parse(data);
|
|
3851
|
+
} catch (error) {
|
|
3852
|
+
const platformError = await toPlatformError(error);
|
|
3853
|
+
if (platformError.status === 404) return null;
|
|
3854
|
+
throw platformError;
|
|
3855
|
+
}
|
|
3856
|
+
},
|
|
3857
|
+
/** LLM-generated markdown overview of the trigger (generated lazily on the worker). */
|
|
3858
|
+
async getOverview(triggerId) {
|
|
3859
|
+
try {
|
|
3860
|
+
const data = await http.get(`api/triggers/${encodeURIComponent(triggerId)}/overview`).json();
|
|
3861
|
+
return WorkspaceTriggerOverviewSchema.parse(data);
|
|
3862
|
+
} catch (error) {
|
|
3863
|
+
throw await toPlatformError(error);
|
|
3864
|
+
}
|
|
3865
|
+
},
|
|
3866
|
+
/** The trigger source file. */
|
|
3867
|
+
async getFile(triggerId) {
|
|
3868
|
+
try {
|
|
3869
|
+
const data = await http.get(`api/triggers/${encodeURIComponent(triggerId)}/file`).json();
|
|
3870
|
+
return WorkspaceTriggerFileSchema.parse(data);
|
|
3871
|
+
} catch (error) {
|
|
3872
|
+
const platformError = await toPlatformError(error);
|
|
3873
|
+
if (platformError.status === 404) return null;
|
|
3874
|
+
throw platformError;
|
|
3875
|
+
}
|
|
3876
|
+
},
|
|
3877
|
+
/** Every fire of the trigger (poll/webhook/cron), dispatched or not. */
|
|
3878
|
+
async listRuns(triggerId, query) {
|
|
3879
|
+
try {
|
|
3880
|
+
const data = await http.get(`api/triggers/${encodeURIComponent(triggerId)}/runs`, { searchParams: listRunsSearchParams(query) }).json();
|
|
3881
|
+
return WorkspaceTriggerRunListResponseSchema.parse(data);
|
|
3882
|
+
} catch (error) {
|
|
3883
|
+
throw await toPlatformError(error);
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
};
|
|
3887
|
+
}
|
|
3828
3888
|
function createTeamRequestsResource(http) {
|
|
3829
3889
|
return { async submit(input) {
|
|
3830
3890
|
const body = SubmitTeamRequestRequestSchema.parse(input);
|
|
@@ -4492,6 +4552,7 @@ function createPlatformClient(options) {
|
|
|
4492
4552
|
agents: createAgentsResource(http),
|
|
4493
4553
|
workflows: createWorkflowsResource(http),
|
|
4494
4554
|
skills: createSkillsResource(http),
|
|
4555
|
+
triggers: createTriggersResource(http),
|
|
4495
4556
|
apps: createAppsResource(http),
|
|
4496
4557
|
credentials: createCredentialsResource(http),
|
|
4497
4558
|
history: createHistoryResource(http),
|
|
@@ -5992,7 +6053,7 @@ function registerBuildCommand(program) {
|
|
|
5992
6053
|
program.command("build").description("Build the keystroke project for production").option("--dir <path>", "Project directory", process.cwd()).action(async (options) => {
|
|
5993
6054
|
try {
|
|
5994
6055
|
const root = resolveProjectRoot(options.dir);
|
|
5995
|
-
const { buildApp } = await import("./dist-
|
|
6056
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
5996
6057
|
await buildApp({ root });
|
|
5997
6058
|
process.stdout.write(`Built ${root}\n`);
|
|
5998
6059
|
} catch (error) {
|
|
@@ -6046,7 +6107,7 @@ async function sleep(ms) {
|
|
|
6046
6107
|
}
|
|
6047
6108
|
async function buildDeployArchive(client, root, projectId, filter) {
|
|
6048
6109
|
if (filter?.length) {
|
|
6049
|
-
const { buildFilteredApp } = await import("./dist-
|
|
6110
|
+
const { buildFilteredApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6050
6111
|
const filtered = await buildFilteredApp({
|
|
6051
6112
|
root,
|
|
6052
6113
|
filter,
|
|
@@ -6068,7 +6129,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
|
|
|
6068
6129
|
sourceFiles: filtered.sourceFiles
|
|
6069
6130
|
};
|
|
6070
6131
|
}
|
|
6071
|
-
const { buildApp } = await import("./dist-
|
|
6132
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6072
6133
|
const { sourceFiles } = await buildApp({
|
|
6073
6134
|
root,
|
|
6074
6135
|
collectSources: true,
|
|
@@ -6187,7 +6248,7 @@ function runtimeChildEnv(parentEnv, overrides) {
|
|
|
6187
6248
|
//#region src/project/bootstrap-run.ts
|
|
6188
6249
|
/** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
|
|
6189
6250
|
async function resolveBootstrapRun(options) {
|
|
6190
|
-
const { resolveRuntimeBuildArtifact } = await import("./dist-
|
|
6251
|
+
const { resolveRuntimeBuildArtifact } = await import("./dist-B3MtYrDr.mjs");
|
|
6191
6252
|
const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
|
|
6192
6253
|
const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
|
|
6193
6254
|
const args = [`--import=${loader}`];
|
|
@@ -6336,7 +6397,7 @@ async function runDev(options) {
|
|
|
6336
6397
|
process.on("SIGINT", shutdown);
|
|
6337
6398
|
process.on("SIGTERM", shutdown);
|
|
6338
6399
|
try {
|
|
6339
|
-
const { watchApp } = await import("./dist-
|
|
6400
|
+
const { watchApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6340
6401
|
await watchApp({
|
|
6341
6402
|
root,
|
|
6342
6403
|
clean: false,
|
|
@@ -7162,7 +7223,7 @@ async function runStart(options) {
|
|
|
7162
7223
|
const apiPort = Number(new URL(serverUrl).port || 80);
|
|
7163
7224
|
const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
|
|
7164
7225
|
ensureNativeDeps(runtimeNodeModules);
|
|
7165
|
-
const { buildApp } = await import("./dist-
|
|
7226
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
7166
7227
|
await buildApp({
|
|
7167
7228
|
root,
|
|
7168
7229
|
clean: false
|
|
@@ -7685,7 +7746,7 @@ function createProgram() {
|
|
|
7685
7746
|
return program;
|
|
7686
7747
|
}
|
|
7687
7748
|
async function runCli(argv) {
|
|
7688
|
-
const { maybeAutoUpdate } = await import("./maybe-auto-update-
|
|
7749
|
+
const { maybeAutoUpdate } = await import("./maybe-auto-update-HA7HooH4.mjs");
|
|
7689
7750
|
await maybeAutoUpdate(argv);
|
|
7690
7751
|
createProgram().parse(argv);
|
|
7691
7752
|
}
|