@keystrokehq/cli 0.1.65 → 0.1.67

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __require, t as __commonJSMin } from "./chunk-DiodbrVj.mjs";
3
- import { Br as object, Dr as ZodType, Fr as discriminatedUnion, Gr as union, Hr as preprocess, Lr as literal, Mr as array, Nr as boolean$1, Or as _enum, Pr as custom, Wr as string, Yr as toJSONSchema, br as parseStoredRouteManifest, cn as PublicModelsResponseSchema, dn as ROUTE_MANIFEST_REL_PATH, dr as credentialInputSchema, gr as normalizeCredentialList, kr as _function, nt as DEFAULT_CLOUD_PLATFORM_ORIGIN, sn as PromptResponseSchema, xr as requiredDisplayTextSchema, zr as number } from "./dist-D2zm0gm3.mjs";
4
- import "./dist-BWOtba0o.mjs";
3
+ import { Br as object, Dr as ZodType, Fr as discriminatedUnion, Gr as union, Hr as preprocess, Lr as literal, Mr as array, Nr as boolean$1, Or as _enum, Pr as custom, Wr as string, Yr as toJSONSchema, br as parseStoredRouteManifest, cn as PublicModelsResponseSchema, dn as ROUTE_MANIFEST_REL_PATH, dr as credentialInputSchema, gr as normalizeCredentialList, kr as _function, nt as DEFAULT_CLOUD_PLATFORM_ORIGIN, sn as PromptResponseSchema, xr as requiredDisplayTextSchema, zr as number } from "./dist-qP0YVL-T.mjs";
4
+ import "./dist-lGYSzJPL.mjs";
5
5
  import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
6
6
  import "./chunk-DLL7UR66-BUYgzxnR.mjs";
7
7
  import "./chunk-TN7HHBQW-CSB_R-XD.mjs";
@@ -7541,84 +7541,6 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7541
7541
  };
7542
7542
  }));
7543
7543
  //#endregion
7544
- //#region ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
7545
- var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7546
- module.exports = (flag, argv = process.argv) => {
7547
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
7548
- const position = argv.indexOf(prefix + flag);
7549
- const terminatorPosition = argv.indexOf("--");
7550
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
7551
- };
7552
- }));
7553
- //#endregion
7554
- //#region ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
7555
- var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7556
- const os = __require("os");
7557
- const tty$1 = __require("tty");
7558
- const hasFlag = require_has_flag();
7559
- const { env } = process;
7560
- let forceColor;
7561
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) forceColor = 0;
7562
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
7563
- if ("FORCE_COLOR" in env) if (env.FORCE_COLOR === "true") forceColor = 1;
7564
- else if (env.FORCE_COLOR === "false") forceColor = 0;
7565
- else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
7566
- function translateLevel(level) {
7567
- if (level === 0) return false;
7568
- return {
7569
- level,
7570
- hasBasic: true,
7571
- has256: level >= 2,
7572
- has16m: level >= 3
7573
- };
7574
- }
7575
- function supportsColor(haveStream, streamIsTTY) {
7576
- if (forceColor === 0) return 0;
7577
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
7578
- if (hasFlag("color=256")) return 2;
7579
- if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
7580
- const min = forceColor || 0;
7581
- if (env.TERM === "dumb") return min;
7582
- if (process.platform === "win32") {
7583
- const osRelease = os.release().split(".");
7584
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
7585
- return 1;
7586
- }
7587
- if ("CI" in env) {
7588
- if ([
7589
- "TRAVIS",
7590
- "CIRCLECI",
7591
- "APPVEYOR",
7592
- "GITLAB_CI",
7593
- "GITHUB_ACTIONS",
7594
- "BUILDKITE"
7595
- ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
7596
- return min;
7597
- }
7598
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
7599
- if (env.COLORTERM === "truecolor") return 3;
7600
- if ("TERM_PROGRAM" in env) {
7601
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
7602
- switch (env.TERM_PROGRAM) {
7603
- case "iTerm.app": return version >= 3 ? 3 : 2;
7604
- case "Apple_Terminal": return 2;
7605
- }
7606
- }
7607
- if (/-256(color)?$/i.test(env.TERM)) return 2;
7608
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
7609
- if ("COLORTERM" in env) return 1;
7610
- return min;
7611
- }
7612
- function getSupportLevel(stream) {
7613
- return translateLevel(supportsColor(stream, stream && stream.isTTY));
7614
- }
7615
- module.exports = {
7616
- supportsColor: getSupportLevel,
7617
- stdout: translateLevel(supportsColor(true, tty$1.isatty(1))),
7618
- stderr: translateLevel(supportsColor(true, tty$1.isatty(2)))
7619
- };
7620
- }));
7621
- //#endregion
7622
7544
  //#region ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
