@keystrokehq/cli 0.1.162 → 0.1.164
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/README.md +1 -1
- package/dist/{dist-Dg-PHK0j.mjs → dist-CGeyFdzI.mjs} +149 -59
- package/dist/dist-CGeyFdzI.mjs.map +1 -0
- package/dist/dist-CI6ZB7F4.mjs +3 -0
- package/dist/{dist-DeMzV-BR.mjs → dist-DesBaiNo.mjs} +4 -4
- package/dist/{dist-DeMzV-BR.mjs.map → dist-DesBaiNo.mjs.map} +1 -1
- package/dist/dist-Dw_AbB-4.mjs +4 -0
- package/dist/{dist-Cy2nsWsI.mjs → dist-neAmdOvZ.mjs} +28 -7
- package/dist/dist-neAmdOvZ.mjs.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{maybe-auto-update-J-Am1CbS.mjs → maybe-auto-update-B-zGDplJ.mjs} +2 -2
- package/dist/{maybe-auto-update-J-Am1CbS.mjs.map → maybe-auto-update-B-zGDplJ.mjs.map} +1 -1
- package/dist/{program-BWeEKhR_.mjs → program-Ct4qJuBN.mjs} +186 -156
- package/dist/program-Ct4qJuBN.mjs.map +1 -0
- package/dist/{run-package-manager-update-CuLe-Jux.mjs → run-package-manager-update-D6cBQMsZ.mjs} +2 -2
- package/dist/{run-package-manager-update-CuLe-Jux.mjs.map → run-package-manager-update-D6cBQMsZ.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +5 -5
- package/dist/skills-bundle/_AGENTS.md +9 -7
- package/package.json +1 -1
- package/dist/dist-B_Dy4mW_.mjs +0 -3
- package/dist/dist-Cy2nsWsI.mjs.map +0 -1
- package/dist/dist-DMlQ27mb.mjs +0 -4
- package/dist/dist-Dg-PHK0j.mjs.map +0 -1
- package/dist/program-BWeEKhR_.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ keystroke triggers invoke <slug> [--input '{…}'] [--workflow <s> | --agent <s>
|
|
|
56
56
|
keystroke triggers disable|enable <slug> [--workflow <s> | --agent <s>]
|
|
57
57
|
keystroke triggers runs list|get <slug> [--workflow <s> | --agent <s>]
|
|
58
58
|
keystroke apps actions list|get <app> [<tool>]
|
|
59
|
-
keystroke apps execute <app> <tool> --input '{...}'
|
|
59
|
+
keystroke apps execute <app> <tool> --input '{...}' # catalog or custom MCP
|
|
60
60
|
keystroke apps create|delete [<slug>]
|
|
61
61
|
keystroke templates list|show|apply <slug>
|
|
62
62
|
keystroke credentials create|get|rotate|delete <key>
|
|
@@ -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 {
|
|
3
|
+
import { Aa as NEVER, Ca as record, Ci as parseStoredRouteManifest, Da as url, Di as zodToStoredJsonSchema, Ea as unknown, Fi as credentialInputSchema, Gi as PublicModelsResponseSchema, Ii as getOpenApiJsonSchema, Li as normalizeCredentialList, Oa as datetime, On as ProjectArtifactIndexSchema, Ri as requiredDisplayTextSchema, Rn as PromptResponseSchema, Sa as preprocess, Ta as union, _a as literal, aa as ZodIssueCode, ba as object, ca as _function, da as array, fa as boolean$1, ga as lazy, ha as intersection, ia as number$1, ka as safeParse$1, la as _null, ma as discriminatedUnion, oa as ZodType, on as PROJECT_MANIFEST_REL_PATH, pa as custom, sa as _enum, ua as any, va as looseObject, wa as string, xa as optional, xi as parseProjectManifest, ya as number, zi as DEFAULT_CLOUD_PLATFORM_ORIGIN } from "./dist-neAmdOvZ.mjs";
|
|
4
4
|
import "./chunk-4RUAZWKT-D60fyWAB.mjs";
|
|
5
5
|
import "./chunk-SAI2SPQQ-CVRoDNs9.mjs";
|
|
6
6
|
import "./chunk-WNH3HOQA-BCZUOjCJ.mjs";
|
|
@@ -1833,64 +1833,17 @@ function buildWorkflowCanvasGraph(source, options = {}) {
|
|
|
1833
1833
|
return buildGraph(sourceFile, located, { resolveSlug: options.resolveSlug });
|
|
1834
1834
|
}
|
|
1835
1835
|
//#endregion
|
|
1836
|
-
//#region ../../packages/sandbox/dist/sizes-
|
|
1837
|
-
/**
|
|
1836
|
+
//#region ../../packages/sandbox/dist/sizes-CeGfTo5B.mjs
|
|
1837
|
+
/**
|
|
1838
|
+
* Author-facing VM size presets (legacy).
|
|
1839
|
+
* Hosted Modal ignores `size` (small request + burst). Local microsandbox still maps
|
|
1840
|
+
* presets to guest CPU/RAM via {@link resolveSandboxResources}.
|
|
1841
|
+
*/
|
|
1838
1842
|
const SandboxSizeSchema = _enum([
|
|
1839
1843
|
"small",
|
|
1840
1844
|
"medium",
|
|
1841
1845
|
"large"
|
|
1842
1846
|
]);
|
|
1843
|
-
const SIZE_RESOURCES = {
|
|
1844
|
-
small: {
|
|
1845
|
-
cpu: 1,
|
|
1846
|
-
memoryGiB: 1,
|
|
1847
|
-
diskGiB: 3,
|
|
1848
|
-
memoryMiB: 1024
|
|
1849
|
-
},
|
|
1850
|
-
medium: {
|
|
1851
|
-
cpu: 2,
|
|
1852
|
-
memoryGiB: 4,
|
|
1853
|
-
diskGiB: 8,
|
|
1854
|
-
memoryMiB: 4096
|
|
1855
|
-
},
|
|
1856
|
-
large: {
|
|
1857
|
-
cpu: 4,
|
|
1858
|
-
memoryGiB: 8,
|
|
1859
|
-
diskGiB: 10,
|
|
1860
|
-
memoryMiB: 8192
|
|
1861
|
-
}
|
|
1862
|
-
};
|
|
1863
|
-
/**
|
|
1864
|
-
* Daytona pay-as-you-go rates (USD per second of reserved resource).
|
|
1865
|
-
* @see https://www.daytona.io/docs/en/billing/
|
|
1866
|
-
*/
|
|
1867
|
-
const DAYTONA_CPU_USD_PER_SECOND = 14e-6;
|
|
1868
|
-
const DAYTONA_MEMORY_USD_PER_GIB_SECOND = 45e-7;
|
|
1869
|
-
const DAYTONA_DISK_USD_PER_GIB_SECOND = 3e-8;
|
|
1870
|
-
function daytonaSandboxUsdPerSecond(resources) {
|
|
1871
|
-
return resources.cpu * DAYTONA_CPU_USD_PER_SECOND + resources.memoryGiB * DAYTONA_MEMORY_USD_PER_GIB_SECOND + resources.diskGiB * DAYTONA_DISK_USD_PER_GIB_SECOND;
|
|
1872
|
-
}
|
|
1873
|
-
/**
|
|
1874
|
-
* Pass-through µc/s for a size (ceil to match historical small rate: 18.59 → 19).
|
|
1875
|
-
* small 1/1/3 → 19, medium 2/4/8 → 47, large 4/8/10 → 93.
|
|
1876
|
-
*/
|
|
1877
|
-
function vmSecondRateMicroCredits(size) {
|
|
1878
|
-
return Math.ceil(daytonaSandboxUsdPerSecond(resolveSandboxResources(size)) * 1e6);
|
|
1879
|
-
}
|
|
1880
|
-
/**
|
|
1881
|
-
* Scale factor for `vm_second` quantity so `quantity * 19µc` ≈ Daytona cost.
|
|
1882
|
-
* Fractional on purpose — charge math rounds after multiplying the small rate.
|
|
1883
|
-
*/
|
|
1884
|
-
function vmSecondSizeMultiplier(size) {
|
|
1885
|
-
return vmSecondRateMicroCredits(normalizeSandboxSize(size)) / vmSecondRateMicroCredits("small");
|
|
1886
|
-
}
|
|
1887
|
-
vmSecondSizeMultiplier("small"), vmSecondSizeMultiplier("medium"), vmSecondSizeMultiplier("large");
|
|
1888
|
-
function normalizeSandboxSize(size) {
|
|
1889
|
-
return size ?? "small";
|
|
1890
|
-
}
|
|
1891
|
-
function resolveSandboxResources(size) {
|
|
1892
|
-
return SIZE_RESOURCES[normalizeSandboxSize(size)];
|
|
1893
|
-
}
|
|
1894
1847
|
//#endregion
|
|
1895
1848
|
//#region ../../packages/sandbox/dist/resolve-sandbox-definition-Bgbd2rfm.mjs
|
|
1896
1849
|
const SKIP_DIRS$1$1 = new Set([".git", "node_modules"]);
|
|
@@ -1928,7 +1881,7 @@ function runWithAppRoot(appRoot, fn) {
|
|
|
1928
1881
|
return appRootStorage.run(appRoot, fn);
|
|
1929
1882
|
}
|
|
1930
1883
|
//#endregion
|
|
1931
|
-
//#region ../../packages/sandbox/dist/files-
|
|
1884
|
+
//#region ../../packages/sandbox/dist/files-Ds9QSoth.mjs
|
|
1932
1885
|
const SandboxModeSchema = _enum(["in-process", "vm"]);
|
|
1933
1886
|
const SandboxFileContentSchema = object({
|
|
1934
1887
|
path: string(),
|
|
@@ -1957,7 +1910,19 @@ const SandboxGitSchema = object({
|
|
|
1957
1910
|
clone: object({
|
|
1958
1911
|
repository: string().trim().min(1).regex(GITHUB_REPOSITORY_PATTERN, "repository must be \"owner/repo\""),
|
|
1959
1912
|
credential: string().trim().min(1),
|
|
1913
|
+
/** Branch or tag to check out. Ignored when `commit` is set. */
|
|
1960
1914
|
branch: string().trim().min(1).optional(),
|
|
1915
|
+
/**
|
|
1916
|
+
* Full 40-character commit SHA. Checked out after clone/fetch.
|
|
1917
|
+
* Prefer this over `branch` when pinning an exact revision.
|
|
1918
|
+
* Abbreviated SHAs are rejected — `git fetch origin <sha>` requires the full object id.
|
|
1919
|
+
*/
|
|
1920
|
+
commit: string().trim().regex(/^[0-9a-f]{40}$/i, "commit must be a full 40-character hex SHA").optional(),
|
|
1921
|
+
/**
|
|
1922
|
+
* When true (default), use a shallow clone/fetch (`--depth 1`).
|
|
1923
|
+
* Set `false` for full history.
|
|
1924
|
+
*/
|
|
1925
|
+
shallow: boolean$1().optional(),
|
|
1961
1926
|
path: string().trim().min(1).optional()
|
|
1962
1927
|
}),
|
|
1963
1928
|
user: SandboxGitUserSchema.optional()
|
|
@@ -1970,7 +1935,10 @@ object({
|
|
|
1970
1935
|
/** Sandbox execution mode. Defaults to in-process when omitted. */
|
|
1971
1936
|
mode: SandboxModeSchema.optional(),
|
|
1972
1937
|
files: SandboxFilesInputSchema.optional(),
|
|
1973
|
-
/**
|
|
1938
|
+
/**
|
|
1939
|
+
* Legacy VM size preset. Requires `mode: "vm"`. Hosted Modal ignores this;
|
|
1940
|
+
* microsandbox may still map it to guest resources.
|
|
1941
|
+
*/
|
|
1974
1942
|
size: SandboxSizeSchema.optional(),
|
|
1975
1943
|
credentials: array(credentialInputSchema).optional(),
|
|
1976
1944
|
env: SandboxEnvFnSchema.optional(),
|
|
@@ -2910,6 +2878,8 @@ object({
|
|
|
2910
2878
|
repository: string().trim().min(1),
|
|
2911
2879
|
credential: string().trim().min(1),
|
|
2912
2880
|
branch: string().trim().min(1).optional(),
|
|
2881
|
+
commit: string().trim().min(1).optional(),
|
|
2882
|
+
shallow: boolean$1().optional(),
|
|
2913
2883
|
path: string().trim().min(1).optional()
|
|
2914
2884
|
}),
|
|
2915
2885
|
user: object({
|
|
@@ -2966,6 +2936,17 @@ function registerWorkflowRunGetter(fn) {
|
|
|
2966
2936
|
registry().getter = fn;
|
|
2967
2937
|
}
|
|
2968
2938
|
//#endregion
|
|
2939
|
+
//#region ../../packages/app/dist/index.mjs
|
|
2940
|
+
/** Brand for {@link isApp} / agent `tools[]` expansion. */
|
|
2941
|
+
const APP = Symbol.for("keystroke.app");
|
|
2942
|
+
/** True when `value` is a {@link defineApp} result. */
|
|
2943
|
+
function isApp(value) {
|
|
2944
|
+
if (typeof value !== "object" || value === null) return false;
|
|
2945
|
+
if (!(APP in value) || value[APP] !== true) return false;
|
|
2946
|
+
const record = value;
|
|
2947
|
+
return typeof record.slug === "string" && typeof record.action === "function";
|
|
2948
|
+
}
|
|
2949
|
+
//#endregion
|
|
2969
2950
|
//#region ../../packages/agent/dist/agent-model-id-D8Vimsri.mjs
|
|
2970
2951
|
const AGENT_MODEL_ID_PATTERN = /^[a-z0-9-]+\/.+/;
|
|
2971
2952
|
custom((value) => typeof value === "string" && AGENT_MODEL_ID_PATTERN.test(value), "model must be vendor/model-id");
|
|
@@ -25426,6 +25407,77 @@ const platformAgentProjectSnapshotsSqlite = sqliteTable("platform_agent_project_
|
|
|
25426
25407
|
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull(),
|
|
25427
25408
|
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull()
|
|
25428
25409
|
});
|
|
25410
|
+
/**
|
|
25411
|
+
* Org-scoped Modal env Images for project-agent `defineSandbox({ setup })`.
|
|
25412
|
+
* Keyed by setup fingerprint so agents with identical setup share one Image.
|
|
25413
|
+
* No RLS — platform Modal jobs read/write globally by organization id.
|
|
25414
|
+
*/
|
|
25415
|
+
const projectAgentEnvImages = pgTable("project_agent_env_images", {
|
|
25416
|
+
id: text$1("id").primaryKey(),
|
|
25417
|
+
organizationId: text$1("organization_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
25418
|
+
/** sha256 of setup commands + base image name. */
|
|
25419
|
+
setupHash: text$1("setup_hash").notNull(),
|
|
25420
|
+
baseImageName: text$1("base_image_name").notNull(),
|
|
25421
|
+
/** JSON array of setup command strings used for this fingerprint. */
|
|
25422
|
+
setupCommands: text$1("setup_commands").notNull(),
|
|
25423
|
+
modalImageId: text$1("modal_image_id"),
|
|
25424
|
+
buildStatus: text$1("build_status").$type().notNull(),
|
|
25425
|
+
buildStartedAt: timestamp("build_started_at", { withTimezone: true }),
|
|
25426
|
+
lastError: text$1("last_error"),
|
|
25427
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
25428
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
25429
|
+
}, (table) => [uniqueIndex$1("project_agent_env_images_org_hash_idx").on(table.organizationId, table.setupHash)]);
|
|
25430
|
+
const projectAgentEnvImagesSqlite = sqliteTable("project_agent_env_images", {
|
|
25431
|
+
id: text("id").primaryKey(),
|
|
25432
|
+
organizationId: text("organization_id").notNull().references(() => organizationsSqlite.id, { onDelete: "cascade" }),
|
|
25433
|
+
setupHash: text("setup_hash").notNull(),
|
|
25434
|
+
baseImageName: text("base_image_name").notNull(),
|
|
25435
|
+
setupCommands: text("setup_commands").notNull(),
|
|
25436
|
+
modalImageId: text("modal_image_id"),
|
|
25437
|
+
buildStatus: text("build_status").$type().notNull(),
|
|
25438
|
+
buildStartedAt: integer("build_started_at", { mode: "timestamp_ms" }),
|
|
25439
|
+
lastError: text("last_error"),
|
|
25440
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
25441
|
+
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
25442
|
+
}, (table) => [uniqueIndex("project_agent_env_images_org_hash_idx").on(table.organizationId, table.setupHash)]);
|
|
25443
|
+
/**
|
|
25444
|
+
* Control-plane pointers for hosted project-agent (`mode: "vm"`) Modal sandboxes.
|
|
25445
|
+
* Keyed by product `agent_sessions.id`. No RLS — maintenance GC lists globally.
|
|
25446
|
+
*
|
|
25447
|
+
* - `sandbox_id`: live Modal sandbox while warm (cleared on grace detach / GC)
|
|
25448
|
+
* - `modal_image_id`: last successful per-session filesystem Image for cold boot
|
|
25449
|
+
* - `sandbox_last_used_at`: activity clock for warm touch + 24h idle GC
|
|
25450
|
+
*/
|
|
25451
|
+
const projectAgentSessionSandboxes = pgTable("project_agent_session_sandboxes", {
|
|
25452
|
+
sessionId: text$1("session_id").primaryKey(),
|
|
25453
|
+
organizationId: text$1("organization_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
25454
|
+
projectId: text$1("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
25455
|
+
agentId: text$1("agent_id").notNull(),
|
|
25456
|
+
sandboxId: text$1("sandbox_id"),
|
|
25457
|
+
sandboxLastUsedAt: timestamp("sandbox_last_used_at", { withTimezone: true }),
|
|
25458
|
+
modalImageId: text$1("modal_image_id"),
|
|
25459
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
25460
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
25461
|
+
}, (table) => [
|
|
25462
|
+
index$1("project_agent_session_sandboxes_project_idx").on(table.projectId),
|
|
25463
|
+
index$1("project_agent_session_sandboxes_sandbox_last_used_idx").on(table.sandboxLastUsedAt).where(sql`${table.sandboxId} IS NOT NULL`),
|
|
25464
|
+
index$1("project_agent_session_sandboxes_image_last_used_idx").on(table.sandboxLastUsedAt).where(sql`${table.modalImageId} IS NOT NULL`)
|
|
25465
|
+
]);
|
|
25466
|
+
const projectAgentSessionSandboxesSqlite = sqliteTable("project_agent_session_sandboxes", {
|
|
25467
|
+
sessionId: text("session_id").primaryKey(),
|
|
25468
|
+
organizationId: text("organization_id").notNull().references(() => organizationsSqlite.id, { onDelete: "cascade" }),
|
|
25469
|
+
projectId: text("project_id").notNull().references(() => projectsSqlite.id, { onDelete: "cascade" }),
|
|
25470
|
+
agentId: text("agent_id").notNull(),
|
|
25471
|
+
sandboxId: text("sandbox_id"),
|
|
25472
|
+
sandboxLastUsedAt: integer("sandbox_last_used_at", { mode: "timestamp_ms" }),
|
|
25473
|
+
modalImageId: text("modal_image_id"),
|
|
25474
|
+
createdAt: integer("created_at", { mode: "timestamp_ms" }).notNull(),
|
|
25475
|
+
updatedAt: integer("updated_at", { mode: "timestamp_ms" }).notNull()
|
|
25476
|
+
}, (table) => [
|
|
25477
|
+
index("project_agent_session_sandboxes_project_idx").on(table.projectId),
|
|
25478
|
+
index("project_agent_session_sandboxes_sandbox_last_used_idx").on(table.sandboxLastUsedAt).where(sql`${table.sandboxId} IS NOT NULL`),
|
|
25479
|
+
index("project_agent_session_sandboxes_image_last_used_idx").on(table.sandboxLastUsedAt).where(sql`${table.modalImageId} IS NOT NULL`)
|
|
25480
|
+
]);
|
|
25429
25481
|
const publishedForms = pgTable("published_forms", {
|
|
25430
25482
|
id: text$1("id").primaryKey(),
|
|
25431
25483
|
organizationId: text$1("organization_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
@@ -26493,6 +26545,14 @@ const tableRegistry = {
|
|
|
26493
26545
|
pg: platformAgentProjectSnapshots,
|
|
26494
26546
|
sqlite: platformAgentProjectSnapshotsSqlite
|
|
26495
26547
|
},
|
|
26548
|
+
projectAgentSessionSandboxes: {
|
|
26549
|
+
pg: projectAgentSessionSandboxes,
|
|
26550
|
+
sqlite: projectAgentSessionSandboxesSqlite
|
|
26551
|
+
},
|
|
26552
|
+
projectAgentEnvImages: {
|
|
26553
|
+
pg: projectAgentEnvImages,
|
|
26554
|
+
sqlite: projectAgentEnvImagesSqlite
|
|
26555
|
+
},
|
|
26496
26556
|
publishedForms: {
|
|
26497
26557
|
pg: publishedForms,
|
|
26498
26558
|
sqlite: publishedFormsSqlite
|
|
@@ -44853,6 +44913,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
44853
44913
|
exports.visit = visit.visit;
|
|
44854
44914
|
exports.visitAsync = visit.visitAsync;
|
|
44855
44915
|
})))();
|
|
44916
|
+
record(string(), unknown());
|
|
44856
44917
|
new AsyncLocalStorage();
|
|
44857
44918
|
const storage = new AsyncLocalStorage();
|
|
44858
44919
|
registerWorkflowRunGetter(() => {
|
|
@@ -45141,6 +45202,23 @@ function toolCredentialRequirements(tool) {
|
|
|
45141
45202
|
function collectAgentToolRequirements(agent) {
|
|
45142
45203
|
const byTool = {};
|
|
45143
45204
|
for (const tool of agent.tools ?? []) {
|
|
45205
|
+
if (isApp(tool)) {
|
|
45206
|
+
byTool[tool.slug] = [{
|
|
45207
|
+
key: tool.credential.key,
|
|
45208
|
+
kind: tool.credential.kind
|
|
45209
|
+
}];
|
|
45210
|
+
for (const registered of tool.actions) {
|
|
45211
|
+
const slug = registered.action.slug;
|
|
45212
|
+
const requirements = toolCredentialRequirements(registered.action);
|
|
45213
|
+
if (!slug || !requirements?.length) continue;
|
|
45214
|
+
byTool[slug] = normalizeCredentialList(requirements).map((requirement) => ({
|
|
45215
|
+
key: requirement.key,
|
|
45216
|
+
kind: requirement.kind,
|
|
45217
|
+
...requirement.scope ? { scope: requirement.scope } : {}
|
|
45218
|
+
}));
|
|
45219
|
+
}
|
|
45220
|
+
continue;
|
|
45221
|
+
}
|
|
45144
45222
|
const slug = actionSlug(tool);
|
|
45145
45223
|
const requirements = toolCredentialRequirements(tool);
|
|
45146
45224
|
if (!slug || !requirements?.length) continue;
|
|
@@ -45160,6 +45238,10 @@ function collectAgentSandboxRequirements(agent) {
|
|
|
45160
45238
|
function collectAgentAppSlugs(agent) {
|
|
45161
45239
|
const slugs = /* @__PURE__ */ new Set();
|
|
45162
45240
|
for (const tool of agent.tools ?? []) {
|
|
45241
|
+
if (isApp(tool)) {
|
|
45242
|
+
slugs.add(tool.slug);
|
|
45243
|
+
continue;
|
|
45244
|
+
}
|
|
45163
45245
|
const record = tool;
|
|
45164
45246
|
const requirements = isManifestAction(tool) ? getManifestActionCredentialRequirements(tool) : "credentials" in record && Array.isArray(record.credentials) ? record.credentials : void 0;
|
|
45165
45247
|
if (!requirements?.length) continue;
|
|
@@ -45171,6 +45253,11 @@ function collectAgentAppSlugs(agent) {
|
|
|
45171
45253
|
function collectAgentToolSlugs(agent) {
|
|
45172
45254
|
const slugs = [];
|
|
45173
45255
|
for (const tool of agent.tools ?? []) {
|
|
45256
|
+
if (isApp(tool)) {
|
|
45257
|
+
slugs.push(tool.slug);
|
|
45258
|
+
for (const registered of tool.actions) slugs.push(registered.action.slug);
|
|
45259
|
+
continue;
|
|
45260
|
+
}
|
|
45174
45261
|
const slug = actionSlug(tool);
|
|
45175
45262
|
if (slug) slugs.push(slug);
|
|
45176
45263
|
}
|
|
@@ -45183,6 +45270,7 @@ function countAgentCredentials(agent) {
|
|
|
45183
45270
|
function agentManifestEntry(agent, options) {
|
|
45184
45271
|
const toolRequirements = collectAgentToolRequirements(agent);
|
|
45185
45272
|
const sandboxRequirements = collectAgentSandboxRequirements(agent);
|
|
45273
|
+
const sandboxSetup = agent.sandbox?.setup?.map((c) => c.trim()).filter(Boolean);
|
|
45186
45274
|
return {
|
|
45187
45275
|
kind: "agent",
|
|
45188
45276
|
slug: agent.slug,
|
|
@@ -45197,7 +45285,8 @@ function agentManifestEntry(agent, options) {
|
|
|
45197
45285
|
appSlugs: collectAgentAppSlugs(agent),
|
|
45198
45286
|
toolSlugs: collectAgentToolSlugs(agent),
|
|
45199
45287
|
...Object.keys(toolRequirements).length ? { toolRequirements } : {},
|
|
45200
|
-
...sandboxRequirements.length ? { sandboxRequirements } : {}
|
|
45288
|
+
...sandboxRequirements.length ? { sandboxRequirements } : {},
|
|
45289
|
+
...sandboxSetup?.length ? { sandboxSetup } : {}
|
|
45201
45290
|
};
|
|
45202
45291
|
}
|
|
45203
45292
|
function resolveActionFromModule(mod, filePath) {
|
|
@@ -45539,7 +45628,8 @@ function serializeRouteManifest(manifest) {
|
|
|
45539
45628
|
appSlugs: entry.appSlugs,
|
|
45540
45629
|
toolSlugs: entry.toolSlugs,
|
|
45541
45630
|
...entry.toolRequirements ? { toolRequirements: entry.toolRequirements } : {},
|
|
45542
|
-
...entry.sandboxRequirements?.length ? { sandboxRequirements: entry.sandboxRequirements } : {}
|
|
45631
|
+
...entry.sandboxRequirements?.length ? { sandboxRequirements: entry.sandboxRequirements } : {},
|
|
45632
|
+
...entry.sandboxSetup?.length ? { sandboxSetup: entry.sandboxSetup } : {}
|
|
45543
45633
|
});
|
|
45544
45634
|
break;
|
|
45545
45635
|
case "action":
|
|
@@ -46693,4 +46783,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
|
|
|
46693
46783
|
//#endregion
|
|
46694
46784
|
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
46785
|
|
|
46696
|
-
//# sourceMappingURL=dist-
|
|
46786
|
+
//# sourceMappingURL=dist-CGeyFdzI.mjs.map
|