anbaric 1.56.4 → 1.56.6

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.
@@ -157,10 +157,12 @@ that fail throw `The OpenAI request failed with status <n>`.
157
157
 
158
158
  ### `AnthropicAgent`
159
159
 
160
- An `Agent` backed by the Anthropic Messages API. The API has no JSON-schema
161
- response format, so the output schema is offered as a single tool the model is
162
- forced to call; its arguments are the structured output. System messages are
163
- lifted out of the conversation into the API's own `system` field.
160
+ An `Agent` backed by the Anthropic Messages API, asking for the output schema
161
+ through the API's `json_schema` output format (every current Claude model
162
+ supports it; the older forced-tool-call approach is rejected from Claude Opus
163
+ 5.5 on). Objects in the schema are closed and every property made required, as
164
+ that format demands. System messages are lifted out of the conversation into
165
+ the API's own `system` field.
164
166
 
165
167
  ```ts
166
168
  class AnthropicAgent extends Agent
@@ -175,9 +177,10 @@ type AnthropicConnection = {
175
177
  }
176
178
  ```
177
179
 
178
- Failures throw `The Anthropic request failed with status <n>`; a model that
179
- answers with prose instead of calling the tool throws `The Anthropic response
180
- carried no structured content`.
180
+ Failures throw `The Anthropic request failed with status <n>`; a reply with no
181
+ text throws `The Anthropic response carried no structured content`, and prose
182
+ where JSON was asked for throws `The Anthropic response was not the JSON it was
183
+ asked for`.
181
184
 
182
185
  ### `GeminiAgent`
183
186
 
@@ -91,7 +91,7 @@ new OpenAIAgent("triager", "support", {
91
91
 
92
92
  new AnthropicAgent("triager", "support", {
93
93
  apiKey: process.env.ANTHROPIC_API_KEY!,
94
- model: "claude-opus-5",
94
+ model: "claude-opus-5-5",
95
95
  maxTokens: 4096, // optional; the Messages API needs a budget
96
96
  });
97
97
 
@@ -102,9 +102,9 @@ new GeminiAgent("triager", "support", {
102
102
  ```
103
103
 
104
104
  Each asks its provider for structured output the way that provider supports it -
105
- OpenAI's JSON-schema response format, a forced tool call on Anthropic, Gemini's
106
- JSON response schema - so your action only ever sees properties matching the
107
- schema you gave it.
105
+ OpenAI's JSON-schema response format, Anthropic's `json_schema` output format,
106
+ Gemini's JSON response schema - so your action only ever sees properties
107
+ matching the schema you gave it.
108
108
 
109
109
  For a provider none of them covers, implement an `Agent.Client` (a class with a
110
110
  `generate(request)` method) and pass it to a plain `Agent`. See the [API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anbaric",
3
- "version": "1.56.4",
3
+ "version": "1.56.6",
4
4
  "description": "Everything needed to write an Anbaric app: state machines, jobs, document and secret stores, local in-memory implementations and the Anbaric Cloud clients",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,9 +24,9 @@
24
24
  "prepublishOnly": "npm run build"
25
25
  },
26
26
  "dependencies": {
27
- "anbaric-impl-cloud": "^1.56.4",
28
- "anbaric-data-store": "^1.56.4",
29
- "anbaric-state-machine": "^1.56.4",
30
- "anbaric-tsapi": "^1.56.4"
27
+ "anbaric-impl-cloud": "^1.56.6",
28
+ "anbaric-data-store": "^1.56.6",
29
+ "anbaric-state-machine": "^1.56.6",
30
+ "anbaric-tsapi": "^1.56.6"
31
31
  }
32
32
  }