robotrock 1.3.3 → 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 +32 -0
- 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 +128 -4
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.d.ts +3 -3
- package/dist/ai/trigger.js +128 -4
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.d.ts +3 -3
- package/dist/ai/workflow.js +128 -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 -3
- package/dist/eve/agent/index.js +736 -414
- package/dist/eve/agent/index.js.map +1 -1
- package/dist/eve/index.d.ts +4 -3
- package/dist/eve/index.js +437 -45
- package/dist/eve/index.js.map +1 -1
- package/dist/eve/tools/admin/assign-tasks.d.ts +40 -8
- package/dist/eve/tools/admin/assign-tasks.js +328 -66
- 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 -8
- package/dist/eve/tools/admin/manage-groups.js +348 -94
- package/dist/eve/tools/admin/manage-groups.js.map +1 -1
- package/dist/eve/tools/admin/manage-team-members.d.ts +86 -8
- package/dist/eve/tools/admin/manage-team-members.js +318 -72
- package/dist/eve/tools/admin/manage-team-members.js.map +1 -1
- package/dist/eve/tools/admin/query-tasks.d.ts +82 -8
- package/dist/eve/tools/admin/query-tasks.js +360 -113
- 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 -44
- package/dist/eve/tools/catalog/search-products.js +237 -33
- package/dist/eve/tools/catalog/search-products.js.map +1 -1
- package/dist/eve/tools/identity/index.d.ts +2 -2
- package/dist/eve/tools/identity/index.js +35 -44
- package/dist/eve/tools/identity/index.js.map +1 -1
- package/dist/eve/tools/identity/my-access.d.ts +90 -6
- package/dist/eve/tools/identity/my-access.js +35 -44
- 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 +932 -288
- package/dist/eve/tools/index.js.map +1 -1
- package/dist/index-Drj0Rzf_.d.ts +905 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +335 -20
- 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-DePyAbTI.d.ts +0 -203
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tool } from 'ai';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { R as RobotRock, S as SendToHumanActionInput } from './client-
|
|
4
|
-
import { A as ApproveByHumanToolDurableOptions, a as ApproveByHumanToolOptions, N as approveByHumanInputSchema, H as HumanToolResult, i as CreateSendToHumanToolDurableOptions, C as CreateSendToHumanToolOptions, a7 as sendToHumanToolInputSchema, j as CreateSendUpdateToolDurableOptions, c as CreateSendUpdateToolOptions, a9 as sendUpdateToolInputSchema, L as SendUpdateToolResult, e as RequestActionInputToolOptions, a4 as requestActionInputToolInputSchema, E as RequestActionInputToolOutput, g as ReportStatusToolOptions, a2 as reportStatusToolInputSchema, B as ReportStatusToolOutput, k as RobotRockAiContext } from './tool-approval-bridge-
|
|
3
|
+
import { R as RobotRock, S as SendToHumanActionInput } from './client-BxbxttFH.js';
|
|
4
|
+
import { A as ApproveByHumanToolDurableOptions, a as ApproveByHumanToolOptions, N as approveByHumanInputSchema, H as HumanToolResult, i as CreateSendToHumanToolDurableOptions, C as CreateSendToHumanToolOptions, a7 as sendToHumanToolInputSchema, j as CreateSendUpdateToolDurableOptions, c as CreateSendUpdateToolOptions, a9 as sendUpdateToolInputSchema, L as SendUpdateToolResult, e as RequestActionInputToolOptions, a4 as requestActionInputToolInputSchema, E as RequestActionInputToolOutput, g as ReportStatusToolOptions, a2 as reportStatusToolInputSchema, B as ReportStatusToolOutput, k as RobotRockAiContext } from './tool-approval-bridge-Cz7qQUpw.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* AI SDK tool with fixed approve/decline actions; blocks until a human decides.
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThreadUpdateStatus, DiscriminatedApprovalResult, ThreadUpdate } from '../schemas/index.js';
|
|
2
2
|
export { ApprovalResult, TaskContextInput, TaskResult } from '../schemas/index.js';
|
|
3
|
-
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-
|
|
3
|
+
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-BxbxttFH.js';
|
|
4
4
|
import { R as RobotRockPlatformOtelFields } from '../otel-platform-DzHyHkGk.js';
|
|
5
5
|
export { a as RobotRockHandlerWebhookPayload } from '../otel-platform-DzHyHkGk.js';
|
|
6
6
|
import 'zod';
|
package/dist/workflow/index.js
CHANGED
|
@@ -494,6 +494,40 @@ var agentChatLinkTaskBodySchema = z.object({
|
|
|
494
494
|
publicTaskId: z.string().min(1),
|
|
495
495
|
toolCallId: z.string().min(1)
|
|
496
496
|
});
|
|
497
|
+
var AGENT_FILE_TAGS_MAX = 20;
|
|
498
|
+
var AGENT_FILE_TAG_MAX_LENGTH = 64;
|
|
499
|
+
function normalizeAgentFileTags(tags) {
|
|
500
|
+
if (!tags?.length) return void 0;
|
|
501
|
+
const seen = /* @__PURE__ */ new Set();
|
|
502
|
+
const out = [];
|
|
503
|
+
for (const raw of tags) {
|
|
504
|
+
const tag = raw.trim().toLowerCase().slice(0, AGENT_FILE_TAG_MAX_LENGTH);
|
|
505
|
+
if (!tag || seen.has(tag)) continue;
|
|
506
|
+
seen.add(tag);
|
|
507
|
+
out.push(tag);
|
|
508
|
+
if (out.length >= AGENT_FILE_TAGS_MAX) break;
|
|
509
|
+
}
|
|
510
|
+
return out.length > 0 ? out : void 0;
|
|
511
|
+
}
|
|
512
|
+
var agentChatUploadImageBodySchema = z.object({
|
|
513
|
+
mediaType: z.string().min(1),
|
|
514
|
+
/** Raw base64 (no data: URL prefix). */
|
|
515
|
+
base64: z.string().min(1),
|
|
516
|
+
chatId: z.string().min(1).optional(),
|
|
517
|
+
publicTaskId: z.string().min(1).optional(),
|
|
518
|
+
source: z.string().min(1).optional(),
|
|
519
|
+
/** Display / search name (e.g. `sunset-robot.png`). */
|
|
520
|
+
filename: z.string().min(1).max(255).optional(),
|
|
521
|
+
/** Human-readable description (e.g. generation prompt). */
|
|
522
|
+
description: z.string().min(1).max(2e3).optional(),
|
|
523
|
+
/**
|
|
524
|
+
* Optional labels for later grouping/filtering.
|
|
525
|
+
* Normalized to lowercase trimmed unique strings (max 20, 64 chars each).
|
|
526
|
+
*/
|
|
527
|
+
tags: z.array(z.string().min(1).max(AGENT_FILE_TAG_MAX_LENGTH)).max(AGENT_FILE_TAGS_MAX).optional().transform((tags) => normalizeAgentFileTags(tags))
|
|
528
|
+
}).refine((data) => Boolean(data.chatId || data.publicTaskId), {
|
|
529
|
+
message: "Provide chatId and/or publicTaskId"
|
|
530
|
+
});
|
|
497
531
|
|
|
498
532
|
// ../core/src/schemas/tool-result-display.ts
|
|
499
533
|
import { z as z2 } from "zod";
|
|
@@ -522,7 +556,8 @@ var tenantRoleSchema = z3.enum(["admin", "member"]);
|
|
|
522
556
|
var agentAdminUserSchema = z3.object({
|
|
523
557
|
id: z3.string(),
|
|
524
558
|
email: z3.string().email(),
|
|
525
|
-
name: z3.string()
|
|
559
|
+
name: z3.string(),
|
|
560
|
+
profilePictureUrl: z3.string().nullable().optional()
|
|
526
561
|
});
|
|
527
562
|
var agentAdminMemberSchema = z3.object({
|
|
528
563
|
userId: z3.string(),
|
|
@@ -607,6 +642,37 @@ var assignTasksBodySchema = z3.object({
|
|
|
607
642
|
{ message: "assignTo needs at least one user email or group slug." }
|
|
608
643
|
)
|
|
609
644
|
});
|
|
645
|
+
var agentAdminPlanLimitsSchema = z3.object({
|
|
646
|
+
tasksPerDay: z3.number(),
|
|
647
|
+
members: z3.number(),
|
|
648
|
+
apiKeys: z3.number(),
|
|
649
|
+
groups: z3.number(),
|
|
650
|
+
auditLogRetention: z3.number(),
|
|
651
|
+
rateLimitPerSecond: z3.number(),
|
|
652
|
+
taskRetentionDays: z3.number()
|
|
653
|
+
});
|
|
654
|
+
var agentAdminUsageSchema = z3.object({
|
|
655
|
+
workspace: z3.string(),
|
|
656
|
+
planName: z3.string(),
|
|
657
|
+
planType: z3.string(),
|
|
658
|
+
trialState: z3.enum(["none", "active", "expired"]),
|
|
659
|
+
daysRemaining: z3.number().nullable(),
|
|
660
|
+
isPaidPro: z3.boolean(),
|
|
661
|
+
subscriptionStatus: z3.string().nullable(),
|
|
662
|
+
tasksToday: z3.number(),
|
|
663
|
+
maxTasksPerDay: z3.number().nullable(),
|
|
664
|
+
tasksResetAt: z3.number(),
|
|
665
|
+
openTasks: z3.number(),
|
|
666
|
+
totalTasks: z3.number(),
|
|
667
|
+
seatsCurrent: z3.number(),
|
|
668
|
+
seatsMax: z3.number().nullable(),
|
|
669
|
+
groupsCurrent: z3.number(),
|
|
670
|
+
groupsMax: z3.number().nullable(),
|
|
671
|
+
apiKeysCurrent: z3.number(),
|
|
672
|
+
apiKeysMax: z3.number().nullable(),
|
|
673
|
+
rateLimitPerSecond: z3.number(),
|
|
674
|
+
limits: agentAdminPlanLimitsSchema
|
|
675
|
+
});
|
|
610
676
|
|
|
611
677
|
// src/schemas/index.ts
|
|
612
678
|
var handlerUrlSchema2 = z4.string().refine((url) => isAllowedHandlerUrl(url), {
|
|
@@ -910,7 +976,11 @@ function resolveRobotRockAuthConfig(overrides) {
|
|
|
910
976
|
"RobotRock auth is required. Set ROBOTROCK_API_KEY, ROBOTROCK_AGENT_SERVICE_TOKEN with tenant context, or pass auth when creating the client."
|
|
911
977
|
);
|
|
912
978
|
}
|
|
913
|
-
return {
|
|
979
|
+
return {
|
|
980
|
+
kind: "apiKey",
|
|
981
|
+
apiKey,
|
|
982
|
+
...overrides?.actingUserId?.trim() ? { actingUserId: overrides.actingUserId.trim() } : {}
|
|
983
|
+
};
|
|
914
984
|
}
|
|
915
985
|
|
|
916
986
|
// src/chat-correlation.ts
|
|
@@ -1104,6 +1174,51 @@ function createChatsApi(config) {
|
|
|
1104
1174
|
data
|
|
1105
1175
|
);
|
|
1106
1176
|
}
|
|
1177
|
+
},
|
|
1178
|
+
async uploadImage(input) {
|
|
1179
|
+
const validation = agentChatUploadImageBodySchema.safeParse(input);
|
|
1180
|
+
if (!validation.success) {
|
|
1181
|
+
throw new RobotRockError(
|
|
1182
|
+
`Invalid image upload: ${validation.error.issues[0]?.message}`,
|
|
1183
|
+
400,
|
|
1184
|
+
validation.error.issues
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
const response = await fetch(`${config.baseUrl}/agent-chats/images`, {
|
|
1188
|
+
method: "POST",
|
|
1189
|
+
headers: headers(),
|
|
1190
|
+
body: JSON.stringify(validation.data)
|
|
1191
|
+
});
|
|
1192
|
+
const data = await parseResponseBody(response);
|
|
1193
|
+
if (!response.ok) {
|
|
1194
|
+
throw new RobotRockError(
|
|
1195
|
+
getErrorMessage(data, "Failed to upload chat image"),
|
|
1196
|
+
response.status,
|
|
1197
|
+
data
|
|
1198
|
+
);
|
|
1199
|
+
}
|
|
1200
|
+
const uploaded = data;
|
|
1201
|
+
if (typeof uploaded.storageId !== "string" || typeof uploaded.url !== "string" || typeof uploaded.mediaType !== "string") {
|
|
1202
|
+
throw new RobotRockError(
|
|
1203
|
+
"Image upload returned an invalid response",
|
|
1204
|
+
500,
|
|
1205
|
+
data
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
return {
|
|
1209
|
+
storageId: uploaded.storageId,
|
|
1210
|
+
url: uploaded.url,
|
|
1211
|
+
mediaType: uploaded.mediaType,
|
|
1212
|
+
...typeof uploaded.chatId === "string" ? { chatId: uploaded.chatId } : {},
|
|
1213
|
+
...typeof uploaded.publicTaskId === "string" ? { publicTaskId: uploaded.publicTaskId } : {},
|
|
1214
|
+
...typeof uploaded.filename === "string" ? { filename: uploaded.filename } : {},
|
|
1215
|
+
...typeof uploaded.description === "string" ? { description: uploaded.description } : {},
|
|
1216
|
+
...Array.isArray(uploaded.tags) ? {
|
|
1217
|
+
tags: uploaded.tags.filter(
|
|
1218
|
+
(tag) => typeof tag === "string"
|
|
1219
|
+
)
|
|
1220
|
+
} : {}
|
|
1221
|
+
};
|
|
1107
1222
|
}
|
|
1108
1223
|
};
|
|
1109
1224
|
}
|
|
@@ -1173,6 +1288,7 @@ var RobotRock = class {
|
|
|
1173
1288
|
}
|
|
1174
1289
|
this.auth = resolveRobotRockAuthConfig({
|
|
1175
1290
|
...apiKey ? { apiKey } : {},
|
|
1291
|
+
...config.actingUserId ? { actingUserId: config.actingUserId } : {},
|
|
1176
1292
|
...agentService ? { agentService } : {}
|
|
1177
1293
|
});
|
|
1178
1294
|
this.chatCorrelation = config.chatCorrelation;
|