-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.sample
More file actions
64 lines (56 loc) · 3.53 KB
/
Copy path.env.sample
File metadata and controls
64 lines (56 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Base URL of the cbdb-online-main-server instance to target.
# Production: https://input.cbdb.fas.harvard.edu
# Local dev: http://localhost:8000
CBDB_API_BASE_URL=https://input.cbdb.fas.harvard.edu
# Sanctum Personal Access Token, created manually by logging into the web UI at
# {CBDB_API_BASE_URL}/profile and clicking "Create new token".
# This agent never creates, rotates, or requests tokens itself. Never commit a real
# value here.
CBDB_API_TOKEN=
# Safety switch: when true, the client builds and locally logs requests but does not
# send mutating calls (create/mutate/delete) to the server. GET calls still go through.
# Defaults to true so a fresh checkout can never accidentally write to production.
CBDB_DRY_RUN=true
# Second safety gate. Whenever CBDB_DRY_RUN=false, this value must equal the EXACT
# current value of CBDB_API_BASE_URL above (not just "true") before any mutating call
# will be sent. This is intentionally URL-pinned, not a boolean: if you change
# CBDB_API_BASE_URL (e.g. from a local dev server to production) this value stops
# matching and the gate re-locks automatically, so switching targets always requires
# a fresh, explicit confirmation of the NEW host - not just "any host". See AGENTS.md.
CBDB_CONFIRM_PROD=
# Self-imposed client-side rate limit (requests per minute), independent of whatever
# the server enforces. See docs/00-target-system-brief.md section 6.
CBDB_MAX_REQUESTS_PER_MINUTE=60
# Directory for the agent's own local audit log (JSONL, one file per day). This is
# independent of and in addition to the server's own audit_log table.
CBDB_LOCAL_AUDIT_LOG_DIR=./logs
# Absolute path to a local clone of the TARGET SYSTEM's source repo,
# github.com/cbdb-project/cbdb-online-main-server - i.e. the input system that
# CBDB_API_BASE_URL points at, not this agent. Optional - leave empty if you have no
# local checkout. It is only ever read (source, API.md) to verify endpoint/field
# behaviour offline; this agent never modifies that repo - it is the checkout
# docs/00-target-system-brief.md was written from. Point at the folder itself, not a
# file inside it:
# Windows: C:/Users/<you>/Documents/GitHub/cbdb-online-main-server
# macOS: /Users/<you>/GitHub/cbdb-online-main-server
# Backslashes and a trailing slash are both fine, and a path containing spaces needs
# no quoting in .env.
CBDB_ONLINE_MAIN_SERVER_REPO_DIR=
# --- Weekly CBDB SQLite snapshot -------------------------------------------------
# The review page shows a human-readable name next to every code (office, address,
# book title, reign period...). Resolving those - especially the full address chain
# through ADDR_BELONGS_DATA and the OFFICE_TYPE_TREE hierarchy - is one SQL query
# against CBDB's own weekly SQLite build, versus dozens of rate-limited HTTP calls.
#
# It is downloaded on demand (~132 MB compressed, ~557 MB on disk) from
# https://huggingface.co/datasets/cbdb/cbdb-sqlite and verified against the sha256
# in its sidecar metadata. Default location: data/cbdb-sqlite/ inside this repo,
# which is gitignored. Set this to keep it somewhere else - e.g. outside a
# OneDrive/Dropbox-synced folder, so half a gigabyte isn't re-uploaded weekly.
CBDB_SQLITE_DIR=
# Set to false to never download it. Everything still works: code labels fall back
# to the public lookup endpoints, with less detail.
# IMPORTANT: the snapshot is a WEEKLY BUILD, not the live database. It is only ever
# used for reference/code tables - never for c_personid allocation, never for a
# "does this row already exist" check before a write. See AGENTS.md.
CBDB_SQLITE_AUTODOWNLOAD=true