Skip to content

Commit 4e3c849

Browse files
committed
chore: update vendored Effect source
1 parent 86b7a7a commit 4e3c849

59 files changed

Lines changed: 7956 additions & 5009 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

repos/effect/.changeset/fix-bedrock-thinking-generate-object.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

repos/effect/.changeset/fix-cli-completions-hyphen.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

repos/effect/.changeset/fix-cli-weak-span-dark-terminal.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/platform": patch
3+
---
4+
5+
Fix `HttpLayerRouter.addHttpApi` so two registered APIs no longer share error encoders. Previously each call's middleware was added to a shared context map and applied to every route, so a 500 response from one API was sometimes encoded against the other API's error schema. The fix scopes each API's middleware to its own endpoints (matched by method + path) and wraps each route handler directly.

repos/effect/.changeset/forward-parent-pointer-discard.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

repos/effect/.github/workflows/release-queue.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ on:
1010
permissions: {}
1111

1212
jobs:
13+
approval-gate:
14+
if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
15+
runs-on: ubuntu-latest
16+
environment: release-queue
17+
steps:
18+
- run: echo "Fork PR approved by maintainer."
19+
1320
update:
14-
if: github.repository_owner == 'Effect-Ts'
21+
needs: [approval-gate]
22+
if: always() && (needs.approval-gate.result == 'success' || needs.approval-gate.result == 'skipped')
1523
name: Update
1624
runs-on: ubuntu-latest
1725
timeout-minutes: 10

repos/effect/packages/ai/ai/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @effect/ai
22

3+
## 0.36.0
4+
5+
### Minor Changes
6+
7+
- [#6260](https://github.com/Effect-TS/effect/pull/6260) [`02ae8fb`](https://github.com/Effect-TS/effect/commit/02ae8fb15809a85ba6a9239ab4421845e87d7985) Thanks @IMax153! - Support `Tool.EmptyParams` as an explicit tool parameters schema.
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [[`e2126bc`](https://github.com/Effect-TS/effect/commit/e2126bc14c4c902ff9f3dbe486e53190c6c87725), [`f7e836e`](https://github.com/Effect-TS/effect/commit/f7e836ea9b399784fdb3846d176ebe72bb07bfc7)]:
12+
- effect@3.21.3
13+
314
## 0.35.0
415

516
### Patch Changes
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import type * as Response from "@effect/ai/Response"
2+
import * as Tool from "@effect/ai/Tool"
3+
import { Schema } from "effect"
4+
import { describe, expect, it } from "tstyche"
5+
6+
describe("Tool", () => {
7+
it("infers struct parameters", () => {
8+
const _Read = Tool.make("Read", {
9+
parameters: {
10+
filePath: Schema.String
11+
}
12+
})
13+
14+
expect<Tool.Parameters<typeof _Read>>().type.toBe<{
15+
readonly filePath: string
16+
}>()
17+
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
18+
readonly filePath: string
19+
}>()
20+
expect<Response.ToolCallParts<{ readonly Read: typeof _Read }>>().type.toBe<
21+
Response.ToolCallPart<"Read", { readonly filePath: string }>
22+
>()
23+
})
24+
25+
it("infers empty parameters", () => {
26+
const _Empty = Tool.make("Empty")
27+
28+
expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
29+
typeof Tool.EmptyParams
30+
>()
31+
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
32+
readonly [x: string]: never
33+
}>()
34+
expect<Tool.ParametersEncoded<typeof _Empty>>().type.toBe<{
35+
readonly [x: string]: never
36+
}>()
37+
})
38+
39+
it("accepts explicit empty parameters", () => {
40+
const _Empty = Tool.make("Empty", {
41+
parameters: Tool.EmptyParams
42+
})
43+
44+
expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
45+
typeof Tool.EmptyParams
46+
>()
47+
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
48+
readonly [x: string]: never
49+
}>()
50+
})
51+
52+
it("infers setParameters with struct fields", () => {
53+
const _Read = Tool.make("Read").setParameters({
54+
filePath: Schema.String
55+
})
56+
57+
expect<Tool.Parameters<typeof _Read>>().type.toBe<{
58+
readonly filePath: string
59+
}>()
60+
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
61+
readonly filePath: string
62+
}>()
63+
expect<Response.ToolCallParts<{ readonly Read: typeof _Read }>>().type.toBe<
64+
Response.ToolCallPart<"Read", { readonly filePath: string }>
65+
>()
66+
})
67+
68+
it("infers setParameters with a struct schema", () => {
69+
const Parameters = Schema.Struct({
70+
filePath: Schema.String
71+
})
72+
const _Read = Tool.make("Read").setParameters(Parameters)
73+
74+
expect<Tool.ParametersSchema<typeof _Read>>().type.toBe<typeof Parameters>()
75+
expect<Tool.Parameters<typeof _Read>>().type.toBe<{
76+
readonly filePath: string
77+
}>()
78+
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
79+
readonly filePath: string
80+
}>()
81+
})
82+
83+
it("infers setParameters with empty parameters", () => {
84+
const _Empty = Tool.make("Empty", {
85+
parameters: {
86+
filePath: Schema.String
87+
}
88+
}).setParameters(Tool.EmptyParams)
89+
90+
expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
91+
typeof Tool.EmptyParams
92+
>()
93+
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
94+
readonly [x: string]: never
95+
}>()
96+
expect<Tool.ParametersEncoded<typeof _Empty>>().type.toBe<{
97+
readonly [x: string]: never
98+
}>()
99+
})
100+
})

repos/effect/packages/ai/ai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@effect/ai",
33
"type": "module",
4-
"version": "0.35.0",
4+
"version": "0.36.0",
55
"license": "MIT",
66
"description": "Effect modules for working with AI apis",
77
"homepage": "https://effect.website",

0 commit comments

Comments
 (0)