@keystrokehq/cli 0.1.62 → 0.1.63

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/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as CredentialInstanceListResponseSchema, $n as WorkspaceTriggerDetailSchema, $t as ProjectResponseSchema, A as ConfirmCheckoutResponseSchema, An as UpdateOrganizationRequestSchema, At as ListOrganizationsResponseSchema, B as CreateCustomAppRequestSchema, Bn as UserPreferencesPatchSchema, Bt as PROJECT_PULL_STATE_RELATIVE_PATH, C as ChannelAccountListResponseSchema, Cn as TriggerRunListResponseSchema, Ct as ListAgentMemoryFilesResponseSchema, D as ChannelPlatformSchema, Dn as UpdateCredentialRequestSchema, Dt as ListCredentialsResponseSchema, E as ChannelDirectoryListResponseSchema, En as UpdateCredentialInstanceBodySchema, Et as ListAppsResponseSchema, F as CreateBillingPortalRequestSchema, Fn as UploadProjectSourceManifestRequestSchema, Ft as ListProjectsResponseSchema, G as CreateProjectRequestSchema, Gn as WorkflowRunDetailResponseSchema, Gt as PresignOrgLogoRequestSchema, H as CreateOrganizationRequestSchema, Hn as WorkflowCanvasCredentialBindingsSchema, Ht as PollRunResponseSchema, I as CreateCredentialInstanceBodySchema, In as UploadProjectSourceResponseSchema, It as McpDiscoverResponseSchema, J as CredentialAssignmentListQuerySchema, Jn as WorkflowRunInputsSchema, Jt as PresignProjectSourceResponseSchema, K as CreateProjectResponseSchema, Kn as WorkflowRunHooksResponseSchema, Kt as PresignOrgLogoResponseSchema, L as CreateCredentialsRequestSchema, Ln as UpsertGatewayAttachmentBodySchema, Lt as OpenApiDiscoverResponseSchema, M as ConnectProvidersResponseSchema, Mn as UpdateProjectMemberResponseSchema, Mt as ListProjectFilesResponseSchema, N as CreateApiKeyRequestSchema, Nn as UpdateProjectRequestSchema, Nt as ListProjectMembersResponseSchema, O as CompleteProjectArtifactResponseSchema, On as UpdateOrganizationMemberRequestSchema, Ot as ListOrganizationInvitationsResponseSchema, P as CreateApiKeyResponseSchema, Pn as UpdateProjectSettingsRequestSchema, Pt as ListProjectMetricsResponseSchema, Q as CredentialConsumerListResponseSchema, Qn as WorkflowSummaryListResponseSchema, Qt as ProjectReachabilityResponseSchema, R as CreateCredentialsResponseSchema, Rn as UserAvatarPatchSchema, Rt as OrganizationSidebarBrandingPatchSchema, S as CatalogAppsPageResponseSchema, Sn as TriggerRunDetailResponseSchema, T as ChannelConnectionSchema, Tn as UpdateChannelBindingBodySchema, Tt as ListApiKeysResponseSchema, U as CreateOrganizationResponseSchema, Un as WorkflowCanvasRunSchema, Ut as PresignChatAttachmentRequestSchema, V as CreateCustomAppResponseSchema, Vn as UserPreferencesSchema, Vt as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, W as CreateProjectArtifactResponseSchema, Wn as WorkflowCanvasSchema, Wt as PresignChatAttachmentResponseSchema, X as CredentialAssignmentRecordSchema, Xn as WorkflowRunResponseSchema, Xt as PresignUserAvatarResponseSchema, Y as CredentialAssignmentListResponseSchema, Yn as WorkflowRunListResponseSchema, Yt as PresignUserAvatarRequestSchema, Z as CredentialConsumerListQuerySchema, Zn as WorkflowSummaryDetailResponseSchema, Zt as ProjectPullStateSchema, _ as BillingUsageResponseSchema, _n as StartOAuthConnectionResultSchema, _r as resolveConnectAppSlug, _t as HistoryRunListResponseSchema, a as AgentSessionDetailResponseSchema, an as QueuedAgentPromptResponseSchema, ar as buildConnectDeeplink, at as DownloadActiveProjectArtifactResponseSchema, b as CatalogActionsPageResponseSchema, bn as TriggerDetailResponseSchema, br as slugifyAppName, bt as InviteProjectMembersRequestSchema, c as AgentSummaryListResponseSchema, cn as RecentResourceListResponseSchema, cr as detectProjectPackageManagerFromSnapshot, ct as ExecuteKeystrokeToolRequestSchema, d as AssignCredentialBodySchema, dn as SlugAvailabilityResponseSchema, dt as GetCustomAppResponseSchema, en as ProjectSettingsResponseSchema, er as WorkspaceTriggerFileSchema, et as CredentialInstanceRecordSchema, f as AutoTopupSummarySchema, fn as StartKeystrokeConnectionInputSchema, ft as GraphqlDiscoverResponseSchema, g as BillingSummaryResponseSchema, gn as StartOAuthConnectionInputSchema, gt as HistoryRunListQuerySchema, h as BillingRedirectResponseSchema, hn as StartMcpOAuthConnectionResultSchema, ht as HistoryRunDetailResponseSchema, i as AgentSessionChatStateResponseSchema, ir as WorkspaceWorkflowOverviewSchema, it as DeclineOrganizationInvitationResponseSchema, j as ConnectAuthorizeUrlResponseSchema, jn as UpdateProjectMemberRequestSchema, jt as ListProjectDeploymentsResponseSchema, k as ConfirmCheckoutRequestSchema, kn as UpdateOrganizationMemberResponseSchema, kt as ListOrganizationMembersResponseSchema, l as AgentTriggerSummaryListResponseSchema, ln as SkillSummaryDetailResponseSchema, lr as isAcceptableInstallExit, lt as GatewayAttachmentRecordSchema, m as BillingInvoiceUrlResponseSchema, mn as StartMcpOAuthConnectionInputSchema, mr as parseErrorResponse, mt as HistoryRunCancelResponseSchema, n as AcceptOrganizationInvitationResponseSchema, nn as PromptInputSchema, nr as WorkspaceTriggerOverviewSchema, nt as DOCS_QUERY_TOOL, o as AgentSessionListResponseSchema, on as QueuedRunResponseSchema, ot as DownloadActiveProjectSourceResponseSchema, p as BillingActivityResponseSchema, pn as StartKeystrokeConnectionResultSchema, pr as parseAppSlug, pt as HealthResponseSchema, q as CreateSubscriptionCheckoutRequestSchema, qn as WorkflowRunInputsPutBodySchema, qt as PresignProjectSourceRequestSchema, r as ActiveOrganizationResponseSchema, rn as PromptResponseSchema, rr as WorkspaceTriggerRunListResponseSchema, rt as DOCS_SEARCH_TOOL, s as AgentSummaryDetailResponseSchema, sr as deriveCustomAppDisplay, st as ErrorResponseSchema, t as ACTIVE_ORG_HEADER, tn as ProjectSlugAvailabilityResponseSchema, tr as WorkspaceTriggerListResponseSchema, u as AppSlugAvailabilityResponseSchema, un as SkillSummaryListResponseSchema, ur as listenPortFromPublicUrl, ut as GetCredentialResponseSchema, v as BindChannelBodySchema, vn as SubmitMarketingContactRequestSchema, vr as resolveDocsMcpUrl, vt as InviteOrganizationMembersRequestSchema, w as ChannelConnectionListResponseSchema, wn as UpdateAutoTopupRequestSchema, wt as ListAgentWorkspaceFilesResponseSchema, x as CatalogAppDetailResponseSchema, xn as TriggerListResponseSchema, xt as InviteProjectMembersResponseSchema, y as CatalogActionDetailResponseSchema, yn as SubmitTeamRequestRequestSchema, yr as resolvePublicPlatformOrigin, yt as InviteOrganizationMembersResponseSchema, z as CreateCreditsCheckoutRequestSchema, zn as UserAvatarSchema, zt as OrganizationSidebarBrandingSchema } from "./dist-CnAsi0KI.mjs";
3
- import { i as packProjectArtifact, n as withMcpReadClient, r as mergeFilteredArtifact, t as mapInParallelBatches } from "./dist-qm-t5iv6.mjs";
4
- import { _ as getPlatformUrl, c as detectPackageManager, d as resolveGithubPackagesToken, f as resolvePackageManager, g as getEffectiveApiTarget, h as getConfigDir, i as isReleaseAgeBlock, l as installDependencies$1, m as getCliConfigDir, n as resolveCliRoot, o as detectManagerFromLockfile, p as createCliConfig, s as buildPlaygroundWorkspace, t as readCliVersion, u as installPlaygroundDependencies, v as getWebUrl, x as resolvePlatformUrlForWebUrl, y as DEFAULT_PLATFORM_URL } from "./version-DlVvrcdK.mjs";
2
+ import { $ as CredentialConsumerListResponseSchema, $n as WorkflowRunInputsSchema, $t as PresignUserAvatarRequestSchema, A as ConfirmCheckoutResponseSchema, An as UpdateCredentialInstanceBodySchema, At as ListOrganizationInvitationsResponseSchema, B as CreateCreditsCheckoutRequestSchema, Bn as UploadProjectSourceManifestRequestSchema, Bt as McpDiscoverResponseSchema, C as ChannelAccountListResponseSchema, Cn as SubmitTeamRequestRequestSchema, Cr as resolveDocsMcpUrl, D as ChannelPlatformSchema, Dn as TriggerRunListResponseSchema, Dt as ListAppsResponseSchema, E as ChannelDirectoryListResponseSchema, En as TriggerRunDetailResponseSchema, Et as ListApiKeysResponseSchema, F as CreateApiKeyResponseSchema, Fn as UpdateOrganizationRequestSchema, Ft as ListProjectMembersResponseSchema, G as CreateProjectArtifactResponseSchema, Gn as UserPreferencesPatchSchema, Gt as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, H as CreateCustomAppResponseSchema, Hn as UpsertGatewayAttachmentBodySchema, Ht as OrganizationSidebarBrandingPatchSchema, I as CreateBillingPortalRequestSchema, In as UpdateProjectMemberRequestSchema, It as ListProjectMetricsResponseSchema, J as CreateSubscriptionCheckoutRequestSchema, Jn as WorkflowCanvasRunSchema, Jt as PresignChatAttachmentResponseSchema, K as CreateProjectRequestSchema, Kn as UserPreferencesSchema, Kt as PollRunResponseSchema, L as CreateCredentialInstanceBodySchema, Ln as UpdateProjectMemberResponseSchema, Lt as ListProjectsResponseSchema, M as ConnectManagedServiceCredentialRequestSchema, Mn as UpdateManagedServiceCredentialRequestSchema, Mt as ListOrganizationsResponseSchema, N as ConnectProvidersResponseSchema, Nn as UpdateOrganizationMemberRequestSchema, Nt as ListProjectDeploymentsResponseSchema, O as CompleteProjectArtifactResponseSchema, On as UpdateAutoTopupRequestSchema, Ot as ListCredentialsResponseSchema, P as CreateApiKeyRequestSchema, Pn as UpdateOrganizationMemberResponseSchema, Pt as ListProjectFilesResponseSchema, Q as CredentialConsumerListQuerySchema, Qn as WorkflowRunInputsPutBodySchema, Qt as PresignProjectSourceResponseSchema, R as CreateCredentialsRequestSchema, Rn as UpdateProjectRequestSchema, Rt as ManagedServiceCredentialSchema, S as CatalogAppsPageResponseSchema, Sn as SubmitMarketingContactRequestSchema, Sr as resolveConnectAppSlug, St as InviteProjectMembersResponseSchema, T as ChannelConnectionSchema, Tn as TriggerListResponseSchema, Tr as slugifyAppName, Tt as ListAgentWorkspaceFilesResponseSchema, U as CreateOrganizationRequestSchema, Un as UserAvatarPatchSchema, Ut as OrganizationSidebarBrandingSchema, V as CreateCustomAppRequestSchema, Vn as UploadProjectSourceResponseSchema, Vt as OpenApiDiscoverResponseSchema, W as CreateOrganizationResponseSchema, Wn as UserAvatarSchema, Wt as PROJECT_PULL_STATE_RELATIVE_PATH, X as CredentialAssignmentListResponseSchema, Xn as WorkflowRunDetailResponseSchema, Xt as PresignOrgLogoResponseSchema, Y as CredentialAssignmentListQuerySchema, Yn as WorkflowCanvasSchema, Yt as PresignOrgLogoRequestSchema, Z as CredentialAssignmentRecordSchema, Zn as WorkflowRunHooksResponseSchema, Zt as PresignProjectSourceRequestSchema, _ as BillingUsageResponseSchema, _n as StartKeystrokeConnectionResultSchema, _t as HistoryRunListQuerySchema, a as AgentSessionDetailResponseSchema, an as ProjectSlugAvailabilityResponseSchema, ar as WorkspaceTriggerFileSchema, at as DeclineOrganizationInvitationResponseSchema, b as CatalogActionsPageResponseSchema, bn as StartOAuthConnectionInputSchema, bt as InviteOrganizationMembersResponseSchema, c as AgentSummaryListResponseSchema, cr as WorkspaceTriggerRunListResponseSchema, ct as ErrorResponseSchema, d as AssignCredentialBodySchema, dt as GetCredentialResponseSchema, en as PresignUserAvatarResponseSchema, er as WorkflowRunListResponseSchema, et as CredentialInstanceListResponseSchema, f as AutoTopupSummarySchema, fn as RecentResourceListResponseSchema, fr as deriveCustomAppDisplay, ft as GetCustomAppResponseSchema, g as BillingSummaryResponseSchema, gn as StartKeystrokeConnectionInputSchema, gt as HistoryRunDetailResponseSchema, h as BillingRedirectResponseSchema, hn as SlugAvailabilityResponseSchema, hr as listenPortFromPublicUrl, ht as HistoryRunCancelResponseSchema, i as AgentSessionChatStateResponseSchema, in as ProjectSettingsResponseSchema, ir as WorkspaceTriggerDetailSchema, it as DOCS_SEARCH_TOOL, j as ConnectAuthorizeUrlResponseSchema, jn as UpdateCredentialRequestSchema, jt as ListOrganizationMembersResponseSchema, k as ConfirmCheckoutRequestSchema, kn as UpdateChannelBindingBodySchema, kt as ListManagedServiceCredentialsResponseSchema, l as AgentTriggerSummaryListResponseSchema, ln as QueuedAgentPromptResponseSchema, lr as WorkspaceWorkflowOverviewSchema, lt as ExecuteKeystrokeToolRequestSchema, m as BillingInvoiceUrlResponseSchema, mn as SkillSummaryListResponseSchema, mr as isAcceptableInstallExit, mt as HealthResponseSchema, n as AcceptOrganizationInvitationResponseSchema, nn as ProjectReachabilityResponseSchema, nr as WorkflowSummaryDetailResponseSchema, o as AgentSessionListResponseSchema, on as PromptInputSchema, or as WorkspaceTriggerListResponseSchema, ot as DownloadActiveProjectArtifactResponseSchema, p as BillingActivityResponseSchema, pn as SkillSummaryDetailResponseSchema, pr as detectProjectPackageManagerFromSnapshot, pt as GraphqlDiscoverResponseSchema, q as CreateProjectResponseSchema, qn as WorkflowCanvasCredentialBindingsSchema, qt as PresignChatAttachmentRequestSchema, r as ActiveOrganizationResponseSchema, rn as ProjectResponseSchema, rr as WorkflowSummaryListResponseSchema, rt as DOCS_QUERY_TOOL, s as AgentSummaryDetailResponseSchema, sn as PromptResponseSchema, sr as WorkspaceTriggerOverviewSchema, st as DownloadActiveProjectSourceResponseSchema, t as ACTIVE_ORG_HEADER, tn as ProjectPullStateSchema, tr as WorkflowRunResponseSchema, tt as CredentialInstanceRecordSchema, u as AppSlugAvailabilityResponseSchema, un as QueuedRunResponseSchema, ur as buildConnectDeeplink, ut as GatewayAttachmentRecordSchema, v as BindChannelBodySchema, vn as StartMcpOAuthConnectionInputSchema, vr as parseAppSlug, vt as HistoryRunListResponseSchema, w as ChannelConnectionListResponseSchema, wn as TriggerDetailResponseSchema, wr as resolvePublicPlatformOrigin, wt as ListAgentMemoryFilesResponseSchema, x as CatalogAppDetailResponseSchema, xn as StartOAuthConnectionResultSchema, xt as InviteProjectMembersRequestSchema, y as CatalogActionDetailResponseSchema, yn as StartMcpOAuthConnectionResultSchema, yr as parseErrorResponse, yt as InviteOrganizationMembersRequestSchema, z as CreateCredentialsResponseSchema, zn as UpdateProjectSettingsRequestSchema, zt as ManagedServiceKindSchema } from "./dist-D2zm0gm3.mjs";
3
+ import { i as packProjectArtifact, n as withMcpReadClient, r as mergeFilteredArtifact, t as mapInParallelBatches } from "./dist-BWOtba0o.mjs";
4
+ import { _ as getPlatformUrl, c as detectPackageManager, d as resolveGithubPackagesToken, f as resolvePackageManager, g as getEffectiveApiTarget, h as getConfigDir, i as isReleaseAgeBlock, l as installDependencies$1, m as getCliConfigDir, n as resolveCliRoot, o as detectManagerFromLockfile, p as createCliConfig, s as buildPlaygroundWorkspace, t as readCliVersion, u as installPlaygroundDependencies, v as getWebUrl, x as resolvePlatformUrlForWebUrl, y as DEFAULT_PLATFORM_URL } from "./version-DZ9lwyAW.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";
@@ -4475,6 +4475,44 @@ function createApiKeysResource(http) {
4475
4475
  }
