@taodigital/app-brain 1.2.1 → 1.2.2

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.
@@ -2547,11 +2547,11 @@ export declare const AppBrain: {
2547
2547
  dataRetentionDays: number;
2548
2548
  }>;
2549
2549
  getTenantProxyConfig(tenantId: string): Promise<{
2550
- mode: "none" | "auto" | "custom";
2550
+ mode: "none" | "auto" | "custom" | "agent";
2551
2551
  proxyUrl?: string;
2552
2552
  } | null>;
2553
2553
  saveTenantProxyConfig(tenantId: string, data: {
2554
- mode: "none" | "auto" | "custom";
2554
+ mode: "none" | "auto" | "custom" | "agent";
2555
2555
  proxyUrl?: string | null;
2556
2556
  }): Promise<{
2557
2557
  tenantId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taodigital/app-brain",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -330,7 +330,7 @@ async function gdriveUploadBuffer(creds: Record<string, string>, buffer: Buffer,
330
330
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': `multipart/related; boundary=${boundary}` },
331
331
  body: full,
332
332
  });
333
- if (!res.ok) throw new Error(`GDrive upload failed: ${await res.text()}`);
333
+ if (!res.ok) throw new Error(`GDrive upload failed: HTTP ${res.status}`);
334
334
  return ((await res.json()) as any).id as string;
335
335
  }
336
336
 
@@ -352,7 +352,7 @@ async function dropboxUploadBuffer(creds: Record<string, string>, buffer: Buffer
352
352
  },
353
353
  body: new Uint8Array(buffer),
354
354
  });
355
- if (!res.ok) throw new Error(`Dropbox upload failed: ${await res.text()}`);
355
+ if (!res.ok) throw new Error(`Dropbox upload failed: HTTP ${res.status}`);
356
356
  return dropboxPath;
357
357
  }
358
358
 
package/src/repository.ts CHANGED
@@ -5238,7 +5238,7 @@ export const AppBrain = {
5238
5238
 
5239
5239
  // ── Workspace-level Proxy config ─────────────────────────────────────────────
5240
5240
 
5241
- async getTenantProxyConfig(tenantId: string): Promise<{ mode: 'none' | 'auto' | 'custom'; proxyUrl?: string } | null> {
5241
+ async getTenantProxyConfig(tenantId: string): Promise<{ mode: 'none' | 'auto' | 'custom' | 'agent'; proxyUrl?: string } | null> {
5242
5242
  const setting = await withTenant(tenantId, (tx) =>
5243
5243
  tx.tenantSetting.findUnique({ where: { tenantId_category: { tenantId, category: 'PROXY' } } })
5244
5244
  );
@@ -5250,7 +5250,7 @@ export const AppBrain = {
5250
5250
  };
5251
5251
  },
5252
5252
 
5253
- async saveTenantProxyConfig(tenantId: string, data: { mode: 'none' | 'auto' | 'custom'; proxyUrl?: string | null }) {
5253
+ async saveTenantProxyConfig(tenantId: string, data: { mode: 'none' | 'auto' | 'custom' | 'agent'; proxyUrl?: string | null }) {
5254
5254
  const config: Record<string, any> = { mode: data.mode };
5255
5255
  if (data.mode === 'custom' && data.proxyUrl) config.proxyUrl_enc = encrypt(data.proxyUrl);
5256
5256
  return withTenant(tenantId, (tx) =>