robotrock 0.8.5 → 0.9.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/dist/ai/index.d.ts +4 -4
- package/dist/ai/index.js +398 -202
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/trigger.d.ts +3 -3
- package/dist/ai/trigger.js +398 -202
- package/dist/ai/trigger.js.map +1 -1
- package/dist/ai/workflow.d.ts +3 -3
- package/dist/ai/workflow.js +399 -203
- package/dist/ai/workflow.js.map +1 -1
- package/dist/{client-D-XEBOWd.d.ts → client-Cy7YLxms.d.ts} +17 -9
- package/dist/index.d.ts +9 -8
- package/dist/index.js +232 -207
- package/dist/index.js.map +1 -1
- package/dist/otel-platform-DzHyHkGk.d.ts +108 -0
- package/dist/schemas/index.d.ts +162 -104
- package/dist/schemas/index.js +39 -114
- package/dist/schemas/index.js.map +1 -1
- package/dist/{tool-approval-bridge-BKDY5NAY.d.ts → tool-approval-bridge-G765kMJR.d.ts} +1 -1
- package/dist/trigger/index.d.ts +6 -4
- package/dist/trigger/index.js +308 -145
- package/dist/trigger/index.js.map +1 -1
- package/dist/{trigger-CsOLTjsH.d.ts → trigger-D0shjqk0.d.ts} +2 -2
- package/dist/workflow/index.d.ts +6 -4
- package/dist/workflow/index.js +302 -142
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -5
- package/dist/handler-webhook-BqEi6Bk-.d.ts +0 -16
- package/dist/otel/index.d.ts +0 -49
- package/dist/otel/index.js +0 -633
- package/dist/otel/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TaskContextInput, AssignToInput, TaskPriority, ThreadUpdateStatus,
|
|
1
|
+
import { TaskContextFormatVersion, TaskContextInput, AssignToInput, TaskPriority, ThreadUpdateStatus, TaskResponse, DiscriminatedApprovalResult, Task, ThreadUpdate } from './schemas/index.js';
|
|
2
2
|
|
|
3
3
|
type RobotRockWebhookConfig = {
|
|
4
4
|
url: string;
|
|
@@ -14,6 +14,11 @@ interface RobotRockPollingOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
timeoutMs?: number;
|
|
16
16
|
}
|
|
17
|
+
/** Advanced client settings rarely changed by integrators. */
|
|
18
|
+
type RobotRockAdvancedConfig = {
|
|
19
|
+
/** Task context wire format version sent on every request. @default 2 */
|
|
20
|
+
contextVersion?: TaskContextFormatVersion;
|
|
21
|
+
};
|
|
17
22
|
type RobotRockClientBaseConfig = {
|
|
18
23
|
/** Optional override for API key. Falls back to ROBOTROCK_API_KEY. */
|
|
19
24
|
apiKey?: string;
|
|
@@ -28,10 +33,12 @@ type RobotRockClientBaseConfig = {
|
|
|
28
33
|
*/
|
|
29
34
|
app?: string;
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
36
|
+
* Agent release version (semver, git SHA, deploy tag).
|
|
37
|
+
* Defaults to `AGENT_VERSION` or `ROBOTROCK_AGENT_VERSION` from env when omitted.
|
|
33
38
|
*/
|
|
34
|
-
version?:
|
|
39
|
+
version?: string;
|
|
40
|
+
/** Advanced settings (context wire format, etc.). */
|
|
41
|
+
advanced?: RobotRockAdvancedConfig;
|
|
35
42
|
};
|
|
36
43
|
/** Client config with a webhook (mutually exclusive with `polling`). */
|
|
37
44
|
type RobotRockWebhookClientConfig = RobotRockClientBaseConfig & {
|
|
@@ -46,7 +53,7 @@ type RobotRockPollingClientConfig = RobotRockClientBaseConfig & {
|
|
|
46
53
|
type RobotRockConfig = RobotRockWebhookClientConfig | RobotRockPollingClientConfig;
|
|
47
54
|
type SendToHumanActionInput = Omit<TaskContextInput["actions"][number], "handlers">;
|
|
48
55
|
type SendToHumanValidUntil = Date | string;
|
|
49
|
-
type SendToHumanInput<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]> = Omit<TaskContextInput, "app" | "actions" | "version" | "validUntil"> & {
|
|
56
|
+
type SendToHumanInput<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]> = Omit<TaskContextInput, "app" | "actions" | "contextVersion" | "version" | "validUntil"> & {
|
|
50
57
|
actions: A;
|
|
51
58
|
/** Task deadline; serialized to an ISO 8601 string on the wire. */
|
|
52
59
|
validUntil?: SendToHumanValidUntil;
|
|
@@ -75,10 +82,10 @@ type SendToHumanInput<A extends readonly SendToHumanActionInput[] = readonly Sen
|
|
|
75
82
|
status?: ThreadUpdateStatus;
|
|
76
83
|
};
|
|
77
84
|
/**
|
|
78
|
-
* Agent
|
|
85
|
+
* Agent release version override. When omitted, uses the client `version`.
|
|
79
86
|
* Used for statistics and feedback analysis.
|
|
80
87
|
*/
|
|
81
|
-
|
|
88
|
+
version?: string;
|
|
82
89
|
};
|
|
83
90
|
type SendToHumanWithAppInput<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]> = (SendToHumanInput<A> | Readonly<SendToHumanInput<A>>) & {
|
|
84
91
|
/** Inbox app bucket. Overrides the client `app` when set. */
|
|
@@ -111,7 +118,8 @@ declare class RobotRock {
|
|
|
111
118
|
private readonly apiKey;
|
|
112
119
|
private readonly baseUrl;
|
|
113
120
|
private readonly app?;
|
|
114
|
-
private readonly
|
|
121
|
+
private readonly agentVersion?;
|
|
122
|
+
private readonly contextVersion;
|
|
115
123
|
private readonly webhook?;
|
|
116
124
|
private readonly polling;
|
|
117
125
|
constructor(config: RobotRockConfig);
|
|
@@ -134,4 +142,4 @@ declare class RobotRock {
|
|
|
134
142
|
declare function createClient(config: RobotRockConfig): RobotRock;
|
|
135
143
|
declare function attachWebhookToActions(actions: readonly SendToHumanActionInput[], webhook: RobotRockWebhookConfig): TaskContextInput["actions"];
|
|
136
144
|
|
|
137
|
-
export { RobotRock as R, type SendToHumanActionInput as S, type SendToHumanInput as a, type RobotRockConfig as b,
|
|
145
|
+
export { RobotRock as R, type SendToHumanActionInput as S, type SendToHumanInput as a, type RobotRockConfig as b, type RobotRockAdvancedConfig as c, RobotRockError as d, type RobotRockPollingClientConfig as e, type RobotRockPollingOptions as f, type RobotRockWebhookClientConfig as g, type RobotRockWebhookConfig as h, type SendToHumanResult as i, type SendToHumanValidUntil as j, type SendUpdateInput as k, attachWebhookToActions as l, createClient as m };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { R as RobotRock, b as RobotRockConfig } from './client-
|
|
2
|
-
export { c as
|
|
1
|
+
import { R as RobotRock, b as RobotRockConfig } from './client-Cy7YLxms.js';
|
|
2
|
+
export { c as RobotRockAdvancedConfig, d as RobotRockError, e as RobotRockPollingClientConfig, f as RobotRockPollingOptions, g as RobotRockWebhookClientConfig, h as RobotRockWebhookConfig, S as SendToHumanActionInput, a as SendToHumanInput, i as SendToHumanResult, j as SendToHumanValidUntil, k as SendUpdateInput, l as attachWebhookToActions, m as createClient } from './client-Cy7YLxms.js';
|
|
3
3
|
import { Task, DiscriminatedApprovalResult } from './schemas/index.js';
|
|
4
|
-
export {
|
|
4
|
+
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';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
export {
|
|
7
|
-
|
|
6
|
+
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';
|
|
7
|
+
import '@opentelemetry/api';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Read RobotRock client config from environment variables.
|
|
@@ -98,7 +98,7 @@ declare function assertNotPlatformRejectRequest(actionId: string, data?: unknown
|
|
|
98
98
|
*/
|
|
99
99
|
declare function shouldStopAgentForHandledAction(actionId: string | undefined): boolean;
|
|
100
100
|
|
|
101
|
-
declare const
|
|
101
|
+
declare const robotRockWebhookPayloadBodySchema: z.ZodObject<{
|
|
102
102
|
taskId: z.ZodString;
|
|
103
103
|
action: z.ZodObject<{
|
|
104
104
|
id: z.ZodString;
|
|
@@ -108,15 +108,16 @@ declare const robotRockWebhookPayloadSchema: z.ZodObject<{
|
|
|
108
108
|
handledBy: z.ZodOptional<z.ZodString>;
|
|
109
109
|
handledAt: z.ZodString;
|
|
110
110
|
handlerType: z.ZodString;
|
|
111
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
112
111
|
}, z.core.$strip>;
|
|
112
|
+
type RobotRockWebhookPayload = z.infer<typeof robotRockWebhookPayloadBodySchema> & {
|
|
113
|
+
headers: Record<string, string>;
|
|
114
|
+
};
|
|
113
115
|
type RobotRockWebhookErrorCode = "MISSING_WEBHOOK_SECRET" | "MISSING_SIGNATURE" | "INVALID_SIGNATURE" | "INVALID_JSON" | "INVALID_PAYLOAD";
|
|
114
116
|
declare class RobotRockWebhookError extends Error {
|
|
115
117
|
readonly code: RobotRockWebhookErrorCode;
|
|
116
118
|
readonly details?: unknown | undefined;
|
|
117
119
|
constructor(message: string, code: RobotRockWebhookErrorCode, details?: unknown | undefined);
|
|
118
120
|
}
|
|
119
|
-
type RobotRockWebhookPayload = z.infer<typeof robotRockWebhookPayloadSchema>;
|
|
120
121
|
interface VerifyRobotRockWebhookOptions {
|
|
121
122
|
/**
|
|
122
123
|
* Override shared secret (defaults to ROBOTROCK_WEBHOOK_SECRET).
|