4476
4476
  };
4477
4477
  }
4478
+ function createManagedServiceCredentialsResource(http) {
4479
+ return {
4480
+ async list(kind) {
4481
+ try {
4482
+ const searchParams = kind ? { kind } : void 0;
4483
+ const data = await http.get("/api/managed-service-credentials", { searchParams }).json();
4484
+ return ListManagedServiceCredentialsResponseSchema.parse(data);
4485
+ } catch (error) {
4486
+ throw await toPlatformError(error);
4487
+ }
4488
+ },
4489
+ async connect(input) {
4490
+ const body = ConnectManagedServiceCredentialRequestSchema.parse(input);
4491
+ try {
4492
+ const data = await http.post("/api/managed-service-credentials", { json: body }).json();
4493
+ return ManagedServiceCredentialSchema.parse(data);
4494
+ } catch (error) {
4495
+ throw await toPlatformError(error);
4496
+ }
4497
+ },
4498
+ async update(id, input) {
4499
+ const body = UpdateManagedServiceCredentialRequestSchema.parse(input);
4500
+ try {
4501
+ const data = await http.patch(`/api/managed-service-credentials/${encodeURIComponent(id)}`, { json: body }).json();
4502
+ return ManagedServiceCredentialSchema.parse(data);
4503
+ } catch (error) {
4504
+ throw await toPlatformError(error);
4505
+ }
4506
+ },
4507
+ async disconnect(id) {
4508
+ try {
4509
+ await http.delete(`/api/managed-service-credentials/${encodeURIComponent(id)}`);
4510
+ } catch (error) {
4511
+ throw await toPlatformError(error);
4512
+ }
4513
+ }
4514
+ };
4515
+ }
4478
4516
  function createBillingResource(http) {
4479
4517
  return {
4480
4518
  async summary() {
@@ -4863,6 +4901,7 @@ function createPlatformClient(options) {
4863
4901
  members: createMembersResource(http),
4864
4902
  invitations: createInvitationsResource(http),
4865
4903
  apiKeys: createApiKeysResource(http),
4904
+ managedServiceCredentials: createManagedServiceCredentialsResource(http),
4866
4905
  billing: createBillingResource(http),
4867
4906
  recents: createRecentsResource(http),
4868
4907
  userPreferences: createUserPreferencesResource(http),
@@ -5527,6 +5566,85 @@ function registerApiKeyCommand(program) {
5527
5566
  });
5528
5567
  }
5529
5568
  //#endregion
5569
+ //#region src/commands/managed-services/run-managed-services.ts
5570
+ async function runManagedServicesList(config, kind = "llm") {
5571
+ await withActivePlatformClient(config, async (platform) => {
5572
+ const managedServices = await platform.managedServiceCredentials.list(kind);
5573
+ process.stdout.write(`${JSON.stringify({ managedServices }, null, 2)}\n`);
5574
+ });
5575
+ }
5576
+ async function runManagedServicesConnect(config, input) {
5577
+ await withActivePlatformClient(config, async (platform) => {
5578
+ const managedService = await platform.managedServiceCredentials.connect(input);
5579
+ process.stdout.write(`${JSON.stringify({ managedService }, null, 2)}\n`);
5580
+ });
5581
+ }
5582
+ async function runManagedServicesUpdate(config, provider, input, kind = "llm") {
5583
+ await withActivePlatformClient(config, async (platform) => {
5584
+ const existing = (await platform.managedServiceCredentials.list(kind)).find((entry) => entry.provider === provider);
5585
+ if (!existing) throw new Error(`No managed service credential connected for provider "${provider}"`);
5586
+ const managedService = await platform.managedServiceCredentials.update(existing.id, input);
5587
+ process.stdout.write(`${JSON.stringify({ managedService }, null, 2)}\n`);
5588
+ });
5589
+ }
5590
+ async function runManagedServicesDisconnect(config, provider, kind = "llm") {
5591
+ await withActivePlatformClient(config, async (platform) => {
5592
+ const existing = (await platform.managedServiceCredentials.list(kind)).find((entry) => entry.provider === provider);
5593
+ if (!existing) throw new Error(`No managed service credential connected for provider "${provider}"`);
5594
+ await platform.managedServiceCredentials.disconnect(existing.id);
5595
+ process.stdout.write(`${JSON.stringify({ disconnected: provider }, null, 2)}\n`);
5596
+ });
5597
+ }
5598
+ //#endregion
5599
+ //#region src/commands/managed-services/index.ts
5600
+ async function handleManagedServicesError(fallback, action) {
5601
+ const config = createCliConfig();
5602
+ try {
5603
+ await action();
5604
+ } catch (error) {
5605
+ process.stderr.write(`${formatCliError(error, fallback, {
5606
+ serverUrl: getPlatformUrl(config),
5607
+ webUrl: getWebUrl(config)
5608
+ })}\n`);
5609
+ process.exitCode = 1;
5610
+ }
5611
+ }
5612
+ function registerManagedServicesCommand(program) {
5613
+ const managedServices = program.command("managed-services").description("Manage organization managed service credentials");
5614
+ managedServices.command("list").description("List connected managed service credentials").option("--kind <kind>", "Managed service kind", "llm").action(async (options) => {
5615
+ const config = createCliConfig();
5616
+ const kind = ManagedServiceKindSchema.parse(options.kind);
5617
+ await handleManagedServicesError("List managed services failed", async () => {
5618
+ await runManagedServicesList(config, kind);
5619
+ });
5620
+ });
5621
+ managedServices.command("connect").description("Connect a managed service provider with your API key").argument("<provider>", "Provider slug (openai, anthropic, google, groq, xai)").requiredOption("--api-key <key>", "Provider API key").option("--kind <kind>", "Managed service kind", "llm").action(async (provider, options) => {
5622
+ const config = createCliConfig();
5623
+ const kind = ManagedServiceKindSchema.parse(options.kind);
5624
+ await handleManagedServicesError("Connect managed service failed", async () => {
5625
+ await runManagedServicesConnect(config, {
5626
+ kind,
5627
+ provider,
5628
+ apiKey: options.apiKey
5629
+ });
5630
+ });
5631
+ });
5632
+ managedServices.command("update").description("Rotate the API key for a connected provider").argument("<provider>", "Provider slug (openai, anthropic, google, groq, xai)").requiredOption("--api-key <key>", "Provider API key").option("--kind <kind>", "Managed service kind", "llm").action(async (provider, options) => {
5633
+ const config = createCliConfig();
5634
+ const kind = ManagedServiceKindSchema.parse(options.kind);
5635
+ await handleManagedServicesError("Update managed service failed", async () => {
5636
+ await runManagedServicesUpdate(config, provider, { apiKey: options.apiKey }, kind);
5637
+ });
5638
+ });
5639
+ managedServices.command("disconnect").description("Disconnect a managed service provider").argument("<provider>", "Provider slug (openai, anthropic, google, groq, xai)").option("--kind <kind>", "Managed service kind", "llm").action(async (provider, options) => {
5640
+ const config = createCliConfig();
5641
+ const kind = ManagedServiceKindSchema.parse(options.kind);
5642
+ await handleManagedServicesError("Disconnect managed service failed", async () => {
5643
+ await runManagedServicesDisconnect(config, provider, kind);
5644
+ });
5645
+ });
5646
+ }
5647
+ //#endregion
5530
5648
  //#region src/commands/apps/action-hints.ts
5531
5649
  function toCamelCase(value) {
5532
5650
  const pascal = value.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join("");
@@ -6650,7 +6768,7 @@ function registerBuildCommand(program) {
6650
6768
  try {
6651
6769
  const root = resolveProjectRoot(options.dir);
6652
6770
  ensureSdkCurrent(root);
6653
- const { buildApp } = await import("./dist-DqFY1hVs.mjs");
6771
+ const { buildApp } = await import("./dist-BnlTZTsD.mjs");
6654
6772
  await buildApp({ root });
6655
6773
  process.stdout.write(`Built ${root}\n`);
6656
6774
  } catch (error) {
@@ -6773,7 +6891,7 @@ async function sleep(ms) {
6773
6891
  }
6774
6892
  async function buildDeployArchive(client, root, projectId, filter) {
6775
6893
  if (filter?.length) {
6776
- const { buildFilteredApp } = await import("./dist-DqFY1hVs.mjs");
6894
+ const { buildFilteredApp } = await import("./dist-BnlTZTsD.mjs");
6777
6895
  const filtered = await buildFilteredApp({
6778
6896
  root,
6779
6897
  filter,
@@ -6795,7 +6913,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
6795
6913
  sourceFiles: filtered.sourceFiles
6796
6914
  };
6797
6915
  }
6798
- const { buildApp } = await import("./dist-DqFY1hVs.mjs");
6916
+ const { buildApp } = await import("./dist-BnlTZTsD.mjs");
6799
6917
  const { sourceFiles } = await buildApp({
6800
6918
  root,
6801
6919
  collectSources: true,
@@ -6917,7 +7035,7 @@ function runtimeChildEnv(parentEnv, overrides) {
6917
7035
  //#region src/project/bootstrap-run.ts
6918
7036
  /** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
6919
7037
  async function resolveBootstrapRun(options) {
6920
- const { resolveRuntimeBuildArtifact } = await import("./dist-DqFY1hVs.mjs");
7038
+ const { resolveRuntimeBuildArtifact } = await import("./dist-BnlTZTsD.mjs");
6921
7039
  const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
6922
7040
  const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
6923
7041
  const args = [`--import=${loader}`];
@@ -7066,7 +7184,7 @@ async function runDev(options) {
7066
7184
  process.on("SIGINT", shutdown);
7067
7185
  process.on("SIGTERM", shutdown);
7068
7186
  try {
7069
- const { watchApp } = await import("./dist-DqFY1hVs.mjs");
7187
+ const { watchApp } = await import("./dist-BnlTZTsD.mjs");
7070
7188
  await watchApp({
7071
7189
  root,
7072
7190
  clean: false,
@@ -8097,7 +8215,7 @@ async function runStart(options) {
8097
8215
  const apiPort = Number(new URL(serverUrl).port || 80);
8098
8216
  const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
8099
8217
  ensureNativeDeps(runtimeNodeModules);
8100
- const { buildApp } = await import("./dist-DqFY1hVs.mjs");
8218
+ const { buildApp } = await import("./dist-BnlTZTsD.mjs");
8101
8219
  await buildApp({
8102
8220
  root,
8103
8221
  clean: false
@@ -8669,6 +8787,7 @@ function createProgram() {
8669
8787
  registerConfigCommand(program);
8670
8788
  registerOrganizationCommand(program);
8671
8789
  registerApiKeyCommand(program);
8790
+ registerManagedServicesCommand(program);
8672
8791
  registerProjectsCommand(program);
8673
8792
  registerHistoryCommand(program);
8674
8793
  registerCredentialsCommand(program);
@@ -8691,7 +8810,7 @@ function createProgram() {
8691
8810
  return program;
8692
8811
  }
8693
8812
  async function runCli(argv) {
8694
- const { maybeAutoUpdate } = await import("./maybe-auto-update-gui95aub.mjs");
8813
+ const { maybeAutoUpdate } = await import("./maybe-auto-update-KpKNhzFK.mjs");
8695
8814
  await maybeAutoUpdate(argv);
8696
8815
  createProgram().parse(argv);
8697
8816
  }