robotrock 1.3.4 → 1.4.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.
- package/README.md +11 -1
- package/dist/agent-admin.d.ts +5 -0
- package/dist/agent-admin.js +75 -2
- package/dist/agent-admin.js.map +1 -1
- package/dist/ai/index.d.ts +5 -5
- package/dist/ai/index.js +120 -4
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.d.ts +3 -3
- package/dist/ai/trigger.js +120 -4
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.d.ts +3 -3
- package/dist/ai/workflow.js +120 -4
- package/dist/ai/workflow.js.map +1 -1
- package/dist/{client-CZ5eWH5v.d.ts → client-BxbxttFH.d.ts} +19 -1
- package/dist/eve/agent/index.d.ts +4 -4
- package/dist/eve/agent/index.js +565 -261
- package/dist/eve/agent/index.js.map +1 -1
- package/dist/eve/index.d.ts +4 -4
- package/dist/eve/index.js +384 -7
- package/dist/eve/index.js.map +1 -1
- package/dist/eve/tools/admin/assign-tasks.d.ts +40 -19
- package/dist/eve/tools/admin/assign-tasks.js +322 -25
- package/dist/eve/tools/admin/assign-tasks.js.map +1 -1
- package/dist/eve/tools/admin/get-workspace-usage.d.ts +71 -0
- package/dist/eve/tools/admin/get-workspace-usage.js +1353 -0
- package/dist/eve/tools/admin/get-workspace-usage.js.map +1 -0
- package/dist/eve/tools/admin/manage-groups.d.ts +122 -7
- package/dist/eve/tools/admin/manage-groups.js +338 -31
- package/dist/eve/tools/admin/manage-groups.js.map +1 -1
- package/dist/eve/tools/admin/manage-team-members.d.ts +86 -7
- package/dist/eve/tools/admin/manage-team-members.js +306 -16
- package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
- package/dist/eve/tools/admin/query-tasks.d.ts +85 -10
- package/dist/eve/tools/admin/query-tasks.js +351 -40
- package/dist/eve/tools/admin/query-tasks.js.map +1 -1
- package/dist/eve/tools/catalog/generate-image.d.ts +64 -0
- package/dist/eve/tools/catalog/generate-image.js +2065 -0
- package/dist/eve/tools/catalog/generate-image.js.map +1 -0
- package/dist/eve/tools/catalog/generate-random-chart.d.ts +71 -0
- package/dist/eve/tools/catalog/generate-random-chart.js +372 -0
- package/dist/eve/tools/catalog/generate-random-chart.js.map +1 -0
- package/dist/eve/tools/catalog/search-products.d.ts +36 -43
- package/dist/eve/tools/catalog/search-products.js +241 -6
- package/dist/eve/tools/catalog/search-products.js.map +1 -1
- package/dist/eve/tools/identity/index.d.ts +2 -1
- package/dist/eve/tools/identity/index.js +26 -6
- package/dist/eve/tools/identity/index.js.map +1 -1
- package/dist/eve/tools/identity/my-access.d.ts +90 -5
- package/dist/eve/tools/identity/my-access.js +26 -6
- package/dist/eve/tools/identity/my-access.js.map +1 -1
- package/dist/eve/tools/identity/whoami.d.ts +1 -1
- package/dist/eve/tools/identity/whoami.js.map +1 -1
- package/dist/eve/tools/inbox/create-task.d.ts +1 -1
- package/dist/eve/tools/inbox/create-task.js +119 -2
- package/dist/eve/tools/inbox/create-task.js.map +1 -1
- package/dist/eve/tools/inbox/index.d.ts +1 -1
- package/dist/eve/tools/inbox/index.js +119 -2
- package/dist/eve/tools/inbox/index.js.map +1 -1
- package/dist/eve/tools/index.d.ts +5 -2
- package/dist/eve/tools/index.js +908 -115
- package/dist/eve/tools/index.js.map +1 -1
- package/dist/index-Drj0Rzf_.d.ts +905 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +316 -13
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.js +67 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/{tool-approval-bridge-DnGaRES4.d.ts → tool-approval-bridge-Cz7qQUpw.d.ts} +1 -1
- package/dist/{tool-reply-guidance-C3qrT1In.d.ts → tool-reply-guidance-CJko9liH.d.ts} +5 -2
- package/dist/tool-result-ui-meta-KT0VafEO.d.ts +52 -0
- package/dist/trigger/index.d.ts +1 -1
- package/dist/trigger/index.js +118 -2
- package/dist/trigger/index.js.map +1 -1
- package/dist/{trigger--qTIK0s6.d.ts → trigger-C1ooSegc.d.ts} +2 -2
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.js +118 -2
- package/dist/workflow/index.js.map +1 -1
- package/package.json +21 -4
- package/dist/index-Blq0XoAr.d.ts +0 -204
- package/dist/tool-ui-hint-CMpug5sC.d.ts +0 -13
package/dist/eve/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as ChatToolAuditInput, p as ChatToolAuditPayload, D as DEFAULT_TOOL_DISPLAY_LABELS, E as EVE_INPUT_OTHER_CHOICE_ID, a as EVE_INPUT_OTHER_CHOICE_LABEL, b as EVE_INPUT_SUBMIT_ACTION_ID, q as EveInputActionSubmission, u as EveInputAuditContext, c as EveInputOption, d as EveInputRequest, e as EveInputRequestDisplay, f as EveInputResponse, F as FormatToolListResultOptions, w as FormatToolObjectResultOptions, R as ROBOTROCK_READY_HOOK_SLUG, T as ToolDisplayResultOptions,
|
|
2
|
-
export {
|
|
3
|
-
export { A as ADMIN_MUTATION_REPLY_GUIDANCE, C as CREATE_INBOX_TASK_REPLY_GUIDANCE, D as DEPLOY_RELEASE_REPLY_GUIDANCE, G as GET_WEATHER_REPLY_GUIDANCE, M as MANAGE_GROUPS_DETAIL_REPLY_GUIDANCE,
|
|
4
|
-
import '../client-
|
|
1
|
+
export { C as ChatToolAuditInput, p as ChatToolAuditPayload, D as DEFAULT_TOOL_DISPLAY_LABELS, E as EVE_INPUT_OTHER_CHOICE_ID, a as EVE_INPUT_OTHER_CHOICE_LABEL, b as EVE_INPUT_SUBMIT_ACTION_ID, q as EveInputActionSubmission, u as EveInputAuditContext, c as EveInputOption, d as EveInputRequest, e as EveInputRequestDisplay, f as EveInputResponse, F as FormatToolListResultOptions, w as FormatToolObjectResultOptions, x as FormatToolQueryResultOptions, G as GroupEntityRow, M as MemberEntityRow, y as MetricPointEntityRow, P as ProductEntityRow, R as ROBOTROCK_READY_HOOK_SLUG, S as StatusEntityRow, T as TaskEntityRow, z as ToolDisplayResultOptions, A as agentAdminErrorResultSchema, B as agentAdminMutationResultSchema, H as assignTasksOutputSchema, I as buildChatToolAuditPayload, J as buildEveInputAuditSubmissionData, j as buildTaskHandledResumeMessage, K as buildTenantGroupUrl, L as buildTenantTaskUrl, k as eveInputRequestTaskType, l as eveInputRequestToActions, N as eveInputResponseToActionSubmission, m as formatEveApprovalTitle, O as formatToolListResult, Q as formatToolObjectResult, U as formatToolQueryResult, W as generateImageOutputSchema, X as generateRandomChartOutputSchema, n as getToolDisplayLabel, Y as getWorkspaceUsageOutputSchema, Z as groupDetailEntitySchema, _ as groupEntityRowSchema, $ as isAgentAdminErrorResult, a0 as isEveApprovalInputRequest, a1 as manageGroupsDetailOutputSchema, a2 as manageGroupsListOutputSchema, a3 as manageGroupsOutputSchema, a4 as manageGroupsSummaryOutputSchema, a5 as manageTeamMembersDetailOutputSchema, a6 as manageTeamMembersListOutputSchema, a7 as manageTeamMembersOutputSchema, a8 as memberEntityRowSchema, a9 as metricPointEntityRowSchema, o as normalizeEveSelectFormData, aa as parseEveAskQuestionToolOutput, ab as productEntityRowSchema, ac as queryTasksDetailOutputSchema, ad as queryTasksListOutputSchema, ae as queryTasksOutputSchema, af as resolveEveFreeformTextToInputResponse, r as resolveEveInputDisplay, ag as sanitizeToolAuditInput, ah as searchProductsOutputSchema, s as setToolDisplayLabelOverrides, ai as shouldAuditToolExecution, aj as statusEntityRowSchema, ak as taskEntityRowSchema, t as taskHandledToEveInputResponse, al as toolDisplayResult, am as toolResultUiMetaSchema, an as workspaceUsageEntitySchema } from '../index-Drj0Rzf_.js';
|
|
2
|
+
export { c as TOOL_RESULT_UI_ENTITIES, d as TOOL_RESULT_UI_ENTITY_ID_RE, e as TOOL_UI_FIELD, f as TOOL_UI_HINT_FIELD, b as ToolResultUiEntity, g as ToolResultUiLayout, T as ToolResultUiMeta, a as ToolUiHint, h as extractToolResultUiMeta, i as extractToolUiHint, j as isToolResultUiEntity, k as isToolResultUiEntityId, l as isToolUiHint, m as legacyPatternToLayout, u as uiHintToLayout, w as withToolUi, n as withUiHint } from '../tool-result-ui-meta-KT0VafEO.js';
|
|
3
|
+
export { A as ADMIN_MUTATION_REPLY_GUIDANCE, C as CREATE_INBOX_TASK_REPLY_GUIDANCE, D as DEPLOY_RELEASE_REPLY_GUIDANCE, G as GENERATE_IMAGE_REPLY_GUIDANCE, a as GENERATE_RANDOM_CHART_REPLY_GUIDANCE, b as GET_WEATHER_REPLY_GUIDANCE, c as GET_WORKSPACE_USAGE_REPLY_GUIDANCE, M as MANAGE_GROUPS_DETAIL_REPLY_GUIDANCE, d as MANAGE_GROUPS_LIST_REPLY_GUIDANCE, e as MANAGE_TEAM_MEMBERS_DETAIL_REPLY_GUIDANCE, f as MANAGE_TEAM_MEMBERS_LIST_REPLY_GUIDANCE, g as MY_ACCESS_REPLY_GUIDANCE, Q as QUERY_TASKS_DETAIL_REPLY_GUIDANCE, h as QUERY_TASKS_LIST_REPLY_GUIDANCE, R as REFUND_CHARGE_REPLY_GUIDANCE, S as SEARCH_PRODUCTS_REPLY_GUIDANCE, i as TOOL_REPLY_GUIDANCE_FIELD, T as ToolResultWithReplyGuidance, W as WHOAMI_REPLY_GUIDANCE, s as stripAgentOnlyToolFields, w as withReplyGuidance } from '../tool-reply-guidance-CJko9liH.js';
|
|
4
|
+
import '../client-BxbxttFH.js';
|
|
5
5
|
import '../schemas/index.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '@robotrock/core';
|
package/dist/eve/index.js
CHANGED
|
@@ -463,9 +463,12 @@ var DEFAULT_TOOL_DISPLAY_LABELS = {
|
|
|
463
463
|
whoami: "Who am I",
|
|
464
464
|
create_robotrock_task: "Create a RobotRock task",
|
|
465
465
|
search_products: "Search products",
|
|
466
|
+
generate_random_chart: "Generate random chart",
|
|
467
|
+
generate_image: "Generate image",
|
|
466
468
|
manage_team_members: "Manage team members",
|
|
467
469
|
manage_groups: "Manage groups",
|
|
468
|
-
query_tasks: "Query tasks"
|
|
470
|
+
query_tasks: "Query tasks",
|
|
471
|
+
get_workspace_usage: "Get workspace usage"
|
|
469
472
|
};
|
|
470
473
|
var toolDisplayLabelOverrides = {};
|
|
471
474
|
function setToolDisplayLabelOverrides(overrides) {
|
|
@@ -518,12 +521,113 @@ function extractToolUiHint(output) {
|
|
|
518
521
|
return isToolUiHint(hint) ? hint : void 0;
|
|
519
522
|
}
|
|
520
523
|
|
|
524
|
+
// src/eve/tool-result-ui-meta.ts
|
|
525
|
+
var TOOL_UI_FIELD = "ui";
|
|
526
|
+
var TOOL_RESULT_UI_ENTITY_ID_RE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
527
|
+
var TOOL_RESULT_UI_ENTITIES = [
|
|
528
|
+
"product",
|
|
529
|
+
"member",
|
|
530
|
+
"task",
|
|
531
|
+
"group",
|
|
532
|
+
"status",
|
|
533
|
+
"object"
|
|
534
|
+
];
|
|
535
|
+
function isToolResultUiEntityId(value) {
|
|
536
|
+
return typeof value === "string" && TOOL_RESULT_UI_ENTITY_ID_RE.test(value);
|
|
537
|
+
}
|
|
538
|
+
function isToolResultUiEntity(value) {
|
|
539
|
+
return isToolResultUiEntityId(value);
|
|
540
|
+
}
|
|
541
|
+
function uiHintToLayout(hint) {
|
|
542
|
+
return hint;
|
|
543
|
+
}
|
|
544
|
+
function legacyPatternToLayout(pattern) {
|
|
545
|
+
switch (pattern) {
|
|
546
|
+
case "chart":
|
|
547
|
+
return "chart";
|
|
548
|
+
case "table":
|
|
549
|
+
return "table";
|
|
550
|
+
case "list":
|
|
551
|
+
case "query":
|
|
552
|
+
return "list";
|
|
553
|
+
default:
|
|
554
|
+
return void 0;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
function readPresent(value) {
|
|
558
|
+
return typeof value === "boolean" ? value : void 0;
|
|
559
|
+
}
|
|
560
|
+
function readRowsPath(value) {
|
|
561
|
+
if (typeof value !== "string") {
|
|
562
|
+
return void 0;
|
|
563
|
+
}
|
|
564
|
+
const trimmed = value.trim();
|
|
565
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
566
|
+
}
|
|
567
|
+
function readEntity(value) {
|
|
568
|
+
if (!isToolResultUiEntityId(value)) {
|
|
569
|
+
return void 0;
|
|
570
|
+
}
|
|
571
|
+
return value;
|
|
572
|
+
}
|
|
573
|
+
function extractToolResultUiMeta(output) {
|
|
574
|
+
if (typeof output !== "object" || output === null || Array.isArray(output)) {
|
|
575
|
+
return void 0;
|
|
576
|
+
}
|
|
577
|
+
const record = output;
|
|
578
|
+
const rawUi = record[TOOL_UI_FIELD];
|
|
579
|
+
const meta = {};
|
|
580
|
+
if (typeof rawUi === "object" && rawUi !== null && !Array.isArray(rawUi)) {
|
|
581
|
+
const ui = rawUi;
|
|
582
|
+
const present = readPresent(ui.present);
|
|
583
|
+
if (present !== void 0) {
|
|
584
|
+
meta.present = present;
|
|
585
|
+
}
|
|
586
|
+
const entity = readEntity(ui.entity);
|
|
587
|
+
if (entity) {
|
|
588
|
+
meta.entity = entity;
|
|
589
|
+
}
|
|
590
|
+
const rowsPath = readRowsPath(ui.rowsPath);
|
|
591
|
+
if (rowsPath) {
|
|
592
|
+
meta.rowsPath = rowsPath;
|
|
593
|
+
}
|
|
594
|
+
if (isToolUiHint(ui.layout)) {
|
|
595
|
+
meta.layout = ui.layout;
|
|
596
|
+
} else if (typeof ui.pattern === "string") {
|
|
597
|
+
const fromPattern = legacyPatternToLayout(ui.pattern);
|
|
598
|
+
if (fromPattern) {
|
|
599
|
+
meta.layout = fromPattern;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (!meta.layout && isToolUiHint(record.uiHint)) {
|
|
604
|
+
meta.layout = uiHintToLayout(record.uiHint);
|
|
605
|
+
}
|
|
606
|
+
if (meta.present === void 0 && meta.entity === void 0 && meta.rowsPath === void 0 && meta.layout === void 0) {
|
|
607
|
+
return void 0;
|
|
608
|
+
}
|
|
609
|
+
return meta;
|
|
610
|
+
}
|
|
611
|
+
function withToolUi(result, ui) {
|
|
612
|
+
const existing = typeof result[TOOL_UI_FIELD] === "object" && result[TOOL_UI_FIELD] !== null && !Array.isArray(result[TOOL_UI_FIELD]) ? result[TOOL_UI_FIELD] : {};
|
|
613
|
+
return {
|
|
614
|
+
...result,
|
|
615
|
+
[TOOL_UI_FIELD]: {
|
|
616
|
+
...existing,
|
|
617
|
+
...ui
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
|
|
521
622
|
// src/eve/tool-reply-guidance.ts
|
|
522
623
|
var TOOL_REPLY_GUIDANCE_FIELD = "replyGuidance";
|
|
523
624
|
var WHOAMI_REPLY_GUIDANCE = "The dashboard shows a profile card with name, email, workspace, role, and groups. Do not restate those in your reply. Only add context not in the card (e.g. permissions, refund approval rules, missing group membership).";
|
|
524
|
-
var MY_ACCESS_REPLY_GUIDANCE = "Access details may render in chat UI. Do not restate role, groups, or admin capabilities if already visible. Only explain what the user can or cannot do for their question (e.g. finance group required for refunds \u2265 $10,000). When access.tenantAdmin is false and the user needs manageTeam, manageGroups,
|
|
625
|
+
var MY_ACCESS_REPLY_GUIDANCE = "Access details may render in chat UI. Do not restate role, groups, or admin capabilities if already visible. Only explain what the user can or cannot do for their question (e.g. finance group required for refunds \u2265 $10,000). When access.tenantAdmin is false and the user needs manageTeam, manageGroups, query-tasks, or workspace-usage capabilities, explain briefly then call ask_question to offer sending an admin request to tenant admins \u2014 do not tell them to find an admin manually without offering delegation first.";
|
|
626
|
+
var GET_WORKSPACE_USAGE_REPLY_GUIDANCE = "Workspace plan and usage render as a card in chat. Do not restate plan name, task counts, seats, groups, API keys, or rate limits from the card. Only add context not shown (e.g. upgrade options, that LLM token/cost meters are not tracked, or next steps). Never invent token or dollar spend numbers.";
|
|
525
627
|
var CREATE_INBOX_TASK_REPLY_GUIDANCE = "A task card shows title, assignee, and inbox status in chat. Do not restate task ID, assignee, or delegation details from the card. Only mention next steps or answer the user's question.";
|
|
526
628
|
var SEARCH_PRODUCTS_REPLY_GUIDANCE = "Product results render as a list card in chat. Do not restate product names, prices, or SKUs. Only add context not in the list (e.g. no matches, recommendations).";
|
|
629
|
+
var GENERATE_RANDOM_CHART_REPLY_GUIDANCE = "Chart metrics render as a chart card in chat. Do not restate series values, dates, or categories from the chart. Only add brief context (e.g. that this is demo data).";
|
|
630
|
+
var GENERATE_IMAGE_REPLY_GUIDANCE = "The generated image renders in chat UI. Do not describe the image pixels or restate the prompt. Only add a short acknowledgement or next-step question if useful.";
|
|
527
631
|
var MANAGE_TEAM_MEMBERS_LIST_REPLY_GUIDANCE = "Team members render as a list card in chat. Do not restate names, emails, or roles from the list. Only add context not shown (e.g. duplicates, next admin actions).";
|
|
528
632
|
var MANAGE_TEAM_MEMBERS_DETAIL_REPLY_GUIDANCE = "Team member details render in chat UI. Do not restate name, email, or role from the card. Only add next steps or policy context.";
|
|
529
633
|
var MANAGE_GROUPS_LIST_REPLY_GUIDANCE = "Groups render as a list card in chat. Do not restate group names, slugs, or descriptions from the list. Use slug (not internal id) for get, update, delete, and membership actions. Only add context not shown.";
|
|
@@ -547,27 +651,259 @@ function stripAgentOnlyToolFields(output) {
|
|
|
547
651
|
const record = { ...output };
|
|
548
652
|
delete record[TOOL_REPLY_GUIDANCE_FIELD];
|
|
549
653
|
delete record[TOOL_UI_HINT_FIELD];
|
|
654
|
+
delete record[TOOL_UI_FIELD];
|
|
550
655
|
return record;
|
|
551
656
|
}
|
|
552
657
|
|
|
553
658
|
// src/eve/tool-display-format.ts
|
|
554
659
|
function formatToolObjectResult(data, options) {
|
|
555
|
-
|
|
660
|
+
let result = withReplyGuidance(
|
|
661
|
+
data,
|
|
662
|
+
options.replyGuidance
|
|
663
|
+
);
|
|
664
|
+
if (options.ui) {
|
|
665
|
+
result = withToolUi(result, options.ui);
|
|
666
|
+
}
|
|
556
667
|
if (options.uiHint) {
|
|
557
|
-
|
|
668
|
+
result = withUiHint(result, options.uiHint);
|
|
558
669
|
}
|
|
559
|
-
return
|
|
670
|
+
return result;
|
|
560
671
|
}
|
|
561
672
|
function formatToolListResult(listKey, items, options) {
|
|
673
|
+
const ui = {
|
|
674
|
+
...options.ui,
|
|
675
|
+
layout: "list",
|
|
676
|
+
rowsPath: listKey,
|
|
677
|
+
...options.entity ? { entity: options.entity } : {},
|
|
678
|
+
...options.present !== void 0 ? { present: options.present } : {}
|
|
679
|
+
};
|
|
562
680
|
return withUiHint(
|
|
563
|
-
|
|
681
|
+
withToolUi(
|
|
682
|
+
withReplyGuidance({ [listKey]: items }, options.replyGuidance),
|
|
683
|
+
ui
|
|
684
|
+
),
|
|
564
685
|
"list"
|
|
565
686
|
);
|
|
566
687
|
}
|
|
688
|
+
function formatToolQueryResult(meta, rows, options) {
|
|
689
|
+
const rowsPath = options.rowsPath ?? options.ui?.rowsPath ?? "rows";
|
|
690
|
+
const ui = {
|
|
691
|
+
...options.ui,
|
|
692
|
+
layout: options.ui?.layout ?? "list",
|
|
693
|
+
rowsPath,
|
|
694
|
+
...options.entity ? { entity: options.entity } : {},
|
|
695
|
+
...options.present !== void 0 ? { present: options.present } : {}
|
|
696
|
+
};
|
|
697
|
+
return withToolUi(
|
|
698
|
+
withReplyGuidance(
|
|
699
|
+
{
|
|
700
|
+
...meta,
|
|
701
|
+
[rowsPath]: rows
|
|
702
|
+
},
|
|
703
|
+
options.replyGuidance
|
|
704
|
+
),
|
|
705
|
+
ui
|
|
706
|
+
);
|
|
707
|
+
}
|
|
567
708
|
function isAgentAdminErrorResult(result) {
|
|
568
709
|
return typeof result === "object" && result !== null && result.ok === false && typeof result.message === "string";
|
|
569
710
|
}
|
|
570
711
|
|
|
712
|
+
// src/eve/entity-schemas.ts
|
|
713
|
+
import { z } from "zod";
|
|
714
|
+
function buildTenantTaskUrl(tenantSlug, task) {
|
|
715
|
+
const q = new URLSearchParams();
|
|
716
|
+
if (task.app && task.app !== "default") {
|
|
717
|
+
q.set("app", task.app);
|
|
718
|
+
}
|
|
719
|
+
if (task.type?.trim()) {
|
|
720
|
+
q.set("type", task.type.trim());
|
|
721
|
+
}
|
|
722
|
+
q.set("selected", task.id);
|
|
723
|
+
return `/${tenantSlug}/inbox?${q.toString()}`;
|
|
724
|
+
}
|
|
725
|
+
function buildTenantGroupUrl(tenantSlug, slug) {
|
|
726
|
+
return `/${tenantSlug}/team/groups/${slug}`;
|
|
727
|
+
}
|
|
728
|
+
var toolResultUiMetaSchema = z.object({
|
|
729
|
+
present: z.boolean().optional(),
|
|
730
|
+
entity: z.string().regex(TOOL_RESULT_UI_ENTITY_ID_RE).optional(),
|
|
731
|
+
rowsPath: z.string().min(1).optional(),
|
|
732
|
+
layout: z.enum(["list", "chart", "table"]).optional()
|
|
733
|
+
}).strict();
|
|
734
|
+
var agentOnlyFields = {
|
|
735
|
+
replyGuidance: z.string().optional(),
|
|
736
|
+
ui: toolResultUiMetaSchema.optional(),
|
|
737
|
+
uiHint: z.enum(["list", "chart", "table"]).optional()
|
|
738
|
+
};
|
|
739
|
+
function withAgentOnlyFields(shape) {
|
|
740
|
+
return z.object({
|
|
741
|
+
...shape,
|
|
742
|
+
...agentOnlyFields
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
var productEntityRowSchema = z.object({
|
|
746
|
+
id: z.string().min(1),
|
|
747
|
+
name: z.string().min(1),
|
|
748
|
+
price: z.number(),
|
|
749
|
+
currency: z.string().min(1),
|
|
750
|
+
inStock: z.boolean(),
|
|
751
|
+
url: z.string().min(1)
|
|
752
|
+
});
|
|
753
|
+
var metricPointEntityRowSchema = z.object({
|
|
754
|
+
date: z.string().optional(),
|
|
755
|
+
category: z.string().optional(),
|
|
756
|
+
label: z.string().optional()
|
|
757
|
+
}).catchall(z.union([z.string(), z.number()]));
|
|
758
|
+
var memberEntityRowSchema = z.object({
|
|
759
|
+
name: z.string(),
|
|
760
|
+
email: z.string(),
|
|
761
|
+
role: z.string(),
|
|
762
|
+
membershipKind: z.string(),
|
|
763
|
+
profilePictureUrl: z.string().nullable()
|
|
764
|
+
});
|
|
765
|
+
var taskEntityRowSchema = z.object({
|
|
766
|
+
id: z.string().min(1),
|
|
767
|
+
name: z.string().min(1),
|
|
768
|
+
status: z.string().min(1),
|
|
769
|
+
type: z.string().nullable(),
|
|
770
|
+
description: z.string().nullable(),
|
|
771
|
+
validUntil: z.number(),
|
|
772
|
+
createdAt: z.number(),
|
|
773
|
+
url: z.string().min(1),
|
|
774
|
+
threadPriority: z.string().nullable().optional()
|
|
775
|
+
});
|
|
776
|
+
var groupEntityRowSchema = z.object({
|
|
777
|
+
name: z.string().min(1),
|
|
778
|
+
slug: z.string().min(1),
|
|
779
|
+
description: z.string().nullable(),
|
|
780
|
+
memberCount: z.number().nullable(),
|
|
781
|
+
url: z.string().min(1)
|
|
782
|
+
});
|
|
783
|
+
var groupDetailEntitySchema = z.object({
|
|
784
|
+
name: z.string().min(1),
|
|
785
|
+
slug: z.string().min(1),
|
|
786
|
+
description: z.string().nullable(),
|
|
787
|
+
url: z.string().min(1),
|
|
788
|
+
members: z.array(
|
|
789
|
+
z.object({
|
|
790
|
+
name: z.string(),
|
|
791
|
+
email: z.string(),
|
|
792
|
+
profilePictureUrl: z.string().nullable()
|
|
793
|
+
})
|
|
794
|
+
)
|
|
795
|
+
});
|
|
796
|
+
var statusEntityRowSchema = z.object({
|
|
797
|
+
id: z.string().min(1),
|
|
798
|
+
name: z.string().min(1),
|
|
799
|
+
status: z.string().min(1),
|
|
800
|
+
url: z.string().min(1),
|
|
801
|
+
type: z.string().nullable().optional(),
|
|
802
|
+
description: z.string().nullable().optional()
|
|
803
|
+
});
|
|
804
|
+
var agentAdminErrorResultSchema = z.object({
|
|
805
|
+
ok: z.literal(false),
|
|
806
|
+
status: z.number().optional(),
|
|
807
|
+
message: z.string(),
|
|
808
|
+
response: z.unknown().optional()
|
|
809
|
+
});
|
|
810
|
+
var agentAdminMutationResultSchema = z.object({
|
|
811
|
+
...agentOnlyFields
|
|
812
|
+
}).passthrough();
|
|
813
|
+
var searchProductsOutputSchema = withAgentOnlyFields({
|
|
814
|
+
items: z.array(productEntityRowSchema)
|
|
815
|
+
});
|
|
816
|
+
var generateRandomChartOutputSchema = withAgentOnlyFields({
|
|
817
|
+
title: z.string().min(1),
|
|
818
|
+
axis: z.enum(["time", "category"]),
|
|
819
|
+
series: z.array(metricPointEntityRowSchema)
|
|
820
|
+
});
|
|
821
|
+
var generateImageOutputSchema = withAgentOnlyFields({
|
|
822
|
+
prompt: z.string().min(1),
|
|
823
|
+
mediaType: z.string().min(1),
|
|
824
|
+
model: z.string().min(1),
|
|
825
|
+
storageId: z.string().min(1),
|
|
826
|
+
url: z.string().min(1),
|
|
827
|
+
/** @deprecated Legacy sessions only — prefer storageId/url. */
|
|
828
|
+
base64: z.string().min(1).optional()
|
|
829
|
+
});
|
|
830
|
+
var manageTeamMembersListOutputSchema = withAgentOnlyFields({
|
|
831
|
+
members: z.array(memberEntityRowSchema)
|
|
832
|
+
});
|
|
833
|
+
var manageTeamMembersDetailOutputSchema = withAgentOnlyFields(
|
|
834
|
+
memberEntityRowSchema.shape
|
|
835
|
+
);
|
|
836
|
+
var manageTeamMembersOutputSchema = z.union([
|
|
837
|
+
manageTeamMembersListOutputSchema,
|
|
838
|
+
manageTeamMembersDetailOutputSchema,
|
|
839
|
+
agentAdminMutationResultSchema,
|
|
840
|
+
agentAdminErrorResultSchema
|
|
841
|
+
]);
|
|
842
|
+
var manageGroupsListOutputSchema = withAgentOnlyFields({
|
|
843
|
+
groups: z.array(groupEntityRowSchema)
|
|
844
|
+
});
|
|
845
|
+
var manageGroupsDetailOutputSchema = withAgentOnlyFields(
|
|
846
|
+
groupDetailEntitySchema.shape
|
|
847
|
+
);
|
|
848
|
+
var manageGroupsSummaryOutputSchema = withAgentOnlyFields(
|
|
849
|
+
groupEntityRowSchema.shape
|
|
850
|
+
);
|
|
851
|
+
var manageGroupsOutputSchema = z.union([
|
|
852
|
+
manageGroupsListOutputSchema,
|
|
853
|
+
manageGroupsDetailOutputSchema,
|
|
854
|
+
manageGroupsSummaryOutputSchema,
|
|
855
|
+
agentAdminMutationResultSchema,
|
|
856
|
+
agentAdminErrorResultSchema
|
|
857
|
+
]);
|
|
858
|
+
var queryTasksListOutputSchema = withAgentOnlyFields({
|
|
859
|
+
items: z.array(taskEntityRowSchema),
|
|
860
|
+
nextCursor: z.string().nullable().optional()
|
|
861
|
+
});
|
|
862
|
+
var queryTasksDetailOutputSchema = withAgentOnlyFields({
|
|
863
|
+
id: z.string().nullable(),
|
|
864
|
+
status: z.string().nullable(),
|
|
865
|
+
type: z.string().nullable(),
|
|
866
|
+
name: z.string().nullable(),
|
|
867
|
+
description: z.string().nullable(),
|
|
868
|
+
validUntil: z.number().nullable(),
|
|
869
|
+
createdAt: z.number().nullable(),
|
|
870
|
+
url: z.string().min(1).nullable()
|
|
871
|
+
});
|
|
872
|
+
var queryTasksOutputSchema = z.union([
|
|
873
|
+
queryTasksListOutputSchema,
|
|
874
|
+
queryTasksDetailOutputSchema,
|
|
875
|
+
agentAdminErrorResultSchema
|
|
876
|
+
]);
|
|
877
|
+
var assignTasksOutputSchema = z.union([
|
|
878
|
+
withAgentOnlyFields({
|
|
879
|
+
results: z.array(statusEntityRowSchema)
|
|
880
|
+
}),
|
|
881
|
+
agentAdminErrorResultSchema
|
|
882
|
+
]);
|
|
883
|
+
var workspaceUsageEntitySchema = z.object({
|
|
884
|
+
workspace: z.string(),
|
|
885
|
+
plan: z.string(),
|
|
886
|
+
planType: z.string(),
|
|
887
|
+
trialState: z.string(),
|
|
888
|
+
daysRemaining: z.number().nullable(),
|
|
889
|
+
isPaidPro: z.boolean(),
|
|
890
|
+
subscriptionStatus: z.string(),
|
|
891
|
+
tasksToday: z.string(),
|
|
892
|
+
tasksResetAt: z.string(),
|
|
893
|
+
openTasks: z.number(),
|
|
894
|
+
totalTasks: z.number(),
|
|
895
|
+
seats: z.string(),
|
|
896
|
+
groups: z.string(),
|
|
897
|
+
apiKeys: z.string(),
|
|
898
|
+
rateLimitPerSecond: z.number()
|
|
899
|
+
});
|
|
900
|
+
var getWorkspaceUsageOutputSchema = z.union([
|
|
901
|
+
withAgentOnlyFields({
|
|
902
|
+
usage: workspaceUsageEntitySchema
|
|
903
|
+
}),
|
|
904
|
+
agentAdminErrorResultSchema
|
|
905
|
+
]);
|
|
906
|
+
|
|
571
907
|
// src/eve/resume-message.ts
|
|
572
908
|
function buildTaskHandledResumeMessage(payload) {
|
|
573
909
|
const handledBy = payload.handledBy?.trim() || "someone";
|
|
@@ -585,7 +921,10 @@ export {
|
|
|
585
921
|
EVE_INPUT_OTHER_CHOICE_ID,
|
|
586
922
|
EVE_INPUT_OTHER_CHOICE_LABEL,
|
|
587
923
|
EVE_INPUT_SUBMIT_ACTION_ID,
|
|
924
|
+
GENERATE_IMAGE_REPLY_GUIDANCE,
|
|
925
|
+
GENERATE_RANDOM_CHART_REPLY_GUIDANCE,
|
|
588
926
|
GET_WEATHER_REPLY_GUIDANCE,
|
|
927
|
+
GET_WORKSPACE_USAGE_REPLY_GUIDANCE,
|
|
589
928
|
MANAGE_GROUPS_DETAIL_REPLY_GUIDANCE,
|
|
590
929
|
MANAGE_GROUPS_LIST_REPLY_GUIDANCE,
|
|
591
930
|
MANAGE_TEAM_MEMBERS_DETAIL_REPLY_GUIDANCE,
|
|
@@ -597,33 +936,71 @@ export {
|
|
|
597
936
|
ROBOTROCK_READY_HOOK_SLUG,
|
|
598
937
|
SEARCH_PRODUCTS_REPLY_GUIDANCE,
|
|
599
938
|
TOOL_REPLY_GUIDANCE_FIELD,
|
|
939
|
+
TOOL_RESULT_UI_ENTITIES,
|
|
940
|
+
TOOL_RESULT_UI_ENTITY_ID_RE,
|
|
941
|
+
TOOL_UI_FIELD,
|
|
600
942
|
TOOL_UI_HINT_FIELD,
|
|
601
943
|
WHOAMI_REPLY_GUIDANCE,
|
|
944
|
+
agentAdminErrorResultSchema,
|
|
945
|
+
agentAdminMutationResultSchema,
|
|
946
|
+
assignTasksOutputSchema,
|
|
602
947
|
buildChatToolAuditPayload,
|
|
603
948
|
buildEveInputAuditSubmissionData,
|
|
604
949
|
buildTaskHandledResumeMessage,
|
|
950
|
+
buildTenantGroupUrl,
|
|
951
|
+
buildTenantTaskUrl,
|
|
605
952
|
eveInputRequestTaskType,
|
|
606
953
|
eveInputRequestToActions,
|
|
607
954
|
eveInputResponseToActionSubmission,
|
|
955
|
+
extractToolResultUiMeta,
|
|
608
956
|
extractToolUiHint,
|
|
609
957
|
formatEveApprovalTitle,
|
|
610
958
|
formatToolListResult,
|
|
611
959
|
formatToolObjectResult,
|
|
960
|
+
formatToolQueryResult,
|
|
961
|
+
generateImageOutputSchema,
|
|
962
|
+
generateRandomChartOutputSchema,
|
|
612
963
|
getToolDisplayLabel,
|
|
964
|
+
getWorkspaceUsageOutputSchema,
|
|
965
|
+
groupDetailEntitySchema,
|
|
966
|
+
groupEntityRowSchema,
|
|
613
967
|
isAgentAdminErrorResult,
|
|
614
968
|
isEveApprovalInputRequest,
|
|
969
|
+
isToolResultUiEntity,
|
|
970
|
+
isToolResultUiEntityId,
|
|
615
971
|
isToolUiHint,
|
|
972
|
+
legacyPatternToLayout,
|
|
973
|
+
manageGroupsDetailOutputSchema,
|
|
974
|
+
manageGroupsListOutputSchema,
|
|
975
|
+
manageGroupsOutputSchema,
|
|
976
|
+
manageGroupsSummaryOutputSchema,
|
|
977
|
+
manageTeamMembersDetailOutputSchema,
|
|
978
|
+
manageTeamMembersListOutputSchema,
|
|
979
|
+
manageTeamMembersOutputSchema,
|
|
980
|
+
memberEntityRowSchema,
|
|
981
|
+
metricPointEntityRowSchema,
|
|
616
982
|
normalizeEveSelectFormData,
|
|
617
983
|
parseEveAskQuestionToolOutput,
|
|
984
|
+
productEntityRowSchema,
|
|
985
|
+
queryTasksDetailOutputSchema,
|
|
986
|
+
queryTasksListOutputSchema,
|
|
987
|
+
queryTasksOutputSchema,
|
|
618
988
|
resolveEveFreeformTextToInputResponse,
|
|
619
989
|
resolveEveInputDisplay,
|
|
620
990
|
sanitizeToolAuditInput,
|
|
991
|
+
searchProductsOutputSchema,
|
|
621
992
|
setToolDisplayLabelOverrides,
|
|
622
993
|
shouldAuditToolExecution,
|
|
994
|
+
statusEntityRowSchema,
|
|
623
995
|
stripAgentOnlyToolFields,
|
|
996
|
+
taskEntityRowSchema,
|
|
624
997
|
taskHandledToEveInputResponse,
|
|
625
998
|
toolDisplayResult,
|
|
999
|
+
toolResultUiMetaSchema,
|
|
1000
|
+
uiHintToLayout,
|
|
626
1001
|
withReplyGuidance,
|
|
627
|
-
|
|
1002
|
+
withToolUi,
|
|
1003
|
+
withUiHint,
|
|
1004
|
+
workspaceUsageEntitySchema
|
|
628
1005
|
};
|
|
629
1006
|
//# sourceMappingURL=index.js.map
|