Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions repos/effect/.changeset/fix-bedrock-streaming-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/ai-amazon-bedrock": patch
---

Fix `@effect/ai-amazon-bedrock` streaming so the terminal `"finish"` part carries real token counts. The Bedrock Converse stream sends `metadata` (with the populated `usage` block) **after** `messageStop`, but the SDK was emitting `"finish"` synchronously on `messageStop`, capturing the still-empty `usage` defaults. Buffer the finish reason on `messageStop` and emit `"finish"` from the `metadata` case once `inputTokens` / `outputTokens` / `totalTokens` are filled in.

This file was deleted.

5 changes: 0 additions & 5 deletions repos/effect/.changeset/fix-cli-completions-hyphen.md

This file was deleted.

5 changes: 0 additions & 5 deletions repos/effect/.changeset/fix-cli-weak-span-dark-terminal.md

This file was deleted.

5 changes: 5 additions & 0 deletions repos/effect/.changeset/fix-graph-undirected-traversal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Fix Graph traversal and shortest-path algorithms to traverse undirected edges independently of their stored source/target orientation.
5 changes: 0 additions & 5 deletions repos/effect/.changeset/forward-parent-pointer-discard.md

This file was deleted.

5 changes: 5 additions & 0 deletions repos/effect/.changeset/quiet-crabs-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/platform": patch
---

Remove the content-length header before sending FetchHttpClient requests.
10 changes: 9 additions & 1 deletion repos/effect/.github/workflows/release-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ on:
permissions: {}

jobs:
approval-gate:
if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
environment: release-queue
steps:
- run: echo "Fork PR approved by maintainer."

update:
if: github.repository_owner == 'Effect-Ts'
needs: [approval-gate]
if: always() && (needs.approval-gate.result == 'success' || needs.approval-gate.result == 'skipped')
name: Update
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
11 changes: 11 additions & 0 deletions repos/effect/packages/ai/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @effect/ai

## 0.36.0

### Minor Changes

- [#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.

### Patch Changes

- Updated dependencies [[`e2126bc`](https://github.com/Effect-TS/effect/commit/e2126bc14c4c902ff9f3dbe486e53190c6c87725), [`f7e836e`](https://github.com/Effect-TS/effect/commit/f7e836ea9b399784fdb3846d176ebe72bb07bfc7)]:
- effect@3.21.3

## 0.35.0

### Patch Changes
Expand Down
100 changes: 100 additions & 0 deletions repos/effect/packages/ai/ai/dtslint/Tool.tst.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import type * as Response from "@effect/ai/Response"
import * as Tool from "@effect/ai/Tool"
import { Schema } from "effect"
import { describe, expect, it } from "tstyche"

describe("Tool", () => {
it("infers struct parameters", () => {
const _Read = Tool.make("Read", {
parameters: {
filePath: Schema.String
}
})

expect<Tool.Parameters<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
expect<Response.ToolCallParts<{ readonly Read: typeof _Read }>>().type.toBe<
Response.ToolCallPart<"Read", { readonly filePath: string }>
>()
})

it("infers empty parameters", () => {
const _Empty = Tool.make("Empty")

expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
typeof Tool.EmptyParams
>()
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
readonly [x: string]: never
}>()
expect<Tool.ParametersEncoded<typeof _Empty>>().type.toBe<{
readonly [x: string]: never
}>()
})

it("accepts explicit empty parameters", () => {
const _Empty = Tool.make("Empty", {
parameters: Tool.EmptyParams
})

expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
typeof Tool.EmptyParams
>()
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
readonly [x: string]: never
}>()
})

it("infers setParameters with struct fields", () => {
const _Read = Tool.make("Read").setParameters({
filePath: Schema.String
})

expect<Tool.Parameters<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
expect<Response.ToolCallParts<{ readonly Read: typeof _Read }>>().type.toBe<
Response.ToolCallPart<"Read", { readonly filePath: string }>
>()
})

it("infers setParameters with a struct schema", () => {
const Parameters = Schema.Struct({
filePath: Schema.String
})
const _Read = Tool.make("Read").setParameters(Parameters)

expect<Tool.ParametersSchema<typeof _Read>>().type.toBe<typeof Parameters>()
expect<Tool.Parameters<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
expect<Tool.ParametersEncoded<typeof _Read>>().type.toBe<{
readonly filePath: string
}>()
})

it("infers setParameters with empty parameters", () => {
const _Empty = Tool.make("Empty", {
parameters: {
filePath: Schema.String
}
}).setParameters(Tool.EmptyParams)

expect<Tool.ParametersSchema<typeof _Empty>>().type.toBe<
typeof Tool.EmptyParams
>()
expect<Tool.Parameters<typeof _Empty>>().type.toBe<{
readonly [x: string]: never
}>()
expect<Tool.ParametersEncoded<typeof _Empty>>().type.toBe<{
readonly [x: string]: never
}>()
})
})
2 changes: 1 addition & 1 deletion repos/effect/packages/ai/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@effect/ai",
"type": "module",
"version": "0.35.0",
"version": "0.36.0",
"license": "MIT",
"description": "Effect modules for working with AI apis",
"homepage": "https://effect.website",
Expand Down
Loading
Loading