robotrock 1.3.3 → 1.3.4

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 (46) hide show
  1. package/README.md +22 -0
  2. package/dist/ai/index.js +8 -0
  3. package/dist/ai/index.js.map +1 -1
  4. package/dist/ai/trigger.js +8 -0
  5. package/dist/ai/trigger.js.map +1 -1
  6. package/dist/ai/workflow.js +8 -0
  7. package/dist/ai/workflow.js.map +1 -1
  8. package/dist/eve/agent/index.d.ts +2 -1
  9. package/dist/eve/agent/index.js +171 -153
  10. package/dist/eve/agent/index.js.map +1 -1
  11. package/dist/eve/index.d.ts +2 -1
  12. package/dist/eve/index.js +62 -47
  13. package/dist/eve/index.js.map +1 -1
  14. package/dist/eve/tools/admin/assign-tasks.d.ts +15 -4
  15. package/dist/eve/tools/admin/assign-tasks.js +8 -43
  16. package/dist/eve/tools/admin/assign-tasks.js.map +1 -1
  17. package/dist/eve/tools/admin/manage-groups.d.ts +2 -3
  18. package/dist/eve/tools/admin/manage-groups.js +18 -71
  19. package/dist/eve/tools/admin/manage-groups.js.map +1 -1
  20. package/dist/eve/tools/admin/manage-team-members.d.ts +2 -3
  21. package/dist/eve/tools/admin/manage-team-members.js +20 -64
  22. package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
  23. package/dist/eve/tools/admin/query-tasks.d.ts +5 -6
  24. package/dist/eve/tools/admin/query-tasks.js +22 -86
  25. package/dist/eve/tools/admin/query-tasks.js.map +1 -1
  26. package/dist/eve/tools/catalog/search-products.d.ts +4 -5
  27. package/dist/eve/tools/catalog/search-products.js +2 -33
  28. package/dist/eve/tools/catalog/search-products.js.map +1 -1
  29. package/dist/eve/tools/identity/index.d.ts +0 -1
  30. package/dist/eve/tools/identity/index.js +15 -44
  31. package/dist/eve/tools/identity/index.js.map +1 -1
  32. package/dist/eve/tools/identity/my-access.d.ts +2 -3
  33. package/dist/eve/tools/identity/my-access.js +15 -44
  34. package/dist/eve/tools/identity/my-access.js.map +1 -1
  35. package/dist/eve/tools/identity/whoami.js.map +1 -1
  36. package/dist/eve/tools/inbox/create-task.js.map +1 -1
  37. package/dist/eve/tools/inbox/index.js.map +1 -1
  38. package/dist/eve/tools/index.d.ts +1 -1
  39. package/dist/eve/tools/index.js +44 -193
  40. package/dist/eve/tools/index.js.map +1 -1
  41. package/dist/{index-DePyAbTI.d.ts → index-Blq0XoAr.d.ts} +17 -16
  42. package/dist/index.d.ts +2 -1
  43. package/dist/index.js +19 -7
  44. package/dist/index.js.map +1 -1
  45. package/dist/tool-ui-hint-CMpug5sC.d.ts +13 -0
  46. package/package.json +2 -2
@@ -979,17 +979,12 @@ function requireBoundAgentAdminClient(ctx) {
979
979
  return createBoundAgentAdminClient(ctx);
980
980
  }
981
981
 
982
- // src/eve/tool-result-display.ts
983
- function toolDisplayResult(data, options) {
984
- const display = options?.widget || options?.title || options?.description ? {
985
- ...options.widget ? { widget: options.widget } : {},
986
- ...options.title ? { title: options.title } : {},
987
- ...options.description ? { description: options.description } : {}
988
- } : void 0;
982
+ // src/eve/tool-ui-hint.ts
983
+ var TOOL_UI_HINT_FIELD = "uiHint";
984
+ function withUiHint(result, hint) {
989
985
  return {
990
- ...display ? { display } : {},
991
- data,
992
- ...options?.ui ? { ui: options.ui } : {}
986
+ ...result,
987
+ [TOOL_UI_HINT_FIELD]: hint
993
988
  };
994
989
  }
995
990
 
@@ -1006,36 +1001,11 @@ function withReplyGuidance(result, guidance) {
1006
1001
 
1007
1002
  // src/eve/tool-display-format.ts
1008
1003
  function formatToolObjectResult(data, options) {
1009
- return withReplyGuidance(
1010
- toolDisplayResult(data, {
1011
- title: options.title,
1012
- description: options.description,
1013
- ui: options.ui
1014
- }),
1015
- options.replyGuidance
1016
- );
1017
- }
1018
- function formatToolListResult(listKey, items, options) {
1019
- const listFieldUi = options.itemWidget ? {
1020
- "ui:widget": "list",
1021
- items: {
1022
- "ui:widget": options.itemWidget,
1023
- ...options.itemUi ?? {}
1024
- }
1025
- } : {
1026
- "ui:widget": "table",
1027
- ...options.itemUi ? { items: options.itemUi } : {}
1028
- };
1029
- return formatToolObjectResult(
1030
- { [listKey]: items },
1031
- {
1032
- title: options.title,
1033
- ui: {
1034
- [listKey]: listFieldUi
1035
- },
1036
- replyGuidance: options.replyGuidance
1037
- }
1038
- );
1004
+ const withGuidance = withReplyGuidance(data, options.replyGuidance);
1005
+ if (options.uiHint) {
1006
+ return withUiHint(withGuidance, options.uiHint);
1007
+ }
1008
+ return withGuidance;
1039
1009
  }
1040
1010
 
1041
1011
  // src/eve/tools/admin/format-tasks-list.ts
@@ -1043,49 +1013,26 @@ function resolveTaskCardLabel(task) {
1043
1013
  return task.name?.trim() || task.description?.trim() || task.type?.trim() || task.id?.trim() || "Untitled task";
1044
1014
  }
1045
1015
  function formatTasksListResult(items, options) {
1046
- const title = options?.title ?? (items.length === 1 ? "1 task" : `${items.length} tasks`);
1047
- const result = formatToolListResult(
1048
- "items",
1049
- items.map((task) => ({
1016
+ const payload = {
1017
+ items: items.map((task) => ({
1050
1018
  id: task.id,
1051
1019
  name: resolveTaskCardLabel(task),
1052
1020
  status: task.status,
1053
1021
  type: task.type,
1054
1022
  description: task.description
1055
- })),
1056
- {
1057
- title,
1058
- itemWidget: "tenantTask",
1059
- replyGuidance: QUERY_TASKS_LIST_REPLY_GUIDANCE
1060
- }
1061
- );
1023
+ }))
1024
+ };
1062
1025
  if (options?.nextCursor) {
1063
- return {
1064
- ...result,
1065
- data: {
1066
- ...result.data,
1067
- nextCursor: options.nextCursor
1068
- },
1069
- display: {
1070
- ...result.display,
1071
- description: "More tasks available \u2014 pass nextCursor to list again."
1072
- }
1073
- };
1026
+ payload.nextCursor = options.nextCursor;
1074
1027
  }
1075
- return result;
1076
- }
1077
- function formatTaskSearchResult(items, total) {
1078
- return formatTasksListResult(items, {
1079
- title: total === 1 ? "1 matching task" : `${total} matching tasks`
1028
+ return formatToolObjectResult(payload, {
1029
+ replyGuidance: QUERY_TASKS_LIST_REPLY_GUIDANCE
1080
1030
  });
1081
1031
  }
1032
+ function formatTaskSearchResult(items) {
1033
+ return formatTasksListResult(items);
1034
+ }
1082
1035
  function formatTaskDetailResult(task) {
1083
- const title = resolveTaskCardLabel({
1084
- name: typeof task.name === "string" ? task.name : null,
1085
- description: typeof task.description === "string" ? task.description : null,
1086
- type: typeof task.type === "string" ? task.type : null,
1087
- id: typeof task.id === "string" ? task.id : null
1088
- });
1089
1036
  return formatToolObjectResult(
1090
1037
  {
1091
1038
  id: task.id ?? null,
@@ -1097,16 +1044,6 @@ function formatTaskDetailResult(task) {
1097
1044
  createdAt: task.createdAt ?? null
1098
1045
  },
1099
1046
  {
1100
- title,
1101
- ui: {
1102
- id: { "ui:title": "Task ID" },
1103
- status: { "ui:title": "Status" },
1104
- type: { "ui:title": "Type" },
1105
- name: { "ui:title": "Name" },
1106
- description: { "ui:title": "Description" },
1107
- validUntil: { "ui:title": "Valid until", "ui:widget": "date" },
1108
- createdAt: { "ui:title": "Created", "ui:widget": "date" }
1109
- },
1110
1047
  replyGuidance: QUERY_TASKS_DETAIL_REPLY_GUIDANCE
1111
1048
  }
1112
1049
  );
@@ -1149,7 +1086,7 @@ var queryTasksInputSchema = z5.object({
1149
1086
  });
1150
1087
  function defineQueryTasksTool() {
1151
1088
  return defineTool({
1152
- description: "Tenant-admin tool to list, fetch detail, or search inbox tasks in the workspace. Requires tenant admin access. Results render as chat UI cards \u2014 do not restate task names, ids, or statuses in your reply.",
1089
+ description: "Tenant-admin tool to list, fetch detail, or search inbox tasks in the workspace. Requires tenant admin access. Call get_my_access in the same turn before this tool to verify admin access (the check renders as its own chat tool card). Results render as chat UI cards \u2014 do not restate task names, ids, or statuses in your reply.",
1153
1090
  inputSchema: queryTasksInputSchema,
1154
1091
  async execute(input, ctx) {
1155
1092
  const api = requireBoundAgentAdminClient(ctx);
@@ -1176,8 +1113,7 @@ function defineQueryTasksTool() {
1176
1113
  case "search": {
1177
1114
  const result = await api.tasks.search(input.query, input.limit);
1178
1115
  return formatTaskSearchResult(
1179
- result.items,
1180
- result.total
1116
+ result.items
1181
1117
  );
1182
1118
  }
1183
1119
  }