clementine-agent 1.11.1 → 1.11.3

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.
@@ -25849,9 +25849,10 @@ async function saveComposioApiKey() {
25849
25849
 
25850
25850
  async function connectComposio(slug) {
25851
25851
  try {
25852
- var res = await fetch('/api/composio/toolkits/' + encodeURIComponent(slug) + '/authorize', {
25852
+ // Use apiFetch (not raw fetch) so the Authorization: Bearer header is
25853
+ // attached — the /api/* middleware rejects unauth'd POSTs with 401.
25854
+ var res = await apiFetch('/api/composio/toolkits/' + encodeURIComponent(slug) + '/authorize', {
25853
25855
  method: 'POST',
25854
- credentials: 'same-origin',
25855
25856
  headers: { 'content-type': 'application/json' },
25856
25857
  body: JSON.stringify({}),
25857
25858
  });
@@ -25884,9 +25885,8 @@ async function connectComposio(slug) {
25884
25885
  async function disconnectComposio(slug, connectionId) {
25885
25886
  if (!confirm('Disconnect this ' + slug + ' account?')) return;
25886
25887
  try {
25887
- var res = await fetch('/api/composio/toolkits/' + encodeURIComponent(slug) + '/disconnect', {
25888
+ var res = await apiFetch('/api/composio/toolkits/' + encodeURIComponent(slug) + '/disconnect', {
25888
25889
  method: 'POST',
25889
- credentials: 'same-origin',
25890
25890
  headers: { 'content-type': 'application/json' },
25891
25891
  body: JSON.stringify({ connectionId: connectionId }),
25892
25892
  });
@@ -52,7 +52,7 @@ export const CURATED_TOOLKITS = [
52
52
  { slug: 'supabase', displayName: 'Supabase', authMode: 'managed' },
53
53
  { slug: 'linkedin', displayName: 'LinkedIn', authMode: 'managed' },
54
54
  { slug: 'outlook', displayName: 'Outlook', authMode: 'managed' },
55
- { slug: 'onedrive', displayName: 'OneDrive', authMode: 'managed' },
55
+ { slug: 'one_drive', displayName: 'OneDrive', authMode: 'managed' },
56
56
  { slug: 'zoom', displayName: 'Zoom', authMode: 'managed' },
57
57
  { slug: 'twitter', displayName: 'Twitter / X', authMode: 'byo' },
58
58
  ];
@@ -431,7 +431,16 @@ _opts) {
431
431
  }
432
432
  catch (err) {
433
433
  const status = err?.status;
434
+ const message = err?.message ?? '';
434
435
  logger.error({ err, slug, userId, status, step: 'toolkits.authorize' }, 'Composio authorize failed');
436
+ // 404 + "Couldn't fetch Toolkit with slug" = our curated list has a typo
437
+ // or Composio renamed/removed the slug. Surface a clear, actionable
438
+ // message instead of the raw API error.
439
+ if (message.includes("fetch Toolkit with slug") || status === 404) {
440
+ throw new Error(`Toolkit "${slug}" was not found in Composio's catalog. ` +
441
+ `The slug may have been renamed or removed. Try the closest match at ` +
442
+ `https://app.composio.dev/apps, or report this to the Clementine maintainer.`);
443
+ }
435
444
  // Translate the documented "no managed auth available" error codes into
436
445
  // the friendly BYO-setup banner the dashboard already renders.
437
446
  if (status === 400 || status === 401 || status === 403) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.11.1",
3
+ "version": "1.11.3",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",