@keystrokehq/keystroke 0.1.78 → 0.1.80

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 (2) hide show
  1. package/README.md +18 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -39,20 +39,30 @@ import { defineConfig } from "@keystrokehq/keystroke/config";
39
39
  import { defineCredential } from "@keystrokehq/keystroke/credentials";
40
40
  ```
41
41
 
42
- ## Custom credentials
42
+ ## Custom apps
43
+
44
+ For a credentialed custom integration, use `defineApp` (not a standalone credential file):
43
45
 
44
46
  ```typescript
45
- import { defineCredential } from "@keystrokehq/keystroke/credentials";
47
+ import { defineApp } from "@keystrokehq/keystroke/app";
46
48
  import { z } from "zod";
47
49
 
48
- export const customAppKey = defineCredential({
49
- key: "CUSTOM_APP_KEY",
50
- fields: { apiKey: z.string() },
50
+ export const customApp = defineApp({
51
+ slug: "custom-app",
52
+ auth: "api_key",
53
+ credential: { apiKey: z.string() },
51
54
  });
52
- ```
53
55
 
54
- ```bash
55
- keystroke credentials set CUSTOM_APP_KEY --scope org --set apiKey=...
56
+ export const doThing = customApp.action({
57
+ slug: "do-thing",
58
+ input: z.object({ id: z.string() }),
59
+ output: z.object({ ok: z.boolean() }),
60
+ async run(input, credentials) {
61
+ return callApi(input.id, credentials["custom-app"].apiKey);
62
+ },
63
+ });
56
64
  ```
57
65
 
66
+ Register a connectable org app with `keystroke apps create` when users should connect via the Apps UI, then `keystroke connect custom-app` (or `credentials create`). See the custom apps docs.
67
+
58
68
  Direct `@keystrokehq/action` (and other primitive) imports remain valid.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/keystroke",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "Keystroke authoring facade — re-exports primitives for user projects.",
5
5
  "repository": {
6
6
  "type": "git",