robotrock 1.4.0 → 1.5.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.
Files changed (32) hide show
  1. package/dist/eve/agent/index.d.ts +1 -1
  2. package/dist/eve/agent/index.js +20 -8
  3. package/dist/eve/agent/index.js.map +1 -1
  4. package/dist/eve/index.d.ts +1 -1
  5. package/dist/eve/index.js +131 -8
  6. package/dist/eve/index.js.map +1 -1
  7. package/dist/eve/tools/admin/assign-tasks.js +20 -8
  8. package/dist/eve/tools/admin/assign-tasks.js.map +1 -1
  9. package/dist/eve/tools/admin/get-workspace-usage.js +20 -8
  10. package/dist/eve/tools/admin/get-workspace-usage.js.map +1 -1
  11. package/dist/eve/tools/admin/manage-groups.js +20 -8
  12. package/dist/eve/tools/admin/manage-groups.js.map +1 -1
  13. package/dist/eve/tools/admin/manage-team-members.js +20 -8
  14. package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
  15. package/dist/eve/tools/admin/query-tasks.d.ts +3 -3
  16. package/dist/eve/tools/admin/query-tasks.js +20 -8
  17. package/dist/eve/tools/admin/query-tasks.js.map +1 -1
  18. package/dist/eve/tools/catalog/generate-image.js +20 -8
  19. package/dist/eve/tools/catalog/generate-image.js.map +1 -1
  20. package/dist/eve/tools/catalog/generate-random-chart.d.ts +10 -4
  21. package/dist/eve/tools/catalog/generate-random-chart.js +65 -26
  22. package/dist/eve/tools/catalog/generate-random-chart.js.map +1 -1
  23. package/dist/eve/tools/catalog/search-products.js +20 -8
  24. package/dist/eve/tools/catalog/search-products.js.map +1 -1
  25. package/dist/eve/tools/identity/my-access.d.ts +9 -9
  26. package/dist/eve/tools/index.js +71 -15
  27. package/dist/eve/tools/index.js.map +1 -1
  28. package/dist/{index-Drj0Rzf_.d.ts → index-amkHKVGs.d.ts} +161 -12
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +20 -8
  31. package/dist/index.js.map +1 -1
  32. package/package.json +1 -1
@@ -1,12 +1,15 @@
1
1
  import * as eve_tools from 'eve/tools';
2
- import { T as ToolResultWithReplyGuidance } from '../../../tool-reply-guidance-CJko9liH.js';
3
2
  import { T as ToolResultUiMeta, a as ToolUiHint } from '../../../tool-result-ui-meta-KT0VafEO.js';
3
+ import { T as ToolResultWithReplyGuidance } from '../../../tool-reply-guidance-CJko9liH.js';
4
4
  import { z } from 'zod';
5
5
 
6
6
  /** Eve tool slug — must match the agent tool filename `get_my_access.ts`. */
7
7
  declare const MY_ACCESS_TOOL_NAME = "get_my_access";
8
8
  declare const myAccessInputSchema: z.ZodObject<{}, z.core.$strip>;
9
- declare function defineMyAccessTool(): eve_tools.ToolDefinition<Record<string, never>, ({
9
+ declare function defineMyAccessTool(): eve_tools.ToolDefinition<Record<string, never>, ToolResultWithReplyGuidance<{
10
+ authenticated: false;
11
+ message: string;
12
+ }> | ({
10
13
  access: {
11
14
  email?: string | undefined;
12
15
  workspace: string;
@@ -48,11 +51,11 @@ declare function defineMyAccessTool(): eve_tools.ToolDefinition<Record<string, n
48
51
  };
49
52
  } & {
50
53
  uiHint: ToolUiHint;
51
- }>) | ToolResultWithReplyGuidance<{
54
+ }>)>;
55
+ declare const myAccessTool: eve_tools.ToolDefinition<Record<string, never>, ToolResultWithReplyGuidance<{
52
56
  authenticated: false;
53
57
  message: string;
54
- }>>;
55
- declare const myAccessTool: eve_tools.ToolDefinition<Record<string, never>, ({
58
+ }> | ({
56
59
  access: {
57
60
  email?: string | undefined;
58
61
  workspace: string;
@@ -94,9 +97,6 @@ declare const myAccessTool: eve_tools.ToolDefinition<Record<string, never>, ({
94
97
  };
95
98
  } & {
96
99
  uiHint: ToolUiHint;
97
- }>) | ToolResultWithReplyGuidance<{
98
- authenticated: false;
99
- message: string;
100
- }>>;
100
+ }>)>;
101
101
 
102
102
  export { MY_ACCESS_TOOL_NAME, defineMyAccessTool, myAccessInputSchema, myAccessTool };
@@ -2146,10 +2146,24 @@ var productEntityRowSchema = z9.object({
2146
2146
  url: z9.string().min(1)
2147
2147
  });
2148
2148
  var metricPointEntityRowSchema = z9.object({
2149
- date: z9.string().optional(),
2150
- category: z9.string().optional(),
2151
- label: z9.string().optional()
2152
- }).catchall(z9.union([z9.string(), z9.number()]));
2149
+ date: z9.string().optional().describe("X-axis value when xKey is date/time"),
2150
+ category: z9.string().optional().describe("X-axis value when xKey is category"),
2151
+ label: z9.string().optional().describe("X-axis value when xKey is label")
2152
+ }).catchall(z9.union([z9.string(), z9.number()])).describe(
2153
+ "Wide chart point: x-axis field + numeric columns named by yKeys (one series per column)"
2154
+ );
2155
+ var toolChartResultSchema = withAgentOnlyFields({
2156
+ title: z9.string().min(1).optional().describe("Chart title shown above the plot"),
2157
+ description: z9.string().min(1).optional().describe("Optional short subtitle"),
2158
+ type: z9.enum(["line", "bar", "area"]).describe("TRL/shadcn chart variant (time series \u2192 line, categories \u2192 bar)"),
2159
+ xKey: z9.string().min(1).describe('Field on each series row for the x-axis, e.g. "date" or "category"'),
2160
+ yKeys: z9.array(z9.string().min(1)).min(1).describe(
2161
+ 'Numeric series column names on each row, e.g. ["NL","BE"] or ["created","handled"]'
2162
+ ),
2163
+ series: z9.array(metricPointEntityRowSchema).describe(
2164
+ "Wide-format points only \u2014 one object per x value with yKeys as numeric fields"
2165
+ )
2166
+ });
2153
2167
  var memberEntityRowSchema = z9.object({
2154
2168
  name: z9.string(),
2155
2169
  email: z9.string(),
@@ -2208,10 +2222,8 @@ var agentAdminMutationResultSchema = z9.object({
2208
2222
  var searchProductsOutputSchema = withAgentOnlyFields({
2209
2223
  items: z9.array(productEntityRowSchema)
2210
2224
  });
2211
- var generateRandomChartOutputSchema = withAgentOnlyFields({
2212
- title: z9.string().min(1),
2213
- axis: z9.enum(["time", "category"]),
2214
- series: z9.array(metricPointEntityRowSchema)
2225
+ var generateRandomChartOutputSchema = toolChartResultSchema.extend({
2226
+ title: z9.string().min(1)
2215
2227
  });
2216
2228
  var generateImageOutputSchema = withAgentOnlyFields({
2217
2229
  prompt: z9.string().min(1),
@@ -2356,6 +2368,42 @@ var searchProductsTool = defineSearchProductsTool();
2356
2368
  // src/eve/tools/catalog/generate-random-chart.ts
2357
2369
  import { defineTool as defineTool5 } from "eve/tools";
2358
2370
  import { z as z11 } from "zod";
2371
+
2372
+ // src/eve/tool-chart-format.ts
2373
+ var TIME_X_AXIS_KEY_PATTERN = /^(date|time|timestamp|month|day|week|period)$/i;
2374
+ function inferToolChartType(xKey) {
2375
+ return TIME_X_AXIS_KEY_PATTERN.test(xKey) ? "line" : "bar";
2376
+ }
2377
+ function formatToolChartResult(chart, options) {
2378
+ if (!chart.xKey.trim()) {
2379
+ throw new Error("formatToolChartResult: xKey is required");
2380
+ }
2381
+ const yKeys = chart.yKeys.map((key) => key.trim()).filter((key) => key.length > 0);
2382
+ if (yKeys.length === 0) {
2383
+ throw new Error("formatToolChartResult: yKeys must include at least one series key");
2384
+ }
2385
+ const data = {
2386
+ ...chart.title?.trim() ? { title: chart.title.trim() } : {},
2387
+ ...chart.description?.trim() ? { description: chart.description.trim() } : {},
2388
+ type: chart.type ?? inferToolChartType(chart.xKey),
2389
+ xKey: chart.xKey.trim(),
2390
+ yKeys,
2391
+ series: chart.series.map((row) => ({ ...row }))
2392
+ };
2393
+ const ui = {
2394
+ ...options.ui,
2395
+ layout: "chart",
2396
+ rowsPath: "series",
2397
+ entity: options.entity ?? options.ui?.entity ?? "metric_point",
2398
+ present: options.present ?? options.ui?.present ?? true
2399
+ };
2400
+ return withUiHint(
2401
+ withToolUi(withReplyGuidance(data, options.replyGuidance), ui),
2402
+ "chart"
2403
+ );
2404
+ }
2405
+
2406
+ // src/eve/tools/catalog/generate-random-chart.ts
2359
2407
  var GENERATE_RANDOM_CHART_TOOL_NAME = "generate_random_chart";
2360
2408
  var generateRandomChartInputSchema = z11.object({
2361
2409
  axis: z11.enum(["time", "category", "random"]).optional().describe(
@@ -2470,16 +2518,24 @@ function defineGenerateRandomChartTool() {
2470
2518
  outputSchema: generateRandomChartOutputSchema,
2471
2519
  async execute(input) {
2472
2520
  const data = buildRandomChartData(input);
2473
- return formatToolObjectResult(data, {
2474
- replyGuidance: GENERATE_RANDOM_CHART_REPLY_GUIDANCE,
2475
- uiHint: "chart",
2476
- ui: {
2477
- layout: "chart",
2478
- rowsPath: "series",
2521
+ const xKey = data.axis === "time" ? "date" : "category";
2522
+ const sample = data.series[0] ?? {};
2523
+ const yKeys = Object.keys(sample).filter((key) => key !== xKey);
2524
+ const result = formatToolChartResult(
2525
+ {
2526
+ title: data.title,
2527
+ type: data.axis === "time" ? "line" : "bar",
2528
+ xKey,
2529
+ yKeys,
2530
+ series: data.series
2531
+ },
2532
+ {
2533
+ replyGuidance: GENERATE_RANDOM_CHART_REPLY_GUIDANCE,
2479
2534
  entity: "metric_point",
2480
2535
  present: true
2481
2536
  }
2482
- });
2537
+ );
2538
+ return { ...result, title: data.title };
2483
2539
  }
2484
2540
  });
2485
2541
  }