@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.
- package/dist/{dist-CtHP_Lct.mjs → dist-BCJ2M6AP.mjs} +58 -5
- package/dist/{dist-CtHP_Lct.mjs.map → dist-BCJ2M6AP.mjs.map} +1 -1
- package/dist/dist-CB-gBQLB.mjs +3 -0
- package/dist/{dist-BBwM8ovO.mjs → dist-CkZVZjrB.mjs} +25 -11
- package/dist/{dist-BBwM8ovO.mjs.map → dist-CkZVZjrB.mjs.map} +1 -1
- package/dist/{dist-Dq8E-oHm.mjs → dist-D3CcImHe.mjs} +3 -3
- package/dist/{dist-Dq8E-oHm.mjs.map → dist-D3CcImHe.mjs.map} +1 -1
- package/dist/index.mjs +172 -35
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-BO0T4n4K.mjs → maybe-auto-update-Cir__-VX.mjs} +2 -2
- package/dist/{maybe-auto-update-BO0T4n4K.mjs.map → maybe-auto-update-Cir__-VX.mjs.map} +1 -1
- package/dist/{version-DCrWhVju.mjs → version-BCmCJixt.mjs} +2 -2
- package/dist/{version-DCrWhVju.mjs.map → version-BCmCJixt.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/dist-DAk65OyX.mjs +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
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
|
|
1388
|
-
const
|
|
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))
|
|
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
|
|
1408
|
+
return slugs;
|
|
1396
1409
|
}
|
|
1397
1410
|
function countAgentCredentials(agent) {
|
|
1398
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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-
|
|
1921
|
+
//# sourceMappingURL=dist-CkZVZjrB.mjs.map
|