cortexdb-connectors 0.2.1__tar.gz → 0.2.5__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 (46) hide show
  1. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/PKG-INFO +22 -5
  2. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/README.md +146 -129
  3. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/base.py +434 -373
  4. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/cli.py +583 -479
  5. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/confluence/__init__.py +359 -359
  6. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/discord/__init__.py +646 -646
  7. cortexdb_connectors-0.2.5/cortexdb_connectors/freshdesk/__init__.py +199 -0
  8. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/github/__init__.py +5 -5
  9. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/gitlab/__init__.py +749 -749
  10. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/google_workspace/__init__.py +8 -8
  11. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/hubspot/__init__.py +489 -489
  12. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/insights/detectors.py +9 -5
  13. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/insights/engine.py +4 -4
  14. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/intercom/__init__.py +631 -631
  15. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/jira/__init__.py +9 -6
  16. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/linear/__init__.py +705 -705
  17. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/notion/__init__.py +9 -9
  18. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/pagerduty/__init__.py +298 -298
  19. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/salesforce/__init__.py +399 -399
  20. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/servicenow/__init__.py +460 -460
  21. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/slack/__init__.py +5 -5
  22. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/state.py +145 -145
  23. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/teams/__init__.py +656 -656
  24. cortexdb_connectors-0.2.5/cortexdb_connectors/tldv/__init__.py +175 -0
  25. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/webhooks.py +360 -99
  26. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/worker.py +112 -13
  27. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/zendesk/__init__.py +496 -496
  28. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/PKG-INFO +22 -5
  29. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/SOURCES.txt +7 -1
  30. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/pyproject.toml +87 -87
  31. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/tests/test_base.py +6 -6
  32. cortexdb_connectors-0.2.5/tests/test_connector_coverage.py +86 -0
  33. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/tests/test_github.py +1 -1
  34. cortexdb_connectors-0.2.5/tests/test_ingest_e2e.py +88 -0
  35. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/tests/test_slack.py +2 -2
  36. cortexdb_connectors-0.2.5/tests/test_streaming_cursor.py +106 -0
  37. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/tests/test_webhooks.py +131 -0
  38. cortexdb_connectors-0.2.5/tests/test_webhooks_replay.py +132 -0
  39. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/__init__.py +0 -0
  40. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/insights/__init__.py +0 -0
  41. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors/insights/api.py +0 -0
  42. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/dependency_links.txt +0 -0
  43. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/entry_points.txt +0 -0
  44. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/requires.txt +0 -0
  45. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/cortexdb_connectors.egg-info/top_level.txt +0 -0
  46. {cortexdb_connectors-0.2.1 → cortexdb_connectors-0.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexdb-connectors
3
- Version: 0.2.1
3
+ Version: 0.2.5
4
4
  Summary: Data connectors for CortexDB — ingest from Slack, GitHub, GitLab, Jira, Linear, Confluence, Notion, PagerDuty, Discord, Teams, Google Workspace, Salesforce, HubSpot, Zendesk, Intercom, and ServiceNow into the v1 memory API.
5
5
  Author-email: CortexDB Team <team@cortexdb.ai>
6
6
  License-Expression: Apache-2.0
@@ -82,6 +82,15 @@ Managed data connectors for [CortexDB](https://cortexdb.ai). Run them yourself,
82
82
 
83
83
  Each connector pulls from a third-party system (Slack, GitHub, Jira, …) and writes every event into CortexDB as a v1 experience.
84
84
 
85
+ ## Plan availability (audit BLK-3)
86
+
87
+ | Mode | Plan | What it means |
88
+ |---|---|---|
89
+ | **Self-hosted** (`cortexdb-sync` CLI) | 🟢 **Free** (this package) | You run the poller / webhook receiver yourself. Cursor state lives in `~/.cortexdb/`. Every connector below works in this mode. |
90
+ | **Managed sync** (dashboard) | 🔒 **Starter+** ($29/mo) | CortexDB hosts the syncer, manages credentials, and surfaces health in the dashboard. The "Add Connector" button in the dashboard is gated on this plan. |
91
+
92
+ The free self-hosted path is always available; the managed dashboard path is what the pricing page calls "Starter+". The badge below appears on each connector's setup page for the same reason.
93
+
85
94
  ## Install
86
95
 
87
96
  ```bash
@@ -115,7 +124,7 @@ export CORTEXDB_ACTOR=user:u_019e...
115
124
  export CORTEXDB_SCOPE_TEMPLATE='org:acme/source:{source}' # optional
116
125
  ```
117
126
 
118
- `{source}` (and `{tenant}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event.
127
+ `{source}` (and `{scope}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event. (`{tenant}` is still accepted as a legacy alias of `{scope}`.)
119
128
 
120
129
  ## Run
121
130
 
@@ -141,6 +150,8 @@ cortexdb-sync status
141
150
 
142
151
  ## Available connectors
143
152
 
153
+ All 16 connectors are **🟢 Free** to self-host and **🔒 Starter+** ($29/mo) to use via the managed dashboard.
154
+
144
155
  ```
145
156
  slack SLACK_BOT_TOKEN
146
157
  github GITHUB_TOKEN
@@ -160,7 +171,9 @@ intercom INTERCOM_TOKEN
160
171
  servicenow SNOW_INSTANCE, SNOW_USERNAME, SNOW_PASSWORD
161
172
  ```
162
173
 
163
- Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)).
174
+ Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)). **The "Add Connector" button on those pages is the managed (Starter+) path** — the CLI on this page is the free path.
175
+
176
+ For deep self-hosted operation — auth lifetimes, cursor state, retries, OAuth setup for Salesforce/Teams/Google Workspace — see [`SELF_HOSTING.md`](./SELF_HOSTING.md) in this directory.
164
177
 
