@keystrokehq/cli 1.0.8 → 1.0.9
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-BXi7cRDx.mjs → dist-BBwM8ovO.mjs} +27 -17
- package/dist/{dist-BXi7cRDx.mjs.map → dist-BBwM8ovO.mjs.map} +1 -1
- package/dist/{dist-DR0-KRom.mjs → dist-CtHP_Lct.mjs} +54 -17
- package/dist/{dist-DR0-KRom.mjs.map → dist-CtHP_Lct.mjs.map} +1 -1
- package/dist/dist-DAk65OyX.mjs +3 -0
- package/dist/{dist-CaXYCefX.mjs → dist-Dq8E-oHm.mjs} +3 -3
- package/dist/{dist-CaXYCefX.mjs.map → dist-Dq8E-oHm.mjs.map} +1 -1
- package/dist/index.mjs +66 -9
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-DxAS-9S7.mjs → maybe-auto-update-BO0T4n4K.mjs} +2 -2
- package/dist/{maybe-auto-update-DxAS-9S7.mjs.map → maybe-auto-update-BO0T4n4K.mjs.map} +1 -1
- package/dist/{version-TtPeAEMz.mjs → version-DCrWhVju.mjs} +2 -2
- package/dist/{version-TtPeAEMz.mjs.map → version-DCrWhVju.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-MYk9JAIo.mjs +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Cn as
|
|
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";
|
|
3
3
|
import "./chunk-BZUGFHVS-CPWRFwK8.mjs";
|
|
4
4
|
import "./chunk-DLL7UR66-BUYgzxnR.mjs";
|
|
5
5
|
import "./chunk-TN7HHBQW-CSB_R-XD.mjs";
|
|
@@ -1384,7 +1384,7 @@ function isManifestAction(value) {
|
|
|
1384
1384
|
function getManifestActionCredentialRequirements(action) {
|
|
1385
1385
|
return Array.isArray(action.credentials) ? action.credentials : void 0;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function collectAgentCredentialKeys(agent) {
|
|
1388
1388
|
const keys = /* @__PURE__ */ new Set();
|
|
1389
1389
|
for (const tool of agent.tools ?? []) {
|
|
1390
1390
|
const record = tool;
|
|
@@ -1392,7 +1392,26 @@ function countAgentCredentials(agent) {
|
|
|
1392
1392
|
if (!requirements?.length) continue;
|
|
1393
1393
|
for (const requirement of normalizeCredentialList(requirements)) keys.add(requirement.key);
|
|
1394
1394
|
}
|
|
1395
|
-
return keys.
|
|
1395
|
+
return [...keys].sort();
|
|
1396
|
+
}
|
|
1397
|
+
function countAgentCredentials(agent) {
|
|
1398
|
+
return collectAgentCredentialKeys(agent).length;
|
|
1399
|
+
}
|
|
1400
|
+
/** Single source of truth for the `kind: "agent"` route-manifest entry shape. */
|
|
1401
|
+
function agentManifestEntry(agent, options) {
|
|
1402
|
+
const credentialKeys = collectAgentCredentialKeys(agent);
|
|
1403
|
+
return {
|
|
1404
|
+
kind: "agent",
|
|
1405
|
+
slug: agent.slug,
|
|
1406
|
+
moduleFile: options.moduleFile,
|
|
1407
|
+
name: agent.name,
|
|
1408
|
+
description: agent.description,
|
|
1409
|
+
model: agent.model,
|
|
1410
|
+
systemPrompt: agent.systemPrompt,
|
|
1411
|
+
toolCount: agent.tools?.length ?? 0,
|
|
1412
|
+
credentialCount: countAgentCredentials(agent),
|
|
1413
|
+
credentialKeys
|
|
1414
|
+
};
|
|
1396
1415
|
}
|
|
1397
1416
|
const SKIP_DIRS = new Set([".git", "node_modules"]);
|
|
1398
1417
|
function toPosix$1(path) {
|
|
@@ -1467,7 +1486,8 @@ function serializeRouteManifest(manifest) {
|
|
|
1467
1486
|
model: entry.model,
|
|
1468
1487
|
systemPrompt: entry.systemPrompt,
|
|
1469
1488
|
toolCount: entry.toolCount,
|
|
1470
|
-
credentialCount: entry.credentialCount
|
|
1489
|
+
credentialCount: entry.credentialCount,
|
|
1490
|
+
credentialKeys: entry.credentialKeys
|
|
1471
1491
|
});
|
|
1472
1492
|
break;
|
|
1473
1493
|
case "workflow":
|
|
@@ -1793,17 +1813,7 @@ async function buildStoredRouteManifestForProject(projectRoot, options) {
|
|
|
1793
1813
|
for (const entry of agentEntries) {
|
|
1794
1814
|
const agent = await importAgentDefinition(entry.filePath, reload);
|
|
1795
1815
|
const moduleFile = await sourcePaths.resolve("agents", "agent", dirs.agentsDir, entry.filePath);
|
|
1796
|
-
manifest.push({
|
|
1797
|
-
kind: "agent",
|
|
1798
|
-
slug: agent.slug,
|
|
1799
|
-
moduleFile,
|
|
1800
|
-
name: agent.name,
|
|
1801
|
-
description: agent.description,
|
|
1802
|
-
model: agent.model,
|
|
1803
|
-
systemPrompt: agent.systemPrompt,
|
|
1804
|
-
toolCount: agent.tools?.length ?? 0,
|
|
1805
|
-
credentialCount: countAgentCredentials(agent)
|
|
1806
|
-
});
|
|
1816
|
+
manifest.push(agentManifestEntry(agent, { moduleFile }));
|
|
1807
1817
|
}
|
|
1808
1818
|
const workflows = await discoverWorkflows(dirs.workflowsDir, reload);
|
|
1809
1819
|
for (const workflow of workflows) {
|
|
@@ -1892,6 +1902,6 @@ async function emitStoredRouteManifestForProject(projectRoot) {
|
|
|
1892
1902
|
persistStoredRouteManifest(projectRoot, await buildStoredRouteManifestForProject(projectRoot));
|
|
1893
1903
|
}
|
|
1894
1904
|
//#endregion
|
|
1895
|
-
export {
|
|
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 };
|
|
1896
1906
|
|
|
1897
|
-
//# sourceMappingURL=dist-
|
|
1907
|
+
//# sourceMappingURL=dist-BBwM8ovO.mjs.map
|