@keystrokehq/cli 0.1.45 → 0.1.47
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 +32 -2
- package/dist/{templates/hello-world/vitest.config.ts → configs/vitest.config.mjs} +9 -2
- package/dist/{templates/hello-world/vitest.setup.integration.ts → configs/vitest.setup.integration.mjs} +3 -1
- package/dist/dist-BPmBLa_o.mjs +3 -0
- package/dist/{dist-COvVTq3V.mjs → dist-BmO-d0ms.mjs} +7 -5
- package/dist/{dist-COvVTq3V.mjs.map → dist-BmO-d0ms.mjs.map} +1 -1
- package/dist/{dist-B7fZRB8p.mjs → dist-CTHhFGjP.mjs} +3 -3
- package/dist/{dist-B7fZRB8p.mjs.map → dist-CTHhFGjP.mjs.map} +1 -1
- package/dist/index.mjs +223 -50
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-4tu8zRcS.mjs → maybe-auto-update-DPhUOdEF.mjs} +4 -98
- package/dist/maybe-auto-update-DPhUOdEF.mjs.map +1 -0
- package/dist/skills-bundle/_AGENTS.mcp.md +1 -1
- package/dist/skills-bundle/_AGENTS.md +18 -4
- package/dist/templates/hello-world/README.md +7 -60
- package/dist/templates/hello-world/package.json +9 -11
- package/dist/{version-D2psJMX3.mjs → version-key3f4tc.mjs} +112 -18
- package/dist/version-key3f4tc.mjs.map +1 -0
- package/package.json +8 -9
- package/dist/dist-DsYcsl0Y.mjs +0 -3
- package/dist/maybe-auto-update-4tu8zRcS.mjs.map +0 -1
- package/dist/version-D2psJMX3.mjs.map +0 -1
- /package/dist/{templates/hello-world/.oxlintrc.json → configs/oxlintrc.json} +0 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Keep the CLI small and boring.
|
|
|
15
15
|
- **Agent-first** — commands should be predictable, scriptable, and easy for AI agents to invoke
|
|
16
16
|
- **Split concerns** — non-secret config in one place, secrets in the OS keychain
|
|
17
17
|
|
|
18
|
-
Right now the CLI exposes `init`, `build`, `dev`, `start`, `health`, `auth`, `--help`, and `--version`.
|
|
18
|
+
Right now the CLI exposes `init`, `build`, `dev`, `start`, `lint`, `typecheck`, `test`, `deploy`, `health`, `auth`, `--help`, and `--version`.
|
|
19
19
|
|
|
20
20
|
### `auth`
|
|
21
21
|
|
|
@@ -96,6 +96,36 @@ keystroke init --name my-app --dir ./my-app --yes --skip-install
|
|
|
96
96
|
| `--skip-install` | Don't run package manager install |
|
|
97
97
|
| `--pm` | Force npm, pnpm, yarn, or bun |
|
|
98
98
|
|
|
99
|
+
Scaffolded projects include a committed `tsconfig.json` and `package.json` scripts for `lint`, `typecheck`, and `test`. Lint config (oxlint) ships in the CLI bundle; projects declare `@types/node`, TypeScript, and vitest in devDependencies.
|
|
100
|
+
|
|
101
|
+
### `lint`
|
|
102
|
+
|
|
103
|
+
Lint `src/` with bundled oxlint. Config lives in the CLI bundle (`dist/configs/oxlintrc.json`), not in the project.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
keystroke lint
|
|
107
|
+
keystroke lint --dir ./my-app
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### `typecheck`
|
|
111
|
+
|
|
112
|
+
Type-check with bundled TypeScript using the project's `tsconfig.json`.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
keystroke typecheck
|
|
116
|
+
keystroke typecheck --dir ./my-app
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### `test`
|
|
120
|
+
|
|
121
|
+
Run tests with bundled vitest. Config lives in the CLI bundle (`dist/configs/vitest.config.mjs`).
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
keystroke test
|
|
125
|
+
keystroke test --project unit
|
|
126
|
+
keystroke test --project integration
|
|
127
|
+
```
|
|
128
|
+
|
|
99
129
|
### `build`
|
|
100
130
|
|
|
101
131
|
Build the project to `dist/` using the framework bootstrap (no user `server.ts` required).
|
|
@@ -107,7 +137,7 @@ keystroke build --dir ./my-app
|
|
|
107
137
|
|
|
108
138
|
### `deploy`
|
|
109
139
|
|
|
110
|
-
|
|
140
|
+
Lint, typecheck, build, upload, and promote a project artifact on the platform. Requires `keystroke auth login` and a linked project (or `--project <slug>`).
|
|
111
141
|
|
|
112
142
|
```bash
|
|
113
143
|
keystroke deploy
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
1
3
|
import { defineConfig } from "vitest/config";
|
|
2
4
|
|
|
5
|
+
// Bundled with the CLI and passed to vitest via `--config`; `--root` points it at
|
|
6
|
+
// the user's project so `include` globs resolve against their src/. The setup file
|
|
7
|
+
// lives beside this config, so reference it by absolute path.
|
|
8
|
+
const configDir = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
3
10
|
const shared = {
|
|
4
11
|
globals: true,
|
|
5
|
-
environment: "node"
|
|
12
|
+
environment: "node",
|
|
6
13
|
};
|
|
7
14
|
|
|
8
15
|
export default defineConfig({
|
|
@@ -23,7 +30,7 @@ export default defineConfig({
|
|
|
23
30
|
test: {
|
|
24
31
|
name: "integration",
|
|
25
32
|
include: ["src/**/*.int.test.ts"],
|
|
26
|
-
setupFiles: ["vitest.setup.integration.
|
|
33
|
+
setupFiles: [join(configDir, "vitest.setup.integration.mjs")],
|
|
27
34
|
envDir: ".",
|
|
28
35
|
hookTimeout: 120_000,
|
|
29
36
|
testTimeout: 60_000,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// Load the project's .env for integration tests. cwd is the project root because
|
|
5
|
+
// `keystroke test` spawns vitest with `--root <projectRoot>`.
|
|
6
|
+
function loadEnvFile(path) {
|
|
5
7
|
if (!existsSync(path)) {
|
|
6
8
|
return;
|
|
7
9
|
}
|
|
@@ -20582,7 +20582,6 @@ registerWorkflowRunGetter(() => {
|
|
|
20582
20582
|
};
|
|
20583
20583
|
});
|
|
20584
20584
|
new AsyncLocalStorage();
|
|
20585
|
-
object({ title: string().max(120).describe("A short, clear chat title in title case; specific, no quotes or emojis") });
|
|
20586
20585
|
[
|
|
20587
20586
|
"You are an expert chat title generator.",
|
|
20588
20587
|
"",
|
|
@@ -20597,16 +20596,19 @@ object({ title: string().max(120).describe("A short, clear chat title in title c
|
|
|
20597
20596
|
"- Keep it under 120 characters when possible",
|
|
20598
20597
|
"- Do not use quotes or emojis",
|
|
20599
20598
|
"",
|
|
20599
|
+
"CRITICAL: Respond with ONLY the title text and nothing else. No reasoning, no explanation,",
|
|
20600
|
+
"no preamble, no labels, no quotes — just the raw title on a single line.",
|
|
20601
|
+
"",
|
|
20600
20602
|
"Examples:",
|
|
20601
20603
|
"",
|
|
20602
20604
|
"User: How do I set up a new Next.js project with TypeScript?",
|
|
20603
|
-
"
|
|
20605
|
+
"Setting Up Next.js Project with TypeScript",
|
|
20604
20606
|
"",
|
|
20605
20607
|
"User: Help me debug this React hook that's causing infinite re-renders. Here's the code...",
|
|
20606
|
-
"
|
|
20608
|
+
"Debugging Infinite Re-render in React Hook",
|
|
20607
20609
|
"",
|
|
20608
20610
|
"User: Write a cold email sequence for fundraising from YC alums",
|
|
20609
|
-
"
|
|
20611
|
+
"YC Alumni Fundraising Cold Email Sequence"
|
|
20610
20612
|
].join("\n");
|
|
20611
20613
|
object({ message: string().describe("Task or question for the subagent") });
|
|
20612
20614
|
const STATIC_MODEL_IDS = new Set([
|
|
@@ -30743,4 +30745,4 @@ async function emitStoredRouteManifestForProject(projectRoot) {
|
|
|
30743
30745
|
//#endregion
|
|
30744
30746
|
export { validatePollGroups as A, attachmentSlugFromRecord as B, pollRouteFromSourceSlug as C, validateAttachmentTargets as D, toStoredRouteManifest as E, webhookManifestAttachmentSchemasFromBindings as F, packAssetDirs as G, computeCallSiteIds as H, webhookMatchSchemaForBindings as I, entryIdFromFile as J, discoverEntries as K, webhookRouteFromEndpoint as L, validateTriggerAttachments as M, validateUniqueAttachmentSlugs as N, validateImportedTriggerAttachment as O, validateUniqueTriggerSourceSlugs as P, walkTypeScriptFiles as Q, workflowKeyForAttachment as R, pollGroupRouteFromId as S, serializeRouteManifest as T, diagnoseWorkflowSource as U, classifyCall as V, locateWorkflow as W, shouldSkipKeystrokeModuleFile as X, readKeystrokeIgnoreDirective as Y, validateUniqueModuleKeys as Z, importAgentDefinition as _, buildStoredRouteManifestForProject as a, persistStoredRouteManifest as b, collectAgentAppSlugs as c, discoverAgentEntries as d, discoverSkillManifestEntries as f, emitStoredRouteManifestForProject as g, discoverWorkflows as h, buildPollGroups as i, validateProjectModules as j, validateImportedWorkflowDefinition as k, collectAgentToolSlugs as l, discoverWorkflowEntries as m, agentManifestEntry as n, buildStoredRouteManifestFromContext as o, discoverTriggerAttachments as p, discoverModuleFileEntries as q, agentRouteFromKey as r, buildWebhookBindingsByRoute as s, agentKeyForAttachment as t, countAgentCredentials as u, importTriggerAttachments as v, schemaToJson as w, pollGroupId as x, importWorkflowDefinition as y, workflowRouteFromKey as z };
|
|
30745
30747
|
|
|
30746
|
-
//# sourceMappingURL=dist-
|
|
30748
|
+
//# sourceMappingURL=dist-BmO-d0ms.mjs.map
|