Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ UTOPIA_OPEN_REGISTRATION=true
# 与 Utopia 共用一个 client 的就写 Utopia 自己的 client id。留空 = 不开放这个端点。
# 只认本人绑定过的身份,不建号、不自动绑定;每个 ID token 只能换一次。
# UTOPIA_OIDC_EXCHANGE_AUDIENCES=
# Google Drive 来源(0068):一个人用自己的 Google 账号连接,按他选的文件夹同步。
# 在 Google Cloud 建一个「Web 应用」类型的 OAuth 客户端,回调地址填下面这个,并启用 Drive API。
# 三项都填才开放;与上面 SSO 的客户端是两回事(权限范围不同)。drive.readonly 是受限范围:
# Workspace 内部应用不需要 Google 审核,对外发布的需要。
# UTOPIA_GOOGLE_DRIVE_CLIENT_ID=
# UTOPIA_GOOGLE_DRIVE_CLIENT_SECRET=
# UTOPIA_GOOGLE_DRIVE_REDIRECT_URI=https://your-deployment/api/v1/google-drive/callback
# 数据库连接池上限。缺省 32,与 worker 并发的缺省对齐。
# 池子小于并发时症状是请求变慢、而不是任何一处说"池子不够"——调高 worker
# 并发时一并考虑这里,也别超过 Postgres 自己的 max_connections(默认 100)。
Expand Down
2 changes: 1 addition & 1 deletion crates/utopia-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct ManifestDataDir {
/// not a side effect of a code change.
// 是迁移文件的**个数**,不是最大的编号(守卫 `schema_version_policy_compares_against_current`
// 按个数比):编号有空缺时两者不同——0071 由一个开放 PR 占着,0072 先落,个数是 71
const CURRENT_SCHEMA_VERSION: u32 = 100;
const CURRENT_SCHEMA_VERSION: u32 = 101;

fn main() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
Expand Down
4 changes: 4 additions & 0 deletions crates/utopia-core/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ pub const SOURCE_SECRET_KEYS: &[&str] = &[
"secret_access_key",
"account_key",
"service_account_key",
// Google Drive 的 OAuth 刷新令牌(0068):能换出那个人整个 Drive 的只读权限
"refresh_token",
];

impl Source {
Expand Down Expand Up @@ -277,6 +279,8 @@ pub enum SourceKind {
Gcs,
Webdav,
Notion,
/// 一个人授权、按他选的文件夹同步(0068)
GoogleDrive,
Api,
/// 推送的不是文档而是陈述本身(0054):请求体就是开放抽取契约,抽取不问模型
Statements,
Expand Down
Loading
Loading