@cmssy/ai-tools 0.24.0 → 0.25.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"import-records.tool.d.ts","sourceRoot":"","sources":["../../src/tools/import-records.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,WAAW;;;iBAOf,CAAC;AAEH,KAAK,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,CASzD,CAAC"}
1
+ {"version":3,"file":"import-records.tool.d.ts","sourceRoot":"","sources":["../../src/tools/import-records.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,WAAW;;;iBAaf,CAAC;AAEH,KAAK,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,CASzD,CAAC"}
@@ -5,11 +5,15 @@ const inputSchema = z.object({
5
5
  .array(z.record(z.string(), z.unknown()))
6
6
  .min(1, "Provide at least 1 row")
7
7
  .max(1000, "Maximum 1000 rows per import")
8
- .describe("Array of plain objects keyed by the model's field keys"),
8
+ .describe("Array of plain objects keyed by the model's field keys. A translatable " +
9
+ "field (localized: true on the model) takes a language map, e.g. " +
10
+ "{ title: { en: 'Ball bearing', no: 'Kulelager' } }. Each row creates a " +
11
+ "record, so every language the row should have must be in it - unlike " +
12
+ "update_record, an import does not merge into an existing one."),
9
13
  });
10
14
  export const importRecordsTool = {
11
15
  name: "import_records",
12
- description: "Bulk-import records into a data model (up to 1000 rows). Returns the imported count and any per-row errors.",
16
+ description: "Bulk-import records into a data model (up to 1000 rows). Each row CREATES a record. A translatable field takes a language map ({ title: { en: '...', no: '...' } }); a language the workspace has not enabled is rejected. Returns the imported count and any per-row errors.",
13
17
  inputSchema,
14
18
  requiredPermissions: ["models:edit"],
15
19
  execute: async ({ modelIdOrSlug, rows }, ops) => {
@@ -1 +1 @@
1
- {"version":3,"file":"import-records.tool.js","sourceRoot":"","sources":["../../src/tools/import-records.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACpE,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACxC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,GAAG,CAAC,IAAI,EAAE,8BAA8B,CAAC;SACzC,QAAQ,CAAC,wDAAwD,CAAC;CACtE,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAgC;IAC5D,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,6GAA6G;IAC/G,WAAW;IACX,mBAAmB,EAAE,CAAC,aAAa,CAAC;IACpC,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;QAC9C,OAAO,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"import-records.tool.js","sourceRoot":"","sources":["../../src/tools/import-records.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACpE,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACxC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,GAAG,CAAC,IAAI,EAAE,8BAA8B,CAAC;SACzC,QAAQ,CACP,yEAAyE;QACvE,kEAAkE;QAClE,yEAAyE;QACzE,uEAAuE;QACvE,+DAA+D,CAClE;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAgC;IAC5D,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,+QAA+Q;IACjR,WAAW;IACX,mBAAmB,EAAE,CAAC,aAAa,CAAC;IACpC,OAAO,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;QAC9C,OAAO,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/ai-tools",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Transport-neutral AI tool-core shared by Cmssy Spotlight and cmssy-mcp",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",