robotrock 1.1.0 → 1.3.1
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 +2 -2
- package/dist/agent-admin.d.ts +82 -0
- package/dist/agent-admin.js +938 -0
- package/dist/agent-admin.js.map +1 -0
- package/dist/ai/index.d.ts +6 -5
- package/dist/ai/index.js +407 -188
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.d.ts +4 -3
- package/dist/ai/trigger.js +407 -188
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.d.ts +4 -3
- package/dist/ai/workflow.js +404 -185
- package/dist/ai/workflow.js.map +1 -1
- package/dist/auth-headers-qL-ZeEtd.d.ts +13 -0
- package/dist/{client-XTnFHGFE.d.ts → client-YO9Y1rkH.d.ts} +29 -17
- package/dist/eve/agent/index.d.ts +11 -35
- package/dist/eve/agent/index.js +678 -146
- package/dist/eve/agent/index.js.map +1 -1
- package/dist/eve/index.d.ts +5 -2
- package/dist/eve/index.js +195 -2
- package/dist/eve/index.js.map +1 -1
- package/dist/eve/tools/admin/assign-tasks.d.ts +39 -0
- package/dist/eve/tools/admin/assign-tasks.js +1060 -0
- package/dist/eve/tools/admin/assign-tasks.js.map +1 -0
- package/dist/eve/tools/admin/manage-groups.d.ts +53 -0
- package/dist/eve/tools/admin/manage-groups.js +1218 -0
- package/dist/eve/tools/admin/manage-groups.js.map +1 -0
- package/dist/eve/tools/admin/manage-team-members.d.ts +45 -0
- package/dist/eve/tools/admin/manage-team-members.js +1160 -0
- package/dist/eve/tools/admin/manage-team-members.js.map +1 -0
- package/dist/eve/tools/admin/query-tasks.d.ts +71 -0
- package/dist/eve/tools/admin/query-tasks.js +1161 -0
- package/dist/eve/tools/admin/query-tasks.js.map +1 -0
- package/dist/eve/tools/catalog/search-products.d.ts +57 -0
- package/dist/eve/tools/catalog/search-products.js +94 -0
- package/dist/eve/tools/catalog/search-products.js.map +1 -0
- package/dist/eve/tools/identity/index.d.ts +2 -0
- package/dist/eve/tools/identity/index.js +117 -27
- package/dist/eve/tools/identity/index.js.map +1 -1
- package/dist/eve/tools/identity/my-access.d.ts +6 -46
- package/dist/eve/tools/identity/my-access.js +91 -10
- package/dist/eve/tools/identity/my-access.js.map +1 -1
- package/dist/eve/tools/identity/whoami.d.ts +7 -8
- package/dist/eve/tools/identity/whoami.js +33 -17
- package/dist/eve/tools/identity/whoami.js.map +1 -1
- package/dist/eve/tools/inbox/create-task.d.ts +5 -4
- package/dist/eve/tools/inbox/create-task.js +365 -137
- package/dist/eve/tools/inbox/create-task.js.map +1 -1
- package/dist/eve/tools/inbox/index.d.ts +1 -0
- package/dist/eve/tools/inbox/index.js +365 -137
- package/dist/eve/tools/inbox/index.js.map +1 -1
- package/dist/eve/tools/index.d.ts +7 -0
- package/dist/eve/tools/index.js +1362 -168
- package/dist/eve/tools/index.js.map +1 -1
- package/dist/{index-BL9qKHA8.d.ts → index-DoQN48Bm.d.ts} +61 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +325 -119
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +6 -1
- package/dist/schemas/index.js +177 -48
- package/dist/schemas/index.js.map +1 -1
- package/dist/{tool-approval-bridge-C4bTm8vu.d.ts → tool-approval-bridge-aMA79Z1B.d.ts} +1 -1
- package/dist/tool-reply-guidance-C3qrT1In.d.ts +25 -0
- package/dist/trigger/index.d.ts +2 -1
- package/dist/trigger/index.js +310 -108
- package/dist/trigger/index.js.map +1 -1
- package/dist/{trigger-Dn0DFiyU.d.ts → trigger-CXrbKVCL.d.ts} +2 -2
- package/dist/workflow/index.d.ts +2 -1
- package/dist/workflow/index.js +310 -108
- package/dist/workflow/index.js.map +1 -1
- package/package.json +30 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type RobotRockAuthConfig = {
|
|
2
|
+
kind: "apiKey";
|
|
3
|
+
apiKey: string;
|
|
4
|
+
actingUserId?: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "agentService";
|
|
7
|
+
token: string;
|
|
8
|
+
tenantSlug: string;
|
|
9
|
+
connectionId: string;
|
|
10
|
+
actingUserId?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { RobotRockAuthConfig as R };
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import { TaskContextInput, AssignToInput
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
kind: "apiKey";
|
|
6
|
-
apiKey: string;
|
|
7
|
-
} | {
|
|
8
|
-
kind: "agentService";
|
|
9
|
-
token: string;
|
|
10
|
-
tenantSlug: string;
|
|
11
|
-
connectionId: string;
|
|
12
|
-
};
|
|
1
|
+
import { TaskContextInput, AssignToInput, TaskPriority, ThreadUpdateStatus, TaskResponse, Task, ThreadUpdate, TaskContextFormatVersion, DiscriminatedApprovalResult } from './schemas/index.js';
|
|
2
|
+
import { AgentChatSeedMessage, AgentChatStageHitlBody, AgentChatAuditInputBody, AgentChatAuditToolBody, AgentChatLinkTaskBody, listTasksQuerySchema, AgentAdminTaskSummary } from '@robotrock/core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { R as RobotRockAuthConfig } from './auth-headers-qL-ZeEtd.js';
|
|
13
5
|
|
|
14
6
|
/** A chat created via {@link ChatsApi.create}. */
|
|
15
7
|
type CreatedChat = {
|
|
@@ -32,8 +24,8 @@ type CreateChatInput = {
|
|
|
32
24
|
connectionId?: string;
|
|
33
25
|
/** Inbox app bucket. Overrides the client `app` when set. */
|
|
34
26
|
app?: string;
|
|
35
|
-
/**
|
|
36
|
-
|
|
27
|
+
/** Email of the user who owns the chat. Required unless `parentChatId` is set. */
|
|
28
|
+
ownerEmail?: string;
|
|
37
29
|
/** Chat title shown in the inbox. */
|
|
38
30
|
title: string;
|
|
39
31
|
/** Seed messages to preload the conversation. Defaults to a welcome message. */
|
|
@@ -45,12 +37,13 @@ type CloseChatOptions = {
|
|
|
45
37
|
/** Optional human-readable reason recorded on the audit trail. */
|
|
46
38
|
reason?: string;
|
|
47
39
|
};
|
|
40
|
+
type LogChatToolExecutionInput = AgentChatAuditToolBody;
|
|
48
41
|
type LogChatInputSubmissionInput = AgentChatAuditInputBody;
|
|
49
42
|
type StageChatHitlRequestsInput = AgentChatStageHitlBody;
|
|
50
43
|
type LinkChatTaskInput = AgentChatLinkTaskBody;
|
|
51
44
|
type StagedChatHitlRequest = StageChatHitlRequestsInput["requests"][number];
|
|
52
45
|
interface ChatsApi {
|
|
53
|
-
/** Create
|
|
46
|
+
/** Create an agent chat owned by a single user. */
|
|
54
47
|
create(input: CreateChatInput): Promise<CreateChatResult>;
|
|
55
48
|
/** Close (archive) a chat by its public chatId — e.g. when an agent is done. */
|
|
56
49
|
close(chatId: string, options?: CloseChatOptions): Promise<void>;
|
|
@@ -60,6 +53,8 @@ interface ChatsApi {
|
|
|
60
53
|
getStagedHitlRequests(eveSessionId: string): Promise<StagedChatHitlRequest[]>;
|
|
61
54
|
/** Log an Eve HITL choice to the RobotRock chat audit trail. */
|
|
62
55
|
logInputSubmission(input: LogChatInputSubmissionInput): Promise<void>;
|
|
56
|
+
/** Log a mutating Eve tool execution to the RobotRock chat audit trail. */
|
|
57
|
+
logToolExecution(input: LogChatToolExecutionInput): Promise<void>;
|
|
63
58
|
/** Link an inbox task to the originating Eve chat session. */
|
|
64
59
|
linkTask(input: LinkChatTaskInput): Promise<void>;
|
|
65
60
|
}
|
|
@@ -139,7 +134,7 @@ type SendToHumanInput<A extends readonly SendToHumanActionInput[] = readonly Sen
|
|
|
139
134
|
/** Optional idempotency key to prevent duplicate tasks */
|
|
140
135
|
idempotencyKey?: string;
|
|
141
136
|
/** Assign to tenant users (email) and/or groups (slug). Narrows inbox visibility. */
|
|
142
|
-
assignTo?: AssignToInput
|
|
137
|
+
assignTo?: AssignToInput;
|
|
143
138
|
/**
|
|
144
139
|
* Groups related tasks together in the inbox. Omit to let the server generate
|
|
145
140
|
* one (returned as `task.threadId`) and reuse it on later tasks in the thread.
|
|
@@ -186,6 +181,11 @@ type SendToHumanResult<A extends readonly SendToHumanActionInput[] = readonly Se
|
|
|
186
181
|
task: TaskResponse["task"];
|
|
187
182
|
} & DiscriminatedApprovalResult<A>);
|
|
188
183
|
|
|
184
|
+
type ListTasksInput = z.infer<typeof listTasksQuerySchema>;
|
|
185
|
+
type SearchTasksInput = {
|
|
186
|
+
q: string;
|
|
187
|
+
limit?: number;
|
|
188
|
+
};
|
|
189
189
|
/** Task CRUD surface, exposed as `client.tasks`. */
|
|
190
190
|
interface TasksApi {
|
|
191
191
|
/** Create a task via POST /v1 without waiting for a human response. */
|
|
@@ -196,6 +196,16 @@ interface TasksApi {
|
|
|
196
196
|
cancel(taskId: string): Promise<void>;
|
|
197
197
|
/** Log a status update against a thread. */
|
|
198
198
|
sendUpdate(input: SendUpdateInput): Promise<ThreadUpdate>;
|
|
199
|
+
/** List tasks in the workspace for this API key. */
|
|
200
|
+
list(input?: ListTasksInput): Promise<{
|
|
201
|
+
items: AgentAdminTaskSummary[];
|
|
202
|
+
nextCursor: string | null;
|
|
203
|
+
}>;
|
|
204
|
+
/** Search tasks by type, name, description, or id. */
|
|
205
|
+
search(input: SearchTasksInput): Promise<{
|
|
206
|
+
items: AgentAdminTaskSummary[];
|
|
207
|
+
total: number;
|
|
208
|
+
}>;
|
|
199
209
|
}
|
|
200
210
|
/**
|
|
201
211
|
* RobotRock API client for creating and querying human-in-the-loop tasks and
|
|
@@ -241,8 +251,10 @@ declare class RobotRock {
|
|
|
241
251
|
private getTaskById;
|
|
242
252
|
private sendThreadUpdate;
|
|
243
253
|
private cancelTaskRequest;
|
|
254
|
+
private listTasksRequest;
|
|
255
|
+
private searchTasksRequest;
|
|
244
256
|
}
|
|
245
257
|
declare function createClient(config: RobotRockConfig): RobotRock;
|
|
246
258
|
declare function attachWebhookToActions(actions: readonly SendToHumanActionInput[], webhook: RobotRockWebhookConfig): TaskContextInput["actions"];
|
|
247
259
|
|
|
248
|
-
export { type ChatsApi as C, RobotRock as R, type SendToHumanActionInput as S, type TasksApi as T, type SendToHumanInput as a, type RobotRockConfig as b, type CloseChatOptions as c, type CreateChatInput as d, type CreateChatResult as e, type CreatedChat as f, type RobotRockAdvancedConfig as g, type RobotRockPollingClientConfig as h, type RobotRockPollingOptions as i, type RobotRockWebhookClientConfig as j, type RobotRockWebhookConfig as k, type
|
|
260
|
+
export { type ChatsApi as C, type ListTasksInput as L, RobotRock as R, type SendToHumanActionInput as S, type TasksApi as T, type SendToHumanInput as a, type RobotRockConfig as b, type CloseChatOptions as c, type CreateChatInput as d, type CreateChatResult as e, type CreatedChat as f, type RobotRockAdvancedConfig as g, type RobotRockPollingClientConfig as h, type RobotRockPollingOptions as i, type RobotRockWebhookClientConfig as j, type RobotRockWebhookConfig as k, type SearchTasksInput as l, type SendToHumanResult as m, type SendToHumanValidUntil as n, type SendUpdateInput as o, type StageChatHitlRequestsInput as p, type StagedChatHitlRequest as q, attachWebhookToActions as r, createChatsApi as s, createClient as t };
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
export { a as TenantCaller, T as TenantRole, i as isAdminCaller, r as requireAdminCaller, b as requireTenantCaller, t as tryResolveTenantCaller } from '../../tenant-5YKDrdC-.js';
|
|
2
2
|
import { AuthFn, vercelOidc } from 'eve/channels/auth';
|
|
3
3
|
import * as eve_channels_eve from 'eve/channels/eve';
|
|
4
|
-
import { R as RobotRock,
|
|
4
|
+
import { R as RobotRock, q as StagedChatHitlRequest, a as SendToHumanInput, S as SendToHumanActionInput, e as CreateChatResult } from '../../client-YO9Y1rkH.js';
|
|
5
5
|
import { SessionContext } from 'eve/context';
|
|
6
6
|
import { TaskPriority } from '../../schemas/index.js';
|
|
7
|
-
import
|
|
8
|
-
|
|
7
|
+
import { HookDefinition } from 'eve/hooks';
|
|
8
|
+
export { AgentAdminApi, createAgentAdminApi, createBoundAgentAdminClient, requireBoundAgentAdminClient } from '../../agent-admin.js';
|
|
9
9
|
export { ROBOTROCK_PLATFORM_USER_CONTEXT_PUBLIC_KEY_URL } from '@robotrock/core/eve/platform-user-context-public-key';
|
|
10
|
-
export { R as ROBOTROCK_READY_HOOK_SLUG } from '../../index-
|
|
10
|
+
export { R as ROBOTROCK_READY_HOOK_SLUG } from '../../index-DoQN48Bm.js';
|
|
11
11
|
export { ROBOTROCK_USER_CONTEXT_AUDIENCE, ROBOTROCK_USER_CONTEXT_ISSUER } from '@robotrock/core/eve/user-context-jwt';
|
|
12
12
|
import '@robotrock/core';
|
|
13
13
|
import 'zod';
|
|
14
|
+
import '../../auth-headers-qL-ZeEtd.js';
|
|
15
|
+
import '@robotrock/core/schemas';
|
|
16
|
+
import '../../tool-reply-guidance-C3qrT1In.js';
|
|
14
17
|
|
|
15
18
|
/** Header carrying the dashboard user-context JWT on proxied Eve requests. */
|
|
16
19
|
declare const ROBOTROCK_USER_CONTEXT_HEADER = "x-robotrock-user-token";
|
|
@@ -97,7 +100,7 @@ declare function resolveTaskHandledWebhookUrl(baseUrl: string): string;
|
|
|
97
100
|
declare function createRobotRockTask(input: CreateRobotRockTaskInput, ctx: SessionContext): Promise<{
|
|
98
101
|
taskId: string;
|
|
99
102
|
threadId: string;
|
|
100
|
-
status: "
|
|
103
|
+
status: "open" | "pending";
|
|
101
104
|
validUntil: string;
|
|
102
105
|
submittedAt: string;
|
|
103
106
|
}>;
|
|
@@ -137,10 +140,7 @@ type CreateRobotRockCronChatInput = {
|
|
|
137
140
|
text: string;
|
|
138
141
|
}[];
|
|
139
142
|
agentIdentifier?: string;
|
|
140
|
-
|
|
141
|
-
users?: string[];
|
|
142
|
-
groups?: string[];
|
|
143
|
-
};
|
|
143
|
+
ownerEmail: string;
|
|
144
144
|
};
|
|
145
145
|
/** Create an inbox chat from an Eve schedule via the RobotRock API. */
|
|
146
146
|
declare function createRobotRockCronChat(input: CreateRobotRockCronChatInput): Promise<CreateChatResult>;
|
|
@@ -157,32 +157,8 @@ declare function defineRobotRockReadyHook(): {};
|
|
|
157
157
|
|
|
158
158
|
/** Reset logged idempotency keys (tests only). */
|
|
159
159
|
declare function resetRobotrockChatAuditIdempotencyKeys(): void;
|
|
160
|
-
declare const robotrockChatAuditHook:
|
|
161
|
-
events: {
|
|
162
|
-
"input.requested"(event: node_modules_eve_dist_src_protocol_message_js.InputRequestedStreamEvent & {
|
|
163
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
164
|
-
}, ctx: HookContext): Promise<void>;
|
|
165
|
-
"message.received"(event: node_modules_eve_dist_src_protocol_message_js.MessageReceivedStreamEvent & {
|
|
166
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
167
|
-
}, ctx: HookContext): Promise<void>;
|
|
168
|
-
"action.result"(event: node_modules_eve_dist_src_protocol_message_js.ActionResultStreamEvent & {
|
|
169
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
170
|
-
}, ctx: HookContext): Promise<void>;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
160
|
+
declare const robotrockChatAuditHook: HookDefinition;
|
|
173
161
|
/** Alias for agents that prefer a factory name. */
|
|
174
|
-
declare function defineRobotRockChatAuditHook():
|
|
175
|
-
events: {
|
|
176
|
-
"input.requested"(event: node_modules_eve_dist_src_protocol_message_js.InputRequestedStreamEvent & {
|
|
177
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
178
|
-
}, ctx: HookContext): Promise<void>;
|
|
179
|
-
"message.received"(event: node_modules_eve_dist_src_protocol_message_js.MessageReceivedStreamEvent & {
|
|
180
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
181
|
-
}, ctx: HookContext): Promise<void>;
|
|
182
|
-
"action.result"(event: node_modules_eve_dist_src_protocol_message_js.ActionResultStreamEvent & {
|
|
183
|
-
readonly meta?: node_modules_eve_dist_src_protocol_message_js.HandleMessageStreamEventMeta;
|
|
184
|
-
}, ctx: HookContext): Promise<void>;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
162
|
+
declare function defineRobotRockChatAuditHook(): HookDefinition;
|
|
187
163
|
|
|
188
164
|
export { type CreateRobotRockCronChatInput, type CreateRobotRockTaskInput, ROBOTROCK_USER_CONTEXT_HEADER, type RobotRockChatAuditPayload, type RobotRockTaskActionInput, type RobotRockTaskAssignToInput, type RobotRockTaskContextInput, type RobotRockTaskToolInput, type RobotrockEveChannelOptions, type RobotrockUserContextAuthOptions, buildRobotRockTaskPayload, createRobotRockCronChat, createRobotRockTask, defineRobotRockChatAuditHook, defineRobotRockReadyHook, eveSelfServiceAuth, fetchRobotRockStagedHitl, postRobotRockChatInputAudit, postRobotRockLinkChatTask, postRobotRockStageHitl, resetBoundClientAuthWarning, resetChatAuditWarnings, resetRobotrockChatAuditIdempotencyKeys, resolvePlatformUserContextPublicKeyPem, resolveTaskHandledWebhookUrl, robotrockAgentServiceAuth, robotrockChatAuditHook, robotrockEveChannel, robotrockReadyHook, robotrockUserContextAuth, tryCreateBoundRobotRockClient };
|