@keystrokehq/cli 0.1.36 → 0.1.37

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.
@@ -22055,13 +22055,18 @@ const triggerAttachmentCoreSchema = preprocess(normalizeLegacySlugFields, discri
22055
22055
  agent: agentSchema,
22056
22056
  prompt: promptSchema
22057
22057
  })]));
22058
- function isManifestTriggerAttachment(value) {
22059
- if (typeof value !== "object" || value === null) return false;
22060
- if (!(TRIGGER_ATTACHMENT in value) || value[TRIGGER_ATTACHMENT] !== true) return false;
22061
- return triggerAttachmentCoreSchema.safeParse(value).success;
22058
+ function isBrandedTriggerAttachment(value) {
22059
+ return typeof value === "object" && value !== null && TRIGGER_ATTACHMENT in value && value[TRIGGER_ATTACHMENT] === true;
22060
+ }
22061
+ function formatIssues(issues) {
22062
+ return issues.map((issue) => {
22063
+ return `${issue.path.length > 0 ? `${issue.path.join(".")}: ` : ""}${issue.message}`;
22064
+ }).join("; ");
22062
22065
  }
22063
22066
  function validateManifestTriggerAttachment(value, filePath) {
22064
- if (!isManifestTriggerAttachment(value)) throw new Error(`${filePath} must default-export a trigger attachment from .attach({ workflow }) or .attach({ agent, prompt })`);
22067
+ if (!isBrandedTriggerAttachment(value)) throw new Error(`${filePath} must default-export a trigger attachment from .attach({ workflow }) or .attach({ agent, prompt })`);
22068
+ const result = triggerAttachmentCoreSchema.safeParse(value);
22069
+ if (!result.success) throw new Error(`${filePath}: invalid trigger attachment: ${formatIssues(result.error.issues)}`);
22065
22070
  return value;
22066
22071
  }
22067
22072
  function shouldDiscoverTriggerFile(triggersDir, filePath) {
@@ -22632,4 +22637,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
22632
22637
  //#endregion
22633
22638
  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 };
22634
22639
 
22635
- //# sourceMappingURL=dist-C_L-HHc0.mjs.map
22640
+ //# sourceMappingURL=dist-B6z1wti6.mjs.map