165
178
  ## YAML config
166
179
 
@@ -188,11 +201,15 @@ from cortexdb_connectors.slack import SlackConnector
188
201
  connector = SlackConnector(
189
202
  cortex_url="https://api-v1.cortexdb.ai",
190
203
  cortex_api_key="v4.public...",
191
- actor="user:u_019e...",
192
- scope_template="org:acme/source:slack/channel:{entity.channel}",
204
+ scope="org:acme/source:slack",
193
205
  slack_bot_token="xoxb-...",
194
206
  channels=["C01ABC", "C02DEF"],
195
207
  )
208
+ # actor + a richer scope_template are set after construction:
209
+ connector.bind(
210
+ actor="user:u_019e...",
211
+ scope_template="org:acme/source:slack/channel:{entity.channel}",
212
+ )
196
213
 
197
214
  result = asyncio.run(connector.sync())
198
215
  print(result.episodes_ingested, "ingested,", len(result.errors), "errors")
@@ -1,129 +1,146 @@
1
- # cortexdb-connectors
2
-
3
- Managed data connectors for [CortexDB](https://cortexdb.ai). Run them yourself, or let CortexDB host them for you on the [Starter tier](https://cortexdb.ai/pricing).
4
-
5
- Each connector pulls from a third-party system (Slack, GitHub, Jira, …) and writes every event into CortexDB as a v1 experience.
6
-
7
- ## Install
8
-
9
- ```bash
10
- # core only — no third-party SDK dependencies
11
- pip install cortexdb-connectors
12
-
13
- # with one source's SDK
14
- pip install 'cortexdb-connectors[slack]'
15
-
16
- # everything
17
- pip install 'cortexdb-connectors[all]'
18
- ```
19
-
20
- Requires Python 3.10+.
21
-
22
- ## Auth
23
-
24
- The connectors talk to the CortexDB v1 API. Two things you need:
25
-
26
- - **A PASETO bearer token** (`Authorization: Bearer …`)
27
- - **An actor id** that matches the token's `sub` claim (`X-Cortex-Actor: …`)
28
-
29
- The fastest way to get both is to install [`cortexdb-cli`](https://pypi.org/project/cortexdb-cli/) and run `cortexdb init` — anonymous signup, no email or card, 7-day free-tier token. The connectors read `~/.cortexdb/state.json` automatically.
30
-
31
- Or set env vars:
32
-
33
- ```bash
34
- export CORTEXDB_URL=https://api-v1.cortexdb.ai
35
- export CORTEXDB_API_KEY=v4.public...
36
- export CORTEXDB_ACTOR=user:u_019e...
37
- export CORTEXDB_SCOPE_TEMPLATE='org:acme/source:{source}' # optional
38
- ```
39
-
40
- `{source}` (and `{tenant}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event.
41
-
42
- ## Run
43
-
44
- ```bash
45
- # one shot
46
- cortexdb-sync sync slack
47
-
48
- # poll loop, 60s between cycles
49
- cortexdb-sync watch slack --interval 60
50
-
51
- # resume from a specific point
52
- cortexdb-sync sync github --since 2026-05-01T00:00:00Z
53
-
54
- # see what's available
55
- cortexdb-sync list
56
-
57
- # check resolved CortexDB creds
58
- cortexdb-sync auth
59
-
60
- # cursor state across every connector
61
- cortexdb-sync status
62
- ```
63
-
64
- ## Available connectors
65
-
66
- ```
67
- slack SLACK_BOT_TOKEN
68
- github GITHUB_TOKEN
69
- gitlab GITLAB_TOKEN
70
- jira JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN
71
- linear LINEAR_API_KEY
72
- confluence CONFLUENCE_URL, CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN
73
- notion NOTION_TOKEN
74
- pagerduty PAGERDUTY_API_KEY
75
- discord DISCORD_BOT_TOKEN
76
- teams TEAMS_TENANT_ID, TEAMS_CLIENT_ID, TEAMS_CLIENT_SECRET
77
- google-workspace GW_SERVICE_ACCOUNT_KEY, GW_DELEGATED_USER
78
- salesforce SF_INSTANCE_URL, SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD
79
- hubspot HUBSPOT_TOKEN
80
- zendesk ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_TOKEN
81
- intercom INTERCOM_TOKEN
82
- servicenow SNOW_INSTANCE, SNOW_USERNAME, SNOW_PASSWORD
83
- ```
84
-
85
- Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)).
86
-
87
- ## YAML config
88
-
89
- If env vars get unwieldy, drop a `cortexdb-connectors.yaml` next to your sync invocation:
90
-
91
- ```yaml
92
- slack:
93
- slack_bot_token: xoxb-...
94
- channels: [C01ABCDEF, C02GHIJKL]
95
-
96
- github:
97
- github_token: ghp_...
98
- repos: [acme/api, acme/web]
99
- events: [pull_request, issue_comment]
100
- ```
101
-
102
- ## Programmatic use
103
-
104
- Skip the CLI entirely:
105
-
106
- ```python
107
- import asyncio
108
- from cortexdb_connectors.slack import SlackConnector
109
-
110
- connector = SlackConnector(
111
- cortex_url="https://api-v1.cortexdb.ai",
112
- cortex_api_key="v4.public...",
113
- actor="user:u_019e...",
114
- scope_template="org:acme/source:slack/channel:{entity.channel}",
115
- slack_bot_token="xoxb-...",
116
- channels=["C01ABC", "C02DEF"],
117
- )
118
-
119
- result = asyncio.run(connector.sync())
120
- print(result.episodes_ingested, "ingested,", len(result.errors), "errors")
121
- ```
122
-
123
- ## Webhooks
124
-
125
- The `cortexdb-connectors[webhooks]` extra ships a Starlette-based webhook receiver for sources that push (Slack Events API, GitHub Apps, Jira webhooks, …) instead of polling. See `cortexdb_connectors/webhooks.py`.
126
-
127
- ## License
128
-
129
- Apache-2.0
1
+ # cortexdb-connectors
2
+
3
+ Managed data connectors for [CortexDB](https://cortexdb.ai). Run them yourself, or let CortexDB host them for you on the [Starter tier](https://cortexdb.ai/pricing).
4
+
5
+ Each connector pulls from a third-party system (Slack, GitHub, Jira, …) and writes every event into CortexDB as a v1 experience.
6
+
7
+ ## Plan availability (audit BLK-3)
8
+
9
+ | Mode | Plan | What it means |
10
+ |---|---|---|
11
+ | **Self-hosted** (`cortexdb-sync` CLI) | 🟢 **Free** (this package) | You run the poller / webhook receiver yourself. Cursor state lives in `~/.cortexdb/`. Every connector below works in this mode. |
12
+ | **Managed sync** (dashboard) | 🔒 **Starter+** ($29/mo) | CortexDB hosts the syncer, manages credentials, and surfaces health in the dashboard. The "Add Connector" button in the dashboard is gated on this plan. |
13
+
14
+ The free self-hosted path is always available; the managed dashboard path is what the pricing page calls "Starter+". The badge below appears on each connector's setup page for the same reason.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ # core only — no third-party SDK dependencies
20
+ pip install cortexdb-connectors
21
+
22
+ # with one source's SDK
23
+ pip install 'cortexdb-connectors[slack]'
24
+
25
+ # everything
26
+ pip install 'cortexdb-connectors[all]'
27
+ ```
28
+
29
+ Requires Python 3.10+.
30
+
31
+ ## Auth
32
+
33
+ The connectors talk to the CortexDB v1 API. Two things you need:
34
+
35
+ - **A PASETO bearer token** (`Authorization: Bearer …`)
36
+ - **An actor id** that matches the token's `sub` claim (`X-Cortex-Actor: …`)
37
+
38
+ The fastest way to get both is to install [`cortexdb-cli`](https://pypi.org/project/cortexdb-cli/) and run `cortexdb init` — anonymous signup, no email or card, 7-day free-tier token. The connectors read `~/.cortexdb/state.json` automatically.
39
+
40
+ Or set env vars:
41
+
42
+ ```bash
43
+ export CORTEXDB_URL=https://api-v1.cortexdb.ai
44
+ export CORTEXDB_API_KEY=v4.public...
45
+ export CORTEXDB_ACTOR=user:u_019e...
46
+ export CORTEXDB_SCOPE_TEMPLATE='org:acme/source:{source}' # optional
47
+ ```
48
+
49
+ `{source}` (and `{scope}`, `{namespace}`, `{actor}`, `{entity.<type>}`) get filled in per event. (`{tenant}` is still accepted as a legacy alias of `{scope}`.)
50
+
51
+ ## Run
52
+
53
+ ```bash
54
+ # one shot
55
+ cortexdb-sync sync slack
56
+
57
+ # poll loop, 60s between cycles
58
+ cortexdb-sync watch slack --interval 60
59
+
60
+ # resume from a specific point
61
+ cortexdb-sync sync github --since 2026-05-01T00:00:00Z
62
+
63
+ # see what's available
64
+ cortexdb-sync list
65
+
66
+ # check resolved CortexDB creds
67
+ cortexdb-sync auth
68
+
69
+ # cursor state across every connector
70
+ cortexdb-sync status
71
+ ```
72
+
73
+ ## Available connectors
74
+
75
+ All 16 connectors are **🟢 Free** to self-host and **🔒 Starter+** ($29/mo) to use via the managed dashboard.
76
+
77
+ ```
78
+ slack SLACK_BOT_TOKEN
79
+ github GITHUB_TOKEN
80
+ gitlab GITLAB_TOKEN
81
+ jira JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN
82
+ linear LINEAR_API_KEY
83
+ confluence CONFLUENCE_URL, CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN
84
+ notion NOTION_TOKEN
85
+ pagerduty PAGERDUTY_API_KEY
86
+ discord DISCORD_BOT_TOKEN
87
+ teams TEAMS_TENANT_ID, TEAMS_CLIENT_ID, TEAMS_CLIENT_SECRET
88
+ google-workspace GW_SERVICE_ACCOUNT_KEY, GW_DELEGATED_USER
89
+ salesforce SF_INSTANCE_URL, SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD
90
+ hubspot HUBSPOT_TOKEN
91
+ zendesk ZENDESK_SUBDOMAIN, ZENDESK_EMAIL, ZENDESK_TOKEN
92
+ intercom INTERCOM_TOKEN
93
+ servicenow SNOW_INSTANCE, SNOW_USERNAME, SNOW_PASSWORD
94
+ ```
95
+
96
+ Per-connector setup pages live at https://cortexdb.ai/docs/connectors/ (e.g. [Slack](https://cortexdb.ai/docs/connectors/slack)). **The "Add Connector" button on those pages is the managed (Starter+) path** — the CLI on this page is the free path.
97
+
98
+ For deep self-hosted operation — auth lifetimes, cursor state, retries, OAuth setup for Salesforce/Teams/Google Workspace — see [`SELF_HOSTING.md`](./SELF_HOSTING.md) in this directory.
99
+
100
+ ## YAML config
101
+
102
+ If env vars get unwieldy, drop a `cortexdb-connectors.yaml` next to your sync invocation:
103
+
104
+ ```yaml
105
+ slack:
106
+ slack_bot_token: xoxb-...
107
+ channels: [C01ABCDEF, C02GHIJKL]
108
+
109
+ github:
110
+ github_token: ghp_...
111
+ repos: [acme/api, acme/web]
112
+ events: [pull_request, issue_comment]
113
+ ```
114
+
115
+ ## Programmatic use
116
+
117
+ Skip the CLI entirely:
118
+
119
+ ```python
120
+ import asyncio
121
+ from cortexdb_connectors.slack import SlackConnector
122
+
123
+ connector = SlackConnector(
124
+ cortex_url="https://api-v1.cortexdb.ai",
125
+ cortex_api_key="v4.public...",
126
+ scope="org:acme/source:slack",
127
+ slack_bot_token="xoxb-...",
128
+ channels=["C01ABC", "C02DEF"],
129
+ )
130
+ # actor + a richer scope_template are set after construction:
131
+ connector.bind(
132
+ actor="user:u_019e...",
133
+ scope_template="org:acme/source:slack/channel:{entity.channel}",
134
+ )
135
+
136
+ result = asyncio.run(connector.sync())
137
+ print(result.episodes_ingested, "ingested,", len(result.errors), "errors")
138
+ ```
139
+
140
+ ## Webhooks
141
+
142
+ The `cortexdb-connectors[webhooks]` extra ships a Starlette-based webhook receiver for sources that push (Slack Events API, GitHub Apps, Jira webhooks, …) instead of polling. See `cortexdb_connectors/webhooks.py`.
143
+
144
+ ## License
145
+
146
+ Apache-2.0