citadel-archive 0.1.0__tar.gz
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.
- citadel_archive-0.1.0/.env.example +242 -0
- citadel_archive-0.1.0/.github/workflows/publish.yml +47 -0
- citadel_archive-0.1.0/.gitignore +23 -0
- citadel_archive-0.1.0/.mcp.json +11 -0
- citadel_archive-0.1.0/.mcp.json.example +11 -0
- citadel_archive-0.1.0/.python-version +1 -0
- citadel_archive-0.1.0/CHANGELOG.md +49 -0
- citadel_archive-0.1.0/CONTEXT.md +278 -0
- citadel_archive-0.1.0/NOTICE.md +6 -0
- citadel_archive-0.1.0/PKG-INFO +229 -0
- citadel_archive-0.1.0/PUBLISHING.md +63 -0
- citadel_archive-0.1.0/README.md +200 -0
- citadel_archive-0.1.0/SECURITY.md +17 -0
- citadel_archive-0.1.0/SKILL.md +380 -0
- citadel_archive-0.1.0/brand.md +58 -0
- citadel_archive-0.1.0/docs/adr/0001-github-vault-backup-mirror.md +19 -0
- citadel_archive-0.1.0/docs/adr/0002-google-chat-app-auth-for-update-digests.md +15 -0
- citadel_archive-0.1.0/docs/adr/0003-seat-node-central-private-memory.md +27 -0
- citadel_archive-0.1.0/docs/adr/0004-linear-seat-scoped-mirror.md +24 -0
- citadel_archive-0.1.0/docs/adr/0005-self-evolving-memory-policy-gated-ingestion.md +89 -0
- citadel_archive-0.1.0/docs/adr/0006-agent-auth-and-onboarding.md +84 -0
- citadel_archive-0.1.0/docs/adr/0007-seat-capture-promotion-write-policy.md +142 -0
- citadel_archive-0.1.0/docs/adr-0007-shipping-plan.md +90 -0
- citadel_archive-0.1.0/docs/agent-access-model.md +286 -0
- citadel_archive-0.1.0/docs/architecture-deepening-opportunities.md +111 -0
- citadel_archive-0.1.0/docs/google-chat-organization-update-digest-plan.md +247 -0
- citadel_archive-0.1.0/docs/internal-update-agent-architecture.md +116 -0
- citadel_archive-0.1.0/docs/live-knowledge-graph-timeline.md +76 -0
- citadel_archive-0.1.0/docs/mcp/README.md +474 -0
- citadel_archive-0.1.0/docs/mcp/claude-code-hosted.mcp.json +11 -0
- citadel_archive-0.1.0/docs/mcp/codex-hosted.config.toml +24 -0
- citadel_archive-0.1.0/docs/mcp-safety-plan.md +280 -0
- citadel_archive-0.1.0/docs/mesh-architecture-research.md +254 -0
- citadel_archive-0.1.0/docs/mesh-design-lab.html +922 -0
- citadel_archive-0.1.0/docs/obsidian-integration-plan.md +288 -0
- citadel_archive-0.1.0/docs/onboarding/citadel-autosync-ides.md +72 -0
- citadel_archive-0.1.0/docs/onboarding/citadel-autosync.md +133 -0
- citadel_archive-0.1.0/docs/onboarding/teammate-rollout.md +206 -0
- citadel_archive-0.1.0/docs/operations.md +326 -0
- citadel_archive-0.1.0/docs/organization-vault-plan.md +217 -0
- citadel_archive-0.1.0/docs/phase-2-shipping-plan.md +201 -0
- citadel_archive-0.1.0/docs/private-github-sync-security.md +231 -0
- citadel_archive-0.1.0/docs/progress.md +754 -0
- citadel_archive-0.1.0/docs/public-and-private.md +90 -0
- citadel_archive-0.1.0/docs/team-share-smoke-test.md +96 -0
- citadel_archive-0.1.0/docs/vault-backup-mirror.md +118 -0
- citadel_archive-0.1.0/kb/__init__.py +29 -0
- citadel_archive-0.1.0/kb/access.py +693 -0
- citadel_archive-0.1.0/kb/backup_mirror.py +380 -0
- citadel_archive-0.1.0/kb/banner.py +69 -0
- citadel_archive-0.1.0/kb/capture.py +183 -0
- citadel_archive-0.1.0/kb/capture_config.py +151 -0
- citadel_archive-0.1.0/kb/capture_policy.py +77 -0
- citadel_archive-0.1.0/kb/cli.py +618 -0
- citadel_archive-0.1.0/kb/cognee_client.py +329 -0
- citadel_archive-0.1.0/kb/config.py +459 -0
- citadel_archive-0.1.0/kb/conflicts.py +341 -0
- citadel_archive-0.1.0/kb/filters.py +38 -0
- citadel_archive-0.1.0/kb/github_sync.py +643 -0
- citadel_archive-0.1.0/kb/google_chat.py +229 -0
- citadel_archive-0.1.0/kb/hooks/__init__.py +6 -0
- citadel_archive-0.1.0/kb/hooks/sync_push.py +451 -0
- citadel_archive-0.1.0/kb/hooks/sync_session.py +365 -0
- citadel_archive-0.1.0/kb/knowledge_mesh.py +138 -0
- citadel_archive-0.1.0/kb/learning.py +257 -0
- citadel_archive-0.1.0/kb/learning_agent.py +377 -0
- citadel_archive-0.1.0/kb/linear_sync.py +372 -0
- citadel_archive-0.1.0/kb/llm_enrichment.py +359 -0
- citadel_archive-0.1.0/kb/logging_utils.py +25 -0
- citadel_archive-0.1.0/kb/mcp_server.py +958 -0
- citadel_archive-0.1.0/kb/mesh.py +830 -0
- citadel_archive-0.1.0/kb/models.py +42 -0
- citadel_archive-0.1.0/kb/notification_gateways.py +33 -0
- citadel_archive-0.1.0/kb/obsidian_sync.py +525 -0
- citadel_archive-0.1.0/kb/onboard.py +214 -0
- citadel_archive-0.1.0/kb/organization_digest.py +300 -0
- citadel_archive-0.1.0/kb/promotion.py +470 -0
- citadel_archive-0.1.0/kb/repo_content_sync.py +488 -0
- citadel_archive-0.1.0/kb/repository_update.py +599 -0
- citadel_archive-0.1.0/kb/retry.py +151 -0
- citadel_archive-0.1.0/kb/security_scan.py +414 -0
- citadel_archive-0.1.0/kb/self_improve.py +281 -0
- citadel_archive-0.1.0/kb/server.py +3282 -0
- citadel_archive-0.1.0/kb/service.py +221 -0
- citadel_archive-0.1.0/kb/skills.py +144 -0
- citadel_archive-0.1.0/kb/source_search.py +144 -0
- citadel_archive-0.1.0/kb/static/app.js +3127 -0
- citadel_archive-0.1.0/kb/static/index.html +1291 -0
- citadel_archive-0.1.0/kb/static/login.js +30 -0
- citadel_archive-0.1.0/kb/static/styles.css +2257 -0
- citadel_archive-0.1.0/kb/static/vendor/force-graph.min.js +5 -0
- citadel_archive-0.1.0/kb/status.py +272 -0
- citadel_archive-0.1.0/kb/status_tui.py +125 -0
- citadel_archive-0.1.0/kb/tags.py +31 -0
- citadel_archive-0.1.0/plugins/citadel-archive-mcp/.codex-plugin/plugin.json +45 -0
- citadel_archive-0.1.0/plugins/citadel-archive-mcp/.mcp.json +20 -0
- citadel_archive-0.1.0/plugins/citadel-archive-mcp/README.md +44 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/README.md +28 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/esbuild.config.mjs +29 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/main.js +2 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/manifest.json +10 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/package-lock.json +638 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/package.json +17 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/auth.ts +14 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/citadelClient.ts +77 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/commands.ts +46 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/main.ts +59 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/settings.ts +67 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/sync/frontmatter.ts +19 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/sync/localIndex.ts +17 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/sync/syncEngine.ts +69 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/sync/vaultScanner.ts +8 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/types.ts +63 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/ui/CitadelView.ts +77 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/src/ui/SearchModal.ts +37 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/styles.css +23 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/tsconfig.json +14 -0
- citadel_archive-0.1.0/plugins/obsidian-citadel/versions.json +3 -0
- citadel_archive-0.1.0/pyproject.toml +64 -0
- citadel_archive-0.1.0/railway.toml +14 -0
- citadel_archive-0.1.0/requirements.txt +8 -0
- citadel_archive-0.1.0/scripts/__init__.py +1 -0
- citadel_archive-0.1.0/scripts/run_backup_mirror.py +157 -0
- citadel_archive-0.1.0/scripts/run_github_sync.py +292 -0
- citadel_archive-0.1.0/scripts/run_railway.py +377 -0
- citadel_archive-0.1.0/scripts/run_self_improve.py +165 -0
- citadel_archive-0.1.0/skills/citadel-data-boundary/SKILL.md +47 -0
- citadel_archive-0.1.0/skills/citadel-mcp-connector/SKILL.md +245 -0
- citadel_archive-0.1.0/skills/citadel-onboard/SKILL.md +103 -0
- citadel_archive-0.1.0/skills/citadel-proactive-ingest/README.md +151 -0
- citadel_archive-0.1.0/skills/citadel-proactive-ingest/SKILL.md +257 -0
- citadel_archive-0.1.0/skills/citadel-vault/SKILL.md +192 -0
- citadel_archive-0.1.0/skills-lock.json +11 -0
- citadel_archive-0.1.0/tasks.md +475 -0
- citadel_archive-0.1.0/tests/test_access.py +351 -0
- citadel_archive-0.1.0/tests/test_backup_mirror.py +172 -0
- citadel_archive-0.1.0/tests/test_backup_mirror_job.py +117 -0
- citadel_archive-0.1.0/tests/test_banner.py +40 -0
- citadel_archive-0.1.0/tests/test_capture.py +203 -0
- citadel_archive-0.1.0/tests/test_capture_config.py +166 -0
- citadel_archive-0.1.0/tests/test_capture_policy.py +60 -0
- citadel_archive-0.1.0/tests/test_client_boundary.py +56 -0
- citadel_archive-0.1.0/tests/test_cognee_client.py +367 -0
- citadel_archive-0.1.0/tests/test_config.py +33 -0
- citadel_archive-0.1.0/tests/test_conflicts.py +215 -0
- citadel_archive-0.1.0/tests/test_filters.py +28 -0
- citadel_archive-0.1.0/tests/test_github_sync.py +412 -0
- citadel_archive-0.1.0/tests/test_github_sync_job.py +192 -0
- citadel_archive-0.1.0/tests/test_google_chat.py +129 -0
- citadel_archive-0.1.0/tests/test_headless.py +107 -0
- citadel_archive-0.1.0/tests/test_knowledge_mesh.py +128 -0
- citadel_archive-0.1.0/tests/test_learning.py +188 -0
- citadel_archive-0.1.0/tests/test_learning_agent.py +272 -0
- citadel_archive-0.1.0/tests/test_linear_sync.py +165 -0
- citadel_archive-0.1.0/tests/test_llm_enrichment.py +281 -0
- citadel_archive-0.1.0/tests/test_mcp_server.py +348 -0
- citadel_archive-0.1.0/tests/test_mesh.py +302 -0
- citadel_archive-0.1.0/tests/test_obsidian_sync.py +149 -0
- citadel_archive-0.1.0/tests/test_onboard.py +230 -0
- citadel_archive-0.1.0/tests/test_organization_digest.py +372 -0
- citadel_archive-0.1.0/tests/test_promotion.py +175 -0
- citadel_archive-0.1.0/tests/test_railway_entrypoint.py +337 -0
- citadel_archive-0.1.0/tests/test_repo_content_sync.py +179 -0
- citadel_archive-0.1.0/tests/test_repository_update.py +196 -0
- citadel_archive-0.1.0/tests/test_retry.py +188 -0
- citadel_archive-0.1.0/tests/test_security_scan.py +156 -0
- citadel_archive-0.1.0/tests/test_self_improve.py +220 -0
- citadel_archive-0.1.0/tests/test_server.py +2826 -0
- citadel_archive-0.1.0/tests/test_service.py +240 -0
- citadel_archive-0.1.0/tests/test_skills.py +210 -0
- citadel_archive-0.1.0/tests/test_source_search.py +70 -0
- citadel_archive-0.1.0/tests/test_status.py +206 -0
- citadel_archive-0.1.0/tests/test_status_tui.py +113 -0
- citadel_archive-0.1.0/tests/test_sync_push.py +236 -0
- citadel_archive-0.1.0/tests/test_sync_session.py +246 -0
- citadel_archive-0.1.0/tests/test_tags.py +17 -0
- citadel_archive-0.1.0/uv.lock +5112 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Citadel wrapper config
|
|
2
|
+
# Structured logging level: DEBUG, INFO, WARNING, ERROR, or CRITICAL.
|
|
3
|
+
CITADEL_LOG_LEVEL=INFO
|
|
4
|
+
# Retry policy for outbound calls (GitHub, Google Chat, LLM digesting).
|
|
5
|
+
# Exponential backoff with full jitter; Retry-After headers are honored.
|
|
6
|
+
CITADEL_RETRY_MAX_ATTEMPTS=3
|
|
7
|
+
CITADEL_RETRY_BASE_DELAY_SECONDS=0.5
|
|
8
|
+
CITADEL_RETRY_MAX_DELAY_SECONDS=8.0
|
|
9
|
+
CITADEL_TENANT_ID=personal
|
|
10
|
+
CITADEL_USER_ID=local
|
|
11
|
+
CITADEL_ADMIN_KEY=
|
|
12
|
+
CITADEL_WRITER_KEYS=
|
|
13
|
+
CITADEL_READER_KEYS=
|
|
14
|
+
CITADEL_ACCESS_STORE_PATH=/data/.citadel/access.json
|
|
15
|
+
CITADEL_AUDIT_MAX_EVENTS=1000
|
|
16
|
+
# Knowledge Conflict store (visible disagreements; never silently overwritten).
|
|
17
|
+
CITADEL_CONFLICTS_STORE_PATH=/data/.citadel/conflicts.json
|
|
18
|
+
CITADEL_CONFLICTS_MAX_RECORDS=500
|
|
19
|
+
# Node cap for GET /api/mesh/graph (the real Cognee knowledge graph).
|
|
20
|
+
CITADEL_MESH_GRAPH_MAX_NODES=200
|
|
21
|
+
CITADEL_DEFAULT_DATASET=personal
|
|
22
|
+
# Dataset used when a /search request omits "dataset" (e.g. masumi-network).
|
|
23
|
+
# Leave empty to fall back to CITADEL_DEFAULT_DATASET and return a hint instead.
|
|
24
|
+
CITADEL_SEARCH_DEFAULT_DATASET=masumi-network
|
|
25
|
+
CITADEL_DEFAULT_SESSION=personal-session
|
|
26
|
+
CITADEL_DEFAULT_TAGS=personal
|
|
27
|
+
CITADEL_MIN_CHARS=3
|
|
28
|
+
CITADEL_EXCLUDE_PATTERNS=.git/*,.venv/*,__pycache__/*,node_modules/*
|
|
29
|
+
CITADEL_AUTO_IMPROVE=false
|
|
30
|
+
CITADEL_BUILD_GLOBAL_CONTEXT_INDEX=false
|
|
31
|
+
CITADEL_COGNEE_SEARCH_TYPE=CHUNKS
|
|
32
|
+
|
|
33
|
+
# Hosted MCP (mounted at /mcp). Forwarded calls hit the API in-process.
|
|
34
|
+
CITADEL_MCP_SELF_BASE_URL=http://127.0.0.1:8000
|
|
35
|
+
# Optional: pin Host/Origin allow-lists to enable DNS-rebinding protection.
|
|
36
|
+
# Leave empty for a token-authenticated public endpoint.
|
|
37
|
+
CITADEL_MCP_ALLOWED_HOSTS=
|
|
38
|
+
CITADEL_MCP_ALLOWED_ORIGINS=
|
|
39
|
+
|
|
40
|
+
# Local stdio MCP wrapper config.
|
|
41
|
+
CITADEL_HTTP_BASE_URL=http://localhost:8000
|
|
42
|
+
CITADEL_MCP_ACCESS_TOKEN=
|
|
43
|
+
CITADEL_MCP_DEFAULT_DATASET=masumi-network
|
|
44
|
+
CITADEL_MCP_MAX_INGEST_BYTES=200000
|
|
45
|
+
CITADEL_MCP_ALLOW_INSECURE_HTTP=false
|
|
46
|
+
|
|
47
|
+
# Railway run mode: web, pipeline (full scheduled run: GitHub org sync,
|
|
48
|
+
# skills refresh, self-improvement, backup mirror), evolve (6h self-evolving
|
|
49
|
+
# cycle, ADR-0005 step 3), or the single jobs learning-agent/github-sync and
|
|
50
|
+
# backup-mirror.
|
|
51
|
+
CITADEL_RUN_MODE=web
|
|
52
|
+
# Pipeline stage toggles. A failed stage never stops later stages; the run
|
|
53
|
+
# exits nonzero only when every enabled stage fails.
|
|
54
|
+
CITADEL_PIPELINE_GITHUB_SYNC_ENABLED=true
|
|
55
|
+
CITADEL_PIPELINE_REPO_CONTENT_SYNC_ENABLED=true
|
|
56
|
+
CITADEL_PIPELINE_SKILLS_REFRESH_ENABLED=true
|
|
57
|
+
CITADEL_PIPELINE_BACKUP_MIRROR_ENABLED=true
|
|
58
|
+
# Evolve cron stage toggles (CITADEL_RUN_MODE=evolve). Same fail-soft semantics
|
|
59
|
+
# as the pipeline: a failed stage never stops later stages and the run exits
|
|
60
|
+
# nonzero only when every enabled stage fails. The 6h cadence is an operator
|
|
61
|
+
# Railway-cron step, not code. Chain: github sync -> repo-content sync ->
|
|
62
|
+
# self-improve -> promotion -> cognify.
|
|
63
|
+
CITADEL_EVOLVE_GITHUB_SYNC_ENABLED=true
|
|
64
|
+
CITADEL_EVOLVE_REPO_CONTENT_SYNC_ENABLED=true
|
|
65
|
+
CITADEL_EVOLVE_SELF_IMPROVE_ENABLED=true
|
|
66
|
+
CITADEL_EVOLVE_PROMOTION_ENABLED=true
|
|
67
|
+
CITADEL_EVOLVE_COGNIFY_ENABLED=true
|
|
68
|
+
# Where the pipeline stores last-seen skill content hashes for change detection.
|
|
69
|
+
CITADEL_SKILLS_STATE_PATH=/data/.citadel/skills_catalog.json
|
|
70
|
+
|
|
71
|
+
# LLM-assisted chunking + enrichment in the Learning Process (OpenRouter).
|
|
72
|
+
# Disabled by default; on any failure ingestion falls back to deterministic
|
|
73
|
+
# paragraph chunking and never fails because of the LLM.
|
|
74
|
+
CITADEL_LLM_ENRICHMENT_ENABLED=true
|
|
75
|
+
# OpenRouter model for enrichment, self-improvement, and the digest default.
|
|
76
|
+
# This path calls OpenRouter's HTTP API directly (not litellm), so it uses the
|
|
77
|
+
# BARE OpenRouter id — do NOT add the openrouter/ prefix here (that is for LLM_MODEL).
|
|
78
|
+
CITADEL_LLM_MODEL=deepseek/deepseek-v4-flash
|
|
79
|
+
# Source material below this size is ingested as-is (chars).
|
|
80
|
+
CITADEL_LLM_ENRICHMENT_THRESHOLD_CHARS=4000
|
|
81
|
+
|
|
82
|
+
# Self-improvement loop (POST /api/learning-agent/optimize + pipeline stage).
|
|
83
|
+
# Strictly bounded and additive: re-tags/summarizes recent ingests, never deletes.
|
|
84
|
+
CITADEL_SELF_IMPROVE_ENABLED=false
|
|
85
|
+
CITADEL_SELF_IMPROVE_MAX_ITEMS=10
|
|
86
|
+
CITADEL_SELF_IMPROVE_DRY_RUN=false
|
|
87
|
+
# Optional: run the cron stage through the web service instead of in-process.
|
|
88
|
+
CITADEL_SELF_IMPROVE_ENDPOINT=
|
|
89
|
+
CITADEL_SELF_IMPROVE_ACCESS_KEY=
|
|
90
|
+
CITADEL_SELF_IMPROVE_TIMEOUT_SECONDS=600
|
|
91
|
+
CITADEL_GITHUB_ORG=masumi-network
|
|
92
|
+
CITADEL_GITHUB_SYNC_DATASET=masumi-network
|
|
93
|
+
CITADEL_GITHUB_SYNC_SESSION=masumi-github-daily
|
|
94
|
+
|
|
95
|
+
# Linear workspace sync (read-only fetch). Full workspace → Central
|
|
96
|
+
# (masumi-network); assignee issues mirrored into seat Nodes.
|
|
97
|
+
# A Linear personal API key with Read scope is sufficient (no Write/Admin).
|
|
98
|
+
# Run via admin API, CITADEL_RUN_MODE=linear-sync, or Railway cron.
|
|
99
|
+
CITADEL_LINEAR_API_KEY=
|
|
100
|
+
CITADEL_LINEAR_SYNC_DATASET=masumi-network
|
|
101
|
+
CITADEL_LINEAR_SYNC_SESSION=masumi-linear
|
|
102
|
+
CITADEL_LINEAR_SYNC_MAX_ISSUES=200
|
|
103
|
+
# Optional JSON map Linear user id → seat slug: {"user-uuid":"john"}
|
|
104
|
+
CITADEL_LINEAR_USER_MAP=
|
|
105
|
+
CITADEL_GITHUB_SYNC_STATE_PATH=/data/.citadel/github_sync_state.json
|
|
106
|
+
CITADEL_GITHUB_SYNC_MAX_REPOS=100
|
|
107
|
+
CITADEL_GITHUB_SYNC_MAX_EVENTS=50
|
|
108
|
+
CITADEL_GITHUB_SYNC_MAX_COMMITS_PER_REPO=5
|
|
109
|
+
CITADEL_GITHUB_SYNC_MAX_PULL_REQUESTS_PER_REPO=5
|
|
110
|
+
CITADEL_GITHUB_SYNC_INCLUDE_COMMITS=true
|
|
111
|
+
CITADEL_GITHUB_SYNC_RUN_IMPROVE=true
|
|
112
|
+
CITADEL_GITHUB_SYNC_INGEST_UNCHANGED=true
|
|
113
|
+
# Deep repository content sync (READMEs, skills, docs) for cognification.
|
|
114
|
+
CITADEL_REPO_CONTENT_SYNC_ENABLED=true
|
|
115
|
+
CITADEL_REPO_CONTENT_SYNC_DATASET=masumi-network
|
|
116
|
+
CITADEL_REPO_CONTENT_SYNC_SESSION=masumi-repo-content
|
|
117
|
+
CITADEL_REPO_CONTENT_SYNC_STATE_PATH=/data/.citadel/repo_content_sync_state.json
|
|
118
|
+
CITADEL_REPO_CONTENT_SYNC_REPOS=sokosumi,Sokosumi-MCP,sokosumi-cli,sokosumi-docs
|
|
119
|
+
CITADEL_REPO_CONTENT_SYNC_ROOT_PATHS=README.md,SKILL.md,CONTEXT.md
|
|
120
|
+
CITADEL_REPO_CONTENT_SYNC_TREE_PREFIXES=skills/,content/docs/,docs/,plugins/
|
|
121
|
+
CITADEL_REPO_CONTENT_SYNC_TREE_EXTENSIONS=.md,.mdx,.txt
|
|
122
|
+
CITADEL_REPO_CONTENT_SYNC_MAX_FILES_PER_REPO=40
|
|
123
|
+
CITADEL_REPO_CONTENT_SYNC_MAX_BYTES_PER_FILE=120000
|
|
124
|
+
CITADEL_REPO_CONTENT_SYNC_RUN_IMPROVE=true
|
|
125
|
+
# Run a Cognee improvement cycle after each teammate/agent contribution. Off by
|
|
126
|
+
# default: contributions are single small writes and improve is expensive.
|
|
127
|
+
CITADEL_CONTRIBUTE_RUN_IMPROVE=false
|
|
128
|
+
# Private repositories are sensitive even when only metadata is fetched.
|
|
129
|
+
# Keep this explicit, and prefer allowlists for private repo monitoring.
|
|
130
|
+
CITADEL_GITHUB_SYNC_INCLUDE_PRIVATE=true
|
|
131
|
+
CITADEL_GITHUB_SYNC_REPO_ALLOWLIST=
|
|
132
|
+
CITADEL_GITHUB_SYNC_REPO_DENYLIST=
|
|
133
|
+
CITADEL_GITHUB_SYNC_SECURITY_SCAN_ENABLED=true
|
|
134
|
+
CITADEL_GITHUB_SYNC_SECURITY_BLOCK_SEVERITY=high
|
|
135
|
+
GITHUB_TOKEN=
|
|
136
|
+
|
|
137
|
+
# GitHub PR-merge webhook -> non-blocking org re-ingest (ADR-0005 step 3).
|
|
138
|
+
# Disabled by default: POST /api/webhooks/github returns 404 until enabled. When
|
|
139
|
+
# enabled, the raw body is verified against X-Hub-Signature-256 (HMAC-SHA256
|
|
140
|
+
# keyed by the secret) BEFORE parsing; a missing/invalid signature is rejected
|
|
141
|
+
# with 401. Only a closed+merged pull_request triggers work (202); everything
|
|
142
|
+
# else is acknowledged with 204. Set the SAME secret in the GitHub webhook UI.
|
|
143
|
+
CITADEL_GITHUB_WEBHOOK_ENABLED=false
|
|
144
|
+
CITADEL_GITHUB_WEBHOOK_SECRET=
|
|
145
|
+
|
|
146
|
+
# Content/secret gate on EVERY write path (ADR-0005 step 1): /ingest,
|
|
147
|
+
# /api/contribute, Obsidian sync, autosync, and MCP writers all funnel through
|
|
148
|
+
# the service-layer ingest gate. A finding at or above the block severity is
|
|
149
|
+
# refused (HTTP 422) and audited; the secret never reaches the vault.
|
|
150
|
+
CITADEL_CONTENT_SCAN_ENABLED=true
|
|
151
|
+
CITADEL_CONTENT_SCAN_BLOCK_SEVERITY=high
|
|
152
|
+
|
|
153
|
+
# Selective promotion of seat-node content to Central (ADR-0005 step 2).
|
|
154
|
+
# Opt-in: when enabled, POST /api/promote/run enumerates a seat node, classifies
|
|
155
|
+
# each item for org-relevance + sensitivity (secret scan + LLM), and promotes
|
|
156
|
+
# qualifying items (relevant AND not sensitive AND secret-clean AND
|
|
157
|
+
# score >= threshold) via the org-ready dual-write. dry_run defaults TRUE
|
|
158
|
+
# (propose only, write nothing); a human sets dry_run=false to actually promote.
|
|
159
|
+
CITADEL_PROMOTION_ENABLED=false
|
|
160
|
+
# Default dry-run for the evolve cron's promotion stage (propose, write nothing).
|
|
161
|
+
# Set false to let the 6h evolve cron actually promote qualifying items.
|
|
162
|
+
CITADEL_PROMOTION_DRY_RUN=true
|
|
163
|
+
CITADEL_PROMOTION_RELEVANCE_THRESHOLD=0.7
|
|
164
|
+
CITADEL_PROMOTION_MAX_ITEMS=20
|
|
165
|
+
|
|
166
|
+
# Organization Update Digest for the learning-agent cron.
|
|
167
|
+
CITADEL_ORG_DIGEST_ENABLED=true
|
|
168
|
+
CITADEL_ORG_DIGEST_WINDOW_HOURS=24
|
|
169
|
+
CITADEL_ORG_DIGEST_MAX_ITEMS=6
|
|
170
|
+
CITADEL_ORG_DIGEST_LLM_ENABLED=true
|
|
171
|
+
CITADEL_ORG_DIGEST_POST_ON_NO_UPDATES=false
|
|
172
|
+
# Scheduled cron runs post by default and hide the raw message body from logs.
|
|
173
|
+
# Manual API/CLI runs preview only unless post_to_chat/--post-to-chat is set.
|
|
174
|
+
CITADEL_ORG_DIGEST_POST_TO_CHAT=true
|
|
175
|
+
CITADEL_ORG_DIGEST_INCLUDE_PREVIEW_IN_CRON_OUTPUT=false
|
|
176
|
+
# Cron stdout mode: summary, none, or full. Do not use full for private repos.
|
|
177
|
+
CITADEL_GITHUB_SYNC_OUTPUT_MODE=summary
|
|
178
|
+
# External LLM digesting is disabled for private repo metadata unless explicitly allowed.
|
|
179
|
+
CITADEL_ORG_DIGEST_LLM_ALLOW_PRIVATE=false
|
|
180
|
+
|
|
181
|
+
# Google Chat outbound delivery. Store the service account JSON as a Railway
|
|
182
|
+
# secret. Do not commit real service account JSON or Google Chat space IDs.
|
|
183
|
+
CITADEL_GOOGLE_CHAT_ENABLED=false
|
|
184
|
+
CITADEL_GOOGLE_CHAT_SPACE_NAME=
|
|
185
|
+
CITADEL_GOOGLE_CHAT_SERVICE_ACCOUNT_JSON=
|
|
186
|
+
CITADEL_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE=
|
|
187
|
+
CITADEL_GOOGLE_CHAT_THREAD_KEY=citadel-org-digest
|
|
188
|
+
CITADEL_GOOGLE_CHAT_MESSAGE_PREFIX=citadel-org-digest
|
|
189
|
+
CITADEL_GOOGLE_CHAT_MAX_MESSAGE_BYTES=30000
|
|
190
|
+
CITADEL_GOOGLE_CHAT_TIMEOUT_SECONDS=20
|
|
191
|
+
CITADEL_GOOGLE_CHAT_RETRY_COUNT=2
|
|
192
|
+
|
|
193
|
+
# Vault Backup Mirror (private GitHub repo; manifest export only).
|
|
194
|
+
CITADEL_BACKUP_MIRROR_REPO=masumi-network/Vault-Backup-Mirror
|
|
195
|
+
CITADEL_BACKUP_MIRROR_ENABLED=false
|
|
196
|
+
CITADEL_BACKUP_MIRROR_PUSH_ENABLED=false
|
|
197
|
+
CITADEL_BACKUP_MIRROR_BRANCH=main
|
|
198
|
+
CITADEL_BACKUP_MIRROR_ROOT_PATH=/data/.citadel/backup_mirror
|
|
199
|
+
CITADEL_BACKUP_MIRROR_DRY_RUN=true
|
|
200
|
+
CITADEL_BACKUP_MIRROR_ACCESS_KEY=
|
|
201
|
+
CITADEL_BACKUP_MIRROR_TOKEN=
|
|
202
|
+
|
|
203
|
+
# Local only. Railway sets PORT automatically.
|
|
204
|
+
PORT=8000
|
|
205
|
+
|
|
206
|
+
# Cognee passes these through from the process environment.
|
|
207
|
+
LLM_API_KEY=
|
|
208
|
+
OPENROUTER_API_KEY=
|
|
209
|
+
LLM_PROVIDER=custom
|
|
210
|
+
# Cognee routes through litellm, so this needs the openrouter/ prefix. A bare id
|
|
211
|
+
# (e.g. "google/gemini-2.5-flash") fails with litellm "LLM Provider NOT provided".
|
|
212
|
+
LLM_MODEL=openrouter/deepseek/deepseek-v4-flash
|
|
213
|
+
LLM_ENDPOINT=https://openrouter.ai/api/v1
|
|
214
|
+
COGNEE_SKIP_CONNECTION_TEST=true
|
|
215
|
+
# Single-tenant: keep cognee's per-dataset/per-user graph partitioning OFF so cognify
|
|
216
|
+
# and graph reads share ONE global Kuzu graph. Left unset, cognee enables it
|
|
217
|
+
# automatically for kuzu+pgvector, which strands the built graph in a per-dataset
|
|
218
|
+
# .pkl the org-wide mesh read never resolves (graph reads 0 despite a built graph).
|
|
219
|
+
ENABLE_BACKEND_ACCESS_CONTROL=false
|
|
220
|
+
EMBEDDING_PROVIDER=fastembed
|
|
221
|
+
EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
|
|
222
|
+
EMBEDDING_DIMENSIONS=384
|
|
223
|
+
|
|
224
|
+
# Railway/Postgres examples. Bind DATABASE_URL from the Railway Postgres service.
|
|
225
|
+
DATABASE_URL=
|
|
226
|
+
DB_PROVIDER=postgres
|
|
227
|
+
DB_HOST=
|
|
228
|
+
DB_PORT=5432
|
|
229
|
+
DB_NAME=
|
|
230
|
+
DB_USERNAME=
|
|
231
|
+
DB_PASSWORD=
|
|
232
|
+
VECTOR_DB_PROVIDER=pgvector
|
|
233
|
+
# Optional overrides. When VECTOR_DB_PROVIDER=pgvector, Citadel derives these from DB_*
|
|
234
|
+
# if they are not set explicitly.
|
|
235
|
+
VECTOR_DB_HOST=
|
|
236
|
+
VECTOR_DB_PORT=
|
|
237
|
+
VECTOR_DB_NAME=
|
|
238
|
+
VECTOR_DB_USERNAME=
|
|
239
|
+
VECTOR_DB_PASSWORD=
|
|
240
|
+
GRAPH_DATABASE_PROVIDER=kuzu
|
|
241
|
+
SYSTEM_ROOT_DIRECTORY=/data/.cognee_system
|
|
242
|
+
DATA_ROOT_DIRECTORY=/data/.data_storage
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes `citadel-archive` to PyPI on a version tag (e.g. v0.1.0) using
|
|
4
|
+
# PyPI Trusted Publishing (OIDC) — no API tokens are stored anywhere.
|
|
5
|
+
# One-time setup is documented in PUBLISHING.md.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags:
|
|
10
|
+
- "v*"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
name: Build sdist + wheel
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
- name: Build distributions
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade build
|
|
24
|
+
python -m build
|
|
25
|
+
- name: Check metadata
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade twine
|
|
28
|
+
python -m twine check dist/*
|
|
29
|
+
- uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
name: Publish to PyPI
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment: pypi
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write # required for Trusted Publishing
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/download-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: dist
|
|
45
|
+
path: dist/
|
|
46
|
+
- name: Publish
|
|
47
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
.env
|
|
3
|
+
.env.*
|
|
4
|
+
!.env.example
|
|
5
|
+
.venv/
|
|
6
|
+
node_modules/
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.mypy_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
dist/
|
|
15
|
+
build/
|
|
16
|
+
*.egg-info/
|
|
17
|
+
.citadel/
|
|
18
|
+
.claude/
|
|
19
|
+
.cognee_system/
|
|
20
|
+
.data_storage/
|
|
21
|
+
.cognee_cache/
|
|
22
|
+
logs/
|
|
23
|
+
.brand-preview/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `citadel-archive` are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/); this project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] — 2026-06-27
|
|
8
|
+
|
|
9
|
+
First published release. Ships the lightweight teammate CLI alongside the
|
|
10
|
+
self-hosted Organization Vault server.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`citadel onboard`** — one-command, idempotent teammate setup: writes the
|
|
15
|
+
seat token to your shell rc (masked, env-only), installs the git pre-push and
|
|
16
|
+
Claude Code `SessionEnd` autosync hooks, adds the Citadel MCP server to
|
|
17
|
+
`.mcp.json`, and offers Approved Capture Roots. Self-contained — no vendored
|
|
18
|
+
skill directory required.
|
|
19
|
+
- **`citadel status`** — connection + identity + local-setup health check
|
|
20
|
+
(Node `/healthz`, `/api/session` whoami, search smoke, hooks/MCP/capture
|
|
21
|
+
roots). `--json` for AI agents; exits non-zero when not connected.
|
|
22
|
+
- **`citadel tui`** — live terminal dashboard (optional `[tui]` extra).
|
|
23
|
+
- **`citadel setup` / `citadel capture`** — declare Approved Capture Roots
|
|
24
|
+
(`~/.citadel/capture.json`) with Capture Root Tags (`personal` / `org-work`),
|
|
25
|
+
and POST per-root summaries to your Node.
|
|
26
|
+
- **Bundled autosync hooks** (`kb.hooks.sync_push`, `kb.hooks.sync_session`) —
|
|
27
|
+
stdlib-only, fail-silent, HTTPS-only, personal-by-default; installed by
|
|
28
|
+
`citadel onboard` and runnable as `python -m kb.hooks.*`.
|
|
29
|
+
- Server **Capture Policy** baseline API + admin UI; seat **Node Write Policy**
|
|
30
|
+
enforced on all HTTP + MCP write paths.
|
|
31
|
+
|
|
32
|
+
### Packaging
|
|
33
|
+
|
|
34
|
+
- Distribution renamed to **`citadel-archive`** (the installed command stays
|
|
35
|
+
`citadel`). Base install is a lightweight client (`python-dotenv` only); the
|
|
36
|
+
server stack is the **`[server]`** extra and the dashboard the **`[tui]`**
|
|
37
|
+
extra. Importing the client never pulls the server stack (guarded by test).
|
|
38
|
+
- PyPI **Trusted Publishing** workflow (`.github/workflows/publish.yml`) — tag
|
|
39
|
+
`v*` to build + publish, no stored tokens. See `PUBLISHING.md`.
|
|
40
|
+
|
|
41
|
+
### Security
|
|
42
|
+
|
|
43
|
+
- `post_capture` / hooks enforce HTTPS-only and refuse redirects (the seat
|
|
44
|
+
Bearer token is never re-sent to another host); payloads are size-capped.
|
|
45
|
+
- The seat token lives in exactly one place (the shell rc); `.mcp.json`
|
|
46
|
+
references it as `${CITADEL_MCP_ACCESS_TOKEN}` and it is never echoed.
|
|
47
|
+
- The pre-push allowlist fails **closed** on a corrupt config.
|
|
48
|
+
|
|
49
|
+
[0.1.0]: https://github.com/masumi-network/Citadel-Archive/releases/tag/v0.1.0
|