7623
7545
  var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7624
7546
  /**
@@ -7648,7 +7570,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7648
7570
  1
7649
7571
  ];
7650
7572
  try {
7651
- const supportsColor = require_supports_color();
7573
+ const supportsColor = __require("supports-color");
7652
7574
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
7653
7575
  20,
7654
7576
  21,
@@ -29686,6 +29608,17 @@ var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
29686
29608
  * a raw string can't be passed where a validated schedule is expected.
29687
29609
  */
29688
29610
  const cronScheduleSchema$1 = string().trim().min(1, "cron schedule must be a non-empty string").refine(isParseableCron, "must be a valid cron expression").brand();
29611
+ /**
29612
+ * Validates and brands a cron expression for poll triggers. Polls may not fire
29613
+ * more often than once per minute, so only minute-level schedules are allowed:
29614
+ * 5-field expressions and `@daily`-style nicknames. 6-field (seconds)
29615
+ * expressions are rejected — use `parseCronSchedule` for cron triggers.
29616
+ */
29617
+ const pollScheduleSchema = cronScheduleSchema$1.refine(isMinuteLevelCron, "poll schedule must be a 5-field cron (no seconds) — polls fire at most once per minute");
29618
+ /** Nicknames (`@hourly`, …) and 5-field expressions fire at most once per minute. */
29619
+ function isMinuteLevelCron(schedule) {
29620
+ return schedule.startsWith("@") || schedule.split(/\s+/).length === 5;
29621
+ }
29689
29622
  const UTC = "UTC";
29690
29623
  /**
29691
29624
  * Single touchpoint for the `cron-parser` library — every parse, validation,
@@ -29746,7 +29679,7 @@ const triggerSourceSchema$1 = preprocess(normalizeLegacySlugFields$1, discrimina
29746
29679
  kind: literal("poll"),
29747
29680
  ...baseSourceShape$1,
29748
29681
  id: string().optional(),
29749
- schedule: cronScheduleSchema$1,
29682
+ schedule: pollScheduleSchema,
29750
29683
  run: _function(),
29751
29684
  stateSchema: zodSchema$1.optional(),
29752
29685
  filters: array(_function()),
@@ -31047,4 +30980,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
31047
30980
  //#endregion
31048
30981
  export { validatePollGroups as A, attachmentSlugFromRecord as B, pollRouteFromSourceSlug as C, validateAttachmentTargets as D, toStoredRouteManifest as E, webhookManifestAttachmentSchemasFromBindings as F, packAssetDirs as G, computeCallSiteIds as H, webhookMatchSchemaForBindings as I, entryIdFromFile as J, discoverEntries as K, webhookRouteFromEndpoint as L, validateTriggerAttachments as M, validateUniqueAttachmentSlugs as N, validateImportedTriggerAttachment as O, validateUniqueTriggerSourceSlugs as P, walkTypeScriptFiles as Q, workflowKeyForAttachment as R, pollGroupRouteFromId as S, serializeRouteManifest as T, diagnoseWorkflowSource as U, classifyCall as V, locateWorkflow as W, shouldSkipKeystrokeModuleFile as X, readKeystrokeIgnoreDirective as Y, validateUniqueModuleKeys as Z, importAgentDefinition as _, buildStoredRouteManifestForProject as a, persistStoredRouteManifest as b, collectAgentAppSlugs as c, discoverAgentEntries as d, discoverSkillManifestEntries as f, emitStoredRouteManifestForProject as g, discoverWorkflows as h, buildPollGroups as i, validateProjectModules as j, validateImportedWorkflowDefinition as k, collectAgentToolSlugs as l, discoverWorkflowEntries as m, agentManifestEntry as n, buildStoredRouteManifestFromContext as o, discoverTriggerAttachments as p, discoverModuleFileEntries as q, agentRouteFromKey as r, buildWebhookBindingsByRoute as s, agentKeyForAttachment as t, countAgentCredentials as u, importTriggerAttachments as v, schemaToJson as w, pollGroupId as x, importWorkflowDefinition as y, workflowRouteFromKey as z };
31049
30982
 
31050
- //# sourceMappingURL=dist-aQ56wvGQ.mjs.map
30983
+ //# sourceMappingURL=dist-DNsgHccO.mjs.map