@anuma/sdk 1.0.0-next.20260408082012 → 1.0.0-next.20260409152425

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.
@@ -3036,7 +3036,7 @@ Executing tool: ${toolInfo}
3036
3036
  type: "function",
3037
3037
  function: {
3038
3038
  name: tc.name,
3039
- arguments: tc.arguments
3039
+ arguments: tc.arguments || "{}"
3040
3040
  }
3041
3041
  }))
3042
3042
  };
@@ -2917,7 +2917,7 @@ Executing tool: ${toolInfo}
2917
2917
  type: "function",
2918
2918
  function: {
2919
2919
  name: tc.name,
2920
- arguments: tc.arguments
2920
+ arguments: tc.arguments || "{}"
2921
2921
  }
2922
2922
  }))
2923
2923
  };
@@ -2161,7 +2161,7 @@ Executing tool: ${toolInfo}
2161
2161
  type: "function",
2162
2162
  function: {
2163
2163
  name: tc.name,
2164
- arguments: tc.arguments
2164
+ arguments: tc.arguments || "{}"
2165
2165
  }
2166
2166
  }))
2167
2167
  };
@@ -19516,8 +19516,7 @@ function createGetAuthenticatedUserTool(getAccessToken, requestAccess) {
19516
19516
  description: "Get the authenticated GitHub user's profile including username and organizations. Call this first to discover the user's identity before making other GitHub API calls.",
19517
19517
  parameters: {
19518
19518
  type: "object",
19519
- properties: {},
19520
- required: []
19519
+ properties: {}
19521
19520
  }
19522
19521
  },
19523
19522
  executor: async () => {
@@ -19583,7 +19582,8 @@ IMPORTANT: For write operations (POST, PUT, PATCH, DELETE), always confirm with
19583
19582
  },
19584
19583
  body: {
19585
19584
  type: "object",
19586
- description: "Request body for POST/PUT/PATCH requests"
19585
+ description: "Request body for POST/PUT/PATCH requests",
19586
+ additionalProperties: true
19587
19587
  }
19588
19588
  },
19589
19589
  required: ["method", "path"]
@@ -1810,7 +1810,7 @@ Executing tool: ${toolInfo}
1810
1810
  type: "function",
1811
1811
  function: {
1812
1812
  name: tc.name,
1813
- arguments: tc.arguments
1813
+ arguments: tc.arguments || "{}"
1814
1814
  }
1815
1815
  }))
1816
1816
  };
@@ -19206,8 +19206,7 @@ function createGetAuthenticatedUserTool(getAccessToken, requestAccess) {
19206
19206
  description: "Get the authenticated GitHub user's profile including username and organizations. Call this first to discover the user's identity before making other GitHub API calls.",
19207
19207
  parameters: {
19208
19208
  type: "object",
19209
- properties: {},
19210
- required: []
19209
+ properties: {}
19211
19210
  }
19212
19211
  },
19213
19212
  executor: async () => {
@@ -19273,7 +19272,8 @@ IMPORTANT: For write operations (POST, PUT, PATCH, DELETE), always confirm with
19273
19272
  },
19274
19273
  body: {
19275
19274
  type: "object",
19276
- description: "Request body for POST/PUT/PATCH requests"
19275
+ description: "Request body for POST/PUT/PATCH requests",
19276
+ additionalProperties: true
19277
19277
  }
19278
19278
  },
19279
19279
  required: ["method", "path"]
@@ -24634,7 +24634,7 @@ Executing tool: ${toolInfo}
24634
24634
  type: "function",
24635
24635
  function: {
24636
24636
  name: tc.name,
24637
- arguments: tc.arguments
24637
+ arguments: tc.arguments || "{}"
24638
24638
  }
24639
24639
  }))
24640
24640
  };
@@ -24375,7 +24375,7 @@ Executing tool: ${toolInfo}
24375
24375
  type: "function",
24376
24376
  function: {
24377
24377
  name: tc.name,
24378
- arguments: tc.arguments
24378
+ arguments: tc.arguments || "{}"
24379
24379
  }
24380
24380
  }))
24381
24381
  };
