@keystrokehq/cli 0.0.133 → 0.0.136

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/index.mjs CHANGED
@@ -1893,6 +1893,7 @@ const serializedRouteManifestEntrySchema = discriminatedUnion("kind", [
1893
1893
  kind: literal("agent"),
1894
1894
  method: literal("POST"),
1895
1895
  path: string(),
1896
+ agentSlug: string(),
1896
1897
  moduleFile: string(),
1897
1898
  requestSchema: record(string(), unknown()),
1898
1899
  responseSchema: record(string(), unknown())
@@ -1901,21 +1902,21 @@ const serializedRouteManifestEntrySchema = discriminatedUnion("kind", [
1901
1902
  kind: literal("agent-sessions-list"),
1902
1903
  method: literal("GET"),
1903
1904
  path: string(),
1904
- agentId: string(),
1905
+ agentSlug: string(),
1905
1906
  moduleFile: string()
1906
1907
  }),
1907
1908
  object({
1908
1909
  kind: literal("agent-session-detail"),
1909
1910
  method: literal("GET"),
1910
1911
  path: string(),
1911
- agentId: string(),
1912
+ agentSlug: string(),
1912
1913
  moduleFile: string()
1913
1914
  }),
1914
1915
  object({
1915
1916
  kind: literal("workflow"),
1916
1917
  method: literal("POST"),
1917
1918
  path: string(),
1918
- workflowId: string(),
1919
+ workflowSlug: string(),
1919
1920
  workflowName: string().optional(),
1920
1921
  moduleFile: string(),
1921
1922
  requestSchema: record(string(), unknown()),
@@ -1925,7 +1926,7 @@ const serializedRouteManifestEntrySchema = discriminatedUnion("kind", [
1925
1926
  kind: literal("workflow-runs-list"),
1926
1927
  method: literal("GET"),
1927
1928
  path: string(),
1928
- workflowId: string(),
1929
+ workflowSlug: string(),
1929
1930
  workflowName: string().optional(),
1930
1931
  moduleFile: string()
1931
1932
  }),
@@ -1933,7 +1934,7 @@ const serializedRouteManifestEntrySchema = discriminatedUnion("kind", [
1933
1934
  kind: literal("workflow-run-detail"),
1934
1935
  method: literal("GET"),
1935
1936
  path: string(),
1936
- workflowId: string(),
1937
+ workflowSlug: string(),
1937
1938
  workflowName: string().optional(),
1938
1939
  moduleFile: string()
1939
1940
  }),
@@ -2104,7 +2105,6 @@ const UserOrganizationSchema = object({
2104
2105
  });
2105
2106
  const ActiveOrganizationResponseSchema = object({ organization: UserOrganizationSchema.nullable() });
2106
2107
  const ListOrganizationsResponseSchema = object({ organizations: array(UserOrganizationSchema) });
2107
- const SetActiveOrganizationRequestSchema = object({ organizationId: string().min(1) });
2108
2108
  const CreateOrganizationRequestSchema = object({
2109
2109
  name: string().trim().min(1),
2110
2110
  /** Format-only at the wire boundary; reserved-name checks run in platform-database. */
@@ -2270,7 +2270,7 @@ const WorkflowRunSummarySchema = object({
2270
2270
  });
2271
2271
  const WorkflowRunRecordSchema = object({
2272
2272
  id: string(),
2273
- workflowKey: string(),
2273
+ workflowSlug: string(),
2274
2274
  status: WorkflowRunStatusSchema,
2275
2275
  trigger: WorkflowRunTriggerSchema,
2276
2276
  triggeredAt: string(),
@@ -2305,7 +2305,7 @@ object({ include: string().optional() });
2305
2305
  const TriggerRunDetailSchema = object({
2306
2306
  id: string(),
2307
2307
  attachmentId: string(),
2308
- attachmentKey: string().nullable(),
2308
+ attachmentSlug: string().nullable(),
2309
2309
  triggerType: _enum([
2310
2310
  "cron",
2311
2311
  "webhook",
@@ -2324,10 +2324,10 @@ const WorkflowStepRunSchema = object({
2324
2324
  const TraceTriggerSummarySchema = object({
2325
2325
  triggerType: string(),
2326
2326
  triggerRunId: string(),
2327
- workflowKey: string().optional(),
2328
- agentKey: string().optional(),
2327
+ workflowSlug: string().optional(),
2328
+ agentSlug: string().optional(),
2329
2329
  attachmentId: string().nullable().optional(),
2330
- attachmentKey: string().nullable().optional(),
2330
+ attachmentSlug: string().nullable().optional(),
2331
2331
  route: string().optional(),
2332
2332
  sourcePath: string().nullable().optional()
2333
2333
  }).nullable();
@@ -2391,7 +2391,7 @@ const AgentSessionSummarySchema = object({
2391
2391
  });
2392
2392
  const AgentSessionRecordSchema = object({
2393
2393
  id: string(),
2394
- agentKey: string(),
2394
+ agentSlug: string(),
2395
2395
  status: AgentSessionStatusSchema,
2396
2396
  source: RunSourceKindSchema,
2397
2397
  sourceId: string().nullable(),
@@ -2421,7 +2421,7 @@ object({ include: string().optional() });
2421
2421
  const GatewaySessionDetailSchema = object({
2422
2422
  threadId: string(),
2423
2423
  attachmentId: string(),
2424
- attachmentKey: string().nullable()
2424
+ attachmentSlug: string().nullable()
2425
2425
  });
2426
2426
  const AgentEventSchema = object({
2427
2427
  id: string(),
@@ -2516,11 +2516,11 @@ const TriggerRunTypeSchema = _enum([
2516
2516
  const TriggerRunWorkflowSummarySchema = object({
2517
2517
  id: string(),
2518
2518
  status: WorkflowRunStatusSchema,
2519
- workflowKey: string()
2519
+ workflowSlug: string()
2520
2520
  });
2521
2521
  const TriggerRunAgentSessionSummarySchema = object({
2522
2522
  id: string(),
2523
- agentKey: string()
2523
+ agentSlug: string()
2524
2524
  });
2525
2525
  const TriggerRunSummarySchema = object({
2526
2526
  id: string(),
@@ -2533,7 +2533,7 @@ const TriggerRunSummarySchema = object({
2533
2533
  const TriggerRunRecordSchema = object({
2534
2534
  id: string(),
2535
2535
  attachmentId: string(),
2536
- attachmentKey: string(),
2536
+ attachmentSlug: string(),
2537
2537
  triggerType: TriggerRunTypeSchema,
2538
2538
  sourcePath: string().nullable(),
2539
2539
  payload: unknown().nullable(),
@@ -2556,7 +2556,7 @@ _enum([
2556
2556
  object({ include: string().optional() });
2557
2557
  const TriggerRunAgentSessionDetailSchema = object({
2558
2558
  id: string(),
2559
- agentKey: string()
2559
+ agentSlug: string()
2560
2560
  });
2561
2561
  const TriggerRunDetailResponseSchema = object({
2562
2562
  run: TriggerRunRecordSchema,
@@ -2699,6 +2699,7 @@ const optionalCount = number$1().int().nonnegative().nullable().optional();
2699
2699
  const optionalTimestamp = string().nullable().optional();
2700
2700
  const AgentSummarySchema = object({
2701
2701
  id: string().min(1),
2702
+ slug: string().min(1),
2702
2703
  name: string().min(1),
2703
2704
  projectId: string().min(1),
2704
2705
  updatedAt: string().min(1),
@@ -2711,16 +2712,17 @@ const AgentSummarySchema = object({
2711
2712
  });
2712
2713
  const WorkflowSummarySchema = object({
2713
2714
  id: string().min(1),
2715
+ slug: string().min(1),
2714
2716
  name: string().min(1),
2715
2717
  projectId: string().min(1),
2716
2718
  updatedAt: string().min(1),
2717
2719
  description: string().optional(),
2718
2720
  sourcePath: string().min(1).optional(),
2719
- stepCount: optionalCount,
2720
2721
  lastRunAt: optionalTimestamp
2721
2722
  });
2722
2723
  const SkillSummarySchema = object({
2723
2724
  id: string().min(1),
2725
+ slug: string().min(1),
2724
2726
  name: string().min(1),
2725
2727
  projectId: string().min(1),
2726
2728
  updatedAt: string().min(1),
@@ -2765,9 +2767,9 @@ const ProjectFileSummarySchema = object({
2765
2767
  path: string().min(1),
2766
2768
  hash: sha256Hex
2767
2769
  });
2768
- /** Maps a runtime resource key (agent/workflow/skill) to its source file path. */
2770
+ /** Maps a runtime resource slug (agent/workflow/skill) to its source file path. */
2769
2771
  const ProjectSourceResourceRefSchema = object({
2770
- key: string().min(1),
2772
+ slug: string().min(1),
2771
2773
  path: string().min(1)
2772
2774
  });
2773
2775
  const ProjectSourceResourcesSchema = object({
@@ -5068,10 +5070,22 @@ function createHealthResource(http) {
5068
5070
  } };
5069
5071
  }
5070
5072
  function createOrganizationsResource(http, options = {}) {
5073
+ async function get(organizationId) {
5074
+ try {
5075
+ const data = await http.get(`/api/organizations/${organizationId}`).json();
5076
+ const organization = ActiveOrganizationResponseSchema.parse(data).organization;
5077
+ if (!organization) throw new Error("Organization was not returned");
5078
+ return organization;
5079
+ } catch (error) {
5080
+ throw await toPlatformError(error);
5081
+ }
5082
+ }
5071
5083
  async function update(input) {
5072
5084
  const body = UpdateOrganizationRequestSchema.parse(input);
5085
+ const organizationId = options.getActiveOrganizationId?.();
5086
+ if (!organizationId) throw new Error("No active organization");
5073
5087
  try {
5074
- const data = await http.patch("/api/organizations/active", { json: body }).json();
5088
+ const data = await http.patch(`/api/organizations/${organizationId}`, { json: body }).json();
5075
5089
  const organization = ActiveOrganizationResponseSchema.parse(data).organization;
5076
5090
  if (!organization) throw new Error("Active organization was not returned");
5077
5091
  return organization;
@@ -5088,34 +5102,27 @@ function createOrganizationsResource(http, options = {}) {
5088
5102
  throw await toPlatformError(error);
5089
5103
  }
5090
5104
  },
5105
+ get,
5091
5106
  async getActive() {
5107
+ const organizationId = options.getActiveOrganizationId?.();
5108
+ if (!organizationId) return null;
5092
5109
  try {
5093
- const data = await http.get("/api/organizations/active").json();
5094
- return ActiveOrganizationResponseSchema.parse(data).organization;
5110
+ return await get(organizationId);
5095
5111
  } catch (error) {
5096
- if (isHTTPError(error) && error.response.status === 401) return null;
5097
- throw await toPlatformError(error);
5112
+ if (error instanceof PlatformError && (error.status === 401 || error.status === 403)) return null;
5113
+ if (isHTTPError(error) && (error.response.status === 401 || error.response.status === 403)) return null;
5114
+ throw error instanceof PlatformError ? error : await toPlatformError(error);
5098
5115
  }
5099
5116
  },
5100
5117
  async setActive(input) {
5101
- const body = SetActiveOrganizationRequestSchema.parse(input);
5102
- try {
5103
- const data = await http.post("/api/organizations/active", { json: body }).json();
5104
- const organization = ActiveOrganizationResponseSchema.parse(data).organization;
5105
- if (!organization) throw new Error("Active organization was not returned");
5106
- options.onActiveOrganizationChange?.(organization.organization.id);
5107
- return organization;
5108
- } catch (error) {
5109
- throw await toPlatformError(error);
5110
- }
5118
+ const organizationId = input.organizationId.trim();
5119
+ if (!organizationId) throw new Error("Organization id is required");
5120
+ const membership = await get(organizationId);
5121
+ options.onActiveOrganizationChange?.(organizationId);
5122
+ return membership;
5111
5123
  },
5112
5124
  async clearActive() {
5113
- try {
5114
- await http.delete("/api/organizations/active");
5115
- options.onActiveOrganizationChange?.(null);
5116
- } catch (error) {
5117
- throw await toPlatformError(error);
5118
- }
5125
+ options.onActiveOrganizationChange?.(null);
5119
5126
  },
5120
5127
  update,
5121
5128
  async create(input) {
@@ -5127,9 +5134,9 @@ function createOrganizationsResource(http, options = {}) {
5127
5134
  throw await toPlatformError(error);
5128
5135
  }
5129
5136
  },
5130
- async checkSlug(slug, options = {}) {
5137
+ async checkSlug(slug, slugOptions = {}) {
5131
5138
  const searchParams = new URLSearchParams({ slug });
5132
- if (options.excludeOrganizationId) searchParams.set("excludeOrganizationId", options.excludeOrganizationId);
5139
+ if (slugOptions.excludeOrganizationId) searchParams.set("excludeOrganizationId", slugOptions.excludeOrganizationId);
5133
5140
  try {
5134
5141
  const data = await http.get(`/api/organizations/slug-available?${searchParams}`).json();
5135
5142
  return SlugAvailabilityResponseSchema.parse(data);
@@ -5212,11 +5219,15 @@ function createProjectMetricsResource(http) {
5212
5219
  }
5213
5220
  } };
5214
5221
  }
5222
+ function listSearchParams$2(options) {
5223
+ const projectId = options?.projectId?.trim();
5224
+ return projectId ? { projectId } : void 0;
5225
+ }
5215
5226
  function createAgentsResource(http) {
5216
5227
  return {
5217
- async list() {
5228
+ async list(options) {
5218
5229
  try {
5219
- const data = await http.get("/api/agents").json();
5230
+ const data = await http.get("/api/agents", { searchParams: listSearchParams$2(options) }).json();
5220
5231
  return AgentSummaryListResponseSchema.parse(data);
5221
5232
  } catch (error) {
5222
5233
  throw await toPlatformError(error);
@@ -5232,11 +5243,15 @@ function createAgentsResource(http) {
5232
5243
  }
5233
5244
  };
5234
5245
  }
5246
+ function listSearchParams$1(options) {
5247
+ const projectId = options?.projectId?.trim();
5248
+ return projectId ? { projectId } : void 0;
5249
+ }
5235
5250
  function createWorkflowsResource(http) {
5236
5251
  return {
5237
- async list() {
5252
+ async list(options) {
5238
5253
  try {
5239
- const data = await http.get("/api/workflows").json();
5254
+ const data = await http.get("/api/workflows", { searchParams: listSearchParams$1(options) }).json();
5240
5255
  return WorkflowSummaryListResponseSchema.parse(data);
5241
5256
  } catch (error) {
5242
5257
  throw await toPlatformError(error);
@@ -5252,11 +5267,15 @@ function createWorkflowsResource(http) {
5252
5267
  }
5253
5268
  };
5254
5269
  }
5270
+ function listSearchParams(options) {
5271
+ const projectId = options?.projectId?.trim();
5272
+ return projectId ? { projectId } : void 0;
5273
+ }
5255
5274
  function createSkillsResource(http) {
5256
5275
  return {
5257
- async list() {
5276
+ async list(options) {
5258
5277
  try {
5259
- const data = await http.get("/api/skills").json();
5278
+ const data = await http.get("/api/skills", { searchParams: listSearchParams(options) }).json();
5260
5279
  return SkillSummaryListResponseSchema.parse(data);
5261
5280
  } catch (error) {
5262
5281
  throw await toPlatformError(error);
@@ -6779,6 +6798,7 @@ const credentialSeed = [
6779
6798
  ];
6780
6799
  const agentSeed = [{
6781
6800
  id: "agent-support",
6801
+ slug: "support-agent",
6782
6802
  name: "Support Agent",
6783
6803
  projectId: "project_personal_repo",
6784
6804
  updatedAt: "2026-06-02T14:20:00Z",
@@ -6790,6 +6810,7 @@ const agentSeed = [{
6790
6810
  lastRunAt: "2026-06-02T14:20:00Z"
6791
6811
  }, {
6792
6812
  id: "agent-research",
6813
+ slug: "research-agent",
6793
6814
  name: "Research Agent",
6794
6815
  projectId: "project_personal_repo",
6795
6816
  updatedAt: "2026-06-01T09:15:00Z",
@@ -6802,21 +6823,21 @@ const agentSeed = [{
6802
6823
  }];
6803
6824
  const workflowSeed = [{
6804
6825
  id: "workflow-daily-digest",
6826
+ slug: "daily-digest",
6805
6827
  name: "Daily Digest",
6806
6828
  projectId: "project_personal_repo",
6807
6829
  updatedAt: "2026-06-02T11:05:00Z",
6808
6830
  description: "Collect project updates and send a daily summary.",
6809
6831
  sourcePath: "src/workflows/daily-digest.ts",
6810
- stepCount: 2,
6811
6832
  lastRunAt: "2026-06-02T11:05:00Z"
6812
6833
  }, {
6813
6834
  id: "workflow-email-triage",
6835
+ slug: "email-triage",
6814
6836
  name: "Email Triage",
6815
6837
  projectId: "project_personal_repo",
6816
6838
  updatedAt: "2026-05-31T16:40:00Z",
6817
6839
  description: "Label, prioritize, and draft replies for inbound email.",
6818
6840
  sourcePath: "src/workflows/email-triage.ts",
6819
- stepCount: 4,
6820
6841
  lastRunAt: "2026-05-31T16:40:00Z"
6821
6842
  }];
6822
6843
  /** Review personas for mocked project members and API key authors (not org membership). */
@@ -7149,15 +7170,11 @@ function buildFailedUsage(durationMs) {
7149
7170
  totalExcludingDurationUsd: .021
7150
7171
  };
7151
7172
  }
7152
- function workflowKeyFromId(workflowId) {
7153
- const row = workflowSeed.find((workflow) => workflow.id === workflowId);
7154
- if (!row?.sourcePath) return workflowId;
7155
- return row.sourcePath.match(/\/([^/]+)\.ts$/)?.[1] ?? workflowId;
7173
+ function workflowSlugFromId(workflowId) {
7174
+ return workflowSeed.find((workflow) => workflow.id === workflowId)?.slug ?? workflowId;
7156
7175
  }
7157
- function agentKeyFromId(agentId) {
7158
- const row = agentSeed.find((agent) => agent.id === agentId);
7159
- if (!row?.sourcePath) return agentId;
7160
- return row.sourcePath.match(/\/([^/]+)\.ts$/)?.[1] ?? agentId;
7176
+ function agentSlugFromId(agentId) {
7177
+ return agentSeed.find((agent) => agent.id === agentId)?.slug ?? agentId;
7161
7178
  }
7162
7179
  const historyRunSeed = [
7163
7180
  {
@@ -7166,7 +7183,7 @@ const historyRunSeed = [
7166
7183
  traceId: "run-support-agent-001",
7167
7184
  projectId: "project_personal_repo",
7168
7185
  projectName: historyProjectNameById.project_personal_repo ?? "Project",
7169
- resourceKey: agentKeyFromId("agent-support"),
7186
+ resourceKey: agentSlugFromId("agent-support"),
7170
7187
  resourceId: "agent-support",
7171
7188
  resourceName: "Support Agent",
7172
7189
  status: "completed",
@@ -7189,7 +7206,7 @@ const historyRunSeed = [
7189
7206
  traceId: "run-daily-digest-001",
7190
7207
  projectId: "project_personal_repo",
7191
7208
  projectName: historyProjectNameById.project_personal_repo ?? "Project",
7192
- resourceKey: workflowKeyFromId("workflow-daily-digest"),
7209
+ resourceKey: workflowSlugFromId("workflow-daily-digest"),
7193
7210
  resourceId: "workflow-daily-digest",
7194
7211
  resourceName: "Daily Digest",
7195
7212
  status: "running",
@@ -7212,7 +7229,7 @@ const historyRunSeed = [
7212
7229
  traceId: "run-support-agent-000",
7213
7230
  projectId: "project_personal_repo",
7214
7231
  projectName: historyProjectNameById.project_personal_repo ?? "Project",
7215
- resourceKey: agentKeyFromId("agent-support"),
7232
+ resourceKey: agentSlugFromId("agent-support"),
7216
7233
  resourceId: "agent-support",
7217
7234
  resourceName: "Support Agent",
7218
7235
  status: "failed",
@@ -7235,7 +7252,7 @@ const historyRunSeed = [
7235
7252
  traceId: "run-email-triage-002",
7236
7253
  projectId: "project_personal_repo",
7237
7254
  projectName: historyProjectNameById.project_personal_repo ?? "Project",
7238
- resourceKey: workflowKeyFromId("workflow-email-triage"),
7255
+ resourceKey: workflowSlugFromId("workflow-email-triage"),
7239
7256
  resourceId: "workflow-email-triage",
7240
7257
  resourceName: "Email Triage",
7241
7258
  status: "failed",
@@ -7258,7 +7275,7 @@ const historyRunSeed = [
7258
7275
  traceId: "run-research-agent-003",
7259
7276
  projectId: "project_personal_repo",
7260
7277
  projectName: historyProjectNameById.project_personal_repo ?? "Project",
7261
- resourceKey: agentKeyFromId("agent-research"),
7278
+ resourceKey: agentSlugFromId("agent-research"),
7262
7279
  resourceId: "agent-research",
7263
7280
  resourceName: "Research Agent",
7264
7281
  status: "completed",
@@ -7727,19 +7744,24 @@ async function presignPutAndFinalize(input) {
7727
7744
  throw await input.toPlatformError(error);
7728
7745
  }
7729
7746
  }
7730
- function createOrganizationSidebarBrandingResource(http) {
7747
+ function createOrganizationSidebarBrandingResource(http, options = {}) {
7748
+ function brandingPath() {
7749
+ const organizationId = options.getActiveOrganizationId?.();
7750
+ if (!organizationId) throw new Error("No active organization");
7751
+ return `/api/organizations/${organizationId}/branding`;
7752
+ }
7731
7753
  async function presignLogoUpload(variant, contentType) {
7732
7754
  const body = PresignOrgLogoRequestSchema.parse({
7733
7755
  variant,
7734
7756
  contentType
7735
7757
  });
7736
- const data = await http.post("/api/organizations/active/branding/logo/presign", { json: body }).json();
7758
+ const data = await http.post(`${brandingPath()}/logo/presign`, { json: body }).json();
7737
7759
  return PresignOrgLogoResponseSchema.parse(data);
7738
7760
  }
7739
7761
  return {
7740
7762
  async get() {
7741
7763
  try {
7742
- const data = await http.get("/api/organizations/active/branding").json();
7764
+ const data = await http.get(brandingPath()).json();
7743
7765
  return OrganizationSidebarBrandingSchema.parse(data);
7744
7766
  } catch (error) {
7745
7767
  throw await toPlatformError(error);
@@ -7766,7 +7788,7 @@ function createOrganizationSidebarBrandingResource(http) {
7766
7788
  async update(patch) {
7767
7789
  const body = OrganizationSidebarBrandingPatchSchema.parse(patch);
7768
7790
  try {
7769
- const data = await http.patch("/api/organizations/active/branding", { json: body }).json();
7791
+ const data = await http.patch(brandingPath(), { json: body }).json();
7770
7792
  return OrganizationSidebarBrandingSchema.parse(data);
7771
7793
  } catch (error) {
7772
7794
  throw await toPlatformError(error);
@@ -8583,7 +8605,7 @@ function createPlatformClient(options) {
8583
8605
  recents: createRecentsResource(http),
8584
8606
  userPreferences: createUserPreferencesResource({ getCurrentUserId: options.getCurrentUserId }),
8585
8607
  userAvatar: createUserAvatarResource(http),
8586
- organizationSidebarBranding: createOrganizationSidebarBrandingResource(http),
8608
+ organizationSidebarBranding: createOrganizationSidebarBrandingResource(http, { getActiveOrganizationId: () => activeOrganizationId }),
8587
8609
  getActiveOrganizationId: () => activeOrganizationId,
8588
8610
  setActiveOrganizationId
8589
8611
  };
@@ -9470,9 +9492,9 @@ function collectModuleRefs(srcRoot, root, files, subdir, nestedEntry) {
9470
9492
  const refs = [];
9471
9493
  for (const file of files) {
9472
9494
  if (!file.path.startsWith(prefix) || !/\.(ts|mts)$/.test(file.path)) continue;
9473
- const key = entryIdFromFile(dir, join(root, file.path), { nestedEntry });
9474
- if (key) refs.push({
9475
- key,
9495
+ const slug = entryIdFromFile(dir, join(root, file.path), { nestedEntry });
9496
+ if (slug) refs.push({
9497
+ slug,
9476
9498
  path: file.path
9477
9499
  });
9478
9500
  }
@@ -9484,9 +9506,9 @@ function collectSkillRefs(srcRoot, root, files) {
9484
9506
  const refs = [];
9485
9507
  for (const file of files) {
9486
9508
  if (!file.path.startsWith(prefix) || !file.path.endsWith("SKILL.md")) continue;
9487
- const key = toPosix(relative(dir, join(root, file.path)).replace(/\/?SKILL\.md$/, ""));
9488
- if (key) refs.push({
9489
- key,
9509
+ const slug = toPosix(relative(dir, join(root, file.path)).replace(/\/?SKILL\.md$/, ""));
9510
+ if (slug) refs.push({
9511
+ slug,
9490
9512
  path: file.path
9491
9513
  });
9492
9514
  }