@keystrokehq/cli 1.0.24 → 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-BIENrk9m.mjs → dist-6-Bdz4wY.mjs} +213 -128
- package/dist/dist-6-Bdz4wY.mjs.map +1 -0
- package/dist/{dist-DERbyHgP.mjs → dist-B3MtYrDr.mjs} +3 -3
- package/dist/{dist-DERbyHgP.mjs.map → dist-B3MtYrDr.mjs.map} +1 -1
- package/dist/{dist-3h33yl2W.mjs → dist-BUK3crkq.mjs} +361 -14
- package/dist/{dist-3h33yl2W.mjs.map → dist-BUK3crkq.mjs.map} +1 -1
- package/dist/dist-zR2BWACn.mjs +3 -0
- package/dist/index.mjs +77 -14
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-DS6ED4YM.mjs → maybe-auto-update-HA7HooH4.mjs} +2 -2
- package/dist/{maybe-auto-update-DS6ED4YM.mjs.map → maybe-auto-update-HA7HooH4.mjs.map} +1 -1
- package/dist/{pack-artifact-NGxvGcXq-B30lSwyC.mjs → pack-artifact-DVnIKrsg-CZTT2aF_.mjs} +4 -4
- package/dist/pack-artifact-DVnIKrsg-CZTT2aF_.mjs.map +1 -0
- package/dist/{version-BMFuEgMn.mjs → version-CQ7xeQi9.mjs} +2 -2
- package/dist/{version-BMFuEgMn.mjs.map → version-CQ7xeQi9.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-BIENrk9m.mjs.map +0 -1
- package/dist/dist-DE91OGfv.mjs +0 -3
- package/dist/pack-artifact-NGxvGcXq-B30lSwyC.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);
|
|
@@ -3867,6 +3927,8 @@ function buildOAuthAuthorizeSearchParams(input) {
|
|
|
3867
3927
|
if (input.createUserProvidedCredential) params.user = "true";
|
|
3868
3928
|
const label = input.label?.trim();
|
|
3869
3929
|
if (label) params.label = label;
|
|
3930
|
+
const credentialInstanceId = input.credentialInstanceId?.trim();
|
|
3931
|
+
if (credentialInstanceId) params.credentialInstanceId = credentialInstanceId;
|
|
3870
3932
|
return params;
|
|
3871
3933
|
}
|
|
3872
3934
|
function createCredentialsResource(http) {
|
|
@@ -4490,6 +4552,7 @@ function createPlatformClient(options) {
|
|
|
4490
4552
|
agents: createAgentsResource(http),
|
|
4491
4553
|
workflows: createWorkflowsResource(http),
|
|
4492
4554
|
skills: createSkillsResource(http),
|
|
4555
|
+
triggers: createTriggersResource(http),
|
|
4493
4556
|
apps: createAppsResource(http),
|
|
4494
4557
|
credentials: createCredentialsResource(http),
|
|
4495
4558
|
history: createHistoryResource(http),
|
|
@@ -5990,7 +6053,7 @@ function registerBuildCommand(program) {
|
|
|
5990
6053
|
program.command("build").description("Build the keystroke project for production").option("--dir <path>", "Project directory", process.cwd()).action(async (options) => {
|
|
5991
6054
|
try {
|
|
5992
6055
|
const root = resolveProjectRoot(options.dir);
|
|
5993
|
-
const { buildApp } = await import("./dist-
|
|
6056
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
5994
6057
|
await buildApp({ root });
|
|
5995
6058
|
process.stdout.write(`Built ${root}\n`);
|
|
5996
6059
|
} catch (error) {
|
|
@@ -6044,7 +6107,7 @@ async function sleep(ms) {
|
|
|
6044
6107
|
}
|
|
6045
6108
|
async function buildDeployArchive(client, root, projectId, filter) {
|
|
6046
6109
|
if (filter?.length) {
|
|
6047
|
-
const { buildFilteredApp } = await import("./dist-
|
|
6110
|
+
const { buildFilteredApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6048
6111
|
const filtered = await buildFilteredApp({
|
|
6049
6112
|
root,
|
|
6050
6113
|
filter,
|
|
@@ -6066,7 +6129,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
|
|
|
6066
6129
|
sourceFiles: filtered.sourceFiles
|
|
6067
6130
|
};
|
|
6068
6131
|
}
|
|
6069
|
-
const { buildApp } = await import("./dist-
|
|
6132
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6070
6133
|
const { sourceFiles } = await buildApp({
|
|
6071
6134
|
root,
|
|
6072
6135
|
collectSources: true,
|
|
@@ -6185,7 +6248,7 @@ function runtimeChildEnv(parentEnv, overrides) {
|
|
|
6185
6248
|
//#region src/project/bootstrap-run.ts
|
|
6186
6249
|
/** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
|
|
6187
6250
|
async function resolveBootstrapRun(options) {
|
|
6188
|
-
const { resolveRuntimeBuildArtifact } = await import("./dist-
|
|
6251
|
+
const { resolveRuntimeBuildArtifact } = await import("./dist-B3MtYrDr.mjs");
|
|
6189
6252
|
const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
|
|
6190
6253
|
const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
|
|
6191
6254
|
const args = [`--import=${loader}`];
|
|
@@ -6334,7 +6397,7 @@ async function runDev(options) {
|
|
|
6334
6397
|
process.on("SIGINT", shutdown);
|
|
6335
6398
|
process.on("SIGTERM", shutdown);
|
|
6336
6399
|
try {
|
|
6337
|
-
const { watchApp } = await import("./dist-
|
|
6400
|
+
const { watchApp } = await import("./dist-B3MtYrDr.mjs");
|
|
6338
6401
|
await watchApp({
|
|
6339
6402
|
root,
|
|
6340
6403
|
clean: false,
|
|
@@ -7160,7 +7223,7 @@ async function runStart(options) {
|
|
|
7160
7223
|
const apiPort = Number(new URL(serverUrl).port || 80);
|
|
7161
7224
|
const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
|
|
7162
7225
|
ensureNativeDeps(runtimeNodeModules);
|
|
7163
|
-
const { buildApp } = await import("./dist-
|
|
7226
|
+
const { buildApp } = await import("./dist-B3MtYrDr.mjs");
|
|
7164
7227
|
await buildApp({
|
|
7165
7228
|
root,
|
|
7166
7229
|
clean: false
|
|
@@ -7683,7 +7746,7 @@ function createProgram() {
|
|
|
7683
7746
|
return program;
|
|
7684
7747
|
}
|
|
7685
7748
|
async function runCli(argv) {
|
|
7686
|
-
const { maybeAutoUpdate } = await import("./maybe-auto-update-
|
|
7749
|
+
const { maybeAutoUpdate } = await import("./maybe-auto-update-HA7HooH4.mjs");
|
|
7687
7750
|
await maybeAutoUpdate(argv);
|
|
7688
7751
|
createProgram().parse(argv);
|
|
7689
7752
|
}
|