@keystrokehq/cli 0.1.162 → 0.1.163

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,4 @@
1
+ #!/usr/bin/env node
2
+ import "./dist-BgPOKEEt.mjs";
3
+ import { _ as emitStoredRouteManifestForProject } from "./dist-fy1jz-eq.mjs";
4
+ export { emitStoredRouteManifestForProject };
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { a as buildApp } from "./dist-v54rjb2O.mjs";
3
+ export { buildApp };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __require, r as __toESM, t as __commonJSMin } from "./chunk-DiodbrVj.mjs";
3
- import { Ca as string, Da as datetime, Dn as ProjectArtifactIndexSchema, Ea as url, Ei as zodToStoredJsonSchema, Fi as getOpenApiJsonSchema, Ii as normalizeCredentialList, Li as requiredDisplayTextSchema, Ln as PromptResponseSchema, Oa as safeParse$1, Pi as credentialInputSchema, Ri as DEFAULT_CLOUD_PLATFORM_ORIGIN, Sa as record, Si as parseStoredRouteManifest, Ta as unknown, Wi as PublicModelsResponseSchema, _a as looseObject, aa as ZodType, an as PROJECT_MANIFEST_REL_PATH, ba as optional, bi as parseProjectManifest, ca as _null, da as boolean$1, fa as custom, ga as literal, ha as lazy, ia as ZodIssueCode, ka as NEVER, la as any, ma as intersection, oa as _enum, pa as discriminatedUnion, ra as number$1, sa as _function, ua as array, va as number, wa as union, xa as preprocess, ya as object } from "./dist-Cy2nsWsI.mjs";
3
+ import { Ca as string, Da as datetime, Dn as ProjectArtifactIndexSchema, Ea as url, Ei as zodToStoredJsonSchema, Fi as getOpenApiJsonSchema, Ii as normalizeCredentialList, Li as requiredDisplayTextSchema, Ln as PromptResponseSchema, Oa as safeParse$1, Pi as credentialInputSchema, Ri as DEFAULT_CLOUD_PLATFORM_ORIGIN, Sa as record, Si as parseStoredRouteManifest, Ta as unknown, Wi as PublicModelsResponseSchema, _a as looseObject, aa as ZodType, an as PROJECT_MANIFEST_REL_PATH, ba as optional, bi as parseProjectManifest, ca as _null, da as boolean$1, fa as custom, ga as literal, ha as lazy, ia as ZodIssueCode, ka as NEVER, la as any, ma as intersection, oa as _enum, pa as discriminatedUnion, ra as number$1, sa as _function, ua as array, va as number, wa as union, xa as preprocess, ya as object } from "./dist-BgPOKEEt.mjs";
4
4
  import "./chunk-4RUAZWKT-D60fyWAB.mjs";
5
5
  import "./chunk-SAI2SPQQ-CVRoDNs9.mjs";
6
6
  import "./chunk-WNH3HOQA-BCZUOjCJ.mjs";
@@ -2966,6 +2966,17 @@ function registerWorkflowRunGetter(fn) {
2966
2966
  registry().getter = fn;
2967
2967
  }
2968
2968
  //#endregion
2969
+ //#region ../../packages/app/dist/index.mjs
2970
+ /** Brand for {@link isApp} / agent `tools[]` expansion. */
2971
+ const APP = Symbol.for("keystroke.app");
2972
+ /** True when `value` is a {@link defineApp} result. */
2973
+ function isApp(value) {
2974
+ if (typeof value !== "object" || value === null) return false;
2975
+ if (!(APP in value) || value[APP] !== true) return false;
2976
+ const record = value;
2977
+ return typeof record.slug === "string" && typeof record.action === "function";
2978
+ }
2979
+ //#endregion
2969
2980
  //#region ../../packages/agent/dist/agent-model-id-D8Vimsri.mjs
2970
2981
  const AGENT_MODEL_ID_PATTERN = /^[a-z0-9-]+\/.+/;
2971
2982
  custom((value) => typeof value === "string" && AGENT_MODEL_ID_PATTERN.test(value), "model must be vendor/model-id");
@@ -44853,6 +44864,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
44853
44864
  exports.visit = visit.visit;
44854
44865
  exports.visitAsync = visit.visitAsync;
44855
44866
  })))();
44867
+ record(string(), unknown());
44856
44868
  new AsyncLocalStorage();
44857
44869
  const storage = new AsyncLocalStorage();
44858
44870
  registerWorkflowRunGetter(() => {
@@ -45141,6 +45153,23 @@ function toolCredentialRequirements(tool) {
45141
45153
  function collectAgentToolRequirements(agent) {
45142
45154
  const byTool = {};
45143
45155
  for (const tool of agent.tools ?? []) {
45156
+ if (isApp(tool)) {
45157
+ byTool[tool.slug] = [{
45158
+ key: tool.credential.key,
45159
+ kind: tool.credential.kind
45160
+ }];
45161
+ for (const registered of tool.actions) {
45162
+ const slug = registered.action.slug;
45163
+ const requirements = toolCredentialRequirements(registered.action);
45164
+ if (!slug || !requirements?.length) continue;
45165
+ byTool[slug] = normalizeCredentialList(requirements).map((requirement) => ({
45166
+ key: requirement.key,
45167
+ kind: requirement.kind,
45168
+ ...requirement.scope ? { scope: requirement.scope } : {}
45169
+ }));
45170
+ }
45171
+ continue;
45172
+ }
45144
45173
  const slug = actionSlug(tool);
45145
45174
  const requirements = toolCredentialRequirements(tool);
45146
45175
  if (!slug || !requirements?.length) continue;
@@ -45160,6 +45189,10 @@ function collectAgentSandboxRequirements(agent) {
45160
45189
  function collectAgentAppSlugs(agent) {
45161
45190
  const slugs = /* @__PURE__ */ new Set();
45162
45191
  for (const tool of agent.tools ?? []) {
45192
+ if (isApp(tool)) {
45193
+ slugs.add(tool.slug);
45194
+ continue;
45195
+ }
45163
45196
  const record = tool;
45164
45197
  const requirements = isManifestAction(tool) ? getManifestActionCredentialRequirements(tool) : "credentials" in record && Array.isArray(record.credentials) ? record.credentials : void 0;
45165
45198
  if (!requirements?.length) continue;
@@ -45171,6 +45204,11 @@ function collectAgentAppSlugs(agent) {
45171
45204
  function collectAgentToolSlugs(agent) {
45172
45205
  const slugs = [];
45173
45206
  for (const tool of agent.tools ?? []) {
45207
+ if (isApp(tool)) {
45208
+ slugs.push(tool.slug);
45209
+ for (const registered of tool.actions) slugs.push(registered.action.slug);
45210
+ continue;
45211
+ }
45174
45212
  const slug = actionSlug(tool);
45175
45213
  if (slug) slugs.push(slug);
45176
45214
  }
@@ -46693,4 +46731,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
46693
46731
  //#endregion
46694
46732
  export { artifactIndexFromModules as $, serializeRouteManifest as A, validateProjectModules as B, isModularManifestEmitCacheHit as C, pollRouteFromSourceSlug as D, pollGroupRouteFromId as E, tryReadProjectManifest as F, webhookMatchSchemaForBindings as G, validateUniqueAttachmentSlugs as H, validateAttachmentTargets as I, workflowRouteFromKey as J, webhookRouteFromEndpoint as K, validateImportedTriggerAttachment as L, sha256File as M, splitStoredRouteManifest as N, projectActionsFingerprint as O, toStoredRouteManifest as P, withMcpReadClient as Q, validateImportedWorkflowDefinition as R, integrationPackagesFingerprint as S, pollGroupId as T, validateUniqueTriggerSourceSlugs as U, validateTriggerAttachments as V, webhookManifestAttachmentSchemasFromBindings as W, PublicHttpUrlError as X, attachmentSlugFromRecord as Y, assertPublicHttpUrl as Z, emitStoredRouteManifestForProject as _, configureTelemetry as _t, buildPollGroups as a, computeCallSiteIds as at, importTriggerAttachments as b, shutdownTelemetry as bt, collectAgentAppSlugs as c, discoverEntries as ct, countAgentCredentials as d, readKeystrokeIgnoreDirective as dt, collectArtifactModules as et, discoverAgentEntries as f, shouldSkipKeystrokeModuleFile as ft, discoverWorkflows as g, captureException as gt, discoverWorkflowEntries as h, alias as ht, agentRouteFromKey as i, classifyCall as it, sha256Bytes as j, schemaToJson as k, collectAgentToolSlugs as l, discoverModuleFileEntries as lt, discoverTriggerAttachments as m, walkTypeScriptFiles as mt, agentKeyForAttachment as n, moduleBlobRefsFromModules as nt, buildStoredRouteManifestForProject as o, diagnoseWorkflowSource as ot, discoverSkillManifestEntries as p, validateUniqueModuleKeys as pt, workflowKeyForAttachment as q, agentManifestEntry as r, packDirFromDisk as rt, buildStoredRouteManifestFromContext as s, locateWorkflow as st, actionsCatalogFingerprint as t, mapInParallelBatches as tt, contentHashForModule as u, entryIdFromFile as ut, hashDirectoryContents as v, event as vt, persistModularRouteManifest as w, importWorkflowDefinition as x, importAgentDefinition as y, flushTelemetry as yt, validatePollGroups as z };
46695
46733
 
46696
- //# sourceMappingURL=dist-Dg-PHK0j.mjs.map
46734
+ //# sourceMappingURL=dist-fy1jz-eq.mjs.map