@msm-core/mini 0.5.0 → 0.5.1

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.
@@ -41,6 +41,7 @@ export function createGeminiBrain(opts) {
41
41
  type: v.type.toUpperCase(),
42
42
  description: v.description,
43
43
  ...(v.enum ? { enum: v.enum } : {}),
44
+ ...(v.items ? { items: { type: v.items.type.toUpperCase() } } : {}),
44
45
  },
45
46
  ])),
46
47
  required: Object.entries(t.parameters)
@@ -26,6 +26,9 @@ export interface JsonSchemaObject {
26
26
  type: string;
27
27
  description: string;
28
28
  enum?: string[];
29
+ items?: {
30
+ type: string;
31
+ };
29
32
  }>;
30
33
  required: string[];
31
34
  }
@@ -24,6 +24,7 @@ export function toolParamsToJsonSchema(parameters) {
24
24
  type: v.type,
25
25
  description: v.description,
26
26
  ...(v.enum ? { enum: v.enum } : {}),
27
+ ...(v.items ? { items: { type: v.items.type } } : {}),
27
28
  };
28
29
  }
29
30
  return {
@@ -90,6 +90,11 @@ export interface ToolParameter {
90
90
  required?: boolean;
91
91
  enum?: string[];
92
92
  default?: unknown;
93
+ /** Element type for `type: "array"` params. Required by Gemini's function-calling
94
+ * schema (an array without `items` is rejected); forwarded to every provider. */
95
+ items?: {
96
+ type: "string" | "number" | "boolean" | "object";
97
+ };
93
98
  }
94
99
  /** Input the loop hands to every brain call */
95
100
  export interface BrainRunInput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-core/mini",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Portable AI agent execution loop — brain-agnostic, zero embedded databases",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",