@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
|
@@ -16,8 +16,7 @@ An action's `run` must **not** call another action (yours or an integration acti
|
|
|
16
16
|
```ts
|
|
17
17
|
// ❌ Don't: an action that calls another action
|
|
18
18
|
import { postMessage } from "@keystrokehq/slack/actions";
|
|
19
|
-
export const notify = defineAction({
|
|
20
|
-
key: "notify",
|
|
19
|
+
export const notify = defineAction({ slug: "notify",
|
|
21
20
|
run: async (input) => postMessage.run({ channel: input.channel, text: input.text }),
|
|
22
21
|
});
|
|
23
22
|
|
|
@@ -36,7 +35,7 @@ import { defineAction } from "@keystrokehq/action";
|
|
|
36
35
|
import { z } from "zod";
|
|
37
36
|
|
|
38
37
|
export const triage = defineAction({
|
|
39
|
-
|
|
38
|
+
slug: "triage",
|
|
40
39
|
name: "Triage",
|
|
41
40
|
description: "Classify an inbound message",
|
|
42
41
|
input: z.object({ message: z.string(), sender: z.string() }),
|
|
@@ -59,7 +58,7 @@ Agents — not other actions — are the one thing an action may invoke:
|
|
|
59
58
|
import signupResearcher from "../agents/signup-researcher";
|
|
60
59
|
|
|
61
60
|
export const researchSignup = defineAction({
|
|
62
|
-
|
|
61
|
+
slug: "research-signup",
|
|
63
62
|
run: async (input) => {
|
|
64
63
|
const result = await signupResearcher.prompt({ message: "…" });
|
|
65
64
|
return { brief: "…" };
|
|
@@ -26,7 +26,7 @@ import { defineAction } from "@keystrokehq/action";
|
|
|
26
26
|
import { slackCredential } from "@keystrokehq/slack";
|
|
27
27
|
|
|
28
28
|
defineAction({
|
|
29
|
-
|
|
29
|
+
slug: "my-notify",
|
|
30
30
|
credentials: [slackCredential] as const,
|
|
31
31
|
run: async (input, credentials) => {
|
|
32
32
|
/* … */
|
|
@@ -17,27 +17,23 @@ Agents are **autonomous LLM runs** with a sandbox, optional skills/files, and **
|
|
|
17
17
|
import { defineAgent } from "@keystrokehq/agent";
|
|
18
18
|
import { exaSearch, exaAnswer } from "@keystrokehq/exa/actions";
|
|
19
19
|
|
|
20
|
-
export default defineAgent(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{ key: "signup-researcher", module: import.meta.url },
|
|
27
|
-
);
|
|
20
|
+
export default defineAgent({
|
|
21
|
+
slug: "signup-researcher",
|
|
22
|
+
systemPrompt: "Research signups with Exa. Stay concise; cite sources.",
|
|
23
|
+
model: "anthropic/claude-sonnet-4-6",
|
|
24
|
+
tools: [exaSearch, exaAnswer],
|
|
25
|
+
});
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
**Skills + files** — static playbooks and docs in the workspace:
|
|
31
29
|
|
|
32
30
|
```ts
|
|
33
|
-
defineAgent(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{ key: "support", module: import.meta.url },
|
|
40
|
-
);
|
|
31
|
+
defineAgent({
|
|
32
|
+
slug: "support",
|
|
33
|
+
systemPrompt: "Read /workspace/product-guide.md before answering.",
|
|
34
|
+
skills: ["support"],
|
|
35
|
+
files: true,
|
|
36
|
+
});
|
|
41
37
|
```
|
|
42
38
|
|
|
43
39
|
Import actions from `@keystrokehq/<integration>/actions` (e.g. `@keystrokehq/exa/actions`, `@keystrokehq/google/gmail/actions`).
|
|
@@ -85,7 +85,7 @@ import { slackCredential } from "@keystrokehq/slack";
|
|
|
85
85
|
import { postMessage } from "@keystrokehq/slack/actions";
|
|
86
86
|
|
|
87
87
|
export const notify = defineAction({
|
|
88
|
-
|
|
88
|
+
slug: "notify",
|
|
89
89
|
credentials: [slackCredential] as const,
|
|
90
90
|
run: async (input, credentials) => postMessage.run(input, credentials),
|
|
91
91
|
});
|
|
@@ -20,13 +20,11 @@ src/files/support/
|
|
|
20
20
|
```ts
|
|
21
21
|
import { defineAgent } from "@keystrokehq/agent";
|
|
22
22
|
|
|
23
|
-
export default defineAgent(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{ key: "support", module: import.meta.url },
|
|
29
|
-
);
|
|
23
|
+
export default defineAgent({
|
|
24
|
+
slug: "support",
|
|
25
|
+
systemPrompt: "Read /workspace/product-guide.md before answering.",
|
|
26
|
+
files: true, // uses agent key → src/files/support/
|
|
27
|
+
});
|
|
30
28
|
```
|
|
31
29
|
|
|
32
30
|
Use `files: "shared"` to mount `src/files/shared/` instead.
|
|
@@ -18,7 +18,10 @@ src/skills/support/
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
|
-
defineAgent({
|
|
21
|
+
defineAgent({
|
|
22
|
+
slug: "support",
|
|
23
|
+
skills: ["support"] /* … */,
|
|
24
|
+
});
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
At runtime → `.agents/skills/support/` in the workspace.
|
|
@@ -19,7 +19,7 @@ import { researchSignup } from "../actions/research-signup";
|
|
|
19
19
|
import { signupBriefMessage } from "../lib/signup";
|
|
20
20
|
|
|
21
21
|
export default defineWorkflow({
|
|
22
|
-
|
|
22
|
+
slug: "signup-pipeline",
|
|
23
23
|
input: z.object({ name: z.string(), email: z.string().email(), company: z.string() }),
|
|
24
24
|
output: z.object({ brief: z.string(), channel: z.string(), ts: z.string() }),
|
|
25
25
|
async run(input) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
2
2
|
|
|
3
|
-
export default defineAgent(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{ key: "hello", module: import.meta.url },
|
|
9
|
-
);
|
|
3
|
+
export default defineAgent({
|
|
4
|
+
slug: "hello",
|
|
5
|
+
systemPrompt: "You are a friendly hello-world agent. Keep replies short.",
|
|
6
|
+
model: "anthropic/claude-sonnet-4-6",
|
|
7
|
+
});
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { greet } from "../actions/greet";
|
|
4
4
|
|
|
5
5
|
export default defineWorkflow({
|
|
6
|
-
|
|
6
|
+
slug: "greeting",
|
|
7
7
|
description: "Return a friendly greeting for a name.",
|
|
8
8
|
input: z.object({ name: z.string() }),
|
|
9
9
|
output: z.object({ greeting: z.string() }),
|