Skip to content

Commit 7084112

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

64 files changed

Lines changed: 9059 additions & 5672 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/ai-anthropic": patch
3+
---
4+
5+
populate `cachedInputTokens` in streaming responses from `cache_read_input_tokens`

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": patch
3+
---
4+
5+
Fix `Cron.next` skipping earlier matching days when the upcoming day-of-month does not exist in the current month. For an expression like `0 0 1,16,31 * *`, advancing from a date past the 16th selected day 31; in a month without 31 days this overflowed into the following month and landed on a later matching day (e.g. the 16th), silently skipping the 1st. `Cron.next` now wraps to the first matching day of the next month in that case, matching the behaviour of `Cron.prev` and other cron implementations.
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+
})

0 commit comments

Comments
 (0)