@keystrokehq/cli 0.1.136 → 0.1.138
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/README.md +16 -0
- package/dist/{dist-C4j9muEB.mjs → dist-BcY5XTlp.mjs} +8 -2
- package/dist/{dist-C4j9muEB.mjs.map → dist-BcY5XTlp.mjs.map} +1 -1
- package/dist/{dist-CS_UEP2o.mjs → dist-BkXtCIR2.mjs} +2 -2
- package/dist/{dist-CS_UEP2o.mjs.map → dist-BkXtCIR2.mjs.map} +1 -1
- package/dist/{dist-CTxk-b3w.mjs → dist-Bo7OJs1C.mjs} +3 -3
- package/dist/{dist-CTxk-b3w.mjs.map → dist-Bo7OJs1C.mjs.map} +1 -1
- package/dist/dist-C3AKWkMS.mjs +3 -0
- package/dist/{dist-uDYI43cW.mjs → dist-Wf-gc7FZ.mjs} +3 -3
- package/dist/{dist-uDYI43cW.mjs.map → dist-Wf-gc7FZ.mjs.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{maybe-auto-update-lF-vd1vx.mjs → maybe-auto-update-C99Obm7k.mjs} +2 -2
- package/dist/{maybe-auto-update-lF-vd1vx.mjs.map → maybe-auto-update-C99Obm7k.mjs.map} +1 -1
- package/dist/{program-xJZurQ2n.mjs → program-DMhbEvwF.mjs} +71 -11
- package/dist/program-DMhbEvwF.mjs.map +1 -0
- package/dist/{run-package-manager-update-Dn1AxPrJ.mjs → run-package-manager-update-CQT2HD0m.mjs} +2 -2
- package/dist/{run-package-manager-update-Dn1AxPrJ.mjs.map → run-package-manager-update-CQT2HD0m.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +6 -0
- package/dist/skills-bundle/_AGENTS.md +7 -0
- package/package.json +2 -2
- package/dist/dist-J67lGXHj.mjs +0 -3
- package/dist/program-xJZurQ2n.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as resolveCliRoot, a as formatReleaseAgeBlockMessage, g as readCliVersion, h as isNewerVersion, i as fetchLatestCliRelease, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, y as getCliConfigDir } from "./run-package-manager-update-
|
|
2
|
+
import { _ as resolveCliRoot, a as formatReleaseAgeBlockMessage, g as readCliVersion, h as isNewerVersion, i as fetchLatestCliRelease, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, y as getCliConfigDir } from "./run-package-manager-update-CQT2HD0m.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { spawnSync } from "node:child_process";
|
|
@@ -136,4 +136,4 @@ async function maybeAutoUpdate(argv) {
|
|
|
136
136
|
//#endregion
|
|
137
137
|
export { maybeAutoUpdate };
|
|
138
138
|
|
|
139
|
-
//# sourceMappingURL=maybe-auto-update-
|
|
139
|
+
//# sourceMappingURL=maybe-auto-update-C99Obm7k.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybe-auto-update-lF-vd1vx.mjs","names":[],"sources":["../src/update/update-block-cache.ts","../src/update/maybe-auto-update.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nimport { getCliConfigDir } from \"../config\";\n\nexport type UpdateBlockCache = {\n registryLatest?: string;\n blockedUntil?: string;\n lastFailedAt?: string;\n};\n\nconst CACHE_FILE = \"update-check.json\";\nconst GENERIC_RETRY_MS = 24 * 60 * 60 * 1000;\n\nfunction cachePath(configDir = getCliConfigDir()): string {\n return join(configDir, CACHE_FILE);\n}\n\nexport function readUpdateBlockCache(configDir?: string): UpdateBlockCache {\n const path = cachePath(configDir);\n if (!existsSync(path)) {\n return {};\n }\n\n try {\n return JSON.parse(readFileSync(path, \"utf8\")) as UpdateBlockCache;\n } catch {\n return {};\n }\n}\n\nexport function writeUpdateBlockCache(cache: UpdateBlockCache, configDir?: string): void {\n const dir = configDir ?? getCliConfigDir();\n mkdirSync(dir, { recursive: true });\n writeFileSync(cachePath(dir), `${JSON.stringify(cache, null, 2)}\\n`, \"utf8\");\n}\n\nexport function shouldSkipCachedUpdate(\n cache: UpdateBlockCache,\n registryLatest: string,\n now = Date.now(),\n): boolean {\n if (cache.registryLatest !== registryLatest) {\n return false;\n }\n\n if (cache.blockedUntil) {\n const blockedUntilMs = Date.parse(cache.blockedUntil);\n if (Number.isFinite(blockedUntilMs) && blockedUntilMs > now) {\n return true;\n }\n }\n\n if (cache.lastFailedAt) {\n const lastFailedMs = Date.parse(cache.lastFailedAt);\n if (Number.isFinite(lastFailedMs) && now - lastFailedMs < GENERIC_RETRY_MS) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function clearUpdateBlockCache(configDir?: string): void {\n writeUpdateBlockCache({}, configDir);\n}\n\nexport function recordReleaseAgeBlock(options: {\n registryLatest: string;\n retryAfter?: Date;\n configDir?: string;\n}): void {\n writeUpdateBlockCache(\n {\n registryLatest: options.registryLatest,\n blockedUntil: options.retryAfter?.toISOString(),\n },\n options.configDir,\n );\n}\n\nexport function recordGenericUpdateFailure(registryLatest: string, configDir?: string): void {\n writeUpdateBlockCache(\n {\n registryLatest,\n lastFailedAt: new Date().toISOString(),\n },\n configDir,\n );\n}\n","import { spawnSync } from \"node:child_process\";\n\nimport { resolveCliRoot } from \"../project/resolve-cli-root\";\nimport { readCliVersion } from \"../version\";\nimport { isNewerVersion } from \"./compare-version\";\nimport { detectCliInstall } from \"./detect-cli-install\";\nimport { formatReleaseAgeBlockMessage, isReleaseAgeBlock } from \"./detect-release-age-block\";\nimport { fetchLatestCliRelease } from \"./fetch-latest-version\";\nimport {\n computeReleaseAgeRetryAfter,\n readPnpmMinimumReleaseAgeMinutes,\n} from \"./read-pnpm-release-age-minutes\";\nimport { runPackageManagerUpdate } from \"./run-package-manager-update\";\nimport {\n clearUpdateBlockCache,\n readUpdateBlockCache,\n recordGenericUpdateFailure,\n recordReleaseAgeBlock,\n shouldSkipCachedUpdate,\n} from \"./update-block-cache\";\n\nfunction isTopLevelUpdateCommand(args: string[]): boolean {\n const valueFlags = new Set([\"--project\", \"--organization\", \"--dir\"]);\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (arg === undefined) {\n return false;\n }\n\n if (arg === \"--\") {\n return args[i + 1] === \"update\";\n }\n\n if (arg.startsWith(\"-\")) {\n if (\n arg === \"--local\" ||\n arg === \"-h\" ||\n arg === \"--help\" ||\n arg === \"-V\" ||\n arg === \"--version\" ||\n arg.startsWith(\"-V\")\n ) {\n continue;\n }\n\n if (arg.includes(\"=\")) {\n continue;\n }\n\n if (valueFlags.has(arg) || arg.startsWith(\"--\")) {\n i++;\n }\n continue;\n }\n\n return arg === \"update\";\n }\n\n return false;\n}\n\nfunction shouldSkipAutoUpdate(argv: string[]): boolean {\n if (\n process.env.KEYSTROKE_DEV ||\n process.env.KEYSTROKE_SKIP_UPDATE ||\n process.env.KEYSTROKE_UPDATING\n ) {\n return true;\n }\n\n if (process.env.CI === \"true\" || process.env.CI === \"1\") {\n return true;\n }\n\n const args = argv.slice(2);\n if (args.length === 0) {\n return false;\n }\n\n // Explicit `keystroke update` owns CLI + project package updates.\n if (isTopLevelUpdateCommand(args)) {\n return true;\n }\n\n return args.every(\n (arg) =>\n arg === \"-V\" ||\n arg === \"--version\" ||\n arg === \"-h\" ||\n arg === \"--help\" ||\n arg.startsWith(\"-V\"),\n );\n}\n\nfunction reexecCli(argv: string[]): never {\n const result = spawnSync(process.execPath, argv.slice(1), {\n stdio: \"inherit\",\n env: {\n ...process.env,\n KEYSTROKE_UPDATING: \"1\",\n },\n });\n\n process.exit(result.status ?? 1);\n}\n\nfunction releaseAgeRetryAfter(\n install: NonNullable<ReturnType<typeof detectCliInstall>>,\n publishedAt: string | undefined,\n): Date | undefined {\n if (install.packageManager !== \"pnpm\") {\n return undefined;\n }\n\n return computeReleaseAgeRetryAfter(publishedAt, readPnpmMinimumReleaseAgeMinutes());\n}\n\nexport async function maybeAutoUpdate(argv: string[]): Promise<void> {\n if (shouldSkipAutoUpdate(argv)) {\n return;\n }\n\n const install = detectCliInstall(resolveCliRoot(import.meta.url));\n if (!install || (install.kind === \"local\" && !install.projectRoot)) {\n return;\n }\n\n const currentVersion = readCliVersion();\n const release = await fetchLatestCliRelease();\n\n if (!release || !isNewerVersion(release.version, currentVersion)) {\n clearUpdateBlockCache();\n return;\n }\n\n const cache = readUpdateBlockCache();\n if (shouldSkipCachedUpdate(cache, release.version)) {\n return;\n }\n\n process.stderr.write(\n `Updating @keystrokehq/cli ${currentVersion} -> ${release.version} via ${install.packageManager}...\\n`,\n );\n\n const result = runPackageManagerUpdate(install);\n const installedVersion = readCliVersion();\n\n if (isNewerVersion(installedVersion, currentVersion)) {\n clearUpdateBlockCache();\n process.stderr.write(`Updated @keystrokehq/cli ${currentVersion} -> ${installedVersion}.\\n`);\n reexecCli(argv);\n }\n\n if (result.ok) {\n clearUpdateBlockCache();\n return;\n }\n\n if (isReleaseAgeBlock(result.output)) {\n const retryAfter = releaseAgeRetryAfter(install, release.publishedAt);\n recordReleaseAgeBlock({\n registryLatest: release.version,\n retryAfter,\n });\n process.stderr.write(\n `${formatReleaseAgeBlockMessage({\n currentVersion,\n availableVersion: release.version,\n retryAfter,\n })}\\n`,\n );\n return;\n }\n\n recordGenericUpdateFailure(release.version);\n process.stderr.write(\"Auto-update failed; continuing with the current version.\\n\");\n}\n"],"mappings":";;;;;;AAWA,MAAM,aAAa;AACnB,MAAM,mBAAmB,OAAU,KAAK;AAExC,SAAS,UAAU,YAAY,gBAAgB,GAAW;CACxD,OAAO,KAAK,WAAW,UAAU;AACnC;AAEA,SAAgB,qBAAqB,WAAsC;CACzE,MAAM,OAAO,UAAU,SA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,iBAAiB,eAAe;CACtC,MAAM,UAAU,MAAM,sBAAsB;CAE5C,IAAI,CAAC,WAAW,CAAC,eAAe,QAAQ,SAAS,cAAc,GAAG;EAChE,sBAAsB;EACtB;CACF;CAGA,IAAI,uBADU,qBACiB,GAAG,QAAQ,OAAO,GAC/C;CAGF,QAAQ,OAAO,MACb,6BAA6B,eAAe,MAAM,QAAQ,QAAQ,OAAO,QAAQ,eAAe,MAClG;CAEA,MAAM,SAAS,wBAAwB,OAAO;CAC9C,MAAM,mBAAmB,eAAe;CAExC,IAAI,eAAe,kBAAkB,cAAc,GAAG;EACpD,sBAAsB;EACtB,QAAQ,OAAO,MAAM,4BAA4B,eAAe,MAAM,iBAAiB,IAAI;EAC3F,UAAU,IAAI;CAChB;CAEA,IAAI,OAAO,IAAI;EACb,sBAAsB;EACtB;CACF;CAEA,IAAI,kBAAkB,OAAO,MAAM,GAAG;EACpC,MAAM,aAAa,qBAAqB,SAAS,QAAQ,WAAW;EACpE,sBAAsB;GACpB,gBAAgB,QAAQ;GACxB;EACF,CAAC;EACD,QAAQ,OAAO,MACb,GAAG,6BAA6B;GAC9B;GACA,kBAAkB,QAAQ;GAC1B;EACF,CAAC,EAAE,GACL;EACA;CACF;CAEA,2BAA2B,QAAQ,OAAO;CAC1C,QAAQ,OAAO,MAAM,4DAA4D;AACnF"}
|
|
1
|
+
{"version":3,"file":"maybe-auto-update-C99Obm7k.mjs","names":[],"sources":["../src/update/update-block-cache.ts","../src/update/maybe-auto-update.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nimport { getCliConfigDir } from \"../config\";\n\nexport type UpdateBlockCache = {\n registryLatest?: string;\n blockedUntil?: string;\n lastFailedAt?: string;\n};\n\nconst CACHE_FILE = \"update-check.json\";\nconst GENERIC_RETRY_MS = 24 * 60 * 60 * 1000;\n\nfunction cachePath(configDir = getCliConfigDir()): string {\n return join(configDir, CACHE_FILE);\n}\n\nexport function readUpdateBlockCache(configDir?: string): UpdateBlockCache {\n const path = cachePath(configDir);\n if (!existsSync(path)) {\n return {};\n }\n\n try {\n return JSON.parse(readFileSync(path, \"utf8\")) as UpdateBlockCache;\n } catch {\n return {};\n }\n}\n\nexport function writeUpdateBlockCache(cache: UpdateBlockCache, configDir?: string): void {\n const dir = configDir ?? getCliConfigDir();\n mkdirSync(dir, { recursive: true });\n writeFileSync(cachePath(dir), `${JSON.stringify(cache, null, 2)}\\n`, \"utf8\");\n}\n\nexport function shouldSkipCachedUpdate(\n cache: UpdateBlockCache,\n registryLatest: string,\n now = Date.now(),\n): boolean {\n if (cache.registryLatest !== registryLatest) {\n return false;\n }\n\n if (cache.blockedUntil) {\n const blockedUntilMs = Date.parse(cache.blockedUntil);\n if (Number.isFinite(blockedUntilMs) && blockedUntilMs > now) {\n return true;\n }\n }\n\n if (cache.lastFailedAt) {\n const lastFailedMs = Date.parse(cache.lastFailedAt);\n if (Number.isFinite(lastFailedMs) && now - lastFailedMs < GENERIC_RETRY_MS) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function clearUpdateBlockCache(configDir?: string): void {\n writeUpdateBlockCache({}, configDir);\n}\n\nexport function recordReleaseAgeBlock(options: {\n registryLatest: string;\n retryAfter?: Date;\n configDir?: string;\n}): void {\n writeUpdateBlockCache(\n {\n registryLatest: options.registryLatest,\n blockedUntil: options.retryAfter?.toISOString(),\n },\n options.configDir,\n );\n}\n\nexport function recordGenericUpdateFailure(registryLatest: string, configDir?: string): void {\n writeUpdateBlockCache(\n {\n registryLatest,\n lastFailedAt: new Date().toISOString(),\n },\n configDir,\n );\n}\n","import { spawnSync } from \"node:child_process\";\n\nimport { resolveCliRoot } from \"../project/resolve-cli-root\";\nimport { readCliVersion } from \"../version\";\nimport { isNewerVersion } from \"./compare-version\";\nimport { detectCliInstall } from \"./detect-cli-install\";\nimport { formatReleaseAgeBlockMessage, isReleaseAgeBlock } from \"./detect-release-age-block\";\nimport { fetchLatestCliRelease } from \"./fetch-latest-version\";\nimport {\n computeReleaseAgeRetryAfter,\n readPnpmMinimumReleaseAgeMinutes,\n} from \"./read-pnpm-release-age-minutes\";\nimport { runPackageManagerUpdate } from \"./run-package-manager-update\";\nimport {\n clearUpdateBlockCache,\n readUpdateBlockCache,\n recordGenericUpdateFailure,\n recordReleaseAgeBlock,\n shouldSkipCachedUpdate,\n} from \"./update-block-cache\";\n\nfunction isTopLevelUpdateCommand(args: string[]): boolean {\n const valueFlags = new Set([\"--project\", \"--organization\", \"--dir\"]);\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (arg === undefined) {\n return false;\n }\n\n if (arg === \"--\") {\n return args[i + 1] === \"update\";\n }\n\n if (arg.startsWith(\"-\")) {\n if (\n arg === \"--local\" ||\n arg === \"-h\" ||\n arg === \"--help\" ||\n arg === \"-V\" ||\n arg === \"--version\" ||\n arg.startsWith(\"-V\")\n ) {\n continue;\n }\n\n if (arg.includes(\"=\")) {\n continue;\n }\n\n if (valueFlags.has(arg) || arg.startsWith(\"--\")) {\n i++;\n }\n continue;\n }\n\n return arg === \"update\";\n }\n\n return false;\n}\n\nfunction shouldSkipAutoUpdate(argv: string[]): boolean {\n if (\n process.env.KEYSTROKE_DEV ||\n process.env.KEYSTROKE_SKIP_UPDATE ||\n process.env.KEYSTROKE_UPDATING\n ) {\n return true;\n }\n\n if (process.env.CI === \"true\" || process.env.CI === \"1\") {\n return true;\n }\n\n const args = argv.slice(2);\n if (args.length === 0) {\n return false;\n }\n\n // Explicit `keystroke update` owns CLI + project package updates.\n if (isTopLevelUpdateCommand(args)) {\n return true;\n }\n\n return args.every(\n (arg) =>\n arg === \"-V\" ||\n arg === \"--version\" ||\n arg === \"-h\" ||\n arg === \"--help\" ||\n arg.startsWith(\"-V\"),\n );\n}\n\nfunction reexecCli(argv: string[]): never {\n const result = spawnSync(process.execPath, argv.slice(1), {\n stdio: \"inherit\",\n env: {\n ...process.env,\n KEYSTROKE_UPDATING: \"1\",\n },\n });\n\n process.exit(result.status ?? 1);\n}\n\nfunction releaseAgeRetryAfter(\n install: NonNullable<ReturnType<typeof detectCliInstall>>,\n publishedAt: string | undefined,\n): Date | undefined {\n if (install.packageManager !== \"pnpm\") {\n return undefined;\n }\n\n return computeReleaseAgeRetryAfter(publishedAt, readPnpmMinimumReleaseAgeMinutes());\n}\n\nexport async function maybeAutoUpdate(argv: string[]): Promise<void> {\n if (shouldSkipAutoUpdate(argv)) {\n return;\n }\n\n const install = detectCliInstall(resolveCliRoot(import.meta.url));\n if (!install || (install.kind === \"local\" && !install.projectRoot)) {\n return;\n }\n\n const currentVersion = readCliVersion();\n const release = await fetchLatestCliRelease();\n\n if (!release || !isNewerVersion(release.version, currentVersion)) {\n clearUpdateBlockCache();\n return;\n }\n\n const cache = readUpdateBlockCache();\n if (shouldSkipCachedUpdate(cache, release.version)) {\n return;\n }\n\n process.stderr.write(\n `Updating @keystrokehq/cli ${currentVersion} -> ${release.version} via ${install.packageManager}...\\n`,\n );\n\n const result = runPackageManagerUpdate(install);\n const installedVersion = readCliVersion();\n\n if (isNewerVersion(installedVersion, currentVersion)) {\n clearUpdateBlockCache();\n process.stderr.write(`Updated @keystrokehq/cli ${currentVersion} -> ${installedVersion}.\\n`);\n reexecCli(argv);\n }\n\n if (result.ok) {\n clearUpdateBlockCache();\n return;\n }\n\n if (isReleaseAgeBlock(result.output)) {\n const retryAfter = releaseAgeRetryAfter(install, release.publishedAt);\n recordReleaseAgeBlock({\n registryLatest: release.version,\n retryAfter,\n });\n process.stderr.write(\n `${formatReleaseAgeBlockMessage({\n currentVersion,\n availableVersion: release.version,\n retryAfter,\n })}\\n`,\n );\n return;\n }\n\n recordGenericUpdateFailure(release.version);\n process.stderr.write(\"Auto-update failed; continuing with the current version.\\n\");\n}\n"],"mappings":";;;;;;AAWA,MAAM,aAAa;AACnB,MAAM,mBAAmB,OAAU,KAAK;AAExC,SAAS,UAAU,YAAY,gBAAgB,GAAW;CACxD,OAAO,KAAK,WAAW,UAAU;AACn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C,WAAY,QAAQ,SAAS,WAAW,CAAC,QAAQ,aACpD;CAGF,MAAM,iBAAiB,eAAe;CACtC,MAAM,UAAU,MAAM,sBAAsB;CAE5C,IAAI,CAAC,WAAW,CAAC,eAAe,QAAQ,SAAS,cAAc,GAAG;EAChE,sBAAsB;EACtB;CACF;CAGA,IAAI,uBADU,qBACiB,GAAG,QAAQ,OAAO,GAC/C;CAGF,QAAQ,OAAO,MACb,6BAA6B,eAAe,MAAM,QAAQ,QAAQ,OAAO,QAAQ,eAAe,MAClG;CAEA,MAAM,SAAS,wBAAwB,OAAO;CAC9C,MAAM,mBAAmB,eAAe;CAExC,IAAI,eAAe,kBAAkB,cAAc,GAAG;EACpD,sBAAsB;EACtB,QAAQ,OAAO,MAAM,4BAA4B,eAAe,MAAM,iBAAiB,IAAI;EAC3F,UAAU,IAAI;CAChB;CAEA,IAAI,OAAO,IAAI;EACb,sBAAsB;EACtB;CACF;CAEA,IAAI,kBAAkB,OAAO,MAAM,GAAG;EACpC,MAAM,aAAa,qBAAqB,SAAS,QAAQ,WAAW;EACpE,sBAAsB;GACpB,gBAAgB,QAAQ;GACxB;EACF,CAAC;EACD,QAAQ,OAAO,MACb,GAAG,6BAA6B;GAC9B;GACA,kBAAkB,QAAQ;GAC1B;EACF,CAAC,EAAE,GACL;EACA;CACF;CAEA,2BAA2B,QAAQ,OAAO;CAC1C,QAAQ,OAAO,MAAM,4DAA4D;AACnF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as CredentialInstanceListResponseSchema, $n as
|
|
3
|
-
import { C as getWebUrl, E as resolvePlatformUrlForWebUrl, S as getPlatformUrl, _ as resolveCliRoot, a as formatReleaseAgeBlockMessage, b as getConfigDir, c as detectManagerFromLockfile, d as installDependencies$1, f as installPlaygroundDependencies, g as readCliVersion, h as isNewerVersion, i as fetchLatestCliRelease, l as buildPlaygroundWorkspace, m as resolvePackageManager, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, p as resolveGithubPackagesToken, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, u as detectPackageManager, v as createCliConfig, w as DEFAULT_PLATFORM_URL, x as getEffectiveApiTarget, y as getCliConfigDir } from "./run-package-manager-update-
|
|
4
|
-
import { a as alias, c as event, i as packProjectArtifact, l as flushTelemetry, n as withMcpReadClient, o as captureException, r as mergeFilteredArtifact, s as configureTelemetry, t as mapInParallelBatches, u as shutdownTelemetry } from "./dist-
|
|
2
|
+
import { $ as CredentialInstanceListResponseSchema, $n as UpdateOrganizationMemberRequestSchema, $t as OrganizationSidebarBrandingSchema, A as ConnectAuthorizeUrlResponseSchema, An as SkillSummaryListResponseSchema, Ar as WorkspaceTriggerRunListResponseSchema, At as ListAgentMemoryFilesResponseSchema, B as CreateCustomAppRequestSchema, Bn as SubmitTeamRequestRequestSchema, Br as parseAppSlug, Bt as ListOrganizationMembersPageResponseSchema, C as ChannelAccountListResponseSchema, Cn as PublishedFormListResponseSchema, Cr as WorkflowRunResponseSchema, Ct as HistoryRunListQuerySchema, D as CompleteProjectArtifactResponseSchema, Dr as WorkspaceTriggerFileSchema, Dt as InviteProjectMembersRequestSchema, E as ChannelDirectoryListResponseSchema, En as QueuedRunResponseSchema, Er as WorkspaceTriggerDetailSchema, Et as InviteOrganizationMembersResponseSchema, F as CreateBillingPortalRequestSchema, Fn as StartMcpOAuthConnectionResultSchema, Fr as detectProjectPackageManagerFromSnapshot, Ft as ListCredentialsPageQuerySchema, G as CreateProjectRequestSchema, Gn as TriggerListResponseSchema, Gr as resolveDocsMcpUrl, Gt as ListProjectMetricsResponseSchema, H as CreateOrganizationRequestSchema, Hn as TriggerDetailResponseSchema, Ht as ListProjectDeploymentsResponseSchema, I as CreateCredentialInstanceBodySchema, In as StartOAuthConnectionInputSchema, Ir as isAcceptableInstallExit, It as ListCredentialsPageResponseSchema, J as CredentialAssignmentListQuerySchema, Jn as UpdateAutoTopupRequestSchema, Jt as ManagedServiceCredentialSchema, K as CreateProjectResponseSchema, Kn as TriggerRunDetailResponseSchema, Kr as resolvePublicPlatformOrigin, Kt as ListProjectsResponseSchema, L as CreateCredentialsRequestSchema, Ln as StartOAuthConnectionResultSchema, Lr as listenPortFromPublicUrl, Lt as ListManagedServiceCredentialsResponseSchema, M as ConnectProvidersResponseSchema, Mn as StartKeystrokeConnectionInputSchema, Mr as buildConnectDeeplink, Mt as ListApiKeysResponseSchema, N as CreateApiKeyRequestSchema, Nn as StartKeystrokeConnectionResultSchema, Nt as ListAppsResponseSchema, O as ConfirmCheckoutRequestSchema, On as RecentResourceListResponseSchema, Or as WorkspaceTriggerListResponseSchema, Ot as InviteProjectMembersResponseSchema, P as CreateApiKeyResponseSchema, Pn as StartMcpOAuthConnectionInputSchema, Pr as deriveCustomAppDisplay, Pt as ListChannelPlatformsResponseSchema, Q as CredentialConsumerListResponseSchema, Qn as UpdateManagedServiceCredentialRequestSchema, Qt as OrganizationSidebarBrandingPatchSchema, R as CreateCredentialsResponseSchema, Rn as SubmitAgentFeedbackRequestSchema, Rt as ListOrganizationInvitationsResponseSchema, S as CatalogAppsPageResponseSchema, Sr as WorkflowRunListResponseSchema, St as HistoryRunDetailResponseSchema, T as ChannelConnectionSchema, Tn as QueuedAgentPromptResponseSchema, Tr as WorkflowSummaryListResponseSchema, Tt as InviteOrganizationMembersRequestSchema, U as CreateOrganizationResponseSchema, Un as TriggerInvokeInputsSchema, Ut as ListProjectFilesResponseSchema, V as CreateCustomAppResponseSchema, Vn as TemplateFilesResponseSchema, Vr as parseErrorResponse, Vt as ListOrganizationsResponseSchema, W as CreateProjectArtifactResponseSchema, Wn as TriggerInvokeResponseSchema, Wr as resolveConnectAppSlug, Wt as ListProjectMembersResponseSchema, X as CredentialAssignmentRecordSchema, Xn as UpdateCredentialInstanceBodySchema, Xt as McpDiscoverResponseSchema, Y as CredentialAssignmentListResponseSchema, Yn as UpdateChannelBindingBodySchema, Yt as ManagedServiceKindSchema, Z as CredentialConsumerListQuerySchema, Zn as UpdateCredentialRequestSchema, Zt as OpenApiDiscoverResponseSchema, _ as BindChannelBodySchema, _n as PromptInputSchema, _r as WorkflowFormUpsertBodySchema, _t as GetCustomAppResponseSchema, a as AgentSessionListResponseSchema, an as PresignCustomAppLogoResponseSchema, ar as UpdateProjectSettingsRequestSchema, at as DownloadActiveProjectArtifactResponseSchema, b as CatalogActionsPageResponseSchema, bn as PublicFormSubmitBodySchema, br as WorkflowRunInputsPutBodySchema, bt as HealthResponseSchema, c as AgentTriggerSummaryListResponseSchema, cn as PresignProjectSourceRequestSchema, cr as UpsertGatewayAttachmentBodySchema, ct as DuplicateCredentialsResponseSchema, d as AutoTopupSummarySchema, dn as PresignUserAvatarResponseSchema, dr as UserPreferencesPatchSchema, dt as FinalizeCustomAppLogoRequestSchema, en as PROJECT_PULL_STATE_RELATIVE_PATH, er as UpdateOrganizationMemberResponseSchema, et as CredentialInstanceRecordSchema, f as BillingActivityResponseSchema, fn as ProjectPullStateSchema, fr as UserPreferencesSchema, ft as FinalizeCustomAppLogoResponseSchema, g as BillingUsageResponseSchema, gn as ProjectSlugAvailabilityResponseSchema, gr as WorkflowFormResponseSchema, gt as GetCredentialResponseSchema, h as BillingSummaryResponseSchema, hn as ProjectSettingsResponseSchema, hr as WorkflowCanvasSchema, ht as GetAppCatalogEntryResponseSchema, i as AgentSessionDetailResponseSchema, in as PresignCustomAppLogoRequestSchema, ir as UpdateProjectRequestSchema, it as DeclineOrganizationInvitationResponseSchema, j as ConnectManagedServiceCredentialRequestSchema, jn as SlugAvailabilityResponseSchema, jr as WorkspaceWorkflowOverviewSchema, jt as ListAgentWorkspaceFilesResponseSchema, k as ConfirmCheckoutResponseSchema, kn as SkillSummaryDetailResponseSchema, kr as WorkspaceTriggerOverviewSchema, l as AppSlugAvailabilityResponseSchema, ln as PresignProjectSourceResponseSchema, lr as UserAvatarPatchSchema, lt as ExecuteKeystrokeToolRequestSchema, m as BillingRedirectResponseSchema, mn as ProjectResponseSchema, mr as WorkflowCanvasRunSchema, mt as GatewayAttachmentRecordSchema, n as AcceptOrganizationInvitationResponseSchema, nn as PresignChatAttachmentRequestSchema, nr as UpdateProjectMemberRequestSchema, nt as DOCS_QUERY_TOOL, o as AgentSummaryDetailResponseSchema, on as PresignOrgLogoRequestSchema, or as UploadProjectSourceManifestRequestSchema, ot as DownloadActiveProjectSourceResponseSchema, p as BillingInvoiceUrlResponseSchema, pn as ProjectReachabilityResponseSchema, pr as WorkflowCanvasCredentialBindingsSchema, pt as FormFieldConfigSchema, q as CreateSubscriptionCheckoutRequestSchema, qn as TriggerRunListResponseSchema, qr as slugifyAppName, qt as ListTemplatesResponseSchema, r as ActiveOrganizationResponseSchema, rn as PresignChatAttachmentResponseSchema, rr as UpdateProjectMemberResponseSchema, rt as DOCS_SEARCH_TOOL, s as AgentSummaryListResponseSchema, sn as PresignOrgLogoResponseSchema, sr as UploadProjectSourceResponseSchema, st as DuplicateCredentialRequestSchema, t as ACTIVE_ORG_HEADER, tn as PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS, tr as UpdateOrganizationRequestSchema, u as AssignCredentialBodySchema, un as PresignUserAvatarRequestSchema, ur as UserAvatarSchema, v as CLIENT_CHANNEL_HEADER, vn as PromptResponseSchema, vr as WorkflowRunDetailResponseSchema, vt as GetTemplateResponseSchema, w as ChannelConnectionListResponseSchema, wn as PublishedFormSchema, wr as WorkflowSummaryDetailResponseSchema, wt as HistoryRunListResponseSchema, x as CatalogAppDetailResponseSchema, xn as PublicFormSubmitResponseSchema, xr as WorkflowRunInputsSchema, xt as HistoryRunCancelResponseSchema, y as CatalogActionDetailResponseSchema, yn as PublicFormMetadataSchema, yr as WorkflowRunHooksResponseSchema, yt as GraphqlDiscoverResponseSchema, z as CreateCreditsCheckoutRequestSchema, zn as SubmitMarketingContactRequestSchema, zt as ListOrganizationMembersPageQuerySchema } from "./dist-BcY5XTlp.mjs";
|
|
3
|
+
import { C as getWebUrl, E as resolvePlatformUrlForWebUrl, S as getPlatformUrl, _ as resolveCliRoot, a as formatReleaseAgeBlockMessage, b as getConfigDir, c as detectManagerFromLockfile, d as installDependencies$1, f as installPlaygroundDependencies, g as readCliVersion, h as isNewerVersion, i as fetchLatestCliRelease, l as buildPlaygroundWorkspace, m as resolvePackageManager, n as computeReleaseAgeRetryAfter, o as isReleaseAgeBlock, p as resolveGithubPackagesToken, r as readPnpmMinimumReleaseAgeMinutes, s as detectCliInstall, t as runPackageManagerUpdate, u as detectPackageManager, v as createCliConfig, w as DEFAULT_PLATFORM_URL, x as getEffectiveApiTarget, y as getCliConfigDir } from "./run-package-manager-update-CQT2HD0m.mjs";
|
|
4
|
+
import { a as alias, c as event, i as packProjectArtifact, l as flushTelemetry, n as withMcpReadClient, o as captureException, r as mergeFilteredArtifact, s as configureTelemetry, t as mapInParallelBatches, u as shutdownTelemetry } from "./dist-BkXtCIR2.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { platform, release } from "node:os";
|
|
@@ -4359,6 +4359,16 @@ function createTeamRequestsResource(http) {
|
|
|
4359
4359
|
}
|
|
4360
4360
|
} };
|
|
4361
4361
|
}
|
|
4362
|
+
function createAgentFeedbackResource(http) {
|
|
4363
|
+
return { async submit(input) {
|
|
4364
|
+
const body = SubmitAgentFeedbackRequestSchema.parse(input);
|
|
4365
|
+
try {
|
|
4366
|
+
await http.post("/api/agent-feedback", { json: body }).json();
|
|
4367
|
+
} catch (error) {
|
|
4368
|
+
throw await toPlatformError(error);
|
|
4369
|
+
}
|
|
4370
|
+
} };
|
|
4371
|
+
}
|
|
4362
4372
|
function createTemplatesResource(http) {
|
|
4363
4373
|
return {
|
|
4364
4374
|
async list(options) {
|
|
@@ -5268,6 +5278,7 @@ function createPlatformClient(options) {
|
|
|
5268
5278
|
customAppLogo: createCustomAppLogoResource(http),
|
|
5269
5279
|
organizationSidebarBranding: createOrganizationSidebarBrandingResource(http, { getActiveOrganizationId: resolveActiveOrganizationId }),
|
|
5270
5280
|
teamRequests: createTeamRequestsResource(http),
|
|
5281
|
+
agentFeedback: createAgentFeedbackResource(http),
|
|
5271
5282
|
templates: createTemplatesResource(http),
|
|
5272
5283
|
marketingContact: createMarketingContactResource(http),
|
|
5273
5284
|
getActiveOrganizationId: resolveActiveOrganizationId,
|
|
@@ -7780,7 +7791,7 @@ function registerBuildCommand(program) {
|
|
|
7780
7791
|
try {
|
|
7781
7792
|
const root = resolveProjectRoot(options.dir);
|
|
7782
7793
|
await ensureSdkCurrent(root);
|
|
7783
|
-
const { buildApp } = await import("./dist-
|
|
7794
|
+
const { buildApp } = await import("./dist-Bo7OJs1C.mjs");
|
|
7784
7795
|
await buildApp({ root });
|
|
7785
7796
|
process.stdout.write(`Built ${root}\n`);
|
|
7786
7797
|
} catch (error) {
|
|
@@ -7915,7 +7926,7 @@ async function sleep(ms) {
|
|
|
7915
7926
|
}
|
|
7916
7927
|
async function buildDeployArchive(client, root, projectId, filter) {
|
|
7917
7928
|
if (filter?.length) {
|
|
7918
|
-
const { buildFilteredApp } = await import("./dist-
|
|
7929
|
+
const { buildFilteredApp } = await import("./dist-Bo7OJs1C.mjs");
|
|
7919
7930
|
const filtered = await buildFilteredApp({
|
|
7920
7931
|
root,
|
|
7921
7932
|
filter,
|
|
@@ -7937,7 +7948,7 @@ async function buildDeployArchive(client, root, projectId, filter) {
|
|
|
7937
7948
|
sourceFiles: filtered.sourceFiles
|
|
7938
7949
|
};
|
|
7939
7950
|
}
|
|
7940
|
-
const { buildApp } = await import("./dist-
|
|
7951
|
+
const { buildApp } = await import("./dist-Bo7OJs1C.mjs");
|
|
7941
7952
|
const { sourceFiles } = await buildApp({
|
|
7942
7953
|
root,
|
|
7943
7954
|
collectSources: true,
|
|
@@ -8068,7 +8079,7 @@ function runtimeChildEnv(parentEnv, overrides) {
|
|
|
8068
8079
|
//#region src/project/bootstrap-run.ts
|
|
8069
8080
|
/** Node args + env for `@keystrokehq/build` bootstrap (shared by start + dev). */
|
|
8070
8081
|
async function resolveBootstrapRun(options) {
|
|
8071
|
-
const { resolveRuntimeBuildArtifact } = await import("./dist-
|
|
8082
|
+
const { resolveRuntimeBuildArtifact } = await import("./dist-Bo7OJs1C.mjs");
|
|
8072
8083
|
const loader = pathToFileURL(resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/runtime-loader.mjs")).href;
|
|
8073
8084
|
const bootstrap = resolveRuntimeBuildArtifact(options.runtimeNodeModules, "dist/standalone-bootstrap.mjs");
|
|
8074
8085
|
const args = [`--import=${loader}`];
|
|
@@ -8218,7 +8229,7 @@ async function runDev(options) {
|
|
|
8218
8229
|
process.on("SIGINT", shutdown);
|
|
8219
8230
|
process.on("SIGTERM", shutdown);
|
|
8220
8231
|
try {
|
|
8221
|
-
const { watchApp } = await import("./dist-
|
|
8232
|
+
const { watchApp } = await import("./dist-Bo7OJs1C.mjs");
|
|
8222
8233
|
await watchApp({
|
|
8223
8234
|
root,
|
|
8224
8235
|
clean: false,
|
|
@@ -8303,6 +8314,54 @@ function registerDocsCommand(program) {
|
|
|
8303
8314
|
registerDocsQueryCommand(docs);
|
|
8304
8315
|
}
|
|
8305
8316
|
//#endregion
|
|
8317
|
+
//#region src/commands/feedback/create.ts
|
|
8318
|
+
const MESSAGE_WRITING_GUIDE = `
|
|
8319
|
+
Write the message for a Keystroke team member with zero context on your session:
|
|
8320
|
+
|
|
8321
|
+
- Start with 1-2 plain sentences on what you were building and what happened.
|
|
8322
|
+
- Then a numbered list with one item per distinct issue.
|
|
8323
|
+
- Lead each item with the plain-English problem and what you expected instead;
|
|
8324
|
+
put technical detail (paths, commands, error text) after — not instead.
|
|
8325
|
+
- Avoid internal function names, codenames, or jargon a cold reader can't know.
|
|
8326
|
+
- Never include secrets, tokens, credentials, proprietary code, or personal data.
|
|
8327
|
+
|
|
8328
|
+
The message renders in Slack as mrkdwn: *bold*, _italic_, \`code\`.
|
|
8329
|
+
|
|
8330
|
+
Template:
|
|
8331
|
+
|
|
8332
|
+
keystroke feedback create --message "$(cat <<'EOF'
|
|
8333
|
+
*Quick Recap and Context*
|
|
8334
|
+
|
|
8335
|
+
One or two sentences on what you were building and what happened.
|
|
8336
|
+
|
|
8337
|
+
-------------------------
|
|
8338
|
+
|
|
8339
|
+
*Feedback for Keystroke Team*
|
|
8340
|
+
|
|
8341
|
+
*1. Plain-English title of the issue*
|
|
8342
|
+
What happened, what you expected, and any workaround. Technical detail last.
|
|
8343
|
+
EOF
|
|
8344
|
+
)"
|
|
8345
|
+
`;
|
|
8346
|
+
function registerFeedbackCreateCommand(feedback) {
|
|
8347
|
+
feedback.command("create").description("Send a build-experience report (snags, unclear docs, papercuts) to the Keystroke team").requiredOption("--message <text>", "Freeform report (recap + feedback). Prefer a heredoc for multi-line messages.").addHelpText("after", MESSAGE_WRITING_GUIDE).action((options) => runStandaloneCliCommand("Feedback create failed", async ({ config }) => {
|
|
8348
|
+
await resolveActiveOrganization(config);
|
|
8349
|
+
const platform = createCliPlatformClient(config);
|
|
8350
|
+
const linked = readLinkedProjectConfig();
|
|
8351
|
+
await platform.agentFeedback.submit({
|
|
8352
|
+
message: options.message,
|
|
8353
|
+
cliVersion: readCliVersion(),
|
|
8354
|
+
...linked.project ? { projectSlug: linked.project } : {}
|
|
8355
|
+
});
|
|
8356
|
+
process.stdout.write(`${JSON.stringify({ ok: true }, null, 2)}\n`);
|
|
8357
|
+
}));
|
|
8358
|
+
}
|
|
8359
|
+
//#endregion
|
|
8360
|
+
//#region src/commands/feedback/index.ts
|
|
8361
|
+
function registerFeedbackCommand(program) {
|
|
8362
|
+
registerFeedbackCreateCommand(program.command("feedback").description("Send build-experience reports to the Keystroke team"));
|
|
8363
|
+
}
|
|
8364
|
+
//#endregion
|
|
8306
8365
|
//#region src/commands/history/run-history.ts
|
|
8307
8366
|
async function runHistoryList(config, filters) {
|
|
8308
8367
|
if (filters?.admin) await requireAdminRole(config);
|
|
@@ -9280,7 +9339,7 @@ async function runStart(options) {
|
|
|
9280
9339
|
const apiPort = Number(new URL(serverUrl).port || 80);
|
|
9281
9340
|
const runtimeNodeModules = resolveCliRuntimeNodeModules(resolveCliRoot(import.meta.url));
|
|
9282
9341
|
ensureNativeDeps(runtimeNodeModules);
|
|
9283
|
-
const { buildApp } = await import("./dist-
|
|
9342
|
+
const { buildApp } = await import("./dist-Bo7OJs1C.mjs");
|
|
9284
9343
|
await buildApp({
|
|
9285
9344
|
root,
|
|
9286
9345
|
clean: false
|
|
@@ -10150,6 +10209,7 @@ function createProgram() {
|
|
|
10150
10209
|
registerCredentialsCommand(program);
|
|
10151
10210
|
registerHealthCommand(program);
|
|
10152
10211
|
registerDocsCommand(program);
|
|
10212
|
+
registerFeedbackCommand(program);
|
|
10153
10213
|
registerInitCommand(program);
|
|
10154
10214
|
registerBuildCommand(program);
|
|
10155
10215
|
registerLintCommand(program);
|
|
@@ -10171,7 +10231,7 @@ function createProgram() {
|
|
|
10171
10231
|
async function runCli(argv) {
|
|
10172
10232
|
initCliTelemetry();
|
|
10173
10233
|
try {
|
|
10174
|
-
const { maybeAutoUpdate } = await import("./maybe-auto-update-
|
|
10234
|
+
const { maybeAutoUpdate } = await import("./maybe-auto-update-C99Obm7k.mjs");
|
|
10175
10235
|
await maybeAutoUpdate(argv);
|
|
10176
10236
|
await createProgram().parseAsync(argv);
|
|
10177
10237
|
} finally {
|
|
@@ -10181,4 +10241,4 @@ async function runCli(argv) {
|
|
|
10181
10241
|
//#endregion
|
|
10182
10242
|
export { runCli };
|
|
10183
10243
|
|
|
10184
|
-
//# sourceMappingURL=program-
|
|
10244
|
+
//# sourceMappingURL=program-DMhbEvwF.mjs.map
|