UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

36 lines • 2 kB
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. ========= // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ========= Copyright 2026 @ Strukto.AI All Rights Reserved. ========= import { timeoutShape } from "../../core/api/config.js"; import { secretSchema, secretStr, z } from "../secrets.js"; export const DropboxConfig = z.object({ ...timeoutShape, clientId: z.string().describe('Dropbox app key.'), clientSecret: secretStr() .optional() .describe('Dropbox app secret. Omit it for a PKCE client, as in the browser.'), refreshToken: secretStr().describe('Long-lived OAuth refresh token; mirage mints short-lived access tokens from it.'), rootPath: z .string() .optional() .describe('Dropbox folder the mount uses as its root, such as `/Projects`; unset or `/` is the account root. `..` segments are rejected.'), endpoint: z .string() .optional() .describe("Base URL that replaces Dropbox's OAuth, API and content hosts, such as a test server. Unset uses Dropbox's hosts."), // Declared so parse keeps it, marked secret so no snapshot carries it. refreshFn: secretSchema(z.custom((value) => typeof value === 'function')) .optional() .describe("Function that takes the refresh token and returns `{ accessToken, expiresIn }` (seconds), called instead of Dropbox's token endpoint, for example so the app secret stays on a backend."), }); //# sourceMappingURL=config.js.map