@@ -488,7 +488,7 @@ function createDisplayTool(options, config) {
488
488
  function createChartTool(options) {
489
489
  return createDisplayTool(options, {
490
490
  name: "display_chart",
491
- description: "Render data visualization charts when the user explicitly requests a bar chart, line chart, area chart, or pie chart of their data. Accepts an array of data points and renders the chart inline in the conversation.",
491
+ description: 'Render a chart inline. You MUST pass the actual numeric values in the "data" array \u2014 they are never inferred. Example call: {"chartType":"bar","data":[{"label":"A","value":10},{"label":"B","value":20}],"dataKeys":["value"],"xAxisKey":"label"}',
492
492
  parameters: {
493
493
  type: "object",
494
494
  properties: {
@@ -507,12 +507,12 @@ function createChartTool(options) {
507
507
  type: "object",
508
508
  additionalProperties: true
509
509
  },
510
- description: "Array of data points. Each object should have a label key and one or more numeric value keys."
510
+ description: `Array of objects containing the actual values to plot. Example: [{"quarter":"Q1","revenue":10},{"quarter":"Q2","revenue":15}]. Each object must include the label key and numeric value keys with real data from the user's message.`
511
511
  },
512
512
  dataKeys: {
513
513
  type: "array",
514
514
  items: { type: "string" },
515
- description: "Which keys in each data object to chart as series/bars/slices (the numeric values)."
515
+ description: 'Which keys in each data object contain the numeric values to chart (e.g. ["revenue"]). Must match keys present in the data array.'
516
516
  },
517
517
  xAxisKey: {
518
518
  type: "string",
@@ -532,13 +532,19 @@ function createChartTool(options) {
532
532
  const data = args.data;
533
533
  const dataKeys = args.dataKeys;
534
534
  if (!chartType || !["bar", "line", "area", "pie"].includes(chartType)) {
535
- return { error: `Unsupported chart type: ${chartType}` };
535
+ return {
536
+ error: `Unsupported chart type: ${chartType}. Must be one of: bar, line, area, pie.`
537
+ };
536
538
  }
537
539
  if (!data || !Array.isArray(data) || data.length === 0) {
538
- return { error: "Invalid or empty chart data" };
540
+ return {
541
+ error: 'The "data" array is required and must contain at least one data point object, e.g. [{"quarter":"Q1","revenue":10}]. You provided: ' + JSON.stringify(data)
542
+ };
539
543
  }
540
544
  if (!dataKeys || !Array.isArray(dataKeys) || dataKeys.length === 0) {
541
- return { error: "No data keys specified for charting" };
545
+ return {
546
+ error: 'The "dataKeys" array is required and must list the numeric keys to chart, e.g. ["revenue"].'
547
+ };
542
548
  }
543
549
  return {
544
550
  chartType,
@@ -2075,8 +2081,7 @@ function createGetAuthenticatedUserTool(getAccessToken, requestAccess) {
2075
2081
  description: "Get the authenticated GitHub user's profile including username and organizations. Call this first to discover the user's identity before making other GitHub API calls.",
2076
2082
  parameters: {
2077
2083
  type: "object",
2078
- properties: {},
2079
- required: []
2084
+ properties: {}
2080
2085
  }
2081
2086
  },
2082
2087
  executor: async () => {
@@ -2142,7 +2147,8 @@ IMPORTANT: For write operations (POST, PUT, PATCH, DELETE), always confirm with
2142
2147
  },
2143
2148
  body: {
2144
2149
  type: "object",
2145
- description: "Request body for POST/PUT/PATCH requests"
2150
+ description: "Request body for POST/PUT/PATCH requests",
2151
+ additionalProperties: true
2146
2152
  }
2147
2153
  },
2148
2154
  required: ["method", "path"]
@@ -2308,7 +2314,7 @@ var LIST_FILES_SCHEMA = {
2308
2314
  };
2309
2315
  var DISPLAY_APP_SCHEMA = {
2310
2316
  name: "display_app",
2311
- description: "Renders the app preview. Called automatically when files are created \u2014 you usually do not need to call this manually.",
2317
+ description: "Renders the app preview from the current saved files. This does NOT modify files \u2014 you must call patch_file or create_file first to make changes, then call display_app to show the updated result.",
2312
2318
  arguments: {
2313
2319
  type: "object",
2314
2320
  properties: { title: { type: "string", description: "Short title for the app" } },
@@ -795,7 +795,7 @@ declare const LIST_FILES_SCHEMA: {
795
795
  };
796
796
  declare const DISPLAY_APP_SCHEMA: {
797
797
  readonly name: "display_app";
798
- readonly description: "Renders the app preview. Called automatically when files are created — you usually do not need to call this manually.";
798
+ readonly description: "Renders the app preview from the current saved files. This does NOT modify files — you must call patch_file or create_file first to make changes, then call display_app to show the updated result.";
799
799
  readonly arguments: {
800
800
  readonly type: "object";
801
801
  readonly properties: {
@@ -795,7 +795,7 @@ declare const LIST_FILES_SCHEMA: {
795
795
  };
796
796
  declare const DISPLAY_APP_SCHEMA: {
797
797
  readonly name: "display_app";
798
- readonly description: "Renders the app preview. Called automatically when files are created — you usually do not need to call this manually.";
798
+ readonly description: "Renders the app preview from the current saved files. This does NOT modify files — you must call patch_file or create_file first to make changes, then call display_app to show the updated result.";
799
799
  readonly arguments: {
800
800
  readonly type: "object";
801
801
  readonly properties: {
@@ -420,7 +420,7 @@ function createDisplayTool(options, config) {
420
420
  function createChartTool(options) {
421
421
  return createDisplayTool(options, {
422
422
  name: "display_chart",
423
- description: "Render data visualization charts when the user explicitly requests a bar chart, line chart, area chart, or pie chart of their data. Accepts an array of data points and renders the chart inline in the conversation.",
423
+ description: 'Render a chart inline. You MUST pass the actual numeric values in the "data" array \u2014 they are never inferred. Example call: {"chartType":"bar","data":[{"label":"A","value":10},{"label":"B","value":20}],"dataKeys":["value"],"xAxisKey":"label"}',
424
424
  parameters: {
425
425
  type: "object",
426
426
  properties: {
@@ -439,12 +439,12 @@ function createChartTool(options) {
439
439
  type: "object",
440
440
  additionalProperties: true
441
441
  },
442
- description: "Array of data points. Each object should have a label key and one or more numeric value keys."
442
+ description: `Array of objects containing the actual values to plot. Example: [{"quarter":"Q1","revenue":10},{"quarter":"Q2","revenue":15}]. Each object must include the label key and numeric value keys with real data from the user's message.`
443
443
  },
444
444
  dataKeys: {
445
445
  type: "array",
446
446
  items: { type: "string" },
447
- description: "Which keys in each data object to chart as series/bars/slices (the numeric values)."
447
+ description: 'Which keys in each data object contain the numeric values to chart (e.g. ["revenue"]). Must match keys present in the data array.'
448
448
  },
449
449
  xAxisKey: {
450
450
  type: "string",
@@ -464,13 +464,19 @@ function createChartTool(options) {
464
464
  const data = args.data;
465
465
  const dataKeys = args.dataKeys;
466
466
  if (!chartType || !["bar", "line", "area", "pie"].includes(chartType)) {
467
- return { error: `Unsupported chart type: ${chartType}` };
467
+ return {
468
+ error: `Unsupported chart type: ${chartType}. Must be one of: bar, line, area, pie.`
469
+ };
468
470
  }
469
471
  if (!data || !Array.isArray(data) || data.length === 0) {
470
- return { error: "Invalid or empty chart data" };
472
+ return {
473
+ error: 'The "data" array is required and must contain at least one data point object, e.g. [{"quarter":"Q1","revenue":10}]. You provided: ' + JSON.stringify(data)
474
+ };
471
475
  }
472
476
  if (!dataKeys || !Array.isArray(dataKeys) || dataKeys.length === 0) {
473
- return { error: "No data keys specified for charting" };
477
+ return {
478
+ error: 'The "dataKeys" array is required and must list the numeric keys to chart, e.g. ["revenue"].'
479
+ };
474
480
  }
475
481
  return {
476
482
  chartType,
@@ -2007,8 +2013,7 @@ function createGetAuthenticatedUserTool(getAccessToken, requestAccess) {
2007
2013
  description: "Get the authenticated GitHub user's profile including username and organizations. Call this first to discover the user's identity before making other GitHub API calls.",
2008
2014
  parameters: {
2009
2015
  type: "object",
2010
- properties: {},
2011
- required: []
2016
+ properties: {}
2012
2017
  }
2013
2018
  },
2014
2019
  executor: async () => {
@@ -2074,7 +2079,8 @@ IMPORTANT: For write operations (POST, PUT, PATCH, DELETE), always confirm with
2074
2079
  },
2075
2080
  body: {
2076
2081
  type: "object",
2077
- description: "Request body for POST/PUT/PATCH requests"
2082
+ description: "Request body for POST/PUT/PATCH requests",
2083
+ additionalProperties: true
2078
2084
  }
2079
2085
  },
2080
2086
  required: ["method", "path"]
@@ -2240,7 +2246,7 @@ var LIST_FILES_SCHEMA = {
2240
2246
  };
2241
2247
  var DISPLAY_APP_SCHEMA = {
2242
2248
  name: "display_app",
2243
- description: "Renders the app preview. Called automatically when files are created \u2014 you usually do not need to call this manually.",
2249
+ description: "Renders the app preview from the current saved files. This does NOT modify files \u2014 you must call patch_file or create_file first to make changes, then call display_app to show the updated result.",
2244
2250
  arguments: {
2245
2251
  type: "object",
2246
2252
  properties: { title: { type: "string", description: "Short title for the app" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "1.0.0-next.20260408082012",
3
+ "version": "1.0.0-next.20260409152425",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",