@sulala/agent 0.1.6 → 0.1.8

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 (173) hide show
  1. package/README.md +42 -27
  2. package/context/airtable.md +35 -0
  3. package/context/asana.md +37 -0
  4. package/context/bluesky.md +26 -91
  5. package/context/calendar.md +63 -0
  6. package/context/country-info.md +13 -0
  7. package/context/create-skill.md +128 -0
  8. package/context/discord.md +30 -0
  9. package/context/docs.md +29 -0
  10. package/context/drive.md +49 -0
  11. package/context/dropbox.md +39 -0
  12. package/context/facebook.md +47 -0
  13. package/context/fetch-form-api.md +16 -0
  14. package/context/figma.md +30 -0
  15. package/context/github.md +58 -0
  16. package/context/gmail.md +52 -0
  17. package/context/google.md +28 -0
  18. package/context/hellohub.md +29 -0
  19. package/context/jira.md +46 -0
  20. package/context/linear.md +40 -0
  21. package/context/notion.md +45 -0
  22. package/context/portal-integrations.md +42 -0
  23. package/context/post-to-x.md +50 -0
  24. package/context/sheets.md +47 -0
  25. package/context/slack.md +48 -0
  26. package/context/slides.md +35 -0
  27. package/context/stripe.md +38 -0
  28. package/context/tes.md +7 -0
  29. package/context/test.md +7 -0
  30. package/context/zoom.md +28 -0
  31. package/dist/agent/google/calendar.d.ts +2 -0
  32. package/dist/agent/google/calendar.d.ts.map +1 -0
  33. package/dist/agent/google/calendar.js +119 -0
  34. package/dist/agent/google/calendar.js.map +1 -0
  35. package/dist/agent/google/drive.d.ts +2 -0
  36. package/dist/agent/google/drive.d.ts.map +1 -0
  37. package/dist/agent/google/drive.js +51 -0
  38. package/dist/agent/google/drive.js.map +1 -0
  39. package/dist/agent/google/get-token.d.ts +7 -0
  40. package/dist/agent/google/get-token.d.ts.map +1 -0
  41. package/dist/agent/google/get-token.js +37 -0
  42. package/dist/agent/google/get-token.js.map +1 -0
  43. package/dist/agent/google/gmail.d.ts +2 -0
  44. package/dist/agent/google/gmail.d.ts.map +1 -0
  45. package/dist/agent/google/gmail.js +138 -0
  46. package/dist/agent/google/gmail.js.map +1 -0
  47. package/dist/agent/google/index.d.ts +2 -0
  48. package/dist/agent/google/index.d.ts.map +1 -0
  49. package/dist/agent/google/index.js +13 -0
  50. package/dist/agent/google/index.js.map +1 -0
  51. package/dist/agent/loop.d.ts +8 -0
  52. package/dist/agent/loop.d.ts.map +1 -1
  53. package/dist/agent/loop.js +226 -40
  54. package/dist/agent/loop.js.map +1 -1
  55. package/dist/agent/memory.d.ts +21 -0
  56. package/dist/agent/memory.d.ts.map +1 -0
  57. package/dist/agent/memory.js +33 -0
  58. package/dist/agent/memory.js.map +1 -0
  59. package/dist/agent/pending-actions.d.ts +21 -0
  60. package/dist/agent/pending-actions.d.ts.map +1 -0
  61. package/dist/agent/pending-actions.js +65 -0
  62. package/dist/agent/pending-actions.js.map +1 -0
  63. package/dist/agent/pi-runner.d.ts +27 -0
  64. package/dist/agent/pi-runner.d.ts.map +1 -0
  65. package/dist/agent/pi-runner.js +300 -0
  66. package/dist/agent/pi-runner.js.map +1 -0
  67. package/dist/agent/skill-generate.d.ts +63 -0
  68. package/dist/agent/skill-generate.d.ts.map +1 -0
  69. package/dist/agent/skill-generate.js +128 -0
  70. package/dist/agent/skill-generate.js.map +1 -0
  71. package/dist/agent/skill-install.d.ts.map +1 -1
  72. package/dist/agent/skill-install.js +80 -31
  73. package/dist/agent/skill-install.js.map +1 -1
  74. package/dist/agent/skill-templates.d.ts +17 -0
  75. package/dist/agent/skill-templates.d.ts.map +1 -0
  76. package/dist/agent/skill-templates.js +26 -0
  77. package/dist/agent/skill-templates.js.map +1 -0
  78. package/dist/agent/skills-config.d.ts +24 -2
  79. package/dist/agent/skills-config.d.ts.map +1 -1
  80. package/dist/agent/skills-config.js +108 -9
  81. package/dist/agent/skills-config.js.map +1 -1
  82. package/dist/agent/skills-watcher.js +1 -1
  83. package/dist/agent/skills.d.ts +9 -3
  84. package/dist/agent/skills.d.ts.map +1 -1
  85. package/dist/agent/skills.js +104 -9
  86. package/dist/agent/skills.js.map +1 -1
  87. package/dist/agent/tools.d.ts +25 -3
  88. package/dist/agent/tools.d.ts.map +1 -1
  89. package/dist/agent/tools.integrations.test.d.ts +2 -0
  90. package/dist/agent/tools.integrations.test.d.ts.map +1 -0
  91. package/dist/agent/tools.integrations.test.js +269 -0
  92. package/dist/agent/tools.integrations.test.js.map +1 -0
  93. package/dist/agent/tools.js +692 -39
  94. package/dist/agent/tools.js.map +1 -1
  95. package/dist/ai/orchestrator.d.ts +6 -1
  96. package/dist/ai/orchestrator.d.ts.map +1 -1
  97. package/dist/ai/orchestrator.js +499 -212
  98. package/dist/ai/orchestrator.js.map +1 -1
  99. package/dist/ai/pricing.d.ts +6 -0
  100. package/dist/ai/pricing.d.ts.map +1 -0
  101. package/dist/ai/pricing.js +39 -0
  102. package/dist/ai/pricing.js.map +1 -0
  103. package/dist/channels/discord.d.ts +15 -0
  104. package/dist/channels/discord.d.ts.map +1 -0
  105. package/dist/channels/discord.js +55 -0
  106. package/dist/channels/discord.js.map +1 -0
  107. package/dist/channels/stripe.d.ts +15 -0
  108. package/dist/channels/stripe.d.ts.map +1 -0
  109. package/dist/channels/stripe.js +58 -0
  110. package/dist/channels/stripe.js.map +1 -0
  111. package/dist/channels/telegram.d.ts +60 -0
  112. package/dist/channels/telegram.d.ts.map +1 -0
  113. package/dist/channels/telegram.js +562 -0
  114. package/dist/channels/telegram.js.map +1 -0
  115. package/dist/cli.js +69 -11
  116. package/dist/cli.js.map +1 -1
  117. package/dist/config.d.ts +14 -0
  118. package/dist/config.d.ts.map +1 -1
  119. package/dist/config.js +91 -2
  120. package/dist/config.js.map +1 -1
  121. package/dist/db/index.d.ts +83 -0
  122. package/dist/db/index.d.ts.map +1 -1
  123. package/dist/db/index.js +174 -2
  124. package/dist/db/index.js.map +1 -1
  125. package/dist/db/schema.sql +35 -0
  126. package/dist/gateway/server.d.ts.map +1 -1
  127. package/dist/gateway/server.js +1224 -29
  128. package/dist/gateway/server.js.map +1 -1
  129. package/dist/index.js +149 -6
  130. package/dist/index.js.map +1 -1
  131. package/dist/ollama-setup.d.ts +27 -0
  132. package/dist/ollama-setup.d.ts.map +1 -0
  133. package/dist/ollama-setup.js +191 -0
  134. package/dist/ollama-setup.js.map +1 -0
  135. package/dist/onboard-env.d.ts +1 -1
  136. package/dist/onboard-env.d.ts.map +1 -1
  137. package/dist/onboard-env.js +3 -0
  138. package/dist/onboard-env.js.map +1 -1
  139. package/dist/onboard.d.ts +3 -1
  140. package/dist/onboard.d.ts.map +1 -1
  141. package/dist/onboard.js +9 -4
  142. package/dist/onboard.js.map +1 -1
  143. package/dist/plugins/index.d.ts +10 -0
  144. package/dist/plugins/index.d.ts.map +1 -1
  145. package/dist/plugins/index.js +32 -0
  146. package/dist/plugins/index.js.map +1 -1
  147. package/dist/redact.d.ts +15 -0
  148. package/dist/redact.d.ts.map +1 -0
  149. package/dist/redact.js +56 -0
  150. package/dist/redact.js.map +1 -0
  151. package/dist/scheduler/cron.d.ts +21 -0
  152. package/dist/scheduler/cron.d.ts.map +1 -1
  153. package/dist/scheduler/cron.js +60 -0
  154. package/dist/scheduler/cron.js.map +1 -1
  155. package/dist/system-capabilities.d.ts +11 -0
  156. package/dist/system-capabilities.d.ts.map +1 -0
  157. package/dist/system-capabilities.js +109 -0
  158. package/dist/system-capabilities.js.map +1 -0
  159. package/dist/types.d.ts +62 -3
  160. package/dist/types.d.ts.map +1 -1
  161. package/dist/watcher/index.d.ts +2 -0
  162. package/dist/watcher/index.d.ts.map +1 -1
  163. package/dist/watcher/index.js +31 -1
  164. package/dist/watcher/index.js.map +1 -1
  165. package/dist/workspace-automations.d.ts +16 -0
  166. package/dist/workspace-automations.d.ts.map +1 -0
  167. package/dist/workspace-automations.js +133 -0
  168. package/dist/workspace-automations.js.map +1 -0
  169. package/package.json +19 -3
  170. package/registry/bluesky.md +12 -89
  171. package/registry/skills-registry.json +6 -0
  172. package/src/db/schema.sql +35 -0
  173. package/src/index.ts +159 -6
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: slack
3
+ description: Use Slack (channels, messages, reactions) via the Portal. When the user asks to list channels, send a message, or read Slack, list connections with list_integrations_connections (provider slack) and use run_command with curl to the Slack API or gateway.
4
+ metadata:
5
+ {
6
+ "sulala": {
7
+ "emoji": "💬",
8
+ "requires": { "bins": ["curl"] }
9
+ }
10
+ }
11
+ ---
12
+
13
+ # Slack
14
+
15
+ 1. **list_integrations_connections** with `provider: "slack"` → get `connection_id`.
16
+ 2. **get_connection_token** with that `connection_id` → returns `accessToken` (do not curl the portal).
17
+ 3. **run_command (curl)** with `Authorization: Bearer <accessToken>` and `Content-Type: application/json` for POST.
18
+
19
+ Base URL: `https://slack.com/api`. Add `slack.com` to **ALLOWED_CURL_HOSTS**.
20
+
21
+ Official docs: https://api.slack.com/methods
22
+
23
+ ---
24
+
25
+ ## Channels
26
+
27
+ - **List channels** (public and private the app is in): `GET https://slack.com/api/conversations.list?types=public_channel,private_channel&limit=50`. Returns `channels[].id`, `channels[].name`. Pagination: `cursor` in response.
28
+
29
+ ---
30
+
31
+ ## Messages
32
+
33
+ - **Send message**: `POST https://slack.com/api/chat.postMessage` with body `{"channel": "<channel_id>", "text": "Message text"}`. `channel` can be channel ID (from conversations.list) or channel name (e.g. `#general`).
34
+ - **Get channel history**: `GET https://slack.com/api/conversations.history?channel=<channel_id>&limit=20`. Returns `messages[]` with `text`, `user`, `ts`. Pagination: `cursor` or `oldest`/`latest` (timestamp).
35
+
36
+ ---
37
+
38
+ ## Users
39
+
40
+ - **List users**: `GET https://slack.com/api/users.list?limit=50`. Returns `members[].id`, `members[].real_name`, `members[].name`.
41
+
42
+ ---
43
+
44
+ ## Reactions
45
+
46
+ - **Add reaction**: `POST https://slack.com/api/reactions.add` with body `{"channel": "<channel_id>", "timestamp": "<message_ts>", "name": "emoji_name"}`. `timestamp` is the `ts` of the message (e.g. `1234567890.123456`). `name` is the emoji without colons (e.g. `thumbsup`).
47
+
48
+ Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Slack in the Portal. Bot must be in the workspace and invited to channels as needed.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: slides
3
+ description: Use Google Slides via the Portal. When the user asks to list presentations or read Slides content, use this skill with list_integrations_connections (provider slides) and run_command + curl.
4
+ metadata:
5
+ {
6
+ "sulala": {
7
+ "emoji": "📽️",
8
+ "requires": { "bins": ["curl"] }
9
+ }
10
+ }
11
+ ---
12
+
13
+ # Google Slides
14
+
15
+ Use **list_integrations_connections** with `provider: "slides"`, then **get_connection_token** (do not curl the portal). Then call the API with that token.
16
+
17
+ 1. **list_integrations_connections** with `provider: "slides"` → get `connection_id`.
18
+ 2. **get_connection_token** with that `connection_id` → returns `accessToken`.
19
+ 3. **run_command (curl)** with `Authorization: Bearer <accessToken>` for all requests.
20
+
21
+ Add `www.googleapis.com` and `slides.googleapis.com` to **ALLOWED_CURL_HOSTS**.
22
+
23
+ ---
24
+
25
+ ## List presentations
26
+
27
+ List via Drive API (mimeType `application/vnd.google-apps.presentation`).
28
+
29
+ ---
30
+
31
+ ## Get presentation
32
+
33
+ `GET https://slides.googleapis.com/v1/presentations/<presentationId>`. Returns slide structure and content.
34
+
35
+ Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Google Slides in the Portal or dashboard Integrations.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: stripe
3
+ description: Use Stripe (customers, invoices) via Settings → Channels or API key. Do not use list_integrations_connections for Stripe—it only lists OAuth apps. Use stripe_list_customers for listing customers; for invoices use run_command with curl and the key from Settings.
4
+ metadata:
5
+ {
6
+ "sulala": {
7
+ "emoji": "💳",
8
+ "requires": { "env": ["STRIPE_SECRET_KEY"] }
9
+ }
10
+ }
11
+ ---
12
+
13
+ # Stripe
14
+
15
+ Stripe is configured in **Settings → Channels (Stripe)** or via **STRIPE_SECRET_KEY** in the agent env. **Do not call list_integrations_connections for Stripe**—that tool only returns OAuth connections (Gmail, Slack, etc.). Stripe uses an API key, not OAuth.
16
+
17
+ - **List customers**: use the **stripe_list_customers** tool (uses the key from Settings → Channels). Returns customers with id, email, name.
18
+ - **Invoices / other Stripe API calls**: use **run_command** with curl to `https://api.stripe.com/v1`. Add `api.stripe.com` to **ALLOWED_CURL_HOSTS**. Stripe API uses **form-encoded** body for POST (e.g. `key=value`), not JSON for most v1 endpoints. The key is in Settings → Channels; the agent must not expose it in chat.
19
+
20
+ Base URL: `https://api.stripe.com/v1`. Official docs: https://stripe.com/docs/api
21
+
22
+ ---
23
+
24
+ ## Customers
25
+
26
+ - **List customers**: use the **stripe_list_customers** tool (limit optional). For raw API: `GET https://api.stripe.com/v1/customers?limit=10`. Pagination: `starting_after=<id>`.
27
+ - **Get customer**: `GET https://api.stripe.com/v1/customers/<customer_id>`.
28
+ - **Create customer** (if needed for invoice): `POST https://api.stripe.com/v1/customers` with body `email=user@example.com&name=Name`.
29
+
30
+ ---
31
+
32
+ ## Invoices
33
+
34
+ - **List invoices**: `GET https://api.stripe.com/v1/invoices?limit=10&customer=<customer_id>` (optional). Returns `data[].id`, `data[].amount_due`, `data[].status`, `data[].invoice_pdf`, `data[].hosted_invoice_url`.
35
+ - **Get invoice**: `GET https://api.stripe.com/v1/invoices/<invoice_id>`.
36
+ - **Create invoice**: (1) Create invoice: `POST https://api.stripe.com/v1/invoices` with body `customer=<customer_id>`. Response has `id`. (2) Add line item: `POST https://api.stripe.com/v1/invoiceitems` with body `customer=<customer_id>&amount=<amount_in_cents>&currency=usd&description=Item description`. (3) Finalize: `POST https://api.stripe.com/v1/invoices/<invoice_id>/finalize`. (4) Optional send: `POST https://api.stripe.com/v1/invoices/<invoice_id>/send`. Use idempotency header `Idempotency-Key: <unique_key>` for POST if retrying.
37
+
38
+ Requirements: Stripe secret key (starts with `sk_`) in Skills config. Do not expose in chat.
package/context/tes.md ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: tsadf
3
+ description: sadf
4
+ version: 1.0.0
5
+ ---
6
+
7
+ safd
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: test form hub
3
+ description: test hub
4
+ version: 1.0.0
5
+ ---
6
+
7
+ test
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: zoom
3
+ description: Use Zoom (meetings) via the Portal. When the user asks to list or create Zoom meetings, list connections with list_integrations_connections (provider zoom) and use run_command with curl to the Zoom API or gateway.
4
+ metadata:
5
+ {
6
+ "sulala": {
7
+ "emoji": "📹",
8
+ "requires": { "bins": ["curl"] }
9
+ }
10
+ }
11
+ ---
12
+
13
+ # Zoom
14
+
15
+ 1. **list_integrations_connections** with `provider: "zoom"` → get `connection_id`.
16
+ 2. **get_connection_token** with that `connection_id` → returns `accessToken` (do not curl the portal).
17
+ 3. **run_command (curl)** with `Authorization: Bearer <accessToken>` and `Content-Type: application/json` for POST.
18
+
19
+ Base URL: `https://api.zoom.us/v2`. Add `api.zoom.us` to **ALLOWED_CURL_HOSTS**. Official docs: https://developers.zoom.us/docs/api/
20
+
21
+ ---
22
+
23
+ ## Meetings
24
+
25
+ - **List meetings** (user's scheduled): `GET https://api.zoom.us/v2/users/me/meetings?type=scheduled&page_size=30`. Returns `meetings[].id`, `uuid`, `topic`, `start_time`, `join_url`, `agenda`.
26
+ - **Create meeting**: `POST https://api.zoom.us/v2/users/me/meetings` with body `{"topic": "Meeting title", "type": 2, "start_time": "<YYYY-MM-DDTHH:MM:SSZ>", "duration": 30, "agenda": "Optional agenda"}`. `type`: 1=instant, 2=scheduled, 3=recurring. Response has `join_url`, `start_url`, `id`.
27
+
28
+ Requirements: **PORTAL_GATEWAY_URL**, **PORTAL_API_KEY**; user must connect Zoom in the Portal.
@@ -0,0 +1,2 @@
1
+ export declare function registerCalendarTools(): void;
2
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/agent/google/calendar.ts"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,IAAI,IAAI,CAiH5C"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Google Calendar tools: list events, create event. Use connection_id from list_integrations_connections (provider calendar).
3
+ */
4
+ import { registerTool } from '../tools.js';
5
+ import { getConnectionToken } from './get-token.js';
6
+ const CALENDAR_API = 'https://www.googleapis.com/calendar/v3/calendars';
7
+ export function registerCalendarTools() {
8
+ registerTool({
9
+ name: 'google_calendar_list_events',
10
+ description: 'List events from a Google Calendar. Use connection_id from list_integrations_connections (provider calendar). Optional time range and calendar (default primary).',
11
+ profile: 'full',
12
+ parameters: {
13
+ type: 'object',
14
+ properties: {
15
+ connection_id: { type: 'string', description: 'Calendar connection ID from list_integrations_connections' },
16
+ calendar_id: { type: 'string', description: 'Calendar ID (default primary). Use "primary" for main calendar.' },
17
+ max_results: { type: 'number', description: 'Max events to return (default 10, max 50)' },
18
+ time_min: { type: 'string', description: 'ISO 8601 start time (e.g. 2025-03-01T00:00:00Z). Optional.' },
19
+ time_max: { type: 'string', description: 'ISO 8601 end time. Optional.' },
20
+ },
21
+ required: ['connection_id'],
22
+ },
23
+ execute: async (args) => {
24
+ const connectionId = args.connection_id;
25
+ const calendarId = typeof args.calendar_id === 'string' && args.calendar_id.trim() ? args.calendar_id.trim() : 'primary';
26
+ const maxResults = Math.min(Math.max(Number(args.max_results) || 10, 1), 50);
27
+ const timeMin = typeof args.time_min === 'string' ? args.time_min.trim() : undefined;
28
+ const timeMax = typeof args.time_max === 'string' ? args.time_max.trim() : undefined;
29
+ const tokenResult = await getConnectionToken(connectionId);
30
+ if ('error' in tokenResult)
31
+ return { error: tokenResult.error };
32
+ const params = new URLSearchParams({ maxResults: String(maxResults), singleEvents: 'true', orderBy: 'startTime' });
33
+ if (timeMin)
34
+ params.set('timeMin', timeMin);
35
+ if (timeMax)
36
+ params.set('timeMax', timeMax);
37
+ const url = `${CALENDAR_API}/${encodeURIComponent(calendarId)}/events?${params}`;
38
+ const res = await fetch(url, {
39
+ headers: { Authorization: `Bearer ${tokenResult.accessToken}` },
40
+ });
41
+ if (!res.ok) {
42
+ const text = await res.text();
43
+ return { error: `Calendar API: ${res.status} ${text.slice(0, 300)}` };
44
+ }
45
+ const data = (await res.json());
46
+ const events = (data.items ?? []).map((e) => ({
47
+ id: e.id,
48
+ summary: e.summary,
49
+ start: e.start?.dateTime ?? e.start?.date,
50
+ end: e.end?.dateTime ?? e.end?.date,
51
+ description: e.description,
52
+ }));
53
+ return { events, count: events.length };
54
+ },
55
+ });
56
+ registerTool({
57
+ name: 'google_calendar_create_event',
58
+ description: 'Create an event on a Google Calendar. Use connection_id from list_integrations_connections (provider calendar). Start and end as ISO 8601 (e.g. 2025-03-15T14:00:00 or 2025-03-15).',
59
+ profile: 'full',
60
+ parameters: {
61
+ type: 'object',
62
+ properties: {
63
+ connection_id: { type: 'string', description: 'Calendar connection ID from list_integrations_connections' },
64
+ calendar_id: { type: 'string', description: 'Calendar ID (default primary)' },
65
+ summary: { type: 'string', description: 'Event title' },
66
+ description: { type: 'string', description: 'Event description. Optional.' },
67
+ start: { type: 'string', description: 'Start time ISO 8601 (e.g. 2025-03-15T14:00:00 or 2025-03-15 for all-day)' },
68
+ end: { type: 'string', description: 'End time ISO 8601' },
69
+ time_zone: { type: 'string', description: 'IANA time zone (e.g. America/Los_Angeles). Optional; API may use calendar default.' },
70
+ },
71
+ required: ['connection_id', 'summary', 'start', 'end'],
72
+ },
73
+ execute: async (args) => {
74
+ const connectionId = args.connection_id;
75
+ const calendarId = typeof args.calendar_id === 'string' && args.calendar_id.trim() ? args.calendar_id.trim() : 'primary';
76
+ const summary = String(args.summary ?? '').trim();
77
+ const description = typeof args.description === 'string' ? args.description.trim() : undefined;
78
+ const start = String(args.start ?? '').trim();
79
+ const end = String(args.end ?? '').trim();
80
+ const timeZone = typeof args.time_zone === 'string' ? args.time_zone.trim() : undefined;
81
+ if (!summary || !start || !end)
82
+ return { error: 'summary, start, and end are required' };
83
+ const tokenResult = await getConnectionToken(connectionId);
84
+ if ('error' in tokenResult)
85
+ return { error: tokenResult.error };
86
+ const isAllDay = !start.includes('T') && !end.includes('T');
87
+ const body = {
88
+ summary,
89
+ start: isAllDay ? { date: start } : { dateTime: start, timeZone: timeZone ?? undefined },
90
+ end: isAllDay ? { date: end } : { dateTime: end, timeZone: timeZone ?? undefined },
91
+ };
92
+ if (description)
93
+ body.description = description;
94
+ const url = `${CALENDAR_API}/${encodeURIComponent(calendarId)}/events`;
95
+ const res = await fetch(url, {
96
+ method: 'POST',
97
+ headers: {
98
+ Authorization: `Bearer ${tokenResult.accessToken}`,
99
+ 'Content-Type': 'application/json',
100
+ },
101
+ body: JSON.stringify(body),
102
+ });
103
+ if (!res.ok) {
104
+ const text = await res.text();
105
+ return { error: `Calendar API: ${res.status} ${text.slice(0, 300)}` };
106
+ }
107
+ const event = (await res.json());
108
+ return {
109
+ success: true,
110
+ eventId: event.id,
111
+ summary: event.summary,
112
+ start: event.start?.dateTime ?? event.start?.date,
113
+ end: event.end?.dateTime ?? event.end?.date,
114
+ htmlLink: event.htmlLink,
115
+ };
116
+ },
117
+ });
118
+ }
119
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../src/agent/google/calendar.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,YAAY,GAAG,kDAAkD,CAAC;AAExE,MAAM,UAAU,qBAAqB;IACnC,YAAY,CAAC;QACX,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACT,mKAAmK;QACrK,OAAO,EAAE,MAAM;QACf,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE;gBAC3G,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iEAAiE,EAAE;g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URL=drive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive.d.ts","sourceRoot":"","sources":["../../../src/agent/google/drive.ts"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,IAAI,IAAI,CA2CzC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Google Drive tools: list files. Use connection_id from list_integrations_connections (provider drive).
3
+ */
4
+ import { registerTool } from '../tools.js';
5
+ import { getConnectionToken } from './get-token.js';
6
+ const DRIVE_API = 'https://www.googleapis.com/drive/v3';
7
+ export function registerDriveTools() {
8
+ registerTool({
9
+ name: 'google_drive_list_files',
10
+ description: 'List files in Google Drive. Use connection_id from list_integrations_connections (provider drive). Optional folder (parent) and page size. Returns id, name, mimeType, webViewLink.',
11
+ profile: 'full',
12
+ parameters: {
13
+ type: 'object',
14
+ properties: {
15
+ connection_id: { type: 'string', description: 'Drive connection ID from list_integrations_connections' },
16
+ page_size: { type: 'number', description: 'Max files to return (default 10, max 100)' },
17
+ q: { type: 'string', description: 'Drive query (e.g. "root" in parents, mimeType, name contains). Optional.' },
18
+ order_by: { type: 'string', description: 'Order by (e.g. modifiedTime desc, name). Optional.' },
19
+ },
20
+ required: ['connection_id'],
21
+ },
22
+ execute: async (args) => {
23
+ const connectionId = args.connection_id;
24
+ const pageSize = Math.min(Math.max(Number(args.page_size) || 10, 1), 100);
25
+ const q = typeof args.q === 'string' ? args.q.trim() : undefined;
26
+ const orderBy = typeof args.order_by === 'string' ? args.order_by.trim() : undefined;
27
+ const tokenResult = await getConnectionToken(connectionId);
28
+ if ('error' in tokenResult)
29
+ return { error: tokenResult.error };
30
+ const params = new URLSearchParams({
31
+ pageSize: String(pageSize),
32
+ fields: 'files(id,name,mimeType,webViewLink,modifiedTime,size)',
33
+ });
34
+ if (q)
35
+ params.set('q', q);
36
+ if (orderBy)
37
+ params.set('orderBy', orderBy);
38
+ const res = await fetch(`${DRIVE_API}/files?${params}`, {
39
+ headers: { Authorization: `Bearer ${tokenResult.accessToken}` },
40
+ });
41
+ if (!res.ok) {
42
+ const text = await res.text();
43
+ return { error: `Drive API: ${res.status} ${text.slice(0, 300)}` };
44
+ }
45
+ const data = (await res.json());
46
+ const files = data.files ?? [];
47
+ return { files, count: files.length };
48
+ },
49
+ });
50
+ }
51
+ //# sourceMappingURL=drive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drive.js","sourceRoot":"","sources":["../../../src/agent/google/drive.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,SAAS,GAAG,qCAAqC,CAAC;AAExD,MAAM,UAAU,kBAAkB;IAChC,YAAY,CAAC;QACX,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EACT,qLAAqL;QACvL,OAAO,EAAE,MAAM;QACf,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wDAAwD,EAAE;gBACxG,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;gBACvF,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0EAA0E,EAAE;gBAC9G,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oDAAoD,EAAE;aAChG;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACtB,MAAM,YAAY,GAAG,IAAI,CAAC,aAAuB,CAAC;YAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC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CAAC;YACpK,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC/B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QACxC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare function getConnectionToken(connectionId: string): Promise<{
2
+ accessToken: string;
3
+ provider: string;
4
+ } | {
5
+ error: string;
6
+ }>;
7
+ //# sourceMappingURL=get-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-token.d.ts","sourceRoot":"","sources":["../../../src/agent/google/get-token.ts"],"names":[],"mappings":"AAKA,wBAAsB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CACnE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CACpB,CAwBA"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Get an access token for an integrations connection. Used by Google (Gmail, Calendar, etc.) tools.
3
+ */
4
+ import { config } from '../../config.js';
5
+ export async function getConnectionToken(connectionId) {
6
+ const base = config.integrationsUrl?.replace(/\/$/, '');
7
+ if (!base)
8
+ return { error: 'INTEGRATIONS_URL is not set' };
9
+ const id = String(connectionId).trim();
10
+ if (!id)
11
+ return { error: 'connection_id is required' };
12
+ try {
13
+ const res = await fetch(`${base}/connections/${encodeURIComponent(id)}/use`, { method: 'POST' });
14
+ if (!res.ok) {
15
+ const text = await res.text();
16
+ let err = `Integrations: ${res.status}`;
17
+ try {
18
+ const j = JSON.parse(text);
19
+ if (j.error)
20
+ err = j.error;
21
+ }
22
+ catch {
23
+ if (text)
24
+ err = text.slice(0, 200);
25
+ }
26
+ return { error: err };
27
+ }
28
+ const data = (await res.json());
29
+ if (!data.accessToken)
30
+ return { error: 'No access token in response' };
31
+ return { accessToken: data.accessToken, provider: data.provider ?? 'unknown' };
32
+ }
33
+ catch (e) {
34
+ return { error: e.message };
35
+ }
36
+ }
37
+ //# sourceMappingURL=get-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-token.js","sourceRoot":"","sources":["../../../src/agent/google/get-token.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,YAAoB;IAI3D,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;IAC3D,MAAM,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC;IACvD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,gBAAgB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACjG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,GAAG,GAAG,iBAAiB,GAAG,CAAC,MAAM,EAAE,CAAC;YACxC,IAAI,CAAC;gBACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAC;gBACjD,IAAI,CAAC,CAAC,KAAK;oBAAE,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,IAAI;oBAAE,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACrC,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAgD,CAAC;QAC/E,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;QACvE,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE,CAAC;IACjF,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAE,CAAC;IACzC,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerGmailTools(): void;
2
+ //# sourceMappingURL=gmail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmail.d.ts","sourceRoot":"","sources":["../../../src/agent/google/gmail.ts"],"names":[],"mappings":"AAgCA,wBAAgB,kBAAkB,IAAI,IAAI,CAgHzC"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Google Gmail tools: send email, list messages. Use connection_id from list_integrations_connections (provider gmail).
3
+ */
4
+ import { registerTool } from '../tools.js';
5
+ import { getConnectionToken } from './get-token.js';
6
+ const GMAIL_API = 'https://gmail.googleapis.com/gmail/v1/users/me';
7
+ function base64UrlEncode(raw) {
8
+ return Buffer.from(raw, 'utf8')
9
+ .toString('base64')
10
+ .replace(/\+/g, '-')
11
+ .replace(/\//g, '_')
12
+ .replace(/=+$/, '');
13
+ }
14
+ /** Build RFC 2822 message and return base64url-encoded raw for Gmail API. */
15
+ function buildSendRaw(to, subject, body, cc, bcc) {
16
+ const lines = [
17
+ `To: ${to}`,
18
+ `Subject: ${subject.replace(/\r?\n/g, ' ')}`,
19
+ 'Content-Type: text/plain; charset=UTF-8',
20
+ 'MIME-Version: 1.0',
21
+ '',
22
+ body.replace(/\r\n/g, '\n'),
23
+ ];
24
+ if (cc)
25
+ lines.splice(2, 0, `Cc: ${cc}`);
26
+ if (bcc)
27
+ lines.splice(2, 0, `Bcc: ${bcc}`);
28
+ const rfc2822 = lines.join('\r\n');
29
+ return base64UrlEncode(rfc2822);
30
+ }
31
+ export function registerGmailTools() {
32
+ registerTool({
33
+ name: 'google_gmail_send',
34
+ description: 'Send an email via a connected Gmail account. Use connection_id from list_integrations_connections (provider gmail). Requires Gmail send scope.',
35
+ profile: 'full',
36
+ parameters: {
37
+ type: 'object',
38
+ properties: {
39
+ connection_id: { type: 'string', description: 'Gmail connection ID from list_integrations_connections' },
40
+ to: { type: 'string', description: 'Recipient email address' },
41
+ subject: { type: 'string', description: 'Email subject' },
42
+ body: { type: 'string', description: 'Plain text body' },
43
+ cc: { type: 'string', description: 'CC addresses (comma-separated). Optional.' },
44
+ bcc: { type: 'string', description: 'BCC addresses (comma-separated). Optional.' },
45
+ },
46
+ required: ['connection_id', 'to', 'subject'],
47
+ },
48
+ execute: async (args) => {
49
+ const connectionId = args.connection_id;
50
+ const to = String(args.to ?? '').trim();
51
+ const subject = String(args.subject ?? '').trim();
52
+ const body = String(args.body ?? '').trim();
53
+ const cc = typeof args.cc === 'string' ? args.cc.trim() : undefined;
54
+ const bcc = typeof args.bcc === 'string' ? args.bcc.trim() : undefined;
55
+ if (!to)
56
+ return { error: 'to is required' };
57
+ const tokenResult = await getConnectionToken(connectionId);
58
+ if ('error' in tokenResult)
59
+ return { error: tokenResult.error };
60
+ const raw = buildSendRaw(to, subject, body, cc, bcc);
61
+ const res = await fetch(`${GMAIL_API}/messages/send`, {
62
+ method: 'POST',
63
+ headers: {
64
+ Authorization: `Bearer ${tokenResult.accessToken}`,
65
+ 'Content-Type': 'application/json',
66
+ },
67
+ body: JSON.stringify({ raw }),
68
+ });
69
+ if (!res.ok) {
70
+ const text = await res.text();
71
+ return { error: `Gmail API: ${res.status} ${text.slice(0, 300)}` };
72
+ }
73
+ const data = (await res.json());
74
+ return { success: true, messageId: data.id, threadId: data.threadId };
75
+ },
76
+ });
77
+ registerTool({
78
+ name: 'google_gmail_list_messages',
79
+ description: 'List Gmail messages (inbox or search). Use connection_id from list_integrations_connections (provider gmail). Returns id, snippet, subject, from, date for each message. Use for summarising email or finding recent messages.',
80
+ profile: 'full',
81
+ parameters: {
82
+ type: 'object',
83
+ properties: {
84
+ connection_id: { type: 'string', description: 'Gmail connection ID from list_integrations_connections' },
85
+ max_results: { type: 'number', description: 'Max messages to return (default 10, max 50)' },
86
+ q: { type: 'string', description: 'Gmail search query (e.g. in:inbox, from:someone@example.com, newer_than:7d). Optional.' },
87
+ },
88
+ required: ['connection_id'],
89
+ },
90
+ execute: async (args) => {
91
+ const connectionId = args.connection_id;
92
+ const maxResults = Math.min(Math.max(Number(args.max_results) || 10, 1), 50);
93
+ const q = typeof args.q === 'string' ? args.q.trim() : undefined;
94
+ const tokenResult = await getConnectionToken(connectionId);
95
+ if ('error' in tokenResult)
96
+ return { error: tokenResult.error };
97
+ const listParams = new URLSearchParams({ maxResults: String(maxResults) });
98
+ if (q)
99
+ listParams.set('q', q);
100
+ const listRes = await fetch(`${GMAIL_API}/messages?${listParams}`, {
101
+ headers: { Authorization: `Bearer ${tokenResult.accessToken}` },
102
+ });
103
+ if (!listRes.ok) {
104
+ const text = await listRes.text();
105
+ return { error: `Gmail API list: ${listRes.status} ${text.slice(0, 300)}` };
106
+ }
107
+ const listData = (await listRes.json());
108
+ const messages = listData.messages ?? [];
109
+ if (messages.length === 0)
110
+ return { messages: [], count: 0 };
111
+ const results = [];
112
+ for (const m of messages.slice(0, maxResults)) {
113
+ const metaParams = new URLSearchParams({ format: 'metadata' });
114
+ ['Subject', 'From', 'Date'].forEach((h) => metaParams.append('metadataHeaders', h));
115
+ const getRes = await fetch(`${GMAIL_API}/messages/${m.id}?${metaParams}`, {
116
+ headers: { Authorization: `Bearer ${tokenResult.accessToken}` },
117
+ });
118
+ if (!getRes.ok) {
119
+ results.push({ id: m.id, threadId: m.threadId });
120
+ continue;
121
+ }
122
+ const msg = (await getRes.json());
123
+ const headers = msg.payload?.headers ?? [];
124
+ const get = (name) => headers.find((h) => h.name.toLowerCase() === name.toLowerCase())?.value;
125
+ results.push({
126
+ id: m.id,
127
+ threadId: m.threadId,
128
+ snippet: msg.snippet,
129
+ subject: get('Subject'),
130
+ from: get('From'),
131
+ date: get('Date'),
132
+ });
133
+ }
134
+ return { messages: results, count: results.length };
135
+ },
136
+ });
137
+ }
138
+ //# sourceMappingURL=gmail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmail.js","sourceRoot":"","sources":["../../../src/agent/google/gmail.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,SAAS,GAAG,gDAAgD,CAAC;AAEnE,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC;SAC5B,QAAQ,CAAC,QAAQ,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,6EAA6E;AAC7E,SAAS,YAAY,CAAC,EAAU,EAAE,OAAe,EAAE,IAAY,EAAE,EAAW,EAAE,GAAY;IACxF,MAAM,KAAK,GAAa;QACtB,OAAO,EAAE,EAAE;QACX,YAAY,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;QAC5C,yCAAyC;QACzC,mBAAmB;QACnB,EAAE;QACF,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;KAC5B,CAAC;IACF,IAAI,EAAE;QAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,C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
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/google/index.ts"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Google integration tools: Gmail, Calendar, Drive. All use connection_id from
3
+ * list_integrations_connections (provider gmail / calendar / drive). Requires INTEGRATIONS_URL.
4
+ */
5
+ import { registerGmailTools } from './gmail.js';
6
+ import { registerCalendarTools } from './calendar.js';
7
+ import { registerDriveTools } from './drive.js';
8
+ export function registerGoogleTools() {
9
+ registerGmailTools();
10
+ registerCalendarTools();
11
+ registerDriveTools();
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agent/google/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,UAAU,mBAAmB;IACjC,kBAAkB,EAAE,CAAC;IACrB,qBAAqB,EAAE,CAAC;IACxB,kBAAkB,EAAE,CAAC;AACvB,CAAC"}