@keystrokehq/cli 0.0.165 → 0.0.167

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.
Files changed (38) hide show
  1. package/README.md +11 -0
  2. package/dist/dist-BMPry9tj.mjs +577 -0
  3. package/dist/dist-BMPry9tj.mjs.map +1 -0
  4. package/dist/dist-CegYAHE0.mjs +3 -0
  5. package/dist/{schemas-Bq8SXmZk.mjs → dist-D_0UmqFb.mjs} +2113 -6
  6. package/dist/dist-D_0UmqFb.mjs.map +1 -0
  7. package/dist/{dist-CgV0MxBq.mjs → dist-WoxxHzM6.mjs} +123 -25
  8. package/dist/dist-WoxxHzM6.mjs.map +1 -0
  9. package/dist/index.mjs +147 -37
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/{maybe-auto-update-CIcDJRrg.mjs → maybe-auto-update-B03C4E8i.mjs} +2 -2
  12. package/dist/{maybe-auto-update-CIcDJRrg.mjs.map → maybe-auto-update-B03C4E8i.mjs.map} +1 -1
  13. package/dist/skills-bundle/_AGENTS.md +7 -3
  14. package/dist/skills-bundle/skills/keystroke-actions/SKILL.md +1 -1
  15. package/dist/skills-bundle/skills/keystroke-actions/references/catalog-and-imports.md +2 -3
  16. package/dist/skills-bundle/skills/keystroke-agents/references/tools-mcp-codemode.md +1 -1
  17. package/dist/skills-bundle/skills/keystroke-cli/SKILL.md +4 -2
  18. package/dist/skills-bundle/skills/keystroke-deploy/SKILL.md +92 -0
  19. package/dist/skills-bundle/skills/keystroke-deploy/references/build-and-full-deploy.md +28 -0
  20. package/dist/skills-bundle/skills/keystroke-deploy/references/filtered-deploy.md +49 -0
  21. package/dist/skills-bundle/skills/keystroke-deploy/references/wip-ignore.md +32 -0
  22. package/dist/skills-bundle/skills/keystroke-gateways/SKILL.md +5 -6
  23. package/dist/skills-bundle/skills/keystroke-gateways/references/slack-setup.md +0 -11
  24. package/dist/templates/hello-world/README.md +1 -1
  25. package/dist/templates/hello-world/keystroke.config.ts +1 -5
  26. package/dist/{version-DdbxgFWa.mjs → version-FrEOAEU7.mjs} +2 -2
  27. package/dist/{version-DdbxgFWa.mjs.map → version-FrEOAEU7.mjs.map} +1 -1
  28. package/package.json +1 -1
  29. package/dist/discovery-DV7FkTRA-JYiC_9cY.mjs +0 -71
  30. package/dist/discovery-DV7FkTRA-JYiC_9cY.mjs.map +0 -1
  31. package/dist/dist-CgV0MxBq.mjs.map +0 -1
  32. package/dist/dist-DtqmE5R_.mjs +0 -2113
  33. package/dist/dist-DtqmE5R_.mjs.map +0 -1
  34. package/dist/dist-sXdjEZpP.mjs +0 -293
  35. package/dist/dist-sXdjEZpP.mjs.map +0 -1
  36. package/dist/schemas-Bq8SXmZk.mjs.map +0 -1
  37. package/dist/walk-project-171B4cvO-DKtupJ6Z.mjs +0 -102
  38. package/dist/walk-project-171B4cvO-DKtupJ6Z.mjs.map +0 -1
@@ -1,102 +0,0 @@
1
- #!/usr/bin/env node
2
- import { r as entryIdFromFile } from "./discovery-DV7FkTRA-JYiC_9cY.mjs";
3
- import { join, relative, sep } from "node:path";
4
- import { readFileSync, readdirSync, statSync } from "node:fs";
5
- import { createHash } from "node:crypto";
6
- //#region ../../packages/build/dist/walk-project-171B4cvO.mjs
7
- const IGNORED_DIRS = new Set([
8
- "node_modules",
9
- "dist",
10
- ".git",
11
- ".turbo",
12
- "build",
13
- "coverage",
14
- ".keystroke",
15
- ".cache",
16
- "tmp"
17
- ]);
18
- const IGNORED_ENV_FILE = /\.env/;
19
- const IGNORED_LOG_FILE = /\.log$/;
20
- function isIgnoredFile(name) {
21
- return IGNORED_ENV_FILE.test(name) || IGNORED_LOG_FILE.test(name);
22
- }
23
- function toPosix(path) {
24
- return path.split(sep).join("/");
25
- }
26
- function isProbablyBinary(buffer) {
27
- const sampleLength = Math.min(buffer.length, 8e3);
28
- for (let index = 0; index < sampleLength; index += 1) if (buffer[index] === 0) return true;
29
- return false;
30
- }
31
- function classifyBuildEntry(root, srcRoot, filePath) {
32
- const relativePath = toPosix(relative(root, filePath));
33
- const agentsPrefix = `${toPosix(relative(root, join(srcRoot, "agents")))}/`;
34
- const workflowsPrefix = `${toPosix(relative(root, join(srcRoot, "workflows")))}/`;
35
- const triggersPrefix = `${toPosix(relative(root, join(srcRoot, "triggers")))}/`;
36
- if (relativePath.startsWith(agentsPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
37
- const id = entryIdFromFile(join(srcRoot, "agents"), filePath, { nestedEntry: "agent" });
38
- return id ? {
39
- entryKey: `agents/${id}`,
40
- entryPath: filePath
41
- } : null;
42
- }
43
- if (relativePath.startsWith(workflowsPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
44
- const id = entryIdFromFile(join(srcRoot, "workflows"), filePath, { nestedEntry: "workflow" });
45
- return id ? {
46
- entryKey: `workflows/${id}`,
47
- entryPath: filePath
48
- } : null;
49
- }
50
- if (relativePath.startsWith(triggersPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
51
- const id = entryIdFromFile(join(srcRoot, "triggers"), filePath, { nestedEntry: "trigger" });
52
- return id ? {
53
- entryKey: `triggers/${id}`,
54
- entryPath: filePath
55
- } : null;
56
- }
57
- return null;
58
- }
59
- function walkTree(root, dir, srcRoot, collectSources, sourceFiles, buildEntries, totals) {
60
- for (const name of readdirSync(dir).sort()) {
61
- if (collectSources && (sourceFiles.length >= 2e3 || totals.bytes >= 8388608)) return;
62
- const absolute = join(dir, name);
63
- const stats = statSync(absolute);
64
- if (stats.isDirectory()) {
65
- if (IGNORED_DIRS.has(name)) continue;
66
- walkTree(root, absolute, srcRoot, collectSources, sourceFiles, buildEntries, totals);
67
- continue;
68
- }
69
- if (!stats.isFile()) continue;
70
- const buildEntry = classifyBuildEntry(root, srcRoot, absolute);
71
- if (buildEntry) buildEntries[buildEntry.entryKey] = buildEntry.entryPath;
72
- if (!collectSources) continue;
73
- if (stats.size > 262144 || isIgnoredFile(name)) continue;
74
- const buffer = readFileSync(absolute);
75
- if (isProbablyBinary(buffer)) continue;
76
- totals.bytes += buffer.byteLength;
77
- sourceFiles.push({
78
- path: toPosix(relative(root, absolute)),
79
- contents: buffer.toString("utf8"),
80
- hash: createHash("sha256").update(buffer).digest("hex")
81
- });
82
- }
83
- }
84
- /**
85
- * One full-tree walk of the project: classifies tsdown entries and optionally
86
- * collects deploy source files (path + contents + hash) under snapshot limits.
87
- */
88
- function walkProject(root, srcDirOrOptions = "src", maybeOptions) {
89
- const srcDir = typeof srcDirOrOptions === "string" ? srcDirOrOptions : srcDirOrOptions.srcDir ?? "src";
90
- const collectSources = (typeof srcDirOrOptions === "string" ? maybeOptions ?? {} : srcDirOrOptions).collectSources ?? false;
91
- const sourceFiles = [];
92
- const buildEntries = {};
93
- walkTree(root, root, join(root, srcDir), collectSources, sourceFiles, buildEntries, { bytes: 0 });
94
- return {
95
- sourceFiles,
96
- buildEntries
97
- };
98
- }
99
- //#endregion
100
- export { walkProject as t };
101
-
102
- //# sourceMappingURL=walk-project-171B4cvO-DKtupJ6Z.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walk-project-171B4cvO-DKtupJ6Z.mjs","names":[],"sources":["../../../packages/build/dist/walk-project-171B4cvO.mjs"],"sourcesContent":["import { readFileSync, readdirSync, statSync } from \"node:fs\";\nimport { join, relative, sep } from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport { entryIdFromFile } from \"@keystrokehq/manifest/discovery\";\n//#region src/walk-project.ts\nconst IGNORED_DIRS = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".git\",\n\t\".turbo\",\n\t\"build\",\n\t\"coverage\",\n\t\".keystroke\",\n\t\".cache\",\n\t\"tmp\"\n]);\nconst IGNORED_ENV_FILE = /\\.env/;\nconst IGNORED_LOG_FILE = /\\.log$/;\nfunction isIgnoredFile(name) {\n\treturn IGNORED_ENV_FILE.test(name) || IGNORED_LOG_FILE.test(name);\n}\nfunction toPosix(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction isProbablyBinary(buffer) {\n\tconst sampleLength = Math.min(buffer.length, 8e3);\n\tfor (let index = 0; index < sampleLength; index += 1) if (buffer[index] === 0) return true;\n\treturn false;\n}\nfunction classifyBuildEntry(root, srcRoot, filePath) {\n\tconst relativePath = toPosix(relative(root, filePath));\n\tconst agentsPrefix = `${toPosix(relative(root, join(srcRoot, \"agents\")))}/`;\n\tconst workflowsPrefix = `${toPosix(relative(root, join(srcRoot, \"workflows\")))}/`;\n\tconst triggersPrefix = `${toPosix(relative(root, join(srcRoot, \"triggers\")))}/`;\n\tif (relativePath.startsWith(agentsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"agents\"), filePath, { nestedEntry: \"agent\" });\n\t\treturn id ? {\n\t\t\tentryKey: `agents/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(workflowsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"workflows\"), filePath, { nestedEntry: \"workflow\" });\n\t\treturn id ? {\n\t\t\tentryKey: `workflows/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(triggersPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"triggers\"), filePath, { nestedEntry: \"trigger\" });\n\t\treturn id ? {\n\t\t\tentryKey: `triggers/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\treturn null;\n}\nfunction walkTree(root, dir, srcRoot, collectSources, sourceFiles, buildEntries, totals) {\n\tfor (const name of readdirSync(dir).sort()) {\n\t\tif (collectSources && (sourceFiles.length >= 2e3 || totals.bytes >= 8388608)) return;\n\t\tconst absolute = join(dir, name);\n\t\tconst stats = statSync(absolute);\n\t\tif (stats.isDirectory()) {\n\t\t\tif (IGNORED_DIRS.has(name)) continue;\n\t\t\twalkTree(root, absolute, srcRoot, collectSources, sourceFiles, buildEntries, totals);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!stats.isFile()) continue;\n\t\tconst buildEntry = classifyBuildEntry(root, srcRoot, absolute);\n\t\tif (buildEntry) buildEntries[buildEntry.entryKey] = buildEntry.entryPath;\n\t\tif (!collectSources) continue;\n\t\tif (stats.size > 262144 || isIgnoredFile(name)) continue;\n\t\tconst buffer = readFileSync(absolute);\n\t\tif (isProbablyBinary(buffer)) continue;\n\t\ttotals.bytes += buffer.byteLength;\n\t\tsourceFiles.push({\n\t\t\tpath: toPosix(relative(root, absolute)),\n\t\t\tcontents: buffer.toString(\"utf8\"),\n\t\t\thash: createHash(\"sha256\").update(buffer).digest(\"hex\")\n\t\t});\n\t}\n}\n/**\n* One full-tree walk of the project: classifies tsdown entries and optionally\n* collects deploy source files (path + contents + hash) under snapshot limits.\n*/\nfunction walkProject(root, srcDirOrOptions = \"src\", maybeOptions) {\n\tconst srcDir = typeof srcDirOrOptions === \"string\" ? srcDirOrOptions : srcDirOrOptions.srcDir ?? \"src\";\n\tconst collectSources = (typeof srcDirOrOptions === \"string\" ? maybeOptions ?? {} : srcDirOrOptions).collectSources ?? false;\n\tconst sourceFiles = [];\n\tconst buildEntries = {};\n\twalkTree(root, root, join(root, srcDir), collectSources, sourceFiles, buildEntries, { bytes: 0 });\n\treturn {\n\t\tsourceFiles,\n\t\tbuildEntries\n\t};\n}\n//#endregion\nexport { walkProject as t };\n\n//# sourceMappingURL=walk-project-171B4cvO.mjs.map"],"mappings":";;;;;;AAKA,MAAM,eAAe,IAAI,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;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