robotrock 1.0.0 → 1.3.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 (71) hide show
  1. package/dist/agent-admin.d.ts +82 -0
  2. package/dist/agent-admin.js +938 -0
  3. package/dist/agent-admin.js.map +1 -0
  4. package/dist/ai/index.d.ts +6 -5
  5. package/dist/ai/index.js +682 -225
  6. package/dist/ai/index.js.map +1 -1
  7. package/dist/ai/trigger.d.ts +4 -3
  8. package/dist/ai/trigger.js +682 -225
  9. package/dist/ai/trigger.js.map +1 -1
  10. package/dist/ai/workflow.d.ts +4 -3
  11. package/dist/ai/workflow.js +679 -222
  12. package/dist/ai/workflow.js.map +1 -1
  13. package/dist/auth-headers-qL-ZeEtd.d.ts +13 -0
  14. package/dist/{client-CzVmjXpz.d.ts → client-YO9Y1rkH.d.ts} +51 -10
  15. package/dist/eve/agent/index.d.ts +164 -0
  16. package/dist/eve/agent/index.js +2854 -0
  17. package/dist/eve/agent/index.js.map +1 -0
  18. package/dist/eve/index.d.ts +8 -0
  19. package/dist/eve/index.js +639 -0
  20. package/dist/eve/index.js.map +1 -0
  21. package/dist/eve/tools/admin/assign-tasks.d.ts +39 -0
  22. package/dist/eve/tools/admin/assign-tasks.js +1060 -0
  23. package/dist/eve/tools/admin/assign-tasks.js.map +1 -0
  24. package/dist/eve/tools/admin/manage-groups.d.ts +53 -0
  25. package/dist/eve/tools/admin/manage-groups.js +1218 -0
  26. package/dist/eve/tools/admin/manage-groups.js.map +1 -0
  27. package/dist/eve/tools/admin/manage-team-members.d.ts +45 -0
  28. package/dist/eve/tools/admin/manage-team-members.js +1160 -0
  29. package/dist/eve/tools/admin/manage-team-members.js.map +1 -0
  30. package/dist/eve/tools/admin/query-tasks.d.ts +71 -0
  31. package/dist/eve/tools/admin/query-tasks.js +1161 -0
  32. package/dist/eve/tools/admin/query-tasks.js.map +1 -0
  33. package/dist/eve/tools/catalog/search-products.d.ts +57 -0
  34. package/dist/eve/tools/catalog/search-products.js +94 -0
  35. package/dist/eve/tools/catalog/search-products.js.map +1 -0
  36. package/dist/eve/tools/identity/index.d.ts +8 -0
  37. package/dist/eve/tools/identity/index.js +234 -0
  38. package/dist/eve/tools/identity/index.js.map +1 -0
  39. package/dist/eve/tools/identity/my-access.d.ts +18 -0
  40. package/dist/eve/tools/identity/my-access.js +187 -0
  41. package/dist/eve/tools/identity/my-access.js.map +1 -0
  42. package/dist/eve/tools/identity/whoami.d.ts +44 -0
  43. package/dist/eve/tools/identity/whoami.js +117 -0
  44. package/dist/eve/tools/identity/whoami.js.map +1 -0
  45. package/dist/eve/tools/inbox/create-task.d.ts +114 -0
  46. package/dist/eve/tools/inbox/create-task.js +1785 -0
  47. package/dist/eve/tools/inbox/create-task.js.map +1 -0
  48. package/dist/eve/tools/inbox/index.d.ts +6 -0
  49. package/dist/eve/tools/inbox/index.js +1785 -0
  50. package/dist/eve/tools/inbox/index.js.map +1 -0
  51. package/dist/eve/tools/index.d.ts +24 -0
  52. package/dist/eve/tools/index.js +2848 -0
  53. package/dist/eve/tools/index.js.map +1 -0
  54. package/dist/index-DoQN48Bm.d.ts +200 -0
  55. package/dist/index.d.ts +8 -44
  56. package/dist/index.js +842 -137
  57. package/dist/index.js.map +1 -1
  58. package/dist/schemas/index.d.ts +6 -1
  59. package/dist/schemas/index.js +251 -59
  60. package/dist/schemas/index.js.map +1 -1
  61. package/dist/tenant-5YKDrdC-.d.ts +23 -0
  62. package/dist/{tool-approval-bridge-DbwUEBHv.d.ts → tool-approval-bridge-aMA79Z1B.d.ts} +1 -1
  63. package/dist/tool-reply-guidance-C3qrT1In.d.ts +25 -0
  64. package/dist/trigger/index.d.ts +2 -1
  65. package/dist/trigger/index.js +543 -127
  66. package/dist/trigger/index.js.map +1 -1
  67. package/dist/{trigger-BCKBbAV7.d.ts → trigger-CXrbKVCL.d.ts} +2 -2
  68. package/dist/workflow/index.d.ts +2 -1
  69. package/dist/workflow/index.js +543 -127
  70. package/dist/workflow/index.js.map +1 -1
  71. package/package.json +69 -8
@@ -0,0 +1,117 @@
1
+ // src/eve/tools/identity/whoami.ts
2
+ import { defineTool } from "eve/tools";
3
+ import { z } from "zod";
4
+
5
+ // src/eve/agent/attributes.ts
6
+ function readStringAttribute(attributes, key) {
7
+ const value = attributes?.[key];
8
+ if (typeof value === "string" && value.length > 0) {
9
+ return value;
10
+ }
11
+ if (Array.isArray(value) && typeof value[0] === "string" && value[0].length > 0) {
12
+ return value[0];
13
+ }
14
+ return void 0;
15
+ }
16
+ function readStringArrayAttribute(attributes, key) {
17
+ const value = attributes?.[key];
18
+ if (typeof value === "string" && value.length > 0) {
19
+ return [value];
20
+ }
21
+ if (Array.isArray(value)) {
22
+ return value.filter(
23
+ (entry) => typeof entry === "string" && entry.length > 0
24
+ );
25
+ }
26
+ return [];
27
+ }
28
+ function parseTenantRole(value) {
29
+ if (value === "admin" || value === "member") {
30
+ return value;
31
+ }
32
+ return null;
33
+ }
34
+
35
+ // src/eve/agent/tenant.ts
36
+ function tryResolveTenantCaller(ctx) {
37
+ const caller = ctx.session.auth.initiator ?? ctx.session.auth.current;
38
+ if (caller?.principalType !== "user") {
39
+ return null;
40
+ }
41
+ const email = readStringAttribute(caller.attributes, "email");
42
+ const name = readStringAttribute(caller.attributes, "name");
43
+ const tenantSlug = readStringAttribute(caller.attributes, "tenantSlug") ?? readStringAttribute(caller.attributes, "tenantId");
44
+ const role = parseTenantRole(readStringAttribute(caller.attributes, "role"));
45
+ if (!email || !tenantSlug || !caller.principalId || !role) {
46
+ return null;
47
+ }
48
+ const workosUserId = readStringAttribute(caller.attributes, "workosUserId");
49
+ const connectionId = readStringAttribute(caller.attributes, "connectionId");
50
+ const groups = readStringArrayAttribute(caller.attributes, "groups");
51
+ return {
52
+ userId: caller.principalId,
53
+ email,
54
+ name: name ?? email.split("@")[0] ?? email,
55
+ tenantSlug,
56
+ ...connectionId ? { connectionId } : {},
57
+ role,
58
+ isAdmin: role === "admin",
59
+ groups,
60
+ ...workosUserId ? { workosUserId } : {}
61
+ };
62
+ }
63
+
64
+ // src/eve/tool-reply-guidance.ts
65
+ var TOOL_REPLY_GUIDANCE_FIELD = "replyGuidance";
66
+ var WHOAMI_REPLY_GUIDANCE = "The dashboard shows a profile card with name, email, workspace, role, and groups. Do not restate those in your reply. Only add context not in the card (e.g. permissions, refund approval rules, missing group membership).";
67
+ function withReplyGuidance(result, guidance) {
68
+ return {
69
+ ...result,
70
+ [TOOL_REPLY_GUIDANCE_FIELD]: guidance
71
+ };
72
+ }
73
+
74
+ // src/eve/tools/identity/whoami.ts
75
+ var WHOAMI_TOOL_NAME = "whoami";
76
+ var whoamiInputSchema = z.object({});
77
+ function defineWhoamiTool() {
78
+ return defineTool({
79
+ description: "Return the authenticated RobotRock user, tenant, role, and group memberships for the current chat session. The dashboard renders a profile card \u2014 do not repeat name, email, workspace, role, or groups in your reply; only add context not shown in the card.",
80
+ inputSchema: whoamiInputSchema,
81
+ async execute(_input, ctx) {
82
+ const caller = tryResolveTenantCaller(ctx);
83
+ if (!caller) {
84
+ return withReplyGuidance(
85
+ {
86
+ authenticated: false,
87
+ message: "No RobotRock user is attached to this session. Dashboard chat supplies user context via the Eve proxy."
88
+ },
89
+ "Explain that no user is attached to this session. Do not invent identity details."
90
+ );
91
+ }
92
+ return withReplyGuidance(
93
+ {
94
+ authenticated: true,
95
+ userId: caller.userId,
96
+ name: caller.name,
97
+ email: caller.email,
98
+ tenantSlug: caller.tenantSlug,
99
+ role: caller.role,
100
+ isAdmin: caller.isAdmin,
101
+ groups: caller.groups.map((slug) => ({ slug })),
102
+ ...caller.workosUserId ? { workosUserId: caller.workosUserId } : {},
103
+ sessionId: ctx.session.id
104
+ },
105
+ WHOAMI_REPLY_GUIDANCE
106
+ );
107
+ }
108
+ });
109
+ }
110
+ var whoamiTool = defineWhoamiTool();
111
+ export {
112
+ WHOAMI_TOOL_NAME,
113
+ defineWhoamiTool,
114
+ whoamiInputSchema,
115
+ whoamiTool
116
+ };
117
+ //# sourceMappingURL=whoami.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/eve/tools/identity/whoami.ts","../../../../src/eve/agent/attributes.ts","../../../../src/eve/agent/tenant.ts","../../../../src/eve/tool-reply-guidance.ts"],"sourcesContent":["import { defineTool } from \"eve/tools\";\nimport { z } from \"zod\";\nimport { tryResolveTenantCaller } from \"../../agent/tenant.js\";\nimport {\n WHOAMI_REPLY_GUIDANCE,\n withReplyGuidance,\n} from \"../../tool-reply-guidance.js\";\n\nexport const WHOAMI_TOOL_NAME = \"whoami\";\n\nexport const whoamiInputSchema = z.object({});\n\nexport function defineWhoamiTool() {\n return defineTool({\n description:\n \"Return the authenticated RobotRock user, tenant, role, and group memberships for the current chat session. \" +\n \"The dashboard renders a profile card — do not repeat name, email, workspace, role, or groups in your reply; only add context not shown in the card.\",\n inputSchema: whoamiInputSchema,\n async execute(_input, ctx) {\n const caller = tryResolveTenantCaller(ctx);\n if (!caller) {\n return withReplyGuidance(\n {\n authenticated: false as const,\n message:\n \"No RobotRock user is attached to this session. Dashboard chat supplies user context via the Eve proxy.\",\n },\n \"Explain that no user is attached to this session. Do not invent identity details.\"\n );\n }\n\n return withReplyGuidance(\n {\n authenticated: true as const,\n userId: caller.userId,\n name: caller.name,\n email: caller.email,\n tenantSlug: caller.tenantSlug,\n role: caller.role,\n isAdmin: caller.isAdmin,\n groups: caller.groups.map((slug) => ({ slug })),\n ...(caller.workosUserId ? { workosUserId: caller.workosUserId } : {}),\n sessionId: ctx.session.id,\n },\n WHOAMI_REPLY_GUIDANCE\n );\n },\n });\n}\n\nexport const whoamiTool = defineWhoamiTool();\n","export function readStringAttribute(\n attributes: Readonly<Record<string, string | readonly string[]>> | undefined,\n key: string\n): string | undefined {\n const value = attributes?.[key];\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n if (Array.isArray(value) && typeof value[0] === \"string\" && value[0].length > 0) {\n return value[0];\n }\n return undefined;\n}\n\nexport function readStringArrayAttribute(\n attributes: Readonly<Record<string, string | readonly string[]>> | undefined,\n key: string\n): string[] {\n const value = attributes?.[key];\n if (typeof value === \"string\" && value.length > 0) {\n return [value];\n }\n if (Array.isArray(value)) {\n return value.filter(\n (entry): entry is string => typeof entry === \"string\" && entry.length > 0\n );\n }\n return [];\n}\n\nexport function parseTenantRole(\n value: string | undefined\n): \"admin\" | \"member\" | null {\n if (value === \"admin\" || value === \"member\") {\n return value;\n }\n return null;\n}\n","import type { SessionContext } from \"eve/context\";\nimport {\n parseTenantRole,\n readStringArrayAttribute,\n readStringAttribute,\n} from \"./attributes.js\";\n\nexport type TenantRole = \"admin\" | \"member\";\n\nexport type TenantCaller = {\n userId: string;\n email: string;\n name: string;\n tenantSlug: string;\n connectionId?: string;\n role: TenantRole;\n isAdmin: boolean;\n groups: string[];\n workosUserId?: string;\n};\n\n/** Resolve the authenticated RobotRock dashboard user for the current session. */\nexport function tryResolveTenantCaller(ctx: SessionContext): TenantCaller | null {\n const caller = ctx.session.auth.initiator ?? ctx.session.auth.current;\n if (caller?.principalType !== \"user\") {\n return null;\n }\n\n const email = readStringAttribute(caller.attributes, \"email\");\n const name = readStringAttribute(caller.attributes, \"name\");\n const tenantSlug =\n readStringAttribute(caller.attributes, \"tenantSlug\") ??\n readStringAttribute(caller.attributes, \"tenantId\");\n const role = parseTenantRole(readStringAttribute(caller.attributes, \"role\"));\n if (!email || !tenantSlug || !caller.principalId || !role) {\n return null;\n }\n\n const workosUserId = readStringAttribute(caller.attributes, \"workosUserId\");\n const connectionId = readStringAttribute(caller.attributes, \"connectionId\");\n const groups = readStringArrayAttribute(caller.attributes, \"groups\");\n\n return {\n userId: caller.principalId,\n email,\n name: name ?? email.split(\"@\")[0] ?? email,\n tenantSlug,\n ...(connectionId ? { connectionId } : {}),\n role,\n isAdmin: role === \"admin\",\n groups,\n ...(workosUserId ? { workosUserId } : {}),\n };\n}\n\n/** Like {@link tryResolveTenantCaller} but throws when the session has no user. */\nexport function requireTenantCaller(ctx: SessionContext): TenantCaller {\n const caller = tryResolveTenantCaller(ctx);\n if (!caller) {\n throw new Error(\"An authenticated RobotRock tenant user is required.\");\n }\n return caller;\n}\n\nexport function isAdminCaller(ctx: SessionContext): boolean {\n return tryResolveTenantCaller(ctx)?.isAdmin === true;\n}\n\n/** Require an authenticated tenant admin for the current session. */\nexport function requireAdminCaller(ctx: SessionContext): TenantCaller {\n const caller = requireTenantCaller(ctx);\n if (!caller.isAdmin) {\n throw new Error(\"Tenant admin access is required.\");\n }\n return caller;\n}\n","/** Field name agents read; dashboard widgets must ignore when rendering. */\nexport const TOOL_REPLY_GUIDANCE_FIELD = \"replyGuidance\" as const;\n\nexport const WHOAMI_REPLY_GUIDANCE =\n \"The dashboard shows a profile card with name, email, workspace, role, and groups. Do not restate those in your reply. Only add context not in the card (e.g. permissions, refund approval rules, missing group membership).\";\n\nexport const MY_ACCESS_REPLY_GUIDANCE =\n \"Access details may render in chat UI. Do not restate role, groups, or admin capabilities if already visible. Only explain what the user can or cannot do for their question (e.g. finance group required for refunds ≥ $10,000). When access.tenantAdmin is false and the user needs manageTeam, manageGroups, or query-tasks capabilities, explain briefly then call ask_question to offer sending an admin request to tenant admins — do not tell them to find an admin manually without offering delegation first.\";\n\nexport const CREATE_INBOX_TASK_REPLY_GUIDANCE =\n \"A task card shows title, assignee, and inbox status in chat. Do not restate task ID, assignee, or delegation details from the card. Only mention next steps or answer the user's question.\";\n\nexport const SEARCH_PRODUCTS_REPLY_GUIDANCE =\n \"Product results render as a list card in chat. Do not restate product names, prices, or SKUs. Only add context not in the list (e.g. no matches, recommendations).\";\n\nexport const MANAGE_TEAM_MEMBERS_LIST_REPLY_GUIDANCE =\n \"Team members render as a list card in chat. Do not restate names, emails, or roles from the list. Only add context not shown (e.g. duplicates, next admin actions).\";\n\nexport const MANAGE_TEAM_MEMBERS_DETAIL_REPLY_GUIDANCE =\n \"Team member details render in chat UI. Do not restate name, email, or role from the card. Only add next steps or policy context.\";\n\nexport const MANAGE_GROUPS_LIST_REPLY_GUIDANCE =\n \"Groups render as a list card in chat. Do not restate group names, slugs, or descriptions from the list. Use slug (not internal id) for get, update, delete, and membership actions. Only add context not shown.\";\n\nexport const MANAGE_GROUPS_DETAIL_REPLY_GUIDANCE =\n \"Group details render in chat UI. Do not restate fields already visible in the card. Only add next steps.\";\n\nexport const QUERY_TASKS_LIST_REPLY_GUIDANCE =\n \"Tasks render as a list card in chat. Do not restate task names, ids, or statuses from the list. Only add context not shown (e.g. filters applied, recommended next action).\";\n\nexport const QUERY_TASKS_DETAIL_REPLY_GUIDANCE =\n \"Task details render in chat UI. Do not restate fields already visible in the card. Only add analysis or next steps.\";\n\nexport const ASSIGN_TASKS_REPLY_GUIDANCE =\n \"Reassignment results render in chat UI. Do not restate task ids or assignee emails from the card. Only mention failures, partial success, or next steps.\";\n\nexport const REFUND_CHARGE_REPLY_GUIDANCE =\n \"Refund details render in chat UI. Do not restate charge id, amount, or status from the card. Only add policy context or next steps.\";\n\nexport const DEPLOY_RELEASE_REPLY_GUIDANCE =\n \"Deploy details render in chat UI. Do not restate service, version, or environment from the card. Only add rollout context or next steps.\";\n\nexport const GET_WEATHER_REPLY_GUIDANCE =\n \"Weather details render in chat UI. Do not restate city, condition, or temperature from the card. Only add conversational context if needed.\";\n\nexport const ADMIN_MUTATION_REPLY_GUIDANCE =\n \"The action result renders in chat UI. Do not restate fields already visible in the card. Confirm outcome briefly or add next steps only.\";\n\nexport type ToolResultWithReplyGuidance<T extends Record<string, unknown>> = T & {\n replyGuidance: string;\n};\n\n/** Attach model-facing narration hints to a tool execute result. */\nexport function withReplyGuidance<T extends Record<string, unknown>>(\n result: T,\n guidance: string\n): ToolResultWithReplyGuidance<T> {\n return {\n ...result,\n [TOOL_REPLY_GUIDANCE_FIELD]: guidance,\n };\n}\n\n/** Remove agent-only fields before showing raw JSON in the dashboard. */\nexport function stripAgentOnlyToolFields(output: unknown): unknown {\n if (typeof output !== \"object\" || output === null || Array.isArray(output)) {\n return output;\n }\n\n const record = {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AO,aAAa,IAAI,CAAC;AAAA,UACnE,WAAW,IAAI,QAAQ;AAAA,QACzB;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEO,IAAM,aAAa,iBAAiB;","names":[]}
@@ -0,0 +1,114 @@
1
+ import * as eve_tools from 'eve/tools';
2
+ import { T as ToolResultWithReplyGuidance } from '../../../tool-reply-guidance-C3qrT1In.js';
3
+ import { z } from 'zod';
4
+ import { a as TenantCaller } from '../../../tenant-5YKDrdC-.js';
5
+ import 'eve/context';
6
+
7
+ /** Eve tool slug — must match the agent tool filename `create_robotrock_task.ts`. */
8
+ declare const CREATE_INBOX_TASK_TOOL_NAME = "create_robotrock_task";
9
+ declare const createInboxTaskInputSchema: z.ZodObject<{
10
+ type: z.ZodString;
11
+ name: z.ZodString;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ actions: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodString;
15
+ title: z.ZodString;
16
+ description: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>>;
18
+ assignTo: z.ZodOptional<z.ZodObject<{
19
+ users: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ }, z.core.$strip>>;
22
+ context: z.ZodOptional<z.ZodObject<{
23
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
25
+ }, z.core.$strip>>;
26
+ validUntilHours: z.ZodOptional<z.ZodNumber>;
27
+ priority: z.ZodOptional<z.ZodEnum<{
28
+ low: "low";
29
+ normal: "normal";
30
+ high: "high";
31
+ urgent: "urgent";
32
+ }>>;
33
+ updateMessage: z.ZodOptional<z.ZodString>;
34
+ delegationReason: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>;
36
+ type CreateInboxTaskToolInput = z.infer<typeof createInboxTaskInputSchema>;
37
+ type DefineCreateInboxTaskToolOptions = {
38
+ defaultApp?: string;
39
+ resolveDelegationReason?: (input: CreateInboxTaskToolInput, caller: TenantCaller) => string | undefined;
40
+ };
41
+ declare function defineCreateInboxTaskTool(options?: DefineCreateInboxTaskToolOptions): eve_tools.ToolDefinition<{
42
+ type: string;
43
+ name: string;
44
+ actions: {
45
+ id: string;
46
+ title: string;
47
+ description?: string | undefined;
48
+ }[];
49
+ description?: string | undefined;
50
+ assignTo?: {
51
+ users?: string[] | undefined;
52
+ groups?: string[] | undefined;
53
+ } | undefined;
54
+ context?: {
55
+ data?: Record<string, unknown> | undefined;
56
+ ui?: Record<string, unknown> | undefined;
57
+ } | undefined;
58
+ validUntilHours?: number | undefined;
59
+ priority?: "low" | "normal" | "high" | "urgent" | undefined;
60
+ updateMessage?: string | undefined;
61
+ delegationReason?: string | undefined;
62
+ }, ToolResultWithReplyGuidance<{
63
+ name: string;
64
+ assignedTo: {
65
+ users?: string[] | undefined;
66
+ groups?: string[] | undefined;
67
+ } | null;
68
+ requestedBy: string;
69
+ delegationReason: string | null;
70
+ message: string;
71
+ taskId: string;
72
+ threadId: string;
73
+ status: "pending" | "open";
74
+ validUntil: string;
75
+ submittedAt: string;
76
+ }>>;
77
+ declare const createInboxTaskTool: eve_tools.ToolDefinition<{
78
+ type: string;
79
+ name: string;
80
+ actions: {
81
+ id: string;
82
+ title: string;
83
+ description?: string | undefined;
84
+ }[];
85
+ description?: string | undefined;
86
+ assignTo?: {
87
+ users?: string[] | undefined;
88
+ groups?: string[] | undefined;
89
+ } | undefined;
90
+ context?: {
91
+ data?: Record<string, unknown> | undefined;
92
+ ui?: Record<string, unknown> | undefined;
93
+ } | undefined;
94
+ validUntilHours?: number | undefined;
95
+ priority?: "low" | "normal" | "high" | "urgent" | undefined;
96
+ updateMessage?: string | undefined;
97
+ delegationReason?: string | undefined;
98
+ }, ToolResultWithReplyGuidance<{
99
+ name: string;
100
+ assignedTo: {
101
+ users?: string[] | undefined;
102
+ groups?: string[] | undefined;
103
+ } | null;
104
+ requestedBy: string;
105
+ delegationReason: string | null;
106
+ message: string;
107
+ taskId: string;
108
+ threadId: string;
109
+ status: "pending" | "open";
110
+ validUntil: string;
111
+ submittedAt: string;
112
+ }>>;
113
+
114
+ export { CREATE_INBOX_TASK_TOOL_NAME, type CreateInboxTaskToolInput, type DefineCreateInboxTaskToolOptions, createInboxTaskInputSchema, createInboxTaskTool, defineCreateInboxTaskTool };