@keystrokehq/cli 0.0.105 → 0.0.108
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/{dist-DvDsEErE.mjs → dist-D1ip549D.mjs} +2 -2
- package/dist/{dist-DvDsEErE.mjs.map → dist-D1ip549D.mjs.map} +1 -1
- package/dist/index.mjs +48 -4402
- package/dist/index.mjs.map +1 -1
- package/dist/maybe-auto-update-DCsPT080.mjs +247 -0
- package/dist/maybe-auto-update-DCsPT080.mjs.map +1 -0
- package/dist/schemas-DwAYtN9C.mjs +4296 -0
- package/dist/schemas-DwAYtN9C.mjs.map +1 -0
- package/dist/skills-bundle/_AGENTS.md +12 -12
- package/dist/skills-bundle/skills/{actions → keystroke-actions}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{agents → keystroke-agents}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{cli → keystroke-cli}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{credentials → keystroke-credentials}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{credentials → keystroke-credentials}/references/cli-and-oauth.md +1 -1
- package/dist/skills-bundle/skills/{files → keystroke-files}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{gateways → keystroke-gateways}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{skills → keystroke-skills}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{triggers → keystroke-triggers}/SKILL.md +2 -2
- package/dist/skills-bundle/skills/{workflows → keystroke-workflows}/SKILL.md +2 -2
- package/dist/version-DESgLEkE.mjs +94 -0
- package/dist/version-DESgLEkE.mjs.map +1 -0
- package/package.json +1 -1
- /package/dist/skills-bundle/skills/{actions → keystroke-actions}/references/catalog-and-imports.md +0 -0
- /package/dist/skills-bundle/skills/{agents → keystroke-agents}/references/models.md +0 -0
- /package/dist/skills-bundle/skills/{agents → keystroke-agents}/references/tools-mcp-codemode.md +0 -0
- /package/dist/skills-bundle/skills/{agents → keystroke-agents}/references/workflows-and-testing.md +0 -0
- /package/dist/skills-bundle/skills/{cli → keystroke-cli}/references/api-targets.md +0 -0
- /package/dist/skills-bundle/skills/{gateways → keystroke-gateways}/references/slack-setup.md +0 -0
- /package/dist/skills-bundle/skills/{workflows → keystroke-workflows}/references/authoring.md +0 -0
- /package/dist/skills-bundle/skills/{workflows → keystroke-workflows}/references/testing.md +0 -0
|
@@ -31,7 +31,7 @@ keystroke deploy --project <id> # build + upload; activates cloud runtime
|
|
|
31
31
|
|
|
32
32
|
**Platform project** = cloud deploy target (managed by the control plane). **Local project** = this repo (`src/`, `keystroke.config.ts`). You need a platform project id before `keystroke deploy`.
|
|
33
33
|
|
|
34
|
-
Full routing rules: [cli skill](.agents/skills/cli/SKILL.md) → [api-targets.md](.agents/skills/cli/references/api-targets.md).
|
|
34
|
+
Full routing rules: [cli skill](.agents/skills/keystroke-cli/SKILL.md) → [api-targets.md](.agents/skills/keystroke-cli/references/api-targets.md).
|
|
35
35
|
|
|
36
36
|
## Run locally (fastest path)
|
|
37
37
|
|
|
@@ -95,14 +95,14 @@ Read `src/` first — existing agents, workflows, actions, and triggers are your
|
|
|
95
95
|
|
|
96
96
|
## Skills map
|
|
97
97
|
|
|
98
|
-
| Skill
|
|
99
|
-
|
|
|
100
|
-
| [cli](.agents/skills/cli/SKILL.md) | Local vs cloud CLI, deploy, config |
|
|
101
|
-
| [agents](.agents/skills/agents/SKILL.md) | Building or debugging agents |
|
|
102
|
-
| [workflows](.agents/skills/workflows/SKILL.md) | Orchestration, action steps |
|
|
103
|
-
| [actions](.agents/skills/actions/SKILL.md) | Shared steps, integration tools |
|
|
104
|
-
| [triggers](.agents/skills/triggers/SKILL.md) | Cron, webhook, poll automation |
|
|
105
|
-
| [gateways](.agents/skills/gateways/SKILL.md) | Slack / messaging bindings |
|
|
106
|
-
| [skills](.agents/skills/skills/SKILL.md) | `src/skills/` playbooks |
|
|
107
|
-
| [files](.agents/skills/files/SKILL.md) | Agent workspace files |
|
|
108
|
-
| [credentials](.agents/skills/credentials/SKILL.md) | Vault, OAuth, connect |
|
|
98
|
+
| Skill | Load when |
|
|
99
|
+
| ------------------------------------------------------------ | ---------------------------------- |
|
|
100
|
+
| [cli](.agents/skills/keystroke-cli/SKILL.md) | Local vs cloud CLI, deploy, config |
|
|
101
|
+
| [agents](.agents/skills/keystroke-agents/SKILL.md) | Building or debugging agents |
|
|
102
|
+
| [workflows](.agents/skills/keystroke-workflows/SKILL.md) | Orchestration, action steps |
|
|
103
|
+
| [actions](.agents/skills/keystroke-actions/SKILL.md) | Shared steps, integration tools |
|
|
104
|
+
| [triggers](.agents/skills/keystroke-triggers/SKILL.md) | Cron, webhook, poll automation |
|
|
105
|
+
| [gateways](.agents/skills/keystroke-gateways/SKILL.md) | Slack / messaging bindings |
|
|
106
|
+
| [skills](.agents/skills/keystroke-skills/SKILL.md) | `src/skills/` playbooks |
|
|
107
|
+
| [files](.agents/skills/keystroke-files/SKILL.md) | Agent workspace files |
|
|
108
|
+
| [credentials](.agents/skills/keystroke-credentials/SKILL.md) | Vault, OAuth, connect |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: actions
|
|
2
|
+
name: keystroke-actions
|
|
3
3
|
description: Define keystroke actions with defineAction — workflow steps and agent tools, Zod IO, integration imports from Exa/Google/Slack. Use when authoring src/actions/ or browsing keystroke integrations.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: actions
|
|
@@ -78,4 +78,4 @@ export const researchSignup = defineAction({
|
|
|
78
78
|
|
|
79
79
|
- [catalog-and-imports.md](references/catalog-and-imports.md) — plugins, credentials on actions
|
|
80
80
|
|
|
81
|
-
Related: [workflows](.agents/skills/workflows/SKILL.md), [agents](.agents/skills/agents/SKILL.md), [credentials](.agents/skills/credentials/SKILL.md).
|
|
81
|
+
Related: [workflows](.agents/skills/keystroke-workflows/SKILL.md), [agents](.agents/skills/keystroke-agents/SKILL.md), [credentials](.agents/skills/keystroke-credentials/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: agents
|
|
2
|
+
name: keystroke-agents
|
|
3
3
|
description: Build keystroke agents with defineAgent — models, integration tools (Exa, Google, Slack), skills, files, and sandbox. Use when authoring src/agents/ or debugging agent sessions.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: agents
|
|
@@ -72,4 +72,4 @@ Follow up in the same session: `--session-id <id>`.
|
|
|
72
72
|
- [tools-mcp-codemode.md](references/tools-mcp-codemode.md) — actions as tools, MCP, codemode
|
|
73
73
|
- [workflows-and-testing.md](references/workflows-and-testing.md) — sessions, workflow handoff
|
|
74
74
|
|
|
75
|
-
Related: [actions](.agents/skills/actions/SKILL.md), [workflows](.agents/skills/workflows/SKILL.md), [files](.agents/skills/files/SKILL.md), [credentials](.agents/skills/credentials/SKILL.md).
|
|
75
|
+
Related: [actions](.agents/skills/keystroke-actions/SKILL.md), [workflows](.agents/skills/keystroke-workflows/SKILL.md), [files](.agents/skills/keystroke-files/SKILL.md), [credentials](.agents/skills/keystroke-credentials/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: cli
|
|
2
|
+
name: keystroke-cli
|
|
3
3
|
description: Keystroke CLI — local dev vs cloud platform targets, config switching, deploy, and when to use each. Use when running keystroke commands against localhost or a deployed project.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: cli
|
|
@@ -127,4 +127,4 @@ keystroke trigger list --endpoint shared-hub
|
|
|
127
127
|
keystroke trigger url incoming-message
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
Related: [credentials](.agents/skills/credentials/SKILL.md), [workflows](.agents/skills/workflows/SKILL.md), [agents](.agents/skills/agents/SKILL.md), [triggers](.agents/skills/triggers/SKILL.md).
|
|
130
|
+
Related: [credentials](.agents/skills/keystroke-credentials/SKILL.md), [workflows](.agents/skills/keystroke-workflows/SKILL.md), [agents](.agents/skills/keystroke-agents/SKILL.md), [triggers](.agents/skills/keystroke-triggers/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: credentials
|
|
2
|
+
name: keystroke-credentials
|
|
3
3
|
description: Manage keystroke credentials — vault secrets, OAuth via integration plugins, keystroke connect and credentials CLI. Use when wiring Exa, Google, Slack, or custom API keys.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: credentials
|
|
@@ -67,4 +67,4 @@ Failed integration calls → check missing env vars, OAuth not completed, or wro
|
|
|
67
67
|
|
|
68
68
|
- [cli-and-oauth.md](references/cli-and-oauth.md) — auth, connect, dashboard
|
|
69
69
|
|
|
70
|
-
Related: [actions](.agents/skills/actions/SKILL.md), [gateways](.agents/skills/gateways/SKILL.md).
|
|
70
|
+
Related: [actions](.agents/skills/keystroke-actions/SKILL.md), [gateways](.agents/skills/keystroke-gateways/SKILL.md).
|
package/dist/skills-bundle/skills/{credentials → keystroke-credentials}/references/cli-and-oauth.md
RENAMED
|
@@ -7,7 +7,7 @@ keystroke auth login
|
|
|
7
7
|
keystroke auth status
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Token is stored in the OS keychain and reused for **cloud** CLI commands. Switching between local dev and cloud (`keystroke config use local` / `cloud`) does not require logging in again. See [cli skill](.agents/skills/cli/SKILL.md) for target routing.
|
|
10
|
+
Token is stored in the OS keychain and reused for **cloud** CLI commands. Switching between local dev and cloud (`keystroke config use local` / `cloud`) does not require logging in again. See [cli skill](.agents/skills/keystroke-cli/SKILL.md) for target routing.
|
|
11
11
|
|
|
12
12
|
## Connect integrations (OAuth)
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: files
|
|
2
|
+
name: keystroke-files
|
|
3
3
|
description: Add static files to agent workspaces from src/files/ — product docs, instructions, context. Use with defineAgent files option.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: files
|
|
@@ -33,4 +33,4 @@ Use `files: "shared"` to mount `src/files/shared/` instead.
|
|
|
33
33
|
|
|
34
34
|
Point the agent at paths in `systemPrompt`. After `keystroke start`, verify behavior with `keystroke agent prompt support --message "…"`.
|
|
35
35
|
|
|
36
|
-
Related: [agents](.agents/skills/agents/SKILL.md), [skills](.agents/skills/skills/SKILL.md).
|
|
36
|
+
Related: [agents](.agents/skills/keystroke-agents/SKILL.md), [skills](.agents/skills/keystroke-skills/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: gateways
|
|
2
|
+
name: keystroke-gateways
|
|
3
3
|
description: Chat with keystroke agents from Slack via @keystrokehq/slack — OAuth, dashboard binding, channel attach. Use when setting up messaging for agents.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: gateways
|
|
@@ -41,4 +41,4 @@ keystroke agent sessions get <agent-key> <session-id> --include messages,trace
|
|
|
41
41
|
|
|
42
42
|
- [slack-setup.md](references/slack-setup.md) — env vars, attach flow
|
|
43
43
|
|
|
44
|
-
Related: [agents](.agents/skills/agents/SKILL.md), [credentials](.agents/skills/credentials/SKILL.md).
|
|
44
|
+
Related: [agents](.agents/skills/keystroke-agents/SKILL.md), [credentials](.agents/skills/keystroke-credentials/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: skills
|
|
2
|
+
name: keystroke-skills
|
|
3
3
|
description: Add Agent Skills playbooks in src/skills/ for defineAgent — SKILL.md format, optional references. Use when giving agents domain-specific instructions.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: skills
|
|
@@ -31,4 +31,4 @@ Follow [Agent Skills](https://agentskills.io/specification): YAML frontmatter wi
|
|
|
31
31
|
|
|
32
32
|
Browse [skills.sh](https://skills.sh) — copy into `src/skills/{key}/` and fix `name` to match the folder.
|
|
33
33
|
|
|
34
|
-
Related: [agents](.agents/skills/agents/SKILL.md), [files](.agents/skills/files/SKILL.md).
|
|
34
|
+
Related: [agents](.agents/skills/keystroke-agents/SKILL.md), [files](.agents/skills/keystroke-files/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: triggers
|
|
2
|
+
name: keystroke-triggers
|
|
3
3
|
description: Wire keystroke workflows to cron, webhook, and poll sources in src/triggers/. Use when adding automation or auditing trigger runs.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: triggers
|
|
@@ -104,4 +104,4 @@ keystroke trigger poll <poll-attachment-id> # on-demand poll
|
|
|
104
104
|
|
|
105
105
|
Check `src/triggers/` in your project for existing patterns before adding new ones.
|
|
106
106
|
|
|
107
|
-
Related: [workflows](.agents/skills/workflows/SKILL.md), [gateways](.agents/skills/gateways/SKILL.md).
|
|
107
|
+
Related: [workflows](.agents/skills/keystroke-workflows/SKILL.md), [gateways](.agents/skills/keystroke-gateways/SKILL.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: workflows
|
|
2
|
+
name: keystroke-workflows
|
|
3
3
|
description: Build keystroke workflows with defineWorkflow — chain actions, call agents, typed Zod IO. Use when authoring src/workflows/ or auditing workflow runs.
|
|
4
4
|
metadata:
|
|
5
5
|
keystroke-domain: workflows
|
|
@@ -59,4 +59,4 @@ Unit-test through `executeWorkflow` from `@keystrokehq/workflow` — never call
|
|
|
59
59
|
- [authoring.md](references/authoring.md) — agents in actions, credentials, composition
|
|
60
60
|
- [testing.md](references/testing.md) — unit tests, stubbing actions, run/trace debugging
|
|
61
61
|
|
|
62
|
-
Related: [actions](.agents/skills/actions/SKILL.md), [triggers](.agents/skills/triggers/SKILL.md), [agents](.agents/skills/agents/SKILL.md).
|
|
62
|
+
Related: [actions](.agents/skills/keystroke-actions/SKILL.md), [triggers](.agents/skills/keystroke-triggers/SKILL.md), [agents](.agents/skills/keystroke-agents/SKILL.md).
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
//#region src/project/resolve-cli-root.ts
|
|
7
|
+
function isCliPackage(dir) {
|
|
8
|
+
const packageJsonPath = join(dir, "package.json");
|
|
9
|
+
if (!existsSync(packageJsonPath)) return false;
|
|
10
|
+
return JSON.parse(readFileSync(packageJsonPath, "utf8")).name === "@keystrokehq/cli";
|
|
11
|
+
}
|
|
12
|
+
function resolveCliRoot(fromModuleUrl) {
|
|
13
|
+
let dir = dirname(fileURLToPath(fromModuleUrl));
|
|
14
|
+
while (dir !== dirname(dir)) {
|
|
15
|
+
if (isCliPackage(dir)) return dir;
|
|
16
|
+
dir = dirname(dir);
|
|
17
|
+
}
|
|
18
|
+
throw new Error("Could not resolve keystroke CLI package root");
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/init/package-manager.ts
|
|
22
|
+
const MANAGERS = [
|
|
23
|
+
"pnpm",
|
|
24
|
+
"npm",
|
|
25
|
+
"yarn",
|
|
26
|
+
"bun"
|
|
27
|
+
];
|
|
28
|
+
function detectPackageManager() {
|
|
29
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
30
|
+
for (const manager of MANAGERS) if (userAgent.startsWith(manager)) return manager;
|
|
31
|
+
if (process.env.PNPM_HOME) return "pnpm";
|
|
32
|
+
return "npm";
|
|
33
|
+
}
|
|
34
|
+
function resolvePackageManager(explicit) {
|
|
35
|
+
if (!explicit) return detectPackageManager();
|
|
36
|
+
const normalized = explicit.trim().toLowerCase();
|
|
37
|
+
if (!MANAGERS.includes(normalized)) throw new Error(`Unsupported package manager "${explicit}". Use npm, pnpm, yarn, or bun.`);
|
|
38
|
+
return normalized;
|
|
39
|
+
}
|
|
40
|
+
/** Resolve GitHub Packages auth for @keystrokehq/* when NODE_AUTH_TOKEN is unset. */
|
|
41
|
+
function resolveGithubPackagesToken() {
|
|
42
|
+
if (process.env.NODE_AUTH_TOKEN) return process.env.NODE_AUTH_TOKEN;
|
|
43
|
+
for (const key of ["GITHUB_TOKEN", "GH_TOKEN"]) {
|
|
44
|
+
const value = process.env[key];
|
|
45
|
+
if (value) return value;
|
|
46
|
+
}
|
|
47
|
+
const gh = spawnSync("gh", ["auth", "token"], { encoding: "utf8" });
|
|
48
|
+
if (gh.status === 0) {
|
|
49
|
+
const token = gh.stdout.trim();
|
|
50
|
+
if (token) return token;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function installDependencies(cwd, manager) {
|
|
54
|
+
const token = resolveGithubPackagesToken();
|
|
55
|
+
if (spawnSync(manager, ["install"], {
|
|
56
|
+
cwd,
|
|
57
|
+
stdio: "inherit",
|
|
58
|
+
env: token ? {
|
|
59
|
+
...process.env,
|
|
60
|
+
NODE_AUTH_TOKEN: token
|
|
61
|
+
} : process.env
|
|
62
|
+
}).status !== 0) throw new Error(`${manager} install failed`);
|
|
63
|
+
}
|
|
64
|
+
function installPlaygroundDependencies(cwd) {
|
|
65
|
+
if (spawnSync("pnpm", ["install", "--ignore-workspace"], {
|
|
66
|
+
cwd,
|
|
67
|
+
stdio: "inherit",
|
|
68
|
+
env: process.env
|
|
69
|
+
}).status !== 0) throw new Error("pnpm install failed");
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build every workspace package so the playground's `link:` deps resolve to
|
|
73
|
+
* compiled `dist/`. Without this, `keystroke dev` fails with
|
|
74
|
+
* `ERR_MODULE_NOT_FOUND` against whichever package was never built. Turbo
|
|
75
|
+
* caches, so this is only slow on the first run.
|
|
76
|
+
*/
|
|
77
|
+
function buildPlaygroundWorkspace(monorepoRoot) {
|
|
78
|
+
const { NODE_OPTIONS: _drop, ...buildEnv } = process.env;
|
|
79
|
+
if (spawnSync("pnpm", ["run", "build"], {
|
|
80
|
+
cwd: monorepoRoot,
|
|
81
|
+
stdio: "inherit",
|
|
82
|
+
env: buildEnv
|
|
83
|
+
}).status !== 0) throw new Error("workspace build failed (pnpm run build)");
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/version.ts
|
|
87
|
+
function readCliVersion() {
|
|
88
|
+
const packageJsonPath = join(resolveCliRoot(import.meta.url), "package.json");
|
|
89
|
+
return JSON.parse(readFileSync(packageJsonPath, "utf8")).version ?? "0.0.0";
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { installPlaygroundDependencies as a, installDependencies as i, buildPlaygroundWorkspace as n, resolvePackageManager as o, detectPackageManager as r, resolveCliRoot as s, readCliVersion as t };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=version-DESgLEkE.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-DESgLEkE.mjs","names":[],"sources":["../src/project/resolve-cli-root.ts","../src/init/package-manager.ts","../src/version.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nfunction isCliPackage(dir: string): boolean {\n const packageJsonPath = join(dir, \"package.json\");\n if (!existsSync(packageJsonPath)) {\n return false;\n }\n\n const pkg = JSON.parse(readFileSync(packageJsonPath, \"utf8\")) as { name?: string };\n return pkg.name === \"@keystrokehq/cli\";\n}\n\nexport function resolveCliRoot(fromModuleUrl: string): string {\n let dir = dirname(fileURLToPath(fromModuleUrl));\n\n while (dir !== dirname(dir)) {\n if (isCliPackage(dir)) {\n return dir;\n }\n\n dir = dirname(dir);\n }\n\n throw new Error(\"Could not resolve keystroke CLI package root\");\n}\n","import { spawnSync } from \"node:child_process\";\n\nexport type PackageManager = \"npm\" | \"pnpm\" | \"yarn\" | \"bun\";\n\nconst MANAGERS: PackageManager[] = [\"pnpm\", \"npm\", \"yarn\", \"bun\"];\n\nexport function detectPackageManager(): PackageManager {\n const userAgent = process.env.npm_config_user_agent ?? \"\";\n\n for (const manager of MANAGERS) {\n if (userAgent.startsWith(manager)) {\n return manager;\n }\n }\n\n if (process.env.PNPM_HOME) {\n return \"pnpm\";\n }\n\n return \"npm\";\n}\n\nexport function resolvePackageManager(explicit?: string): PackageManager {\n if (!explicit) {\n return detectPackageManager();\n }\n\n const normalized = explicit.trim().toLowerCase();\n if (!MANAGERS.includes(normalized as PackageManager)) {\n throw new Error(`Unsupported package manager \"${explicit}\". Use npm, pnpm, yarn, or bun.`);\n }\n\n return normalized as PackageManager;\n}\n\n/** Resolve GitHub Packages auth for @keystrokehq/* when NODE_AUTH_TOKEN is unset. */\nexport function resolveGithubPackagesToken(): string | undefined {\n if (process.env.NODE_AUTH_TOKEN) {\n return process.env.NODE_AUTH_TOKEN;\n }\n\n for (const key of [\"GITHUB_TOKEN\", \"GH_TOKEN\"] as const) {\n const value = process.env[key];\n if (value) {\n return value;\n }\n }\n\n const gh = spawnSync(\"gh\", [\"auth\", \"token\"], { encoding: \"utf8\" });\n if (gh.status === 0) {\n const token = gh.stdout.trim();\n if (token) {\n return token;\n }\n }\n\n return undefined;\n}\n\nexport function installDependencies(cwd: string, manager: PackageManager): void {\n const token = resolveGithubPackagesToken();\n const env = token ? { ...process.env, NODE_AUTH_TOKEN: token } : process.env;\n\n const result = spawnSync(manager, [\"install\"], {\n cwd,\n stdio: \"inherit\",\n env,\n });\n\n if (result.status !== 0) {\n throw new Error(`${manager} install failed`);\n }\n}\n\nexport function installPlaygroundDependencies(cwd: string): void {\n const result = spawnSync(\"pnpm\", [\"install\", \"--ignore-workspace\"], {\n cwd,\n stdio: \"inherit\",\n env: process.env,\n });\n\n if (result.status !== 0) {\n throw new Error(\"pnpm install failed\");\n }\n}\n\n/**\n * Build every workspace package so the playground's `link:` deps resolve to\n * compiled `dist/`. Without this, `keystroke dev` fails with\n * `ERR_MODULE_NOT_FOUND` against whichever package was never built. Turbo\n * caches, so this is only slow on the first run.\n */\nexport function buildPlaygroundWorkspace(monorepoRoot: string): void {\n // Build with a clean Node env: the `keystroke-dev` wrapper sets\n // NODE_OPTIONS=--conditions=development, which would make tsdown/turbo resolve\n // their own deps to src/ and fail. Dropping NODE_OPTIONS builds to dist/ normally.\n const { NODE_OPTIONS: _drop, ...buildEnv } = process.env;\n const result = spawnSync(\"pnpm\", [\"run\", \"build\"], {\n cwd: monorepoRoot,\n stdio: \"inherit\",\n env: buildEnv,\n });\n\n if (result.status !== 0) {\n throw new Error(\"workspace build failed (pnpm run build)\");\n }\n}\n","import { readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { resolveCliRoot } from \"./project/resolve-cli-root\";\n\nexport function readCliVersion(): string {\n const packageJsonPath = join(resolveCliRoot(import.meta.url), \"package.json\");\n const pkg = JSON.parse(readFileSync(packageJsonPath, \"utf8\")) as { version?: string };\n return pkg.version ?? \"0.0.0\";\n}\n"],"mappings":";;;;;;AAIA,SAAS,aAAa,KAAsB;CAC1C,MAAM,kBAAkB,KAAK,KAAK,cAAc;CAChD,IAAI,CAAC,WAAW,eAAe,GAC7B,OAAO;CAIT,OADY,KAAK,MAAM,aAAa,iBAAiB,MAAM,CAClD,EAAE,SAAS;AACtB;AAEA,SAAgB,eAAe,eAA+B;CAC5D,IAAI,MAAM,QAAQ,cAAc,aAAa,CAAC;CAE9C,OAAO,QAAQ,QAAQ,GAAG,GAAG;EAC3B,IAAI,aAAa,GAAG,GAClB,OAAO;EAGT,MAAM,QAAQ,GAAG;CACnB;CAEA,MAAM,IAAI,MAAM,8CAA8C;AAChE;;;ACtBA,MAAM,WAA6B;CAAC;CAAQ;CAAO;CAAQ;AAAK;AAEhE,SAAgB,uBAAuC;CACrD,MAAM,YAAY,QAAQ,IAAI,yBAAyB;CAEvD,KAAK,MAAM,WAAW,UACpB,IAAI,UAAU,WAAW,OAAO,GAC9B,OAAO;CAIX,IAAI,QAAQ,IAAI,WACd,OAAO;CAGT,OAAO;AACT;AAEA,SAAgB,sBAAsB,UAAmC;CACvE,IAAI,CAAC,UACH,OAAO,qBAAqB;CAG9B,MAAM,aAAa,SAAS,KAAK,EAAE,YAAY;CAC/C,IAAI,CAAC,SAAS,SAAS,UAA4B,GACjD,MAAM,IAAI,MAAM,gCAAgC,SAAS,gCAAgC;CAG3F,OAAO;AACT;;AAGA,SAAgB,6BAAiD;CAC/D,IAAI,QAAQ,IAAI,iBACd,OAAO,QAAQ,IAAI;CAGrB,KAAK,MAAM,OAAO,CAAC,gBAAgB,UAAU,GAAY;EACvD,MAAM,QAAQ,QAAQ,IAAI;EAC1B,IAAI,OACF,OAAO;CAEX;CAEA,MAAM,KAAK,UAAU,MAAM,CAAC,QAAQ,OAAO,GAAG,EAAE,UAAU,OAAO,CAAC;CAClE,IAAI,GAAG,WAAW,GAAG;EACnB,MAAM,QAAQ,GAAG,OAAO,KAAK;EAC7B,IAAI,OACF,OAAO;CAEX;AAGF;AAEA,SAAgB,oBAAoB,KAAa,SAA+B;CAC9E,MAAM,QAAQ,2BAA2B;CASzC,IANe,UAAU,SAAS,CAAC,SAAS,GAAG;EAC7C;EACA,OAAO;EACP,KALU,QAAQ;GAAE,GAAG,QAAQ;GAAK,iBAAiB;EAAM,IAAI,QAAQ;CAMzE,CAES,EAAE,WAAW,GACpB,MAAM,IAAI,MAAM,GAAG,QAAQ,gBAAgB;AAE/C;AAEA,SAAgB,8BAA8B,KAAmB;CAO/D,IANe,UAAU,QAAQ,CAAC,WAAW,oBAAoB,GAAG;EAClE;EACA,OAAO;EACP,KAAK,QAAQ;CACf,CAES,EAAE,WAAW,GACpB,MAAM,IAAI,MAAM,qBAAqB;AAEzC;;;;;;;AAQA,SAAgB,yBAAyB,cAA4B;CAInE,MAAM,EAAE,cAAc,OAAO,GAAG,aAAa,QAAQ;CAOrD,IANe,UAAU,QAAQ,CAAC,OAAO,OAAO,GAAG;EACjD,KAAK;EACL,OAAO;EACP,KAAK;CACP,CAES,EAAE,WAAW,GACpB,MAAM,IAAI,MAAM,yCAAyC;AAE7D;;;ACtGA,SAAgB,iBAAyB;CACvC,MAAM,kBAAkB,KAAK,eAAe,OAAO,KAAK,GAAG,GAAG,cAAc;CAE5E,OADY,KAAK,MAAM,aAAa,iBAAiB,MAAM,CAClD,EAAE,WAAW;AACxB"}
|
package/package.json
CHANGED
/package/dist/skills-bundle/skills/{actions → keystroke-actions}/references/catalog-and-imports.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/skills-bundle/skills/{agents → keystroke-agents}/references/tools-mcp-codemode.md
RENAMED
|
File without changes
|
/package/dist/skills-bundle/skills/{agents → keystroke-agents}/references/workflows-and-testing.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/skills-bundle/skills/{gateways → keystroke-gateways}/references/slack-setup.md
RENAMED
|
File without changes
|
/package/dist/skills-bundle/skills/{workflows → keystroke-workflows}/references/authoring.md
RENAMED
|
File without changes
|
|
File without changes
|