ycb 2.0.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.
Files changed (66) hide show
  1. ycb-2.0.0/.env.example +259 -0
  2. ycb-2.0.0/.gitignore +18 -0
  3. ycb-2.0.0/PKG-INFO +806 -0
  4. ycb-2.0.0/README.md +787 -0
  5. ycb-2.0.0/pyproject.toml +50 -0
  6. ycb-2.0.0/src/__init__.py +2 -0
  7. ycb-2.0.0/src/cli/__init__.py +0 -0
  8. ycb-2.0.0/src/cli/main.py +437 -0
  9. ycb-2.0.0/src/cli/ui/__init__.py +1 -0
  10. ycb-2.0.0/src/cli/ui/animation.py +30 -0
  11. ycb-2.0.0/src/cli/ui/components.py +29 -0
  12. ycb-2.0.0/src/cli/ui/dashboard.py +89 -0
  13. ycb-2.0.0/src/cli/ui/logger.py +54 -0
  14. ycb-2.0.0/src/config/__init__.py +0 -0
  15. ycb-2.0.0/src/connectors/__init__.py +0 -0
  16. ycb-2.0.0/src/connectors/airtable_connector.py +180 -0
  17. ycb-2.0.0/src/connectors/analytics_connector.py +141 -0
  18. ycb-2.0.0/src/connectors/asana_connector.py +130 -0
  19. ycb-2.0.0/src/connectors/ashby_connector.py +265 -0
  20. ycb-2.0.0/src/connectors/bamboohr_connector.py +209 -0
  21. ycb-2.0.0/src/connectors/base_connector.py +65 -0
  22. ycb-2.0.0/src/connectors/basecamp_connector.py +288 -0
  23. ycb-2.0.0/src/connectors/calendly_connector.py +143 -0
  24. ycb-2.0.0/src/connectors/clickup_connector.py +159 -0
  25. ycb-2.0.0/src/connectors/datadog_connector.py +274 -0
  26. ycb-2.0.0/src/connectors/deel_connector.py +281 -0
  27. ycb-2.0.0/src/connectors/discord_connector.py +144 -0
  28. ycb-2.0.0/src/connectors/dropbox_connector.py +137 -0
  29. ycb-2.0.0/src/connectors/facebook_connector.py +99 -0
  30. ycb-2.0.0/src/connectors/front_connector.py +179 -0
  31. ycb-2.0.0/src/connectors/github_connector.py +156 -0
  32. ycb-2.0.0/src/connectors/gitlab_connector.py +174 -0
  33. ycb-2.0.0/src/connectors/gmail_connector.py +170 -0
  34. ycb-2.0.0/src/connectors/google_docs_connector.py +142 -0
  35. ycb-2.0.0/src/connectors/google_drive_connector.py +164 -0
  36. ycb-2.0.0/src/connectors/google_sheets_connector.py +192 -0
  37. ycb-2.0.0/src/connectors/hubspot_connector.py +235 -0
  38. ycb-2.0.0/src/connectors/jira_connector.py +159 -0
  39. ycb-2.0.0/src/connectors/linear_connector.py +154 -0
  40. ycb-2.0.0/src/connectors/monday_connector.py +260 -0
  41. ycb-2.0.0/src/connectors/notion_connector.py +183 -0
  42. ycb-2.0.0/src/connectors/outlook_teams_connector.py +203 -0
  43. ycb-2.0.0/src/connectors/registry.py +132 -0
  44. ycb-2.0.0/src/connectors/rippling_connector.py +249 -0
  45. ycb-2.0.0/src/connectors/salesforce_connector.py +257 -0
  46. ycb-2.0.0/src/connectors/search_connector.py +234 -0
  47. ycb-2.0.0/src/connectors/segment_connector.py +244 -0
  48. ycb-2.0.0/src/connectors/slack_connector.py +153 -0
  49. ycb-2.0.0/src/connectors/todoist_connector.py +178 -0
  50. ycb-2.0.0/src/connectors/twitter_connector.py +294 -0
  51. ycb-2.0.0/src/connectors/web_crawler_connector.py +248 -0
  52. ycb-2.0.0/src/connectors/zoom_connector.py +278 -0
  53. ycb-2.0.0/src/licensing/__init__.py +3 -0
  54. ycb-2.0.0/src/licensing/tier_mapping.py +140 -0
  55. ycb-2.0.0/src/licensing/validator.py +364 -0
  56. ycb-2.0.0/src/models/__init__.py +0 -0
  57. ycb-2.0.0/src/models/domain.py +96 -0
  58. ycb-2.0.0/src/processors/__init__.py +0 -0
  59. ycb-2.0.0/src/processors/chunker.py +75 -0
  60. ycb-2.0.0/src/processors/knowledge_extractor.py +187 -0
  61. ycb-2.0.0/src/processors/skills_synthesizer.py +143 -0
  62. ycb-2.0.0/src/storage/__init__.py +0 -0
  63. ycb-2.0.0/src/storage/database.py +73 -0
  64. ycb-2.0.0/src/storage/storage_manager.py +184 -0
  65. ycb-2.0.0/src/sync/__init__.py +0 -0
  66. ycb-2.0.0/src/sync/sync_scheduler.py +189 -0
ycb-2.0.0/.env.example ADDED
@@ -0,0 +1,259 @@
1
+ # Enabled Connectors (comma-separated list, leave empty to enable all configured connectors)
2
+ # Available: slack, google_docs, github, notion, discord, google_sheets, linear, outlook, teams, gitlab, dropbox, mixpanel, amplitude, algolia, exa, perplexity, facebook
3
+ CONNECTORS_ENABLED=slack,google_docs,github,notion,discord,google_sheets,linear,outlook,teams,gitlab,dropbox,mixpanel,amplitude,algolia,exa,perplexity,facebook
4
+
5
+ # === Performance & Concurrency Configuration ===
6
+ # Hardware Guidance: Low-VRAM/consumer GPUs (e.g. 4GB-8GB VRAM) should keep these low (1-2)
7
+ # to avoid GPU memory exhaustion. High-end or server-grade hardware can increase them for higher throughput.
8
+ LLM_CONCURRENCY=1 # Number of concurrent chunk inference requests sent to Ollama (default: 1)
9
+ BATCH_SIZE=2 # Number of documents processed per interactive sync batch pause (default: 2)
10
+
11
+ # === Tier 1 Connectors ===
12
+
13
+ # 1. Slack Configuration
14
+ SLACK_BOT_TOKEN=xoxb-your-token
15
+ SLACK_APP_TOKEN=xapp-your-token
16
+
17
+ # 2. Google Docs & Sheets Configuration
18
+ GOOGLE_CREDENTIALS_PATH=credentials.json
19
+
20
+ # 3. GitHub Configuration
21
+ GITHUB_TOKEN=ghp_your_personal_access_token
22
+ GITHUB_REPOS=owner/repo1,owner/repo2
23
+
24
+ # 4. Notion Configuration
25
+ NOTION_TOKEN=secret_your_notion_integration_token
26
+
27
+ # 5. Discord Configuration
28
+ DISCORD_BOT_TOKEN=your_discord_bot_token
29
+ DISCORD_GUILD_IDS=123456789012345678
30
+
31
+ # 6. Linear Configuration
32
+ LINEAR_API_KEY=lin_api_your_linear_key
33
+
34
+ # 7. Microsoft Outlook & Teams Configuration
35
+ MS_CLIENT_ID=your_azure_client_id
36
+ MS_CLIENT_SECRET=your_azure_client_secret
37
+ MS_TENANT_ID=your_azure_tenant_id
38
+
39
+ # === Tier 2 Connectors ===
40
+
41
+ # 8. GitLab Configuration
42
+ GITLAB_TOKEN=glpat-your_personal_access_token
43
+ GITLAB_URL=https://gitlab.com
44
+ GITLAB_PROJECTS=group/project1,group/project2
45
+
46
+ # 9. Dropbox Configuration
47
+ DROPBOX_TOKEN=sl.your_dropbox_access_token
48
+
49
+ # 10. Mixpanel Configuration
50
+ MIXPANEL_API_SECRET=your_mixpanel_api_secret
51
+ MIXPANEL_PROJECT_ID=your_project_id
52
+
53
+ # 11. Amplitude Configuration
54
+ AMPLITUDE_API_KEY=your_amplitude_api_key
55
+ AMPLITUDE_SECRET_KEY=your_amplitude_secret_key
56
+
57
+ # 12. Algolia Configuration
58
+ ALGOLIA_APP_ID=your_algolia_app_id
59
+ ALGOLIA_API_KEY=your_algolia_api_key
60
+ ALGOLIA_INDEX_NAME=your_index_name
61
+
62
+ # 13. Exa Search Configuration
63
+ EXA_API_KEY=your_exa_api_key
64
+ EXA_SEARCH_QUERIES=company refund policy,server incident response
65
+
66
+ # 14. Perplexity AI Configuration
67
+ PERPLEXITY_API_KEY=pplx-your_perplexity_api_key
68
+ PERPLEXITY_PROMPTS=What is our standard customer refund procedure?
69
+
70
+ # 15. Facebook Configuration
71
+ FACEBOOK_PAGE_TOKEN=EAAG...your_page_access_token
72
+ FACEBOOK_PAGE_ID=me
73
+
74
+ # === Batch 1 Connectors ===
75
+
76
+ # 16. Gmail Configuration (Uses shared GOOGLE_CREDENTIALS_PATH)
77
+ # Requires 'https://www.googleapis.com/auth/gmail.readonly' scope in Google Cloud Console
78
+
79
+ # 17. Google Drive Configuration (Uses shared GOOGLE_CREDENTIALS_PATH)
80
+ # Requires 'https://www.googleapis.com/auth/drive.readonly' scope in Google Cloud Console
81
+
82
+ # 18. Todoist Configuration
83
+ # Get from Todoist -> Settings -> Integrations -> Developer -> API token
84
+ TODOIST_API_TOKEN=your_todoist_api_token
85
+
86
+ # 19. Web Crawler Configuration
87
+ # Comma-separated list of starting URLs to crawl
88
+ CRAWLER_START_URLS=https://example.com/docs,https://example.com/help
89
+ CRAWLER_MAX_PAGES=50
90
+ CRAWLER_MAX_DEPTH=2
91
+ CRAWLER_ALLOWED_DOMAINS=example.com
92
+ CRAWLER_DELAY_SECONDS=2
93
+ CRAWLER_REQUEST_TIMEOUT_SECONDS=10
94
+ CRAWLER_MAX_RUNTIME_SECONDS=300
95
+
96
+ # === Batch 2 Connectors ===
97
+
98
+ # 20. Jira Configuration
99
+ # Get API token from https://id.atlassian.com/manage-profile/security/api-tokens
100
+ JIRA_DOMAIN=your-company.atlassian.net
101
+ JIRA_EMAIL=your_email@company.com
102
+ JIRA_API_TOKEN=your_jira_api_token
103
+
104
+ # 21. Asana Configuration
105
+ # Get token from Asana -> My Settings -> Developer -> Personal Access Tokens
106
+ ASANA_TOKEN=1/your_asana_personal_access_token
107
+ ASANA_WORKSPACE_GID=your_workspace_gid
108
+
109
+ # 22. Calendly Configuration
110
+ # Get token from Calendly -> Account Settings -> Integrations -> API & Webhooks
111
+ CALENDLY_TOKEN=your_calendly_personal_access_token
112
+ # WARNING: Setting CALENDLY_INGEST_INVITEE_DETAILS=true will ingest external meeting invitees'
113
+ # personally identifiable information (PII) including full names, email addresses, and booking intake
114
+ # Q&A responses into local processing and exported skills files. Keep set to false (default) unless opt-in is required.
115
+ CALENDLY_INGEST_INVITEE_DETAILS=false
116
+
117
+ # 23. ClickUp Configuration
118
+ # Get token from ClickUp -> Settings -> Apps -> API Token
119
+ CLICKUP_API_TOKEN=pk_your_clickup_api_token
120
+ CLICKUP_TEAM_ID=your_team_id
121
+
122
+ # === Batch 3a Connectors ===
123
+
124
+ # 24. Airtable Configuration
125
+ # Create a Personal Access Token at https://airtable.com/create/tokens
126
+ # Required scopes: data.records:read, schema.bases:read
127
+ AIRTABLE_TOKEN=your_airtable_personal_access_token
128
+ # Optional: comma-separated base IDs to limit ingestion (leave empty to discover all accessible bases)
129
+ AIRTABLE_BASE_IDS=appXXXXXXXXXXXXXX,appYYYYYYYYYYYYYY
130
+
131
+ # 25. Datadog Configuration
132
+ # API Key: https://app.datadoghq.com/organization-settings/api-keys
133
+ # Application Key: https://app.datadoghq.com/organization-settings/application-keys
134
+ DATADOG_API_KEY=your_datadog_api_key
135
+ DATADOG_APP_KEY=your_datadog_application_key
136
+ # Optional: change if using a non-US Datadog site (e.g. datadoghq.eu, us3.datadoghq.com)
137
+ DATADOG_SITE=datadoghq.com
138
+
139
+ # 26. Segment Configuration
140
+ # Create a Personal Access Token at https://app.segment.com/workspaces/YOUR_WORKSPACE/settings/access-management
141
+ # Required scope: Workspace Member (read access to sources, destinations, tracking plans)
142
+ SEGMENT_ACCESS_TOKEN=your_segment_personal_access_token
143
+
144
+ # 27. Front Configuration
145
+ # Generate an API token from Front Settings > Developers > API tokens (requires admin privileges)
146
+ # A free developer account is available at https://dev.frontapp.com/
147
+ FRONT_API_TOKEN=your_front_api_token
148
+
149
+ # 28. Zoom Configuration
150
+ # Create a Server-to-Server OAuth app in the Zoom App Marketplace:
151
+ # https://marketplace.zoom.us/develop/create — choose "Server-to-Server OAuth"
152
+ # Required scopes: meeting:read:meeting:admin, recording:read:recording:admin, user:read:user:admin
153
+ ZOOM_ACCOUNT_ID=your_zoom_account_id
154
+ ZOOM_CLIENT_ID=your_zoom_client_id
155
+ ZOOM_CLIENT_SECRET=your_zoom_client_secret
156
+
157
+ # 29. X / Twitter Configuration
158
+ # Create a developer app at https://developer.twitter.com/en/portal/dashboard
159
+ # NOTE: As of 2025, free-tier X developer accounts have very limited read access.
160
+ # A Basic plan ($100/month) or higher is required for meaningful tweet search and timeline access.
161
+ # This connector handles 401/403 responses gracefully — it logs a clear message and returns no data
162
+ # rather than crashing. Set the vars below if you have an eligible plan.
163
+ TWITTER_BEARER_TOKEN=your_x_twitter_bearer_token
164
+ # Comma-separated search queries (e.g. your company name, product, brand)
165
+ TWITTER_SEARCH_QUERIES=your_company_name,your_product_name
166
+ # Optional: comma-separated numeric user IDs whose timelines to fetch
167
+ TWITTER_USER_IDS=
168
+
169
+ # === Batch 3b Connectors ===
170
+
171
+ # 30. HubSpot Configuration
172
+ # Create a Private App in HubSpot Settings > Integrations > Private Apps.
173
+ # Required scopes: crm.objects.contacts.read, crm.objects.companies.read,
174
+ # crm.objects.deals.read, crm.objects.notes.read
175
+ HUBSPOT_ACCESS_TOKEN=your_hubspot_private_app_access_token
176
+
177
+ # 31. Salesforce Configuration
178
+ # Setup steps (Client Credentials Flow — server-to-server, no browser login required):
179
+ # 1. In Salesforce Setup > App Manager, create a new Connected App with OAuth enabled.
180
+ # 2. Under OAuth settings, enable "Enable Client Credentials Flow".
181
+ # 3. Under the app's Manage > Edit Policies, set "Client Credentials Flow" Run As to a
182
+ # dedicated integration user (NOT yourself — this user's profile/permissions determine
183
+ # what data the connector can access).
184
+ # 4. CRITICAL — permission set on the Run As user: the Client Credentials flow authenticates
185
+ # as the app itself, not as a named user. If the Run As user's profile or permission set
186
+ # does not include read access to Opportunity, Account, Case, and Note objects, the SOQL
187
+ # queries will return empty results with no error — the API call succeeds but returns 0
188
+ # records. Assign the Run As user a permission set that explicitly grants read access to
189
+ # all object types you want to ingest before running the connector.
190
+ # 5. Retrieve the Consumer Key (client_id) and Consumer Secret (client_secret) from the app.
191
+ # (Username-password OAuth is deprecated/blocked in orgs created after Summer '23.)
192
+ SALESFORCE_CLIENT_ID=your_salesforce_connected_app_consumer_key
193
+ SALESFORCE_CLIENT_SECRET=your_salesforce_connected_app_consumer_secret
194
+ # Optional: use 'test' for sandbox orgs; defaults to 'login' (production)
195
+ SALESFORCE_DOMAIN=login
196
+
197
+ # 32. Monday.com Configuration
198
+ # Get your API token from monday.com: avatar menu (top-right) > Developers > My Access Tokens
199
+ MONDAY_API_TOKEN=your_monday_api_token
200
+
201
+ # 33. Basecamp Configuration
202
+ # Requires OAuth 2.0. Register an integration at https://launchpad.37signals.com/integrations
203
+ # to get client_id/client_secret, complete the browser OAuth flow once to obtain an
204
+ # access_token, then provide it here along with your numeric Basecamp account ID
205
+ # (found in your Basecamp URL: https://3.basecamp.com/<ACCOUNT_ID>/).
206
+ BASECAMP_ACCESS_TOKEN=your_basecamp_oauth_access_token
207
+ BASECAMP_ACCOUNT_ID=your_basecamp_account_id
208
+ # Required by Basecamp API policy — include your app name and contact email
209
+ BASECAMP_USER_AGENT=CompanyBrain/1.0 (yourname@yourcompany.com)
210
+
211
+ # === Batch 3c Connectors ===
212
+
213
+ # 34. Ashby ATS Configuration
214
+ # Ashby API keys are generated inside your Ashby account — no separate sign-up.
215
+ # Navigate to: Ashby > Settings > Admin > Integrations > API Keys > + New Key
216
+ # REQUIREMENT: You must be an existing Ashby customer with admin-level access.
217
+ # There is no free tier or public sandbox — credentials require an active subscription.
218
+ # Required scopes on the key: Jobs (read), Candidates (read), Organization (read)
219
+ ASHBY_API_KEY=your_ashby_api_key
220
+
221
+ # 35. BambooHR Configuration
222
+ # API key path (for ingesting your own organisation's data — no OAuth required).
223
+ # Generate: Log in to BambooHR > profile icon (lower-left) > API Keys > Add New Key
224
+ # Your company subdomain is the part before .bamboohr.com in your URL.
225
+ # Example: if you log in at https://acme.bamboohr.com, your subdomain is 'acme'.
226
+ # NOTE: BambooHR API keys are strictly for your own organisation's internal use
227
+ # per BambooHR's Terms of Service. This matches Company Brain's use case.
228
+ BAMBOOHR_API_KEY=your_bamboohr_api_key
229
+ BAMBOOHR_SUBDOMAIN=your_company_subdomain
230
+
231
+ # 36. Deel Configuration
232
+ # Generate an Organisation Token (not Personal) for server-to-server ingestion:
233
+ # Deel Dashboard > More > Developer > Access Tokens > Generate new token
234
+ # Choose "Organisation Token" — it doesn't expire when a user leaves the company.
235
+ # A sandbox environment is available at api-sandbox.demo.deel.com for testing.
236
+ DEEL_API_TOKEN=your_deel_organisation_token
237
+
238
+ # 37. Rippling Configuration
239
+ # Generate an API token: Rippling admin account > Tools > Developer > API Tokens
240
+ # Requires admin-level access to the Rippling account.
241
+ # IMPORTANT — Terms of Service constraint: This token is for your own organisation's
242
+ # internal use only. It must NOT be used to access another company's Rippling data.
243
+ # Company Brain's use case (each customer ingests their own data) is the permitted use.
244
+ # For multi-tenant integrations, Rippling requires the Technology Partner Program + OAuth.
245
+ # Rate limit: 300 requests per 10-second burst window per IP address.
246
+ RIPPLING_API_TOKEN=your_rippling_api_token
247
+
248
+ # === Core System Configuration ===
249
+
250
+ # Ollama Configuration
251
+ OLLAMA_MODEL=gemma4:e4b
252
+ OLLAMA_HOST=http://localhost:11434
253
+
254
+ # Storage Configuration
255
+ DATABASE_URL=sqlite:///./data/company_brain.db
256
+
257
+ # Application Configuration
258
+ SYNC_INTERVAL_MINUTES=30
259
+ KNOWLEDGE_EXTRACTION_BATCH_SIZE=5
ycb-2.0.0/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.pyd
5
+ .env
6
+ venv/
7
+ data/
8
+ output/
9
+ credentials.json
10
+ token.pickle
11
+ company_brain.log
12
+ *.log
13
+ *.db
14
+ *.sqlite
15
+ .DS_Store
16
+ build/
17
+ dist/
18
+ *.egg-info/