robotrock 1.3.1 → 1.3.2
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/dist/agent-admin.d.ts +2 -1
- package/dist/agent-admin.js +44 -0
- package/dist/agent-admin.js.map +1 -1
- package/dist/ai/index.d.ts +6 -6
- package/dist/ai/index.js +34 -2
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.d.ts +4 -4
- package/dist/ai/trigger.js +34 -2
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.d.ts +4 -4
- package/dist/ai/workflow.js +34 -2
- package/dist/ai/workflow.js.map +1 -1
- package/dist/{auth-headers-qL-ZeEtd.d.ts → chat-correlation-BsHD-tOQ.d.ts} +6 -1
- package/dist/{client-YO9Y1rkH.d.ts → client-CZ5eWH5v.d.ts} +6 -1
- package/dist/eve/agent/index.d.ts +4 -4
- package/dist/eve/agent/index.js +127 -238
- package/dist/eve/agent/index.js.map +1 -1
- package/dist/eve/index.d.ts +3 -3
- package/dist/eve/index.js +1 -26
- package/dist/eve/index.js.map +1 -1
- package/dist/eve/tools/admin/assign-tasks.js +44 -0
- package/dist/eve/tools/admin/assign-tasks.js.map +1 -1
- package/dist/eve/tools/admin/manage-groups.js +44 -0
- package/dist/eve/tools/admin/manage-groups.js.map +1 -1
- package/dist/eve/tools/admin/manage-team-members.js +44 -0
- package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
- package/dist/eve/tools/admin/query-tasks.js +44 -0
- package/dist/eve/tools/admin/query-tasks.js.map +1 -1
- package/dist/eve/tools/identity/index.d.ts +1 -1
- package/dist/eve/tools/identity/index.js +2 -0
- package/dist/eve/tools/identity/index.js.map +1 -1
- package/dist/eve/tools/identity/my-access.js +2 -0
- 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 +2 -0
- 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 +56 -31
- 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 +56 -31
- 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 +68 -31
- package/dist/eve/tools/index.js.map +1 -1
- package/dist/{index-DoQN48Bm.d.ts → index-DePyAbTI.d.ts} +6 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/{tenant-5YKDrdC-.d.ts → tenant-DmN0MMyC.d.ts} +1 -0
- package/dist/{tool-approval-bridge-aMA79Z1B.d.ts → tool-approval-bridge-DnGaRES4.d.ts} +1 -1
- package/dist/trigger/index.d.ts +2 -2
- package/dist/trigger/index.js +26 -2
- package/dist/trigger/index.js.map +1 -1
- package/dist/{trigger-CXrbKVCL.d.ts → trigger--qTIK0s6.d.ts} +2 -2
- package/dist/workflow/index.d.ts +2 -2
- package/dist/workflow/index.js +26 -2
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ai/workflow.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as ApproveByHumanToolDurableOptions, a as ApproveByHumanToolOptions, b as ApproveByHumanToolDefinition, R as RobotRockAiWorkflowContext, C as CreateSendToHumanToolOptions, S as SendToHumanToolDefinition, c as CreateSendUpdateToolOptions, d as SendUpdateToolDefinition, e as RequestActionInputToolOptions, f as RequestActionInputToolDefinition, g as ReportStatusToolOptions, h as ReportStatusToolDefinition, i as CreateSendToHumanToolDurableOptions, j as CreateSendUpdateToolDurableOptions } from '../tool-approval-bridge-
|
|
2
|
-
export { k as RobotRockAiContext, l as RobotRockAiMode, m as RobotRockAiPollingContext, n as RobotRockAiTriggerContext, o as applyRobotRockToolApprovalToTools, p as createRobotRockAiWorkflowContext, q as createRobotRockNeedsApproval, r as createRobotRockToolApproval, s as resolveToolApprovalsViaRobotRock, t as runWithRobotRockApprovals } from '../tool-approval-bridge-
|
|
3
|
-
import { R as RobotRock, S as SendToHumanActionInput } from '../client-
|
|
1
|
+
import { A as ApproveByHumanToolDurableOptions, a as ApproveByHumanToolOptions, b as ApproveByHumanToolDefinition, R as RobotRockAiWorkflowContext, C as CreateSendToHumanToolOptions, S as SendToHumanToolDefinition, c as CreateSendUpdateToolOptions, d as SendUpdateToolDefinition, e as RequestActionInputToolOptions, f as RequestActionInputToolDefinition, g as ReportStatusToolOptions, h as ReportStatusToolDefinition, i as CreateSendToHumanToolDurableOptions, j as CreateSendUpdateToolDurableOptions } from '../tool-approval-bridge-DnGaRES4.js';
|
|
2
|
+
export { k as RobotRockAiContext, l as RobotRockAiMode, m as RobotRockAiPollingContext, n as RobotRockAiTriggerContext, o as applyRobotRockToolApprovalToTools, p as createRobotRockAiWorkflowContext, q as createRobotRockNeedsApproval, r as createRobotRockToolApproval, s as resolveToolApprovalsViaRobotRock, t as runWithRobotRockApprovals } from '../tool-approval-bridge-DnGaRES4.js';
|
|
3
|
+
import { R as RobotRock, S as SendToHumanActionInput } from '../client-CZ5eWH5v.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../schemas/index.js';
|
|
6
6
|
import 'ai';
|
|
7
7
|
import '@robotrock/core';
|
|
8
|
-
import '../
|
|
8
|
+
import '../chat-correlation-BsHD-tOQ.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Workflow-safe approve/decline tool for `generateText`, `DurableAgent`, and similar.
|
package/dist/ai/workflow.js
CHANGED
|
@@ -1127,11 +1127,37 @@ var init_auth_headers = __esm({
|
|
|
1127
1127
|
}
|
|
1128
1128
|
});
|
|
1129
1129
|
|
|
1130
|
+
// src/chat-correlation.ts
|
|
1131
|
+
function buildChatCorrelationHeaders(correlation) {
|
|
1132
|
+
if (!correlation) {
|
|
1133
|
+
return {};
|
|
1134
|
+
}
|
|
1135
|
+
const headers = {};
|
|
1136
|
+
const chatId = correlation.chatId?.trim();
|
|
1137
|
+
const eveSessionId = correlation.eveSessionId?.trim();
|
|
1138
|
+
if (chatId) {
|
|
1139
|
+
headers[ROBOTROCK_CHAT_ID_HEADER] = chatId;
|
|
1140
|
+
}
|
|
1141
|
+
if (eveSessionId) {
|
|
1142
|
+
headers[ROBOTROCK_EVE_SESSION_ID_HEADER] = eveSessionId;
|
|
1143
|
+
}
|
|
1144
|
+
return headers;
|
|
1145
|
+
}
|
|
1146
|
+
var ROBOTROCK_CHAT_ID_HEADER, ROBOTROCK_EVE_SESSION_ID_HEADER;
|
|
1147
|
+
var init_chat_correlation = __esm({
|
|
1148
|
+
"src/chat-correlation.ts"() {
|
|
1149
|
+
"use strict";
|
|
1150
|
+
ROBOTROCK_CHAT_ID_HEADER = "x-robotrock-chat-id";
|
|
1151
|
+
ROBOTROCK_EVE_SESSION_ID_HEADER = "x-robotrock-eve-session-id";
|
|
1152
|
+
}
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1130
1155
|
// src/chats.ts
|
|
1131
1156
|
function createChatsApi(config) {
|
|
1132
1157
|
const headers = () => ({
|
|
1133
1158
|
"Content-Type": "application/json",
|
|
1134
|
-
...buildRobotRockAuthHeaders(config.auth)
|
|
1159
|
+
...buildRobotRockAuthHeaders(config.auth),
|
|
1160
|
+
...buildChatCorrelationHeaders(config.chatCorrelation)
|
|
1135
1161
|
});
|
|
1136
1162
|
return {
|
|
1137
1163
|
async create(input) {
|
|
@@ -1307,6 +1333,7 @@ var init_chats = __esm({
|
|
|
1307
1333
|
init_src();
|
|
1308
1334
|
init_http();
|
|
1309
1335
|
init_auth_headers();
|
|
1336
|
+
init_chat_correlation();
|
|
1310
1337
|
}
|
|
1311
1338
|
});
|
|
1312
1339
|
|
|
@@ -1398,11 +1425,13 @@ var init_client = __esm({
|
|
|
1398
1425
|
init_src();
|
|
1399
1426
|
init_chats();
|
|
1400
1427
|
init_auth_headers();
|
|
1428
|
+
init_chat_correlation();
|
|
1401
1429
|
init_http();
|
|
1402
1430
|
DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
1403
1431
|
DEFAULT_TIMEOUT_MS = 24 * 60 * 60 * 1e3;
|
|
1404
1432
|
RobotRock = class {
|
|
1405
1433
|
auth;
|
|
1434
|
+
chatCorrelation;
|
|
1406
1435
|
baseUrl;
|
|
1407
1436
|
app;
|
|
1408
1437
|
agentVersion;
|
|
@@ -1430,6 +1459,7 @@ var init_client = __esm({
|
|
|
1430
1459
|
...apiKey ? { apiKey } : {},
|
|
1431
1460
|
...agentService ? { agentService } : {}
|
|
1432
1461
|
});
|
|
1462
|
+
this.chatCorrelation = config.chatCorrelation;
|
|
1433
1463
|
this.baseUrl = config.baseUrl ?? getRobotRockApiBaseUrl();
|
|
1434
1464
|
this.app = config.app;
|
|
1435
1465
|
this.agentVersion = config.version ?? resolveAgentVersionFromEnv();
|
|
@@ -1447,13 +1477,15 @@ var init_client = __esm({
|
|
|
1447
1477
|
this.chats = createChatsApi({
|
|
1448
1478
|
baseUrl: this.baseUrl,
|
|
1449
1479
|
auth: this.auth,
|
|
1450
|
-
app: this.app
|
|
1480
|
+
app: this.app,
|
|
1481
|
+
chatCorrelation: this.chatCorrelation
|
|
1451
1482
|
});
|
|
1452
1483
|
}
|
|
1453
1484
|
authHeaders(extra) {
|
|
1454
1485
|
return {
|
|
1455
1486
|
"Content-Type": "application/json",
|
|
1456
1487
|
...buildRobotRockAuthHeaders(this.auth),
|
|
1488
|
+
...buildChatCorrelationHeaders(this.chatCorrelation),
|
|
1457
1489
|
...extra
|
|
1458
1490
|
};
|
|
1459
1491
|
}
|