robotrock 1.3.2 → 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.
- package/README.md +22 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.js +8 -0
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.js +8 -0
- package/dist/ai/workflow.js.map +1 -1
- package/dist/eve/agent/index.d.ts +67 -3
- package/dist/eve/agent/index.js +209 -153
- package/dist/eve/agent/index.js.map +1 -1
- package/dist/eve/index.d.ts +2 -1
- package/dist/eve/index.js +62 -47
- package/dist/eve/index.js.map +1 -1
- package/dist/eve/tools/admin/assign-tasks.d.ts +15 -4
- package/dist/eve/tools/admin/assign-tasks.js +8 -43
- package/dist/eve/tools/admin/assign-tasks.js.map +1 -1
- package/dist/eve/tools/admin/manage-groups.d.ts +2 -3
- package/dist/eve/tools/admin/manage-groups.js +18 -71
- package/dist/eve/tools/admin/manage-groups.js.map +1 -1
- package/dist/eve/tools/admin/manage-team-members.d.ts +2 -3
- package/dist/eve/tools/admin/manage-team-members.js +20 -64
- package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
- package/dist/eve/tools/admin/query-tasks.d.ts +5 -6
- package/dist/eve/tools/admin/query-tasks.js +22 -86
- package/dist/eve/tools/admin/query-tasks.js.map +1 -1
- package/dist/eve/tools/catalog/search-products.d.ts +4 -5
- package/dist/eve/tools/catalog/search-products.js +2 -33
- package/dist/eve/tools/catalog/search-products.js.map +1 -1
- package/dist/eve/tools/identity/index.d.ts +0 -1
- package/dist/eve/tools/identity/index.js +15 -44
- package/dist/eve/tools/identity/index.js.map +1 -1
- package/dist/eve/tools/identity/my-access.d.ts +2 -3
- package/dist/eve/tools/identity/my-access.js +15 -44
- package/dist/eve/tools/identity/my-access.js.map +1 -1
- package/dist/eve/tools/identity/whoami.js.map +1 -1
- package/dist/eve/tools/inbox/create-task.js.map +1 -1
- package/dist/eve/tools/inbox/index.js.map +1 -1
- package/dist/eve/tools/index.d.ts +1 -1
- package/dist/eve/tools/index.js +44 -193
- package/dist/eve/tools/index.js.map +1 -1
- package/dist/{index-DePyAbTI.d.ts → index-Blq0XoAr.d.ts} +17 -16
- package/dist/index.d.ts +2 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/dist/tool-ui-hint-CMpug5sC.d.ts +13 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as SendToHumanActionInput } from './client-CZ5eWH5v.js';
|
|
2
|
-
import { UiSchema
|
|
2
|
+
import { UiSchema } from '@robotrock/core/schemas';
|
|
3
3
|
import { T as ToolResultWithReplyGuidance } from './tool-reply-guidance-C3qrT1In.js';
|
|
4
|
-
import
|
|
4
|
+
import { T as ToolUiHint } from './tool-ui-hint-CMpug5sC.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
/** One selectable option in an Eve HITL input request. */
|
|
@@ -127,28 +127,29 @@ type ToolDisplayResultOptions = {
|
|
|
127
127
|
ui?: Record<string, UiSchema>;
|
|
128
128
|
};
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
130
|
+
* @deprecated Tool results should return plain JSON. Display envelopes are ignored
|
|
131
|
+
* by the dashboard TRL renderer. Kept for backwards-compatible call sites.
|
|
132
132
|
*/
|
|
133
|
-
declare function toolDisplayResult<T extends Record<string, unknown>>(data: T,
|
|
133
|
+
declare function toolDisplayResult<T extends Record<string, unknown>>(data: T, _options?: ToolDisplayResultOptions): T;
|
|
134
134
|
|
|
135
135
|
type FormatToolObjectResultOptions = {
|
|
136
|
-
title?: string;
|
|
137
|
-
description?: string;
|
|
138
|
-
ui?: Record<string, UiSchema>;
|
|
139
136
|
replyGuidance: string;
|
|
137
|
+
/** Optional layout hint for TRL rendering. Omit to let the dashboard infer. */
|
|
138
|
+
uiHint?: ToolUiHint;
|
|
140
139
|
};
|
|
141
140
|
type FormatToolListResultOptions = {
|
|
142
|
-
title: string;
|
|
143
|
-
itemUi?: UiSchema;
|
|
144
|
-
/** Composite widget for each row (uses list layout instead of table). */
|
|
145
|
-
itemWidget?: string;
|
|
146
141
|
replyGuidance: string;
|
|
147
142
|
};
|
|
148
|
-
/**
|
|
149
|
-
declare function formatToolObjectResult(data: Record<string, unknown>, options: FormatToolObjectResultOptions): ToolResultWithReplyGuidance<
|
|
150
|
-
/** Wrap an array field as
|
|
151
|
-
declare function formatToolListResult(listKey: string, items: Record<string, unknown>[], options: FormatToolListResultOptions):
|
|
143
|
+
/** Attach agent narration hints to plain tool JSON. No display/ui envelope. */
|
|
144
|
+
declare function formatToolObjectResult(data: Record<string, unknown>, options: FormatToolObjectResultOptions): ToolResultWithReplyGuidance<Record<string, unknown>>;
|
|
145
|
+
/** Wrap an array field as plain tool JSON with reply guidance and list layout hint. */
|
|
146
|
+
declare function formatToolListResult(listKey: string, items: Record<string, unknown>[], options: FormatToolListResultOptions): {
|
|
147
|
+
[listKey]: Record<string, unknown>[];
|
|
148
|
+
} & {
|
|
149
|
+
replyGuidance: string;
|
|
150
|
+
} & {
|
|
151
|
+
uiHint: ToolUiHint;
|
|
152
|
+
};
|
|
152
153
|
declare function isAgentAdminErrorResult(result: unknown): result is {
|
|
153
154
|
ok: false;
|
|
154
155
|
message: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,13 @@ export { C as ChatsApi, c as CloseChatOptions, d as CreateChatInput, e as Create
|
|
|
3
3
|
export { AgentChatSeedMessage, CreateAgentChatBody, CreateAgentChatBodyInput, agentChatSeedMessageSchema, createAgentChatBodySchema } from '@robotrock/core';
|
|
4
4
|
import { Task, DiscriminatedApprovalResult } from './schemas/index.js';
|
|
5
5
|
export { AgentTelemetry, AgentTelemetryInput, ApprovalResult, AssignToInput, CreateTaskBody, CreateTaskBodyInput, DEFAULT_TASK_PRIORITY, DEFAULT_THREAD_UPDATE_STATUS, Handler, InferActionData, LOWEST_TASK_PRIORITY, TASK_CONTEXT_FORMAT_VERSION, TASK_PRIORITY_RANK, TaskAction, TaskContext, TaskContextFormatVersion, TaskContextInput, TaskPriority, TaskResponse, TaskResult, TaskStatus, ThreadUpdate, ThreadUpdateBody, ThreadUpdateBodyInput, ThreadUpdateInput, ThreadUpdateResponse, ThreadUpdateSource, ThreadUpdateStatus, TriggerHandler, TupleElementIndices, WebhookHandler, agentTelemetrySchema, assignToSchema, createTaskBodySchema, taskContextSchema, taskPriorities, taskPrioritySchema, threadUpdateBodySchema, threadUpdateInputSchema, threadUpdateStatusSchema, threadUpdateStatuses } from './schemas/index.js';
|
|
6
|
-
export { 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, c as EveInputOption, d as EveInputRequest, e as EveInputRequestDisplay, f as EveInputResponse, R as ROBOTROCK_READY_HOOK_SLUG, g as RobotRockWebhookError, h as RobotRockWebhookErrorCode, i as RobotRockWebhookPayload, V as VerifyRobotRockWebhookOptions, j as buildTaskHandledResumeMessage, k as eveInputRequestTaskType, l as eveInputRequestToActions, m as formatEveApprovalTitle, n as getToolDisplayLabel, o as normalizeEveSelectFormData, r as resolveEveInputDisplay, s as setToolDisplayLabelOverrides, t as taskHandledToEveInputResponse, v as verifyRobotRockWebhook } from './index-
|
|
6
|
+
export { 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, c as EveInputOption, d as EveInputRequest, e as EveInputRequestDisplay, f as EveInputResponse, R as ROBOTROCK_READY_HOOK_SLUG, g as RobotRockWebhookError, h as RobotRockWebhookErrorCode, i as RobotRockWebhookPayload, V as VerifyRobotRockWebhookOptions, j as buildTaskHandledResumeMessage, k as eveInputRequestTaskType, l as eveInputRequestToActions, m as formatEveApprovalTitle, n as getToolDisplayLabel, o as normalizeEveSelectFormData, r as resolveEveInputDisplay, s as setToolDisplayLabelOverrides, t as taskHandledToEveInputResponse, v as verifyRobotRockWebhook } from './index-Blq0XoAr.js';
|
|
7
7
|
export { E as EndRobotRockHumanWaitSpanOptions, b as RobotRockCreatedTask, c as RobotRockHandledOtelInput, a as RobotRockHandlerWebhookPayload, d as RobotRockHumanWaitOtelSession, e as RobotRockOtelHandle, f as RobotRockOtelRecordOptions, R as RobotRockPlatformOtelFields, g as beginRobotRockHumanWaitOtel, h as captureRobotRockOtelHandle, i as endRobotRockHumanWaitSpan, j as finishRobotRockHumanWaitOtel, r as recordRobotRockHandledToOtel, s as shouldRecordRobotRockOtel, k as startRobotRockHumanWaitSpan, l as stripPlatformOtelFields, t as toRobotRockHandledOtelInput } from './otel-platform-DzHyHkGk.js';
|
|
8
8
|
import 'zod';
|
|
9
9
|
import './chat-correlation-BsHD-tOQ.js';
|
|
10
10
|
import '@robotrock/core/schemas';
|
|
11
11
|
import './tool-reply-guidance-C3qrT1In.js';
|
|
12
|
+
import './tool-ui-hint-CMpug5sC.js';
|
|
12
13
|
import '@opentelemetry/api';
|
|
13
14
|
|
|
14
15
|
declare class RobotRockError extends Error {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// src/schemas/index.ts
|
|
2
2
|
import { z as z4 } from "zod";
|
|
3
3
|
|
|
4
|
+
// ../core/src/utils/decode-html-entities.ts
|
|
5
|
+
function decodeHtmlEntities(value) {
|
|
6
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/&#(\d+);/g, (_, code) => String.fromCharCode(Number(code))).replace(
|
|
7
|
+
/&#x([0-9a-f]+);/gi,
|
|
8
|
+
(_, code) => String.fromCharCode(parseInt(code, 16))
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
// ../core/src/utils/safe-url.ts
|
|
5
13
|
var BLOCKED_HOSTNAMES = /* @__PURE__ */ new Set([
|
|
6
14
|
"localhost",
|
|
@@ -1574,6 +1582,9 @@ function readStringField(data, key) {
|
|
|
1574
1582
|
const trimmed = value.trim();
|
|
1575
1583
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
1576
1584
|
}
|
|
1585
|
+
function decodeDisplayText(value) {
|
|
1586
|
+
return decodeHtmlEntities(value);
|
|
1587
|
+
}
|
|
1577
1588
|
function resolveEveInputDisplay(request, toolName) {
|
|
1578
1589
|
if (request.display) {
|
|
1579
1590
|
return request.display;
|
|
@@ -1590,11 +1601,12 @@ function confirmationActions(request) {
|
|
|
1590
1601
|
const options = request.options && request.options.length > 0 ? request.options : CONFIRMATION_DEFAULT_OPTIONS;
|
|
1591
1602
|
return options.map((option) => ({
|
|
1592
1603
|
id: option.id,
|
|
1593
|
-
title: option.label,
|
|
1594
|
-
...option.description ? { description: option.description } : {}
|
|
1604
|
+
title: decodeDisplayText(option.label),
|
|
1605
|
+
...option.description ? { description: decodeDisplayText(option.description) } : {}
|
|
1595
1606
|
}));
|
|
1596
1607
|
}
|
|
1597
1608
|
function textSubmitAction(prompt) {
|
|
1609
|
+
const decodedPrompt = decodeDisplayText(prompt);
|
|
1598
1610
|
return {
|
|
1599
1611
|
id: EVE_INPUT_SUBMIT_ACTION_ID,
|
|
1600
1612
|
title: "Submit",
|
|
@@ -1610,7 +1622,7 @@ function textSubmitAction(prompt) {
|
|
|
1610
1622
|
},
|
|
1611
1623
|
ui: {
|
|
1612
1624
|
answer: {
|
|
1613
|
-
"ui:title":
|
|
1625
|
+
"ui:title": decodedPrompt.trim() || "Your answer",
|
|
1614
1626
|
"ui:widget": "textarea"
|
|
1615
1627
|
}
|
|
1616
1628
|
}
|
|
@@ -1619,15 +1631,15 @@ function textSubmitAction(prompt) {
|
|
|
1619
1631
|
function selectPerOptionActions(options) {
|
|
1620
1632
|
return options.map((option) => ({
|
|
1621
1633
|
id: option.id,
|
|
1622
|
-
title: option.label,
|
|
1623
|
-
...option.description ? { description: option.description } : {}
|
|
1634
|
+
title: decodeDisplayText(option.label),
|
|
1635
|
+
...option.description ? { description: decodeDisplayText(option.description) } : {}
|
|
1624
1636
|
}));
|
|
1625
1637
|
}
|
|
1626
1638
|
function selectFormAction(request) {
|
|
1627
1639
|
const options = request.options ?? [];
|
|
1628
1640
|
const allowFreeform = request.allowFreeform === true;
|
|
1629
1641
|
const enumValues = options.map((option) => option.id);
|
|
1630
|
-
const enumNames = options.map((option) => option.label);
|
|
1642
|
+
const enumNames = options.map((option) => decodeDisplayText(option.label));
|
|
1631
1643
|
if (allowFreeform) {
|
|
1632
1644
|
enumValues.push(EVE_INPUT_OTHER_CHOICE_ID);
|
|
1633
1645
|
enumNames.push(EVE_INPUT_OTHER_CHOICE_LABEL);
|
|
@@ -1811,7 +1823,7 @@ function getToolDisplayLabel(toolName) {
|
|
|
1811
1823
|
function formatEveApprovalTitle(request, toolName) {
|
|
1812
1824
|
const display = resolveEveInputDisplay(request, toolName);
|
|
1813
1825
|
if (display !== "confirmation" || !toolName) {
|
|
1814
|
-
return request.prompt;
|
|
1826
|
+
return decodeHtmlEntities(request.prompt);
|
|
1815
1827
|
}
|
|
1816
1828
|
return `Approve: ${getToolDisplayLabel(toolName)}`;
|
|
1817
1829
|
}
|