@gjermundgaraba/effect-actions 0.6.0 → 0.8.0

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 (48) hide show
  1. package/README.md +3 -3
  2. package/dist/Action.d.mts +29 -8
  3. package/dist/Action.mjs +2 -2
  4. package/dist/ActionCatalog.d.mts +2 -3
  5. package/dist/ActionCatalog.mjs +8 -6
  6. package/dist/ActionCli.d.mts +1 -1
  7. package/dist/ActionCli.mjs +1 -1
  8. package/dist/ActionCliClient.d.mts +11 -12
  9. package/dist/ActionCliClient.mjs +7 -14
  10. package/dist/ActionGroup.d.mts +1 -1
  11. package/dist/ActionGroup.mjs +3 -9
  12. package/dist/ActionHttp.d.mts +5 -7
  13. package/dist/ActionHttp.mjs +8 -6
  14. package/dist/ActionHttpClient.d.mts +8 -20
  15. package/dist/ActionHttpClient.mjs +8 -16
  16. package/dist/ActionMcp.d.mts +8 -7
  17. package/dist/ActionMcp.mjs +73 -4
  18. package/dist/ActionToolkit.d.mts +11 -12
  19. package/dist/ActionToolkit.mjs +1 -1
  20. package/dist/Authentication.d.mts +1 -1
  21. package/dist/Authentication.mjs +1 -1
  22. package/dist/Testing.d.mts +11 -9
  23. package/dist/Testing.mjs +10 -9
  24. package/dist/internal/actions.d.mts +1 -1
  25. package/dist/internal/cli.d.mts +1 -1
  26. package/dist/internal/cli.mjs +1 -1
  27. package/dist/internal/fetchClient.d.mts +6 -0
  28. package/dist/internal/fetchClient.mjs +8 -0
  29. package/dist/internal/implementation.d.mts +14 -15
  30. package/dist/internal/implementation.mjs +3 -3
  31. package/dist/internal/tools.d.mts +2 -2
  32. package/dist/internal/tools.mjs +16 -14
  33. package/docs/Action.md +27 -14
  34. package/docs/ActionCatalog.md +10 -10
  35. package/docs/ActionCli.md +8 -8
  36. package/docs/ActionCliClient.md +9 -9
  37. package/docs/ActionGroup.md +10 -8
  38. package/docs/ActionHttp.md +13 -13
  39. package/docs/ActionHttpClient.md +26 -19
  40. package/docs/ActionMcp.md +9 -6
  41. package/docs/ActionToolkit.md +5 -5
  42. package/docs/Authentication.md +2 -3
  43. package/docs/CONTEXT.md +6 -6
  44. package/docs/README.md +4 -4
  45. package/docs/Testing.md +8 -5
  46. package/docs/guarantees.md +5 -4
  47. package/docs/setup.md +6 -5
  48. package/package.json +11 -6
package/docs/setup.md CHANGED
@@ -5,12 +5,12 @@ Install, version pins, entry points, and the boundaries of the package.
5
5
  ## Install
6
6
 
7
7
  ```sh
8
- pnpm add @gjermundgaraba/effect-actions effect@4.0.0-rc.117
8
+ pnpm add @gjermundgaraba/effect-actions effect@4.0.0-rc.118
9
9
  ```
10
10
 
11
11
  | Need | Add |
12
12
  | ------------------------------ | ----------------------------------------------------- |
13
- | Node HTTP server or stdio host | `@effect/platform-node@4.0.0-rc.117` |
13
+ | Node HTTP server or stdio host | `@effect/platform-node@4.0.0-rc.118` |
14
14
  | `TestingClient.withMcpClient` | `@modelcontextprotocol/client@^2.0.0` (optional peer) |
15
15
 
16
16
  Node `^22.12.0 || ^24.0.0 || >=26.0.0`. ESM only.
@@ -35,12 +35,12 @@ import * as TestingClient from "@gjermundgaraba/effect-actions/TestingClient";
35
35
  ```
36
36
 
37
37
  Every module imports from the `effect` package only, with two exceptions worth knowing when
38
- bundling: `ActionMcp` and `ActionToolkit` are the only modules that import `effect/unstable/ai`,
38
+ bundling: `ActionMcp` and `ActionToolkit` are the only modules that import `effect/ai`,
39
39
  and `TestingClient` is the only module that imports the optional `@modelcontextprotocol/client`
40
40
  peer. Because there is no package root, importing a contract module never pulls in an MCP
41
41
  server or the peer.
42
42
 
43
- Companion Effect modules you will import alongside: `effect/unstable/httpapi` (`HttpApiClient`, `OpenApi`, `HttpApiSwagger`, `HttpApiScalar`), `effect/unstable/http` (`HttpRouter`, `HttpServerResponse`, `FetchHttpClient`, `HttpClientError`), `effect/unstable/cli` (`Command`, `Flag`, `Argument`).
43
+ Companion Effect modules you will import alongside: `effect/http-api` (`HttpApiClient`, `OpenApi`, `HttpApiSwagger`, `HttpApiScalar`), `effect/http` (`HttpRouter`, `HttpServerResponse`, `FetchHttpClient`, `HttpClientError`), `effect/cli` (`Command`, `Flag`, `Argument`).
44
44
 
45
45
  ## Rules
46
46
 
@@ -60,5 +60,6 @@ What the package does, and nothing else:
60
60
  ## Failure modes
61
61
 
62
62
  - `Cannot find module '@gjermundgaraba/effect-actions'`: there is no root export. Import a subpath.
63
- - Type errors inside `effect/unstable/*` after install: `effect` version drift. Install one `effect` release candidate within the peer range for every package.
63
+ - Type errors inside `effect/*` modules after install: `effect` version drift. Install one `effect` release candidate within the peer range for every package.
64
+ - `Cannot find module 'effect/http'` (or `effect/http-api`, `effect/cli`, `effect/ai`): `effect` is older than `4.0.0-rc.118`, which moved these modules out of `effect/unstable/*`. Install a release candidate within the peer range, and import from the new paths.
64
65
  - `@modelcontextprotocol/client` resolution errors in a server build: something imported `TestingClient`. Only tests should.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjermundgaraba/effect-actions",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Define Effect action contracts once and project them onto HTTP, MCP, native Toolkits, catalogs, and CLIs.",
5
5
  "homepage": "https://github.com/gjermundgaraba/effect-actions#readme",
6
6
  "bugs": {
@@ -35,18 +35,18 @@
35
35
  "access": "public"
36
36
  },
37
37
  "devDependencies": {
38
- "@effect/platform-node": "4.0.0-rc.117",
38
+ "@effect/platform-node": "4.0.0-rc.118",
39
39
  "@modelcontextprotocol/client": "2.0.0",
40
40
  "@types/node": "26.6.2",
41
- "effect": "4.0.0-rc.117",
41
+ "effect": "4.0.0-rc.118",
42
42
  "tsx": "4.23.15",
43
43
  "typescript": "7.0.2",
44
- "vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
45
- "vite-plus": "0.3.3"
44
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
45
+ "vite-plus": "1.0.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@modelcontextprotocol/client": "^2.0.0",
49
- "effect": ">=4.0.0-rc.116 <4.0.0"
49
+ "effect": ">=4.0.0-rc.118 <4.0.0"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@modelcontextprotocol/client": {
@@ -58,6 +58,11 @@
58
58
  "name": "pnpm",
59
59
  "version": "12.5.1",
60
60
  "onFail": "download"
61
+ },
62
+ "runtime": {
63
+ "name": "node",
64
+ "version": "^22.18.0 || ^24.11.0 || >=26.0.0",
65
+ "onFail": "error"
61
66
  }
62
67
  },
63
68
  "engines": {