@ziggs-ai/agent-sdk 0.48.4 → 0.48.5

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.48.5
6
+
5
7
  ## 0.48.3
6
8
 
7
9
  - A task an agent opens for itself is taken up at once. The server never rings an agent with its own write, so the inbox's held read used to wait for unrelated mail before the task woke the agent (minutes in practice). The inbox loop now reads again as soon as `task_create` opens a task assigned to the agent. `InboxLoopHandle.rereadNow()` does the same for any host.
@@ -19,6 +19,15 @@ function convertField(value) {
19
19
  const { required: isReq, ...rest } = v;
20
20
  return { schema: rest, required: !!isReq };
21
21
  }
22
+ // An object whose fields are named (a capability param with `properties`):
23
+ // convert each field the same way, and take no other key.
24
+ if (v['type'] === 'object' && v['properties'] && typeof v['properties'] === 'object') {
25
+ const { required: isReq, properties, type: _type, ...rest } = v;
26
+ return {
27
+ schema: { ...rest, ...convertObject(properties), additionalProperties: false },
28
+ required: !!isReq,
29
+ };
30
+ }
22
31
  if (v['type'] === 'array' || v['type'] === 'object') {
23
32
  const { required: isReq, ...rest } = v;
24
33
  return { schema: rest, required: !!isReq };
@@ -66,7 +75,9 @@ export function defineTool(name, params, handler, options = {}) {
66
75
  // passed while the handler quietly ignored what the model asked for.
67
76
  // Nested objects stay open: the typo class this guards against is at the
68
77
  // call surface the model writes, and closing nested payloads (task result,
69
- // plan) would reject shapes the backend accepts.
78
+ // plan) would reject shapes the backend accepts. The exception is a param
79
+ // that names its fields (`properties`): it lists exactly the keys the
80
+ // backend accepts, so it is closed too.
70
81
  const parameters = { ...convertObject(params || {}), additionalProperties: false };
71
82
  const fn = { name, parameters };
72
83
  if (options.description)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/agent-sdk",
3
- "version": "0.48.4",
3
+ "version": "0.48.5",
4
4
  "description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
5
5
  "homepage": "https://ziggsai.com/docs",
6
6
  "bugs": {
@@ -30,8 +30,8 @@
30
30
  "@anthropic-ai/claude-agent-sdk": "^0.3.284",
31
31
  "@anthropic-ai/sdk": "^0.110.0",
32
32
  "@modelcontextprotocol/sdk": "^1.29.0",
33
- "@ziggs-ai/api-client": "0.42.4",
34
- "@ziggs-ai/contracts": "0.49.1",
33
+ "@ziggs-ai/api-client": "0.42.5",
34
+ "@ziggs-ai/contracts": "0.50.1",
35
35
  "ajv": "^8.17.1",
36
36
  "dotenv": "^17.2.3",
37
37
  "openai": "^4.0.0",