@keystrokehq/skills 0.0.2 → 0.0.4
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/CHANGELOG.md +27 -0
- package/README.md +23 -15
- package/package.json +3 -10
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/SKILL.md +4 -4
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/messaging-gateways.md +7 -7
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/patterns.md +5 -5
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/prebuilt-integrations.md +78 -78
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/sandbox-and-mcp.md +2 -2
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/source-map.md +1 -1
- package/{keystroke-agent-authoring → src/keystroke-agent-authoring}/references/testing.md +4 -4
- package/{keystroke-cli-workspace → src/keystroke-cli-workspace}/SKILL.md +1 -1
- package/{keystroke-cli-workspace → src/keystroke-cli-workspace}/references/command-map.md +3 -3
- package/{keystroke-cli-workspace → src/keystroke-cli-workspace}/references/project-lifecycle.md +1 -1
- package/{keystroke-credential-binding → src/keystroke-credential-binding}/SKILL.md +43 -108
- package/{keystroke-credential-binding → src/keystroke-credential-binding}/references/patterns.md +38 -66
- package/{keystroke-credential-binding → src/keystroke-credential-binding}/references/source-map.md +9 -9
- package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/references/patterns.md +8 -4
- package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/references/source-map.md +2 -3
- package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/references/testing.md +2 -2
- package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/SKILL.md +2 -2
- package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/prebuilt-integrations.md +65 -65
- package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/runtime-helpers.md +3 -3
- package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/source-map.md +1 -1
- package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/testing.md +5 -4
- package/keystroke-agent-authoring/evals/evals.json +0 -29
- package/keystroke-cli-workspace/evals/evals.json +0 -23
- package/keystroke-credential-binding/evals/evals.json +0 -29
- package/keystroke-data-toolkit/evals/evals.json +0 -23
- package/keystroke-task-authoring/evals/evals.json +0 -23
- package/keystroke-trigger-authoring/evals/evals.json +0 -29
- package/keystroke-workflow-as-tool-debugging/evals/evals.json +0 -23
- package/keystroke-workflow-authoring/evals/evals.json +0 -29
- /package/{AGENTS-blurb.md → src/AGENTS.md} +0 -0
- /package/{keystroke-cli-workspace → src/keystroke-cli-workspace}/references/credentials-and-connect.md +0 -0
- /package/{keystroke-credential-binding → src/keystroke-credential-binding}/references/cli.md +0 -0
- /package/{keystroke-data-toolkit → src/keystroke-data-toolkit}/SKILL.md +0 -0
- /package/{keystroke-data-toolkit → src/keystroke-data-toolkit}/references/usage.md +0 -0
- /package/{keystroke-task-authoring → src/keystroke-task-authoring}/SKILL.md +0 -0
- /package/{keystroke-task-authoring → src/keystroke-task-authoring}/references/patterns.md +0 -0
- /package/{keystroke-task-authoring → src/keystroke-task-authoring}/references/source-map.md +0 -0
- /package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/SKILL.md +0 -0
- /package/{keystroke-workflow-as-tool-debugging → src/keystroke-workflow-as-tool-debugging}/SKILL.md +0 -0
- /package/{keystroke-workflow-as-tool-debugging → src/keystroke-workflow-as-tool-debugging}/references/playbook.md +0 -0
- /package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/patterns.md +0 -0
package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/references/source-map.md
RENAMED
|
@@ -101,14 +101,13 @@ All factory-created triggers are callable. Calling one returns a `BoundTrigger`:
|
|
|
101
101
|
|
|
102
102
|
- `trigger()` — bare binding (no transform)
|
|
103
103
|
- `trigger({ transform })` — bound with payload-to-input mapping
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
|
|
105
|
+
Bindings carry only `transform`. To filter events for a specific workflow, derive a child with `trigger.narrow({ name, filter })` and attach that — `.narrow()` is the only authoring path for per-target filtering. Binding-level `filter` and `idempotencyKey` are intentionally not part of the API.
|
|
106
106
|
|
|
107
107
|
## `BoundTrigger`
|
|
108
108
|
|
|
109
109
|
- `.isBoundTrigger` — always `true`
|
|
110
110
|
- `.trigger` — reference to the underlying trigger instance
|
|
111
|
-
- `.filter?` — composed filter (trigger's filter + binding filter)
|
|
112
111
|
- `.transform?` — payload-to-workflow-input mapping function
|
|
113
112
|
|
|
114
113
|
## Workflow `triggers` array
|
package/{keystroke-trigger-authoring → src/keystroke-trigger-authoring}/references/testing.md
RENAMED
|
@@ -6,11 +6,11 @@ Assume `paymentWebhook`, `orderPolling`, and `paymentWorkflow` are the public tr
|
|
|
6
6
|
|
|
7
7
|
## Vitest setup
|
|
8
8
|
|
|
9
|
-
`keystrokeTestPlugin()` adds the
|
|
9
|
+
`keystrokeTestPlugin()` adds the Keystroke testing setup file to Vitest, which is required for credential resolution and context mocking.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
import { defineConfig } from 'vitest/config';
|
|
13
|
-
import { keystrokeTestPlugin } from '@keystrokehq/
|
|
13
|
+
import { keystrokeTestPlugin } from '@keystrokehq/testing';
|
|
14
14
|
|
|
15
15
|
export default defineConfig({
|
|
16
16
|
plugins: [keystrokeTestPlugin()],
|
|
@@ -123,7 +123,7 @@ Teach these rules:
|
|
|
123
123
|
- waits and hooks
|
|
124
124
|
5. Put operational work in steps, shared operations, or agents.
|
|
125
125
|
6. Keep each exported primitive in its own typed file.
|
|
126
|
-
7. Finish with tests using `@keystrokehq/
|
|
126
|
+
7. Finish with tests using `@keystrokehq/testing`.
|
|
127
127
|
|
|
128
128
|
## Workflow rules
|
|
129
129
|
|
|
@@ -202,7 +202,7 @@ keystroke workflows run <authoredWorkflowId> --input '{}' --wait
|
|
|
202
202
|
keystroke workflows run <authoredWorkflowId> --input '{}' --follow
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
`workflows run` executes the current deployed snapshot. It is different from `workflows
|
|
205
|
+
`workflows run` executes the current deployed snapshot. It is different from `workflows test`, which builds local code and runs a temporary artifact.
|
|
206
206
|
|
|
207
207
|
To explicitly start a workflow via API:
|
|
208
208
|
- **Endpoint**: `POST /api/v1/workflows/execute`
|
|
@@ -15,13 +15,13 @@ Use this rule:
|
|
|
15
15
|
Install the package that exports the operation:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
pnpm add @
|
|
18
|
+
pnpm add @keystrokehq/slack
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Import the named operation you want:
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import { sendMessage } from '@
|
|
24
|
+
import { sendMessage } from '@keystrokehq/slack/platform/messages';
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Call the operation directly from your workflow:
|
|
@@ -35,18 +35,18 @@ const result = await sendMessage.run({
|
|
|
35
35
|
|
|
36
36
|
Replace `sendMessage` with any of the operation exports listed below.
|
|
37
37
|
|
|
38
|
-
## `@
|
|
38
|
+
## `@keystrokehq/ai`
|
|
39
39
|
|
|
40
40
|
Install:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
pnpm add @
|
|
43
|
+
pnpm add @keystrokehq/ai
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Import and use:
|
|
47
47
|
|
|
48
48
|
```ts
|
|
49
|
-
import { generateObject, generateText } from '@
|
|
49
|
+
import { generateObject, generateText } from '@keystrokehq/ai/generate';
|
|
50
50
|
|
|
51
51
|
const summary = await generateText.run(/* AI text-generation input */);
|
|
52
52
|
const structured = await generateObject.run(/* AI object-generation input */);
|
|
@@ -60,21 +60,21 @@ Also note:
|
|
|
60
60
|
- this package exports AI provider credential sets for agent authoring
|
|
61
61
|
- this package also exports generation operations, but agent authoring guidance belongs in the agent skill
|
|
62
62
|
|
|
63
|
-
## `@
|
|
63
|
+
## `@keystrokehq/apollo`
|
|
64
64
|
|
|
65
65
|
Install:
|
|
66
66
|
|
|
67
67
|
```sh
|
|
68
|
-
pnpm add @
|
|
68
|
+
pnpm add @keystrokehq/apollo
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Prefer domain subpath imports such as `@
|
|
71
|
+
Prefer domain subpath imports such as `@keystrokehq/apollo/accounts` or `@keystrokehq/apollo/contacts`.
|
|
72
72
|
|
|
73
73
|
Import and use:
|
|
74
74
|
|
|
75
75
|
```ts
|
|
76
|
-
import { createAccount } from '@
|
|
77
|
-
import { searchContacts } from '@
|
|
76
|
+
import { createAccount } from '@keystrokehq/apollo/accounts';
|
|
77
|
+
import { searchContacts } from '@keystrokehq/apollo/contacts';
|
|
78
78
|
|
|
79
79
|
const account = await createAccount.run(/* Apollo create-account input */);
|
|
80
80
|
const contacts = await searchContacts.run(/* Apollo search-contacts input */);
|
|
@@ -128,20 +128,20 @@ const contacts = await searchContacts.run(/* Apollo search-contacts input */);
|
|
|
128
128
|
- `createTasks`: Create Apollo tasks.
|
|
129
129
|
- `searchTasks`: Search Apollo tasks.
|
|
130
130
|
|
|
131
|
-
## `@
|
|
131
|
+
## `@keystrokehq/attio`
|
|
132
132
|
|
|
133
133
|
Install:
|
|
134
134
|
|
|
135
135
|
```sh
|
|
136
|
-
pnpm add @
|
|
136
|
+
pnpm add @keystrokehq/attio
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
Prefer domain subpath imports such as `@
|
|
139
|
+
Prefer domain subpath imports such as `@keystrokehq/attio/records` or `@keystrokehq/attio/lists`.
|
|
140
140
|
|
|
141
141
|
Import and use:
|
|
142
142
|
|
|
143
143
|
```ts
|
|
144
|
-
import { createRecord, queryRecords } from '@
|
|
144
|
+
import { createRecord, queryRecords } from '@keystrokehq/attio/records';
|
|
145
145
|
|
|
146
146
|
const record = await createRecord.run(/* Attio create-record input */);
|
|
147
147
|
const records = await queryRecords.run(/* Attio query-records input */);
|
|
@@ -187,18 +187,18 @@ const records = await queryRecords.run(/* Attio query-records input */);
|
|
|
187
187
|
- `listTasks`: List Attio tasks.
|
|
188
188
|
- `updateTask`: Update an Attio task.
|
|
189
189
|
|
|
190
|
-
## `@
|
|
190
|
+
## `@keystrokehq/daytona`
|
|
191
191
|
|
|
192
192
|
Install:
|
|
193
193
|
|
|
194
194
|
```sh
|
|
195
|
-
pnpm add @
|
|
195
|
+
pnpm add @keystrokehq/daytona
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
Import example:
|
|
199
199
|
|
|
200
200
|
```ts
|
|
201
|
-
import { DaytonaSandbox } from '@
|
|
201
|
+
import { DaytonaSandbox } from '@keystrokehq/daytona';
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
This package does not currently export workflow operations.
|
|
@@ -209,21 +209,21 @@ It currently exports sandbox utilities instead:
|
|
|
209
209
|
- `DaytonaSandbox`: Create a Daytona-backed sandbox for agents.
|
|
210
210
|
- `DaytonaSandboxProvider`: Configure the Daytona sandbox provider.
|
|
211
211
|
|
|
212
|
-
## `@
|
|
212
|
+
## `@keystrokehq/github`
|
|
213
213
|
|
|
214
214
|
Install:
|
|
215
215
|
|
|
216
216
|
```sh
|
|
217
|
-
pnpm add @
|
|
217
|
+
pnpm add @keystrokehq/github
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
Prefer domain subpath imports such as `@
|
|
220
|
+
Prefer domain subpath imports such as `@keystrokehq/github/issues`, `@keystrokehq/github/pull-requests`, or `@keystrokehq/github/repos`.
|
|
221
221
|
|
|
222
222
|
Import and use:
|
|
223
223
|
|
|
224
224
|
```ts
|
|
225
|
-
import { getIssue } from '@
|
|
226
|
-
import { listPullRequests } from '@
|
|
225
|
+
import { getIssue } from '@keystrokehq/github/issues';
|
|
226
|
+
import { listPullRequests } from '@keystrokehq/github/pull-requests';
|
|
227
227
|
|
|
228
228
|
const issue = await getIssue.run({
|
|
229
229
|
owner: 'keystroke',
|
|
@@ -251,22 +251,22 @@ Common operation groups:
|
|
|
251
251
|
|
|
252
252
|
Messaging-specific credential surfaces also exist in this package, but workflow trigger and conversation entry guidance belongs in the trigger and agent skills.
|
|
253
253
|
|
|
254
|
-
## `@
|
|
254
|
+
## `@keystrokehq/google`
|
|
255
255
|
|
|
256
256
|
Install:
|
|
257
257
|
|
|
258
258
|
```sh
|
|
259
|
-
pnpm add @
|
|
259
|
+
pnpm add @keystrokehq/google
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
Prefer domain subpath imports such as `@
|
|
262
|
+
Prefer domain subpath imports such as `@keystrokehq/google/gmail`, `@keystrokehq/google/sheets`, or `@keystrokehq/google/calendar`.
|
|
263
263
|
|
|
264
264
|
Import and use:
|
|
265
265
|
|
|
266
266
|
```ts
|
|
267
|
-
import { listCalendarEvents, createCalendarEvent } from '@
|
|
268
|
-
import { listEmails, sendEmail } from '@
|
|
269
|
-
import { createSpreadsheet, writeSpreadsheetRange } from '@
|
|
267
|
+
import { listCalendarEvents, createCalendarEvent } from '@keystrokehq/google/calendar';
|
|
268
|
+
import { listEmails, sendEmail } from '@keystrokehq/google/gmail';
|
|
269
|
+
import { createSpreadsheet, writeSpreadsheetRange } from '@keystrokehq/google/sheets';
|
|
270
270
|
|
|
271
271
|
const inbox = await listEmails.run({
|
|
272
272
|
labelIds: ['INBOX', 'UNREAD'],
|
|
@@ -332,23 +332,23 @@ await writeSpreadsheetRange.run({
|
|
|
332
332
|
|
|
333
333
|
This package also exports agent-tool variants (`sendEmailTool`, `getEmailTool`, `listEmailsTool`, `labelEmailTool`, `createSpreadsheetTool`, `addSpreadsheetTabTool`, `readSpreadsheetTabTool`, `writeSpreadsheetRangeTool`, `listCalendarsTool`, `listCalendarEventsTool`, `getCalendarEventTool`, `createCalendarEventTool`, `updateCalendarEventTool`, `deleteCalendarEventTool`). Those are for agent authoring, not workflow steps.
|
|
334
334
|
|
|
335
|
-
## `@
|
|
335
|
+
## `@keystrokehq/hubspot`
|
|
336
336
|
|
|
337
337
|
Install:
|
|
338
338
|
|
|
339
339
|
```sh
|
|
340
|
-
pnpm add @
|
|
340
|
+
pnpm add @keystrokehq/hubspot
|
|
341
341
|
```
|
|
342
342
|
|
|
343
|
-
Prefer explicit subpaths such as `@
|
|
344
|
-
`@
|
|
345
|
-
`@
|
|
343
|
+
Prefer explicit subpaths such as `@keystrokehq/hubspot/connection`,
|
|
344
|
+
`@keystrokehq/hubspot/triggers`, and domain paths like
|
|
345
|
+
`@keystrokehq/hubspot/companies` or `@keystrokehq/hubspot/contacts`.
|
|
346
346
|
|
|
347
347
|
Import and use:
|
|
348
348
|
|
|
349
349
|
```ts
|
|
350
|
-
import { createCompany } from '@
|
|
351
|
-
import { searchContacts } from '@
|
|
350
|
+
import { createCompany } from '@keystrokehq/hubspot/companies';
|
|
351
|
+
import { searchContacts } from '@keystrokehq/hubspot/contacts';
|
|
352
352
|
|
|
353
353
|
const company = await createCompany.run(/* HubSpot create-company input */);
|
|
354
354
|
const contacts = await searchContacts.run(/* HubSpot search-contacts input */);
|
|
@@ -390,21 +390,21 @@ const contacts = await searchContacts.run(/* HubSpot search-contacts input */);
|
|
|
390
390
|
- `searchTickets`: Search HubSpot tickets.
|
|
391
391
|
- `updateTicket`: Update a HubSpot ticket.
|
|
392
392
|
|
|
393
|
-
## `@
|
|
393
|
+
## `@keystrokehq/kalshi`
|
|
394
394
|
|
|
395
395
|
Install:
|
|
396
396
|
|
|
397
397
|
```sh
|
|
398
|
-
pnpm add @
|
|
398
|
+
pnpm add @keystrokehq/kalshi
|
|
399
399
|
```
|
|
400
400
|
|
|
401
|
-
Prefer domain subpath imports such as `@
|
|
401
|
+
Prefer domain subpath imports such as `@keystrokehq/kalshi/markets` or `@keystrokehq/kalshi/portfolio`.
|
|
402
402
|
|
|
403
403
|
Import and use:
|
|
404
404
|
|
|
405
405
|
```ts
|
|
406
|
-
import { getMarkets } from '@
|
|
407
|
-
import { createOrder } from '@
|
|
406
|
+
import { getMarkets } from '@keystrokehq/kalshi/markets';
|
|
407
|
+
import { createOrder } from '@keystrokehq/kalshi/portfolio';
|
|
408
408
|
|
|
409
409
|
const markets = await getMarkets.run(/* Kalshi market-list input */);
|
|
410
410
|
const order = await createOrder.run(/* Kalshi create-order input */);
|
|
@@ -542,20 +542,20 @@ const order = await createOrder.run(/* Kalshi create-order input */);
|
|
|
542
542
|
|
|
543
543
|
This package also exports trigger helpers such as `polling`, `marketTrades`, `marketCandles`, `portfolioFills`, `portfolioOrderUpdates`, and `settledPositions`.
|
|
544
544
|
|
|
545
|
-
## `@
|
|
545
|
+
## `@keystrokehq/linear`
|
|
546
546
|
|
|
547
547
|
Install:
|
|
548
548
|
|
|
549
549
|
```sh
|
|
550
|
-
pnpm add @
|
|
550
|
+
pnpm add @keystrokehq/linear
|
|
551
551
|
```
|
|
552
552
|
|
|
553
|
-
Prefer domain subpath imports such as `@
|
|
553
|
+
Prefer domain subpath imports such as `@keystrokehq/linear/issues` or `@keystrokehq/linear/users`.
|
|
554
554
|
|
|
555
555
|
Import and use:
|
|
556
556
|
|
|
557
557
|
```ts
|
|
558
|
-
import { createIssue, searchIssues } from '@
|
|
558
|
+
import { createIssue, searchIssues } from '@keystrokehq/linear/issues';
|
|
559
559
|
|
|
560
560
|
const issue = await createIssue.run(/* Linear create-issue input */);
|
|
561
561
|
const matches = await searchIssues.run(/* Linear search-issues input */);
|
|
@@ -616,22 +616,22 @@ const matches = await searchIssues.run(/* Linear search-issues input */);
|
|
|
616
616
|
- `deleteWebhook`: Delete a Linear webhook.
|
|
617
617
|
- `listWebhooks`: List Linear webhooks.
|
|
618
618
|
|
|
619
|
-
## `@
|
|
619
|
+
## `@keystrokehq/perplexity`
|
|
620
620
|
|
|
621
621
|
Install:
|
|
622
622
|
|
|
623
623
|
```sh
|
|
624
|
-
pnpm add @
|
|
624
|
+
pnpm add @keystrokehq/perplexity
|
|
625
625
|
```
|
|
626
626
|
|
|
627
|
-
Prefer subpath imports such as `@
|
|
627
|
+
Prefer subpath imports such as `@keystrokehq/perplexity/search`, `@keystrokehq/perplexity/stream`, and `@keystrokehq/perplexity/generate`.
|
|
628
628
|
|
|
629
629
|
Import and use:
|
|
630
630
|
|
|
631
631
|
```ts
|
|
632
|
-
import { generateText } from '@
|
|
633
|
-
import { research, search } from '@
|
|
634
|
-
import { streamSearch } from '@
|
|
632
|
+
import { generateText } from '@keystrokehq/perplexity/generate';
|
|
633
|
+
import { research, search } from '@keystrokehq/perplexity/search';
|
|
634
|
+
import { streamSearch } from '@keystrokehq/perplexity/stream';
|
|
635
635
|
|
|
636
636
|
const answer = await generateText.run(/* Perplexity text-generation input */);
|
|
637
637
|
const results = await search.run(/* Perplexity search input */);
|
|
@@ -642,21 +642,21 @@ const results = await search.run(/* Perplexity search input */);
|
|
|
642
642
|
- `search`: Run a Perplexity search query.
|
|
643
643
|
- `streamSearch`: Stream Perplexity search results.
|
|
644
644
|
|
|
645
|
-
## `@
|
|
645
|
+
## `@keystrokehq/polymarket`
|
|
646
646
|
|
|
647
647
|
Install:
|
|
648
648
|
|
|
649
649
|
```sh
|
|
650
|
-
pnpm add @
|
|
650
|
+
pnpm add @keystrokehq/polymarket
|
|
651
651
|
```
|
|
652
652
|
|
|
653
|
-
Prefer domain subpath imports such as `@
|
|
653
|
+
Prefer domain subpath imports such as `@keystrokehq/polymarket/markets` or `@keystrokehq/polymarket/discovery`.
|
|
654
654
|
|
|
655
655
|
Import and use:
|
|
656
656
|
|
|
657
657
|
```ts
|
|
658
|
-
import { getMarket } from '@
|
|
659
|
-
import { search } from '@
|
|
658
|
+
import { getMarket } from '@keystrokehq/polymarket/markets';
|
|
659
|
+
import { search } from '@keystrokehq/polymarket/discovery';
|
|
660
660
|
|
|
661
661
|
const market = await getMarket.run(/* Polymarket get-market input */);
|
|
662
662
|
const results = await search.run(/* Polymarket search input */);
|
|
@@ -709,21 +709,21 @@ const results = await search.run(/* Polymarket search input */);
|
|
|
709
709
|
- `getPriceHistory`: Fetch historical price data for a market.
|
|
710
710
|
- `listPrices`: List prices across markets.
|
|
711
711
|
|
|
712
|
-
## `@
|
|
712
|
+
## `@keystrokehq/scrapin`
|
|
713
713
|
|
|
714
714
|
Install:
|
|
715
715
|
|
|
716
716
|
```sh
|
|
717
|
-
pnpm add @
|
|
717
|
+
pnpm add @keystrokehq/scrapin
|
|
718
718
|
```
|
|
719
719
|
|
|
720
|
-
Prefer domain subpath imports such as `@
|
|
720
|
+
Prefer domain subpath imports such as `@keystrokehq/scrapin/persons` or `@keystrokehq/scrapin/companies`.
|
|
721
721
|
|
|
722
722
|
Import and use:
|
|
723
723
|
|
|
724
724
|
```ts
|
|
725
|
-
import { getCompanyProfile } from '@
|
|
726
|
-
import { searchPersons } from '@
|
|
725
|
+
import { getCompanyProfile } from '@keystrokehq/scrapin/companies';
|
|
726
|
+
import { searchPersons } from '@keystrokehq/scrapin/persons';
|
|
727
727
|
|
|
728
728
|
const company = await getCompanyProfile.run(/* Scrapin company-profile input */);
|
|
729
729
|
const people = await searchPersons.run(/* Scrapin search-persons input */);
|
|
@@ -760,21 +760,21 @@ const people = await searchPersons.run(/* Scrapin search-persons input */);
|
|
|
760
760
|
- `resolvePersonByEmail`: Resolve a person from an email address.
|
|
761
761
|
- `searchPersons`: Search people.
|
|
762
762
|
|
|
763
|
-
## `@
|
|
763
|
+
## `@keystrokehq/slack`
|
|
764
764
|
|
|
765
765
|
Install:
|
|
766
766
|
|
|
767
767
|
```sh
|
|
768
|
-
pnpm add @
|
|
768
|
+
pnpm add @keystrokehq/slack
|
|
769
769
|
```
|
|
770
770
|
|
|
771
|
-
Prefer mode/domain imports such as `@
|
|
771
|
+
Prefer mode/domain imports such as `@keystrokehq/slack/platform/messages` or `@keystrokehq/slack/platform/users`.
|
|
772
772
|
|
|
773
773
|
Import and use:
|
|
774
774
|
|
|
775
775
|
```ts
|
|
776
|
-
import { sendMessage } from '@
|
|
777
|
-
import { listUsers } from '@
|
|
776
|
+
import { sendMessage } from '@keystrokehq/slack/platform/messages';
|
|
777
|
+
import { listUsers } from '@keystrokehq/slack/platform/users';
|
|
778
778
|
|
|
779
779
|
const users = await listUsers.run(/* Slack list-users input */);
|
|
780
780
|
const message = await sendMessage.run(/* Slack send-message input */);
|
|
@@ -239,7 +239,7 @@ Use these when operation behavior depends on retry state or when you want the st
|
|
|
239
239
|
|
|
240
240
|
## Public testing helpers
|
|
241
241
|
|
|
242
|
-
Import these from `@keystrokehq/
|
|
242
|
+
Import these from `@keystrokehq/testing`:
|
|
243
243
|
|
|
244
244
|
- `keystrokeTestPlugin`
|
|
245
245
|
- `createTestRuntime`
|
|
@@ -248,7 +248,7 @@ Import these from `@keystrokehq/core/vitest`:
|
|
|
248
248
|
|
|
249
249
|
### What they are used for
|
|
250
250
|
|
|
251
|
-
- `keystrokeTestPlugin`: Vitest plugin that wires
|
|
251
|
+
- `keystrokeTestPlugin`: Vitest plugin that wires Keystroke testing setup into the test process
|
|
252
252
|
- `createTestRuntime`: build a full workflow test runtime with workflow context plus step execution metadata
|
|
253
253
|
- `createTestStepContext`: build only the operation / step context for isolated tests
|
|
254
254
|
- `createMockHook`: create an immediately resolving hook for tests that would otherwise block on `ctx.createHook(...)`
|
|
@@ -256,7 +256,7 @@ Import these from `@keystrokehq/core/vitest`:
|
|
|
256
256
|
Example:
|
|
257
257
|
|
|
258
258
|
```ts
|
|
259
|
-
import { createMockHook } from '@keystrokehq/
|
|
259
|
+
import { createMockHook } from '@keystrokehq/testing';
|
|
260
260
|
|
|
261
261
|
const hook = createMockHook();
|
|
262
262
|
await hook;
|
package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/source-map.md
RENAMED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
createTestRuntime,
|
|
10
10
|
createTestStepContext,
|
|
11
11
|
keystrokeTestPlugin,
|
|
12
|
-
} from '@keystrokehq/
|
|
12
|
+
} from '@keystrokehq/testing';
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
`Operation`, `Step`, and `Tool` are aliases for the same class. In this workflow skill, prefer `Step` for examples and explanations, but `Operation` is equally valid for shared or integration-oriented code.
|
package/{keystroke-workflow-authoring → src/keystroke-workflow-authoring}/references/testing.md
RENAMED
|
@@ -6,11 +6,11 @@ Assume `helloWorkflow`, `accountSyncWorkflow`, `loadCustomer`, `paymentWebhook`,
|
|
|
6
6
|
|
|
7
7
|
## Vitest setup
|
|
8
8
|
|
|
9
|
-
`keystrokeTestPlugin()` adds the
|
|
9
|
+
`keystrokeTestPlugin()` adds the Keystroke testing setup file to Vitest. Use it when you want normal `workflow.run(...)` and `step.run(...)` calls to work in tests without building custom harness code first.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
import { defineConfig } from 'vitest/config';
|
|
13
|
-
import { keystrokeTestPlugin } from '@keystrokehq/
|
|
13
|
+
import { keystrokeTestPlugin } from '@keystrokehq/testing';
|
|
14
14
|
|
|
15
15
|
export default defineConfig({
|
|
16
16
|
plugins: [keystrokeTestPlugin()],
|
|
@@ -39,7 +39,8 @@ test('returns the greeting', async () => {
|
|
|
39
39
|
Use it when a workflow test needs more than plain input data.
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
|
-
import {
|
|
42
|
+
import { createTestRuntime } from '@keystrokehq/testing';
|
|
43
|
+
import { createMockHook } from '@keystrokehq/testing';
|
|
43
44
|
|
|
44
45
|
const runtime = createTestRuntime({
|
|
45
46
|
workflowGlobals: {
|
|
@@ -59,7 +60,7 @@ await accountSyncWorkflow.run(
|
|
|
59
60
|
`createTestStepContext()` is the smaller helper for operation unit tests. Use it when you want to call `step.run(...)` or `operation.run(...)` directly and provide only the runtime context values that operation reads.
|
|
60
61
|
|
|
61
62
|
```ts
|
|
62
|
-
import { createTestStepContext } from '@keystrokehq/
|
|
63
|
+
import { createTestStepContext } from '@keystrokehq/testing';
|
|
63
64
|
|
|
64
65
|
const stepContext = createTestStepContext({
|
|
65
66
|
credentials: {
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-agent-authoring",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "I need a Keystroke agent that can look up Slack users and DM one of them. What fields should I set up, and where do tools and credentials go?",
|
|
7
|
-
"expected_output": "Explains the canonical Keystroke agent path, the important agent fields, tool configuration, and the credential relationship between the agent and its tools.",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "Should this be a Step or an agent? The task is to inspect some repo files, decide what changed, and then call a couple of tools depending on what it finds.",
|
|
13
|
-
"expected_output": "Explains when an agent is appropriate, when a normal step would be better, and how workflow orchestration relates to agent scope.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "Show me how to build a sandboxed Keystroke coding agent that can work in a checked-out repo and maybe use MCP later if needed.",
|
|
19
|
-
"expected_output": "Uses the public sandbox and MCP patterns, points to MCP references when needed, and keeps workflow orchestration separate.",
|
|
20
|
-
"files": []
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"id": 4,
|
|
24
|
-
"prompt": "I want my Keystroke agent to answer messages from GitHub conversations. Should I use a trigger or something else?",
|
|
25
|
-
"expected_output": "Explains that conversational entry belongs on Agent.messaging with a MessagingGateway, not on workflow triggers, and keeps the distinction between tasks, triggers, and conversations clear.",
|
|
26
|
-
"files": []
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-cli-workspace",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "I need to deploy a Keystroke task. What command should I use, and how should I inspect the available flags before running it?",
|
|
7
|
-
"expected_output": "Uses the CLI skill, chooses `keystroke deploy --target <task.task.ts>`, and tells the agent to inspect `keystroke deploy --help` first.",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "How do I set up a new Keystroke project and make the Keystroke-authored skills available in Cursor?",
|
|
13
|
-
"expected_output": "Uses `keystroke init`, explains `keystroke skills sync`, and tells the agent to inspect command help first.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "I need to figure out which CLI options exist for uploading credentials. What should I do before running the upload command?",
|
|
19
|
-
"expected_output": "Explicitly uses `keystroke credentials upload --help` before describing the upload flow.",
|
|
20
|
-
"files": []
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-credential-binding",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "I need to add a credential set for a new API integration in Keystroke. Can you show me how to define the CredentialSet and how a step would read it safely?",
|
|
7
|
-
"expected_output": "Explains CredentialSet authoring, typed schemas, and step context access through ctx.credentials.",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "Before I deploy these workflows, how do I figure out which credentials are required and upload them from env vars with the Keystroke CLI?",
|
|
13
|
-
"expected_output": "Uses the tested credential requirements and upload flows, including the KEYSTROKE_<KEY> convention.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "Does the same credential model work for steps, tools, agents, and triggers, or are there important differences I need to know?",
|
|
19
|
-
"expected_output": "Explains the shared CredentialSet model and the differences in where credentials are attached and consumed across primitives.",
|
|
20
|
-
"files": []
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"id": 4,
|
|
24
|
-
"prompt": "How do I upload official GitHub credentials with the current Keystroke CLI? Please use the real command surface, not an outdated one.",
|
|
25
|
-
"expected_output": "Uses the current credentials upload syntax, including --integration and the KEYSTROKE_<KEY> convention, and avoids stale flags such as --from-workflows or --no-verify.",
|
|
26
|
-
"files": []
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-data-toolkit",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "My workflow tool can return a few megabytes of audit rows. How should I configure the workflow and how should the agent inspect the result?",
|
|
7
|
-
"expected_output": "Recommends largeResultMode: 'ref', explains the ref envelope, and uses describe_ref/read_ref/slice_ref with bounded ranges.",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "The agent called read_ref and got truncated: true. What should it do next?",
|
|
13
|
-
"expected_output": "Explains that truncation is signaled and the agent should request a narrower range or targeted slice rather than assuming it saw all data.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "Can we add DuckDB reducers for this large CSV workflow output?",
|
|
19
|
-
"expected_output": "States that reducers and DuckDB are deferred in the active product and recommends bounded ref reads or samples instead.",
|
|
20
|
-
"files": []
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-task-authoring",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "I want a Keystroke task that runs an agent every time a webhook fires and includes the webhook payload in the prompt. How should I author that?",
|
|
7
|
-
"expected_output": "Explains Task authoring, inline triggers, prompt templating with trigger context, and keeps workflow attachments out of the task path.",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "Should this be a workflow or a task? The job is just: cron fires, agent writes a summary, then stop.",
|
|
13
|
-
"expected_output": "Chooses Task, explains why the task model fits better than workflow orchestration, and mentions deploy --target for focused task deploys.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "How do I limit a Keystroke task to run once and expire after a week?",
|
|
19
|
-
"expected_output": "Explains task lifecycle fields such as maxExecutions and expiresAfter with authored code examples.",
|
|
20
|
-
"files": []
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "keystroke-trigger-authoring",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "How do I create a Keystroke webhook trigger for a Stripe event and map the incoming payload into my workflow input?",
|
|
7
|
-
"expected_output": "Explains webhookTrigger() factory setup, required and optional fields, and the bound trigger transform pattern via Workflow({ triggers: [trigger({ transform })] }).",
|
|
8
|
-
"files": []
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 2,
|
|
12
|
-
"prompt": "I need a polling trigger that checks an external API every 15 minutes and only launches the workflow for new items. What should that look like?",
|
|
13
|
-
"expected_output": "Explains pollingTrigger() factory setup, schedule, poll/response, optional filter and idempotency behavior, and listing the trigger in Workflow({ triggers: [...] }) with optional transform binding.",
|
|
14
|
-
"files": []
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": 3,
|
|
18
|
-
"prompt": "What is the right way to test a Keystroke trigger? I want to validate webhook verify/filter logic and the input transform into the workflow.",
|
|
19
|
-
"expected_output": "Points to trigger-specific callback tests (verify, filter, payload.parse) plus bound trigger transform testing via bound.transform?.(payload).",
|
|
20
|
-
"files": []
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"id": 4,
|
|
24
|
-
"prompt": "I want a cron-driven agent job. Do I attach a trigger to the agent, attach it to a task, or something else?",
|
|
25
|
-
"expected_output": "Explains that workflow triggers are listed in Workflow({ triggers: [...] }), task triggers are listed inline on Task.triggers, and messaging gateways are not triggers.",
|
|
26
|
-
"files": []
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|