@keystrokehq/cli 1.0.11 → 1.0.12

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { h as emitStoredRouteManifestForProject } from "./dist-CkZVZjrB.mjs";
3
+ export { emitStoredRouteManifestForProject };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Cn as discriminatedUnion, Dn as union, En as string, Et as PromptResponseSchema, On as toJSONSchema, Sn as custom, Tn as object, bn as _function, kt as ROUTE_MANIFEST_REL_PATH, pn as normalizeCredentialList, vn as ZodType, wn as literal, xn as array, yn as _enum } from "./dist-CtHP_Lct.mjs";
2
+ import { An as literal, Dn as array, En as _function, Ft as ROUTE_MANIFEST_REL_PATH, Mn as string, Mt as PromptResponseSchema, Nn as union, On as custom, Pn as toJSONSchema, Tn as _enum, jn as object, kn as discriminatedUnion, wn as ZodType, yn as normalizeCredentialList } from "./dist-BCJ2M6AP.mjs";
3
3
  import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
4
4
  import "./chunk-DLL7UR66-BUYgzxnR.mjs";
5
5
  import "./chunk-TN7HHBQW-CSB_R-XD.mjs";
@@ -1384,22 +1384,34 @@ function isManifestAction(value) {
1384
1384
  function getManifestActionCredentialRequirements(action) {
1385
1385
  return Array.isArray(action.credentials) ? action.credentials : void 0;
1386
1386
  }
1387
- function collectAgentCredentialKeys(agent) {
1388
- const keys = /* @__PURE__ */ new Set();
1387
+ function actionSlug(tool) {
1388
+ const record = tool;
1389
+ return typeof record.slug === "string" ? record.slug : void 0;
1390
+ }
1391
+ /** App-kind slugs required by the agent's tools (same as `credential_instances.app_slug`). */
1392
+ function collectAgentAppSlugs(agent) {
1393
+ const slugs = /* @__PURE__ */ new Set();
1389
1394
  for (const tool of agent.tools ?? []) {
1390
1395
  const record = tool;
1391
1396
  const requirements = isManifestAction(tool) ? getManifestActionCredentialRequirements(tool) : "credentials" in record && Array.isArray(record.credentials) ? record.credentials : void 0;
1392
1397
  if (!requirements?.length) continue;
1393
- for (const requirement of normalizeCredentialList(requirements)) keys.add(requirement.key);
1398
+ for (const requirement of normalizeCredentialList(requirements)) slugs.add(requirement.key);
1399
+ }
1400
+ return [...slugs].sort();
1401
+ }
1402
+ function collectAgentToolSlugs(agent) {
1403
+ const slugs = [];
1404
+ for (const tool of agent.tools ?? []) {
1405
+ const slug = actionSlug(tool);
1406
+ if (slug) slugs.push(slug);
1394
1407
  }
1395
- return [...keys].sort();
1408
+ return slugs;
1396
1409
  }
1397
1410
  function countAgentCredentials(agent) {
1398
- return collectAgentCredentialKeys(agent).length;
1411
+ return collectAgentAppSlugs(agent).length;
1399
1412
  }
1400
1413
  /** Single source of truth for the `kind: "agent"` route-manifest entry shape. */
1401
1414
  function agentManifestEntry(agent, options) {
1402
- const credentialKeys = collectAgentCredentialKeys(agent);
1403
1415
  return {
1404
1416
  kind: "agent",
1405
1417
  slug: agent.slug,
@@ -1410,7 +1422,8 @@ function agentManifestEntry(agent, options) {
1410
1422
  systemPrompt: agent.systemPrompt,
1411
1423
  toolCount: agent.tools?.length ?? 0,
1412
1424
  credentialCount: countAgentCredentials(agent),
1413
- credentialKeys
1425
+ appSlugs: collectAgentAppSlugs(agent),
1426
+ toolSlugs: collectAgentToolSlugs(agent)
1414
1427
  };
1415
1428
  }
1416
1429
  const SKIP_DIRS = new Set([".git", "node_modules"]);
@@ -1487,7 +1500,8 @@ function serializeRouteManifest(manifest) {
1487
1500
  systemPrompt: entry.systemPrompt,
1488
1501
  toolCount: entry.toolCount,
1489
1502
  credentialCount: entry.credentialCount,
1490
- credentialKeys: entry.credentialKeys
1503
+ appSlugs: entry.appSlugs,
1504
+ toolSlugs: entry.toolSlugs
1491
1505
  });
1492
1506
  break;
1493
1507
  case "workflow":
@@ -1902,6 +1916,6 @@ async function emitStoredRouteManifestForProject(projectRoot) {
1902
1916
  persistStoredRouteManifest(projectRoot, await buildStoredRouteManifestForProject(projectRoot));
1903
1917
  }
1904
1918
  //#endregion
1905
- export { discoverEntries as A, validateImportedTriggerAttachment as C, webhookRouteFromEndpoint as D, webhookMatchSchemaForBindings as E, walkTypeScriptFiles as F, entryIdFromFile as M, readKeystrokeIgnoreDirective as N, workflowRouteFromKey as O, shouldSkipKeystrokeModuleFile as P, toStoredRouteManifest as S, webhookManifestAttachmentSchemasFromBindings as T, importWorkflowDefinition as _, buildStoredRouteManifestFromContext as a, schemaToJson as b, countAgentCredentials as c, discoverTriggerAttachments as d, discoverWorkflowEntries as f, importTriggerAttachment as g, importAgentDefinition as h, buildStoredRouteManifestForProject as i, discoverModuleFileEntries as j, packAssetDirs as k, discoverAgentEntries as l, emitStoredRouteManifestForProject as m, agentRouteFromKey as n, buildWebhookBindingsByRoute as o, discoverWorkflows as p, buildPollGroups as r, collectAgentCredentialKeys as s, agentManifestEntry as t, discoverSkillManifestEntries as u, persistStoredRouteManifest as v, validateImportedWorkflowDefinition as w, serializeRouteManifest as x, pollGroupId as y };
1919
+ export { packAssetDirs as A, toStoredRouteManifest as C, webhookMatchSchemaForBindings as D, webhookManifestAttachmentSchemasFromBindings as E, shouldSkipKeystrokeModuleFile as F, walkTypeScriptFiles as I, discoverModuleFileEntries as M, entryIdFromFile as N, webhookRouteFromEndpoint as O, readKeystrokeIgnoreDirective as P, serializeRouteManifest as S, validateImportedWorkflowDefinition as T, importTriggerAttachment as _, buildStoredRouteManifestFromContext as a, pollGroupId as b, collectAgentToolSlugs as c, discoverSkillManifestEntries as d, discoverTriggerAttachments as f, importAgentDefinition as g, emitStoredRouteManifestForProject as h, buildStoredRouteManifestForProject as i, discoverEntries as j, workflowRouteFromKey as k, countAgentCredentials as l, discoverWorkflows as m, agentRouteFromKey as n, buildWebhookBindingsByRoute as o, discoverWorkflowEntries as p, buildPollGroups as r, collectAgentAppSlugs as s, agentManifestEntry as t, discoverAgentEntries as u, importWorkflowDefinition as v, validateImportedTriggerAttachment as w, schemaToJson as x, persistStoredRouteManifest as y };
1906
1920
 
1907
- //# sourceMappingURL=dist-BBwM8ovO.mjs.map
1921
+ //# sourceMappingURL=dist-CkZVZjrB.mjs.map