Skip to content
Merged
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ existing `0.1.0` release; earlier development prereleases are not listed.

## [Unreleased]

### Fixed

- Align Managed Session budgets with the official decimal-string `max_credit_cost` contract, shared by Deployment budgets. The limit covers cumulative model and sandbox Credits; reaching it rejects the next user message without interrupting the current turn.
- Expose Managed and Forward Session `model_credits`, `sandbox_runtime_credits`, and `total_credits`; decode top-level `session.usage` Credits and per-call `model_usage.credits` / compaction `usage.credits`. Session usage may be absent. Legacy response token/list-cost fields remain available.
- Route Identity ownership through query parameters on existing Forward Environment, Skill/Version, Vault/Credential, and File operations, including multipart uploads and content downloads.
- Allow existing channel pairing creation with either a code or `channel_pairing_id`, and expose pairing scope details. No additional API endpoints are introduced.

### Migration

- **Breaking budget field change:** Replace `{ type: "limit", max_list_cost: {...} }` with `{ type: "limit", max_credit_cost: "100.00" }`. Amounts are positive decimal strings, not currency objects. Omitting a budget update preserves the limit; explicit null removes it.
- Consume the three top-level Credits fields from `session.usage` events. Replace cumulative snapshots rather than adding them; compaction Credits are already included in Session totals.
- Set `identity_id` in resource params; for methods without params, set it in the existing request-options argument. Use this only with a PAT. With a SAT, omit `identity_id`; the server infers ownership from the token and rejects explicit values (including an empty string).
- Channel pairing requests must provide exactly one of `code` or `channel_pairing_id`; existing code-based calls remain supported.

## [0.6.0]

### Added
Expand Down
1 change: 1 addition & 0 deletions docs/api/forward/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
- [EventContentUnionParam](type-aliases/EventContentUnionParam.md)
- [ForwardClientOptions](type-aliases/ForwardClientOptions.md)
- [IdentityCreateParams](type-aliases/IdentityCreateParams.md)
- [IdentityScopeOptions](type-aliases/IdentityScopeOptions.md)
- [MemoryStoreCreateParams](type-aliases/MemoryStoreCreateParams.md)
- [MemoryStoreMemoryCreateParams](type-aliases/MemoryStoreMemoryCreateParams.md)
- [ModelConfig](type-aliases/ModelConfig.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/api/forward/classes/Environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Archive an environment retained by historical sessions or tool calls.

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -108,7 +108,7 @@ createEnvironment

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -160,7 +160,7 @@ listEnvironment

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
6 changes: 3 additions & 3 deletions docs/api/forward/classes/Files.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand All @@ -82,7 +82,7 @@ deleteFile

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand All @@ -108,7 +108,7 @@ downloadFile

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
6 changes: 3 additions & 3 deletions docs/api/forward/classes/SkillVersions.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ createSkillVersion

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -120,7 +120,7 @@ deleteSkillVersion

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -180,7 +180,7 @@ listSkillVersion

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/api/forward/classes/Skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ createSkill

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
4 changes: 2 additions & 2 deletions docs/api/forward/classes/VaultCredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ createVaultCredential

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -150,7 +150,7 @@ listVaultCredential

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
4 changes: 2 additions & 2 deletions docs/api/forward/classes/Vaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ createVault

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down Expand Up @@ -140,7 +140,7 @@ listVault

##### options?

[`RequestOptions`](../../index/interfaces/RequestOptions.md)
[`IdentityScopeOptions`](../type-aliases/IdentityScopeOptions.md)

#### Returns

Expand Down
30 changes: 30 additions & 0 deletions docs/api/forward/interfaces/ChannelPairing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Channel ID。

***

### created\_at?

> `optional` **created\_at?**: `string`

***

### id

> **id**: `string`
Expand All @@ -46,6 +52,24 @@ Pairing ID,解除配对时使用。

***

### scope\_display\_name

> **scope\_display\_name**: `string`

***

### scope\_external\_id

> **scope\_external\_id**: `string`

***

### scope\_type

> **scope\_type**: `string`

***

### status

> **status**: `string`
Expand All @@ -67,3 +91,9 @@ Pairing ID,解除配对时使用。
> **type**: `string`

固定为 `channel_pairing`。

***

### updated\_at?

> `optional` **updated\_at?**: `string`
14 changes: 11 additions & 3 deletions docs/api/forward/interfaces/ChannelPairingNewParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ Additional fields are preserved verbatim by the SDK.

## Properties

### code
### channel\_pairing\_id?

> **code**: `string`
> `optional` **channel\_pairing\_id?**: `string`

Channel 消息中显示的 6 位配对码。
Pending pairing ID. Supply exactly one of code or channel_pairing_id.

***

### code?

> `optional` **code?**: `string`

Channel 消息中的配对码;与 channel_pairing_id 二选一。

***

Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/EnvironmentListParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### limit?

> `optional` **limit?**: `number` \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/EnvironmentNewParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ Environment 运行时配置对象;省略时默认使用 `{"type":"cloud"}`。

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### metadata?

> `optional` **metadata?**: `Record`\<`string`, `unknown`\> \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/EnvironmentUpdateParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### metadata?

> `optional` **metadata?**: `Record`\<`string`, `unknown`\> \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/FileListParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### limit?

> `optional` **limit?**: `number` \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/FileUploadParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### metadata?

> `optional` **metadata?**: `Record`\<`string`, `unknown`\> \| `null`
Expand Down
4 changes: 2 additions & 2 deletions docs/api/forward/interfaces/Session.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ Template 摘要。

***

### usage
### usage?

> **usage**: [`SessionUsage`](SessionUsage.md)
> `optional` **usage?**: [`SessionUsage`](SessionUsage.md)
12 changes: 12 additions & 0 deletions docs/api/forward/interfaces/SessionUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Additional fields are preserved verbatim by the SDK.

## Properties

### model\_credits?

> `optional` **model\_credits?**: `number`

***

### sandbox\_runtime\_credits?

> `optional` **sandbox\_runtime\_credits?**: `number`

***

### total\_credits

> **total\_credits**: `number`
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/SkillGetParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Additional fields are preserved verbatim by the SDK.

## Properties

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### include\_content?

> `optional` **include\_content?**: `boolean` \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/SkillListParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### limit?

> `optional` **limit?**: `number` \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/SkillNewParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ Forward Resource icon 公开 ID。

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### metadata?

> `optional` **metadata?**: `Record`\<`string`, `unknown`\> \| `null`
Expand Down
8 changes: 8 additions & 0 deletions docs/api/forward/interfaces/SkillUpdateParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ Additional fields are preserved verbatim by the SDK.

***

### identity\_id?

> `optional` **identity\_id?**: `string`

Select identity ownership with a PAT. Omit when using a SAT.

***

### metadata?

> `optional` **metadata?**: `Record`\<`string`, `unknown`\> \| `null`
Expand Down
Loading
Loading