@keystrokehq/cli 0.0.133 → 0.0.134
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 +59 -46
- package/dist/index.mjs.map +1 -1
- package/dist/skills-bundle/skills/keystroke-actions/SKILL.md +3 -4
- package/dist/skills-bundle/skills/keystroke-actions/references/catalog-and-imports.md +1 -1
- package/dist/skills-bundle/skills/keystroke-agents/SKILL.md +12 -16
- package/dist/skills-bundle/skills/keystroke-credentials/SKILL.md +1 -1
- package/dist/skills-bundle/skills/keystroke-files/SKILL.md +5 -7
- package/dist/skills-bundle/skills/keystroke-skills/SKILL.md +4 -1
- package/dist/skills-bundle/skills/keystroke-workflows/SKILL.md +1 -1
- package/dist/templates/hello-world/src/actions/greet.ts +1 -1
- package/dist/templates/hello-world/src/agents/hello.ts +5 -7
- package/dist/templates/hello-world/src/workflows/greeting.ts +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1937
|
+
workflowSlug: string(),
|
|
1937
1938
|
workflowName: string().optional(),
|
|
1938
1939
|
moduleFile: string()
|
|
1939
1940
|
}),
|
|
@@ -2270,7 +2271,7 @@ const WorkflowRunSummarySchema = object({
|
|
|
2270
2271
|
});
|
|
2271
2272
|
const WorkflowRunRecordSchema = object({
|
|
2272
2273
|
id: string(),
|
|
2273
|
-
|
|
2274
|
+
workflowSlug: string(),
|
|
2274
2275
|
status: WorkflowRunStatusSchema,
|
|
2275
2276
|
trigger: WorkflowRunTriggerSchema,
|
|
2276
2277
|
triggeredAt: string(),
|
|
@@ -2305,7 +2306,7 @@ object({ include: string().optional() });
|
|
|
2305
2306
|
const TriggerRunDetailSchema = object({
|
|
2306
2307
|
id: string(),
|
|
2307
2308
|
attachmentId: string(),
|
|
2308
|
-
|
|
2309
|
+
attachmentSlug: string().nullable(),
|
|
2309
2310
|
triggerType: _enum([
|
|
2310
2311
|
"cron",
|
|
2311
2312
|
"webhook",
|
|
@@ -2324,10 +2325,10 @@ const WorkflowStepRunSchema = object({
|
|
|
2324
2325
|
const TraceTriggerSummarySchema = object({
|
|
2325
2326
|
triggerType: string(),
|
|
2326
2327
|
triggerRunId: string(),
|
|
2327
|
-
|
|
2328
|
-
|
|
2328
|
+
workflowSlug: string().optional(),
|
|
2329
|
+
agentSlug: string().optional(),
|
|
2329
2330
|
attachmentId: string().nullable().optional(),
|
|
2330
|
-
|
|
2331
|
+
attachmentSlug: string().nullable().optional(),
|
|
2331
2332
|
route: string().optional(),
|
|
2332
2333
|
sourcePath: string().nullable().optional()
|
|
2333
2334
|
}).nullable();
|
|
@@ -2391,7 +2392,7 @@ const AgentSessionSummarySchema = object({
|
|
|
2391
2392
|
});
|
|
2392
2393
|
const AgentSessionRecordSchema = object({
|
|
2393
2394
|
id: string(),
|
|
2394
|
-
|
|
2395
|
+
agentSlug: string(),
|
|
2395
2396
|
status: AgentSessionStatusSchema,
|
|
2396
2397
|
source: RunSourceKindSchema,
|
|
2397
2398
|
sourceId: string().nullable(),
|
|
@@ -2421,7 +2422,7 @@ object({ include: string().optional() });
|
|
|
2421
2422
|
const GatewaySessionDetailSchema = object({
|
|
2422
2423
|
threadId: string(),
|
|
2423
2424
|
attachmentId: string(),
|
|
2424
|
-
|
|
2425
|
+
attachmentSlug: string().nullable()
|
|
2425
2426
|
});
|
|
2426
2427
|
const AgentEventSchema = object({
|
|
2427
2428
|
id: string(),
|
|
@@ -2516,11 +2517,11 @@ const TriggerRunTypeSchema = _enum([
|
|
|
2516
2517
|
const TriggerRunWorkflowSummarySchema = object({
|
|
2517
2518
|
id: string(),
|
|
2518
2519
|
status: WorkflowRunStatusSchema,
|
|
2519
|
-
|
|
2520
|
+
workflowSlug: string()
|
|
2520
2521
|
});
|
|
2521
2522
|
const TriggerRunAgentSessionSummarySchema = object({
|
|
2522
2523
|
id: string(),
|
|
2523
|
-
|
|
2524
|
+
agentSlug: string()
|
|
2524
2525
|
});
|
|
2525
2526
|
const TriggerRunSummarySchema = object({
|
|
2526
2527
|
id: string(),
|
|
@@ -2533,7 +2534,7 @@ const TriggerRunSummarySchema = object({
|
|
|
2533
2534
|
const TriggerRunRecordSchema = object({
|
|
2534
2535
|
id: string(),
|
|
2535
2536
|
attachmentId: string(),
|
|
2536
|
-
|
|
2537
|
+
attachmentSlug: string(),
|
|
2537
2538
|
triggerType: TriggerRunTypeSchema,
|
|
2538
2539
|
sourcePath: string().nullable(),
|
|
2539
2540
|
payload: unknown().nullable(),
|
|
@@ -2556,7 +2557,7 @@ _enum([
|
|
|
2556
2557
|
object({ include: string().optional() });
|
|
2557
2558
|
const TriggerRunAgentSessionDetailSchema = object({
|
|
2558
2559
|
id: string(),
|
|
2559
|
-
|
|
2560
|
+
agentSlug: string()
|
|
2560
2561
|
});
|
|
2561
2562
|
const TriggerRunDetailResponseSchema = object({
|
|
2562
2563
|
run: TriggerRunRecordSchema,
|
|
@@ -2699,6 +2700,7 @@ const optionalCount = number$1().int().nonnegative().nullable().optional();
|
|
|
2699
2700
|
const optionalTimestamp = string().nullable().optional();
|
|
2700
2701
|
const AgentSummarySchema = object({
|
|
2701
2702
|
id: string().min(1),
|
|
2703
|
+
slug: string().min(1),
|
|
2702
2704
|
name: string().min(1),
|
|
2703
2705
|
projectId: string().min(1),
|
|
2704
2706
|
updatedAt: string().min(1),
|
|
@@ -2711,16 +2713,17 @@ const AgentSummarySchema = object({
|
|
|
2711
2713
|
});
|
|
2712
2714
|
const WorkflowSummarySchema = object({
|
|
2713
2715
|
id: string().min(1),
|
|
2716
|
+
slug: string().min(1),
|
|
2714
2717
|
name: string().min(1),
|
|
2715
2718
|
projectId: string().min(1),
|
|
2716
2719
|
updatedAt: string().min(1),
|
|
2717
2720
|
description: string().optional(),
|
|
2718
2721
|
sourcePath: string().min(1).optional(),
|
|
2719
|
-
stepCount: optionalCount,
|
|
2720
2722
|
lastRunAt: optionalTimestamp
|
|
2721
2723
|
});
|
|
2722
2724
|
const SkillSummarySchema = object({
|
|
2723
2725
|
id: string().min(1),
|
|
2726
|
+
slug: string().min(1),
|
|
2724
2727
|
name: string().min(1),
|
|
2725
2728
|
projectId: string().min(1),
|
|
2726
2729
|
updatedAt: string().min(1),
|
|
@@ -2765,9 +2768,9 @@ const ProjectFileSummarySchema = object({
|
|
|
2765
2768
|
path: string().min(1),
|
|
2766
2769
|
hash: sha256Hex
|
|
2767
2770
|
});
|
|
2768
|
-
/** Maps a runtime resource
|
|
2771
|
+
/** Maps a runtime resource slug (agent/workflow/skill) to its source file path. */
|
|
2769
2772
|
const ProjectSourceResourceRefSchema = object({
|
|
2770
|
-
|
|
2773
|
+
slug: string().min(1),
|
|
2771
2774
|
path: string().min(1)
|
|
2772
2775
|
});
|
|
2773
2776
|
const ProjectSourceResourcesSchema = object({
|
|
@@ -5212,11 +5215,15 @@ function createProjectMetricsResource(http) {
|
|
|
5212
5215
|
}
|
|
5213
5216
|
} };
|
|
5214
5217
|
}
|
|
5218
|
+
function listSearchParams$2(options) {
|
|
5219
|
+
const projectId = options?.projectId?.trim();
|
|
5220
|
+
return projectId ? { projectId } : void 0;
|
|
5221
|
+
}
|
|
5215
5222
|
function createAgentsResource(http) {
|
|
5216
5223
|
return {
|
|
5217
|
-
async list() {
|
|
5224
|
+
async list(options) {
|
|
5218
5225
|
try {
|
|
5219
|
-
const data = await http.get("/api/agents").json();
|
|
5226
|
+
const data = await http.get("/api/agents", { searchParams: listSearchParams$2(options) }).json();
|
|
5220
5227
|
return AgentSummaryListResponseSchema.parse(data);
|
|
5221
5228
|
} catch (error) {
|
|
5222
5229
|
throw await toPlatformError(error);
|
|
@@ -5232,11 +5239,15 @@ function createAgentsResource(http) {
|
|
|
5232
5239
|
}
|
|
5233
5240
|
};
|
|
5234
5241
|
}
|
|
5242
|
+
function listSearchParams$1(options) {
|
|
5243
|
+
const projectId = options?.projectId?.trim();
|
|
5244
|
+
return projectId ? { projectId } : void 0;
|
|
5245
|
+
}
|
|
5235
5246
|
function createWorkflowsResource(http) {
|
|
5236
5247
|
return {
|
|
5237
|
-
async list() {
|
|
5248
|
+
async list(options) {
|
|
5238
5249
|
try {
|
|
5239
|
-
const data = await http.get("/api/workflows").json();
|
|
5250
|
+
const data = await http.get("/api/workflows", { searchParams: listSearchParams$1(options) }).json();
|
|
5240
5251
|
return WorkflowSummaryListResponseSchema.parse(data);
|
|
5241
5252
|
} catch (error) {
|
|
5242
5253
|
throw await toPlatformError(error);
|
|
@@ -5252,11 +5263,15 @@ function createWorkflowsResource(http) {
|
|
|
5252
5263
|
}
|
|
5253
5264
|
};
|
|
5254
5265
|
}
|
|
5266
|
+
function listSearchParams(options) {
|
|
5267
|
+
const projectId = options?.projectId?.trim();
|
|
5268
|
+
return projectId ? { projectId } : void 0;
|
|
5269
|
+
}
|
|
5255
5270
|
function createSkillsResource(http) {
|
|
5256
5271
|
return {
|
|
5257
|
-
async list() {
|
|
5272
|
+
async list(options) {
|
|
5258
5273
|
try {
|
|
5259
|
-
const data = await http.get("/api/skills").json();
|
|
5274
|
+
const data = await http.get("/api/skills", { searchParams: listSearchParams(options) }).json();
|
|
5260
5275
|
return SkillSummaryListResponseSchema.parse(data);
|
|
5261
5276
|
} catch (error) {
|
|
5262
5277
|
throw await toPlatformError(error);
|
|
@@ -6779,6 +6794,7 @@ const credentialSeed = [
|
|
|
6779
6794
|
];
|
|
6780
6795
|
const agentSeed = [{
|
|
6781
6796
|
id: "agent-support",
|
|
6797
|
+
slug: "support-agent",
|
|
6782
6798
|
name: "Support Agent",
|
|
6783
6799
|
projectId: "project_personal_repo",
|
|
6784
6800
|
updatedAt: "2026-06-02T14:20:00Z",
|
|
@@ -6790,6 +6806,7 @@ const agentSeed = [{
|
|
|
6790
6806
|
lastRunAt: "2026-06-02T14:20:00Z"
|
|
6791
6807
|
}, {
|
|
6792
6808
|
id: "agent-research",
|
|
6809
|
+
slug: "research-agent",
|
|
6793
6810
|
name: "Research Agent",
|
|
6794
6811
|
projectId: "project_personal_repo",
|
|
6795
6812
|
updatedAt: "2026-06-01T09:15:00Z",
|
|
@@ -6802,21 +6819,21 @@ const agentSeed = [{
|
|
|
6802
6819
|
}];
|
|
6803
6820
|
const workflowSeed = [{
|
|
6804
6821
|
id: "workflow-daily-digest",
|
|
6822
|
+
slug: "daily-digest",
|
|
6805
6823
|
name: "Daily Digest",
|
|
6806
6824
|
projectId: "project_personal_repo",
|
|
6807
6825
|
updatedAt: "2026-06-02T11:05:00Z",
|
|
6808
6826
|
description: "Collect project updates and send a daily summary.",
|
|
6809
6827
|
sourcePath: "src/workflows/daily-digest.ts",
|
|
6810
|
-
stepCount: 2,
|
|
6811
6828
|
lastRunAt: "2026-06-02T11:05:00Z"
|
|
6812
6829
|
}, {
|
|
6813
6830
|
id: "workflow-email-triage",
|
|
6831
|
+
slug: "email-triage",
|
|
6814
6832
|
name: "Email Triage",
|
|
6815
6833
|
projectId: "project_personal_repo",
|
|
6816
6834
|
updatedAt: "2026-05-31T16:40:00Z",
|
|
6817
6835
|
description: "Label, prioritize, and draft replies for inbound email.",
|
|
6818
6836
|
sourcePath: "src/workflows/email-triage.ts",
|
|
6819
|
-
stepCount: 4,
|
|
6820
6837
|
lastRunAt: "2026-05-31T16:40:00Z"
|
|
6821
6838
|
}];
|
|
6822
6839
|
/** Review personas for mocked project members and API key authors (not org membership). */
|
|
@@ -7149,15 +7166,11 @@ function buildFailedUsage(durationMs) {
|
|
|
7149
7166
|
totalExcludingDurationUsd: .021
|
|
7150
7167
|
};
|
|
7151
7168
|
}
|
|
7152
|
-
function
|
|
7153
|
-
|
|
7154
|
-
if (!row?.sourcePath) return workflowId;
|
|
7155
|
-
return row.sourcePath.match(/\/([^/]+)\.ts$/)?.[1] ?? workflowId;
|
|
7169
|
+
function workflowSlugFromId(workflowId) {
|
|
7170
|
+
return workflowSeed.find((workflow) => workflow.id === workflowId)?.slug ?? workflowId;
|
|
7156
7171
|
}
|
|
7157
|
-
function
|
|
7158
|
-
|
|
7159
|
-
if (!row?.sourcePath) return agentId;
|
|
7160
|
-
return row.sourcePath.match(/\/([^/]+)\.ts$/)?.[1] ?? agentId;
|
|
7172
|
+
function agentSlugFromId(agentId) {
|
|
7173
|
+
return agentSeed.find((agent) => agent.id === agentId)?.slug ?? agentId;
|
|
7161
7174
|
}
|
|
7162
7175
|
const historyRunSeed = [
|
|
7163
7176
|
{
|
|
@@ -7166,7 +7179,7 @@ const historyRunSeed = [
|
|
|
7166
7179
|
traceId: "run-support-agent-001",
|
|
7167
7180
|
projectId: "project_personal_repo",
|
|
7168
7181
|
projectName: historyProjectNameById.project_personal_repo ?? "Project",
|
|
7169
|
-
resourceKey:
|
|
7182
|
+
resourceKey: agentSlugFromId("agent-support"),
|
|
7170
7183
|
resourceId: "agent-support",
|
|
7171
7184
|
resourceName: "Support Agent",
|
|
7172
7185
|
status: "completed",
|
|
@@ -7189,7 +7202,7 @@ const historyRunSeed = [
|
|
|
7189
7202
|
traceId: "run-daily-digest-001",
|
|
7190
7203
|
projectId: "project_personal_repo",
|
|
7191
7204
|
projectName: historyProjectNameById.project_personal_repo ?? "Project",
|
|
7192
|
-
resourceKey:
|
|
7205
|
+
resourceKey: workflowSlugFromId("workflow-daily-digest"),
|
|
7193
7206
|
resourceId: "workflow-daily-digest",
|
|
7194
7207
|
resourceName: "Daily Digest",
|
|
7195
7208
|
status: "running",
|
|
@@ -7212,7 +7225,7 @@ const historyRunSeed = [
|
|
|
7212
7225
|
traceId: "run-support-agent-000",
|
|
7213
7226
|
projectId: "project_personal_repo",
|
|
7214
7227
|
projectName: historyProjectNameById.project_personal_repo ?? "Project",
|
|
7215
|
-
resourceKey:
|
|
7228
|
+
resourceKey: agentSlugFromId("agent-support"),
|
|
7216
7229
|
resourceId: "agent-support",
|
|
7217
7230
|
resourceName: "Support Agent",
|
|
7218
7231
|
status: "failed",
|
|
@@ -7235,7 +7248,7 @@ const historyRunSeed = [
|
|
|
7235
7248
|
traceId: "run-email-triage-002",
|
|
7236
7249
|
projectId: "project_personal_repo",
|
|
7237
7250
|
projectName: historyProjectNameById.project_personal_repo ?? "Project",
|
|
7238
|
-
resourceKey:
|
|
7251
|
+
resourceKey: workflowSlugFromId("workflow-email-triage"),
|
|
7239
7252
|
resourceId: "workflow-email-triage",
|
|
7240
7253
|
resourceName: "Email Triage",
|
|
7241
7254
|
status: "failed",
|
|
@@ -7258,7 +7271,7 @@ const historyRunSeed = [
|
|
|
7258
7271
|
traceId: "run-research-agent-003",
|
|
7259
7272
|
projectId: "project_personal_repo",
|
|
7260
7273
|
projectName: historyProjectNameById.project_personal_repo ?? "Project",
|
|
7261
|
-
resourceKey:
|
|
7274
|
+
resourceKey: agentSlugFromId("agent-research"),
|
|
7262
7275
|
resourceId: "agent-research",
|
|
7263
7276
|
resourceName: "Research Agent",
|
|
7264
7277
|
status: "completed",
|
|
@@ -9470,9 +9483,9 @@ function collectModuleRefs(srcRoot, root, files, subdir, nestedEntry) {
|
|
|
9470
9483
|
const refs = [];
|
|
9471
9484
|
for (const file of files) {
|
|
9472
9485
|
if (!file.path.startsWith(prefix) || !/\.(ts|mts)$/.test(file.path)) continue;
|
|
9473
|
-
const
|
|
9474
|
-
if (
|
|
9475
|
-
|
|
9486
|
+
const slug = entryIdFromFile(dir, join(root, file.path), { nestedEntry });
|
|
9487
|
+
if (slug) refs.push({
|
|
9488
|
+
slug,
|
|
9476
9489
|
path: file.path
|
|
9477
9490
|
});
|
|
9478
9491
|
}
|
|
@@ -9484,9 +9497,9 @@ function collectSkillRefs(srcRoot, root, files) {
|
|
|
9484
9497
|
const refs = [];
|
|
9485
9498
|
for (const file of files) {
|
|
9486
9499
|
if (!file.path.startsWith(prefix) || !file.path.endsWith("SKILL.md")) continue;
|
|
9487
|
-
const
|
|
9488
|
-
if (
|
|
9489
|
-
|
|
9500
|
+
const slug = toPosix(relative(dir, join(root, file.path)).replace(/\/?SKILL\.md$/, ""));
|
|
9501
|
+
if (slug) refs.push({
|
|
9502
|
+
slug,
|
|
9490
9503
|
path: file.path
|
|
9491
9504
|
});
|
|
9492
9505
|
}
|