robotrock 0.9.0 → 1.1.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.
Files changed (52) hide show
  1. package/dist/ai/index.d.ts +18 -7
  2. package/dist/ai/index.js +852 -115
  3. package/dist/ai/index.js.map +1 -1
  4. package/dist/ai/trigger.d.ts +4 -3
  5. package/dist/ai/trigger.js +810 -115
  6. package/dist/ai/trigger.js.map +1 -1
  7. package/dist/ai/workflow.d.ts +15 -4
  8. package/dist/ai/workflow.js +729 -115
  9. package/dist/ai/workflow.js.map +1 -1
  10. package/dist/client-XTnFHGFE.d.ts +248 -0
  11. package/dist/eve/agent/index.d.ts +188 -0
  12. package/dist/eve/agent/index.js +2322 -0
  13. package/dist/eve/agent/index.js.map +1 -0
  14. package/dist/eve/index.d.ts +5 -0
  15. package/dist/eve/index.js +446 -0
  16. package/dist/eve/index.js.map +1 -0
  17. package/dist/eve/tools/identity/index.d.ts +6 -0
  18. package/dist/eve/tools/identity/index.js +144 -0
  19. package/dist/eve/tools/identity/index.js.map +1 -0
  20. package/dist/eve/tools/identity/my-access.d.ts +58 -0
  21. package/dist/eve/tools/identity/my-access.js +106 -0
  22. package/dist/eve/tools/identity/my-access.js.map +1 -0
  23. package/dist/eve/tools/identity/whoami.d.ts +45 -0
  24. package/dist/eve/tools/identity/whoami.js +101 -0
  25. package/dist/eve/tools/identity/whoami.js.map +1 -0
  26. package/dist/eve/tools/inbox/create-task.d.ts +113 -0
  27. package/dist/eve/tools/inbox/create-task.js +1557 -0
  28. package/dist/eve/tools/inbox/create-task.js.map +1 -0
  29. package/dist/eve/tools/inbox/index.d.ts +5 -0
  30. package/dist/eve/tools/inbox/index.js +1557 -0
  31. package/dist/eve/tools/inbox/index.js.map +1 -0
  32. package/dist/eve/tools/index.d.ts +17 -0
  33. package/dist/eve/tools/index.js +1654 -0
  34. package/dist/eve/tools/index.js.map +1 -0
  35. package/dist/index-BL9qKHA8.d.ts +141 -0
  36. package/dist/index.d.ts +12 -44
  37. package/dist/index.js +793 -97
  38. package/dist/index.js.map +1 -1
  39. package/dist/schemas/index.d.ts +11 -1
  40. package/dist/schemas/index.js +126 -8
  41. package/dist/schemas/index.js.map +1 -1
  42. package/dist/tenant-5YKDrdC-.d.ts +23 -0
  43. package/dist/{tool-approval-bridge-G765kMJR.d.ts → tool-approval-bridge-C4bTm8vu.d.ts} +93 -2
  44. package/dist/trigger/index.d.ts +2 -1
  45. package/dist/trigger/index.js +495 -87
  46. package/dist/trigger/index.js.map +1 -1
  47. package/dist/{trigger-D0shjqk0.d.ts → trigger-Dn0DFiyU.d.ts} +64 -3
  48. package/dist/workflow/index.d.ts +2 -1
  49. package/dist/workflow/index.js +496 -88
  50. package/dist/workflow/index.js.map +1 -1
  51. package/package.json +44 -7
  52. package/dist/client-Cy7YLxms.d.ts +0 -145
@@ -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-Cy7YLxms.js';
4
- import { A as ApproveByHumanToolDurableOptions, a as ApproveByHumanToolOptions, y as approveByHumanInputSchema, H as HumanToolResult, e as CreateSendToHumanToolDurableOptions, C as CreateSendToHumanToolOptions, G as sendToHumanToolInputSchema, f as CreateSendUpdateToolDurableOptions, c as CreateSendUpdateToolOptions, J as sendUpdateToolInputSchema, w as SendUpdateToolResult, g as RobotRockAiContext } from './tool-approval-bridge-G765kMJR.js';
3
+ import { R as RobotRock, S as SendToHumanActionInput } from './client-XTnFHGFE.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-C4bTm8vu.js';
5
5
 
6
6
  /**
7
7
  * AI SDK tool with fixed approve/decline actions; blocks until a human decides.
@@ -39,6 +39,55 @@ declare function createSendToHumanTool<A extends readonly SendToHumanActionInput
39
39
  */
40
40
  declare function createSendUpdateTool(clientOrOptions: RobotRock | CreateSendUpdateToolDurableOptions, maybeOptions?: CreateSendUpdateToolOptions): Tool<z.infer<typeof sendUpdateToolInputSchema>, SendUpdateToolResult>;
41
41
 
42
+ /**
43
+ * Client-side AI SDK tool that renders a RobotRock action widget in chat.
44
+ *
45
+ * Has no `execute` — the chat UI collects input and calls `addToolOutput`.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * tools: {
50
+ * requestActionInput: requestActionInputTool(),
51
+ * }
52
+ * ```
53
+ */
54
+ declare function requestActionInputTool(options?: RequestActionInputToolOptions): Tool<z.infer<typeof requestActionInputToolInputSchema>, RequestActionInputToolOutput>;
55
+
56
+ /**
57
+ * AI SDK tool that posts ephemeral progress updates to the agent chat UI.
58
+ *
59
+ * Fire-and-forget: executes immediately and renders as a status marker in chat.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * tools: {
64
+ * reportStatus: reportStatusTool(),
65
+ * }
66
+ * ```
67
+ */
68
+ declare function reportStatusTool(options?: ReportStatusToolOptions): Tool<z.infer<typeof reportStatusToolInputSchema>, ReportStatusToolOutput>;
69
+
70
+ declare const CLOSE_CHAT_TOOL_NAME = "closeChat";
71
+ declare const closeChatToolInputSchema: z.ZodObject<{
72
+ reason: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ type CloseChatToolInput = z.infer<typeof closeChatToolInputSchema>;
75
+ type CloseChatToolResult = {
76
+ closed: boolean;
77
+ chatId: string;
78
+ };
79
+ type CloseChatToolOptions = {
80
+ /**
81
+ * Public chatId of the chat the agent is running in. Required — the model
82
+ * does not supply it. The agent runtime passes its own chatId here.
83
+ */
84
+ chatId: string;
85
+ description?: string;
86
+ };
87
+ type CloseChatToolDurableOptions = CloseChatToolOptions & RobotRockAiContext & {
88
+ mode: "trigger" | "workflow";
89
+ };
90
+
42
91
  type CreateRobotRockAiToolsOptions = {
43
92
  /** @default "polling" when `client` is passed; `"trigger"` or `"workflow"` for durable waits. */
44
93
  mode?: "polling" | "trigger" | "workflow";
@@ -49,12 +98,24 @@ type CreateRobotRockAiToolsOptions = {
49
98
  * `sendUpdate` tool to auto-thread onto tasks made by the `sendToHuman` tool.
50
99
  */
51
100
  threadId?: string;
101
+ /**
102
+ * Public chatId of the chat the agent is running in. Enables the `closeChat`
103
+ * tool to close the current chat without the model supplying an id.
104
+ */
105
+ chatId?: string;
52
106
  };
53
107
  type RobotRockAiTools = {
54
108
  context: RobotRockAiContext;
55
109
  approveByHuman: (toolOptions?: ApproveByHumanToolOptions) => Tool<z.infer<typeof approveByHumanInputSchema>, HumanToolResult>;
56
110
  sendToHuman: <A extends readonly SendToHumanActionInput[]>(toolOptions: CreateSendToHumanToolOptions<A>) => Tool<z.infer<typeof sendToHumanToolInputSchema>, HumanToolResult>;
57
111
  sendUpdate: (toolOptions?: CreateSendUpdateToolOptions) => Tool<z.infer<typeof sendUpdateToolInputSchema>, SendUpdateToolResult>;
112
+ requestActionInput: (toolOptions?: RequestActionInputToolOptions) => Tool<z.infer<typeof requestActionInputToolInputSchema>, RequestActionInputToolOutput>;
113
+ reportStatus: (toolOptions?: ReportStatusToolOptions) => Tool<z.infer<typeof reportStatusToolInputSchema>, ReportStatusToolOutput>;
114
+ /**
115
+ * Close the current chat. Requires a `chatId` — from `createRobotRockAiTools`
116
+ * options or per-call `toolOptions`.
117
+ */
118
+ closeChat: (toolOptions?: CloseChatToolOptions) => Tool<z.infer<typeof closeChatToolInputSchema>, CloseChatToolResult>;
58
119
  };
59
120
  /**
60
121
  * Build AI SDK tools for a given RobotRock execution mode.
@@ -76,4 +137,4 @@ type RobotRockAiTools = {
76
137
  */
77
138
  declare function createRobotRockAiTools(options: CreateRobotRockAiToolsOptions): RobotRockAiTools;
78
139
 
79
- export { type CreateRobotRockAiToolsOptions as C, type RobotRockAiTools as R, approveByHumanTool as a, createSendToHumanTool as b, createRobotRockAiTools as c, createSendUpdateTool as d };
140
+ export { type CloseChatToolDurableOptions as C, type RobotRockAiTools as R, type CloseChatToolOptions as a, type CloseChatToolResult as b, closeChatToolInputSchema as c, CLOSE_CHAT_TOOL_NAME as d, type CloseChatToolInput as e, type CreateRobotRockAiToolsOptions as f, approveByHumanTool as g, createRobotRockAiTools as h, createSendToHumanTool as i, createSendUpdateTool as j, requestActionInputTool as k, reportStatusTool as r };
@@ -1,9 +1,10 @@
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-Cy7YLxms.js';
3
+ import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-XTnFHGFE.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';
7
+ import '@robotrock/core';
7
8
  import '@opentelemetry/api';
8
9
 
9
10
  type SendToHumanWorkflowPayload<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]> = SendToHumanInput<A> & RobotRockPlatformOtelFields & {