contexara 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.
- contexara-0.1.0/.gitignore +351 -0
- contexara-0.1.0/LICENSE +21 -0
- contexara-0.1.0/PKG-INFO +395 -0
- contexara-0.1.0/README.md +378 -0
- contexara-0.1.0/ci/check_clean_install.py +17 -0
- contexara-0.1.0/ci/check_py_typed.py +25 -0
- contexara-0.1.0/contexara/__init__.py +46 -0
- contexara-0.1.0/contexara/_capture.py +370 -0
- contexara-0.1.0/contexara/_sse.py +110 -0
- contexara-0.1.0/contexara/async_client.py +375 -0
- contexara-0.1.0/contexara/client.py +585 -0
- contexara-0.1.0/contexara/context.py +159 -0
- contexara-0.1.0/contexara/errors.py +157 -0
- contexara-0.1.0/contexara/models.py +161 -0
- contexara-0.1.0/contexara/py.typed +0 -0
- contexara-0.1.0/contexara/resilience.py +187 -0
- contexara-0.1.0/contexara/testing.py +105 -0
- contexara-0.1.0/pyproject.toml +42 -0
- contexara-0.1.0/tests/test_async_client.py +74 -0
- contexara-0.1.0/tests/test_capture.py +218 -0
- contexara-0.1.0/tests/test_client_requests.py +376 -0
- contexara-0.1.0/tests/test_context.py +128 -0
- contexara-0.1.0/tests/test_deadline.py +153 -0
- contexara-0.1.0/tests/test_errors.py +61 -0
- contexara-0.1.0/tests/test_models.py +82 -0
- contexara-0.1.0/tests/test_sse.py +81 -0
- contexara-0.1.0/tests/test_validation.py +95 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
# Platform (Next.js)
|
|
211
|
+
platform/web/node_modules/
|
|
212
|
+
platform/web/.next/
|
|
213
|
+
platform/web/.build-performance/
|
|
214
|
+
platform/web/.env.local
|
|
215
|
+
platform/web/tsconfig.tsbuildinfo
|
|
216
|
+
!platform/web/lib/
|
|
217
|
+
|
|
218
|
+
# Clients (installer)
|
|
219
|
+
clients/installer/node_modules/
|
|
220
|
+
|
|
221
|
+
# Platform (Capture Engine local dev artifacts)
|
|
222
|
+
platform/api/.venv/
|
|
223
|
+
platform/api/.local_storage/
|
|
224
|
+
|
|
225
|
+
# Engines (processing) — generated ONNX exports and caches, never source
|
|
226
|
+
engines/processing/_onnx_*/
|
|
227
|
+
# ~2.3GB BGE-M3 ONNX weights, downloaded via infra/DEPLOY.md step 5 (hf download), not committed
|
|
228
|
+
engines/processing/onnx-bge-m3/
|
|
229
|
+
engines/processing/.venv/
|
|
230
|
+
engines/processing/__pycache__/
|
|
231
|
+
engines/processing/experiments/__pycache__/
|
|
232
|
+
|
|
233
|
+
# Clients (hooks) — compiled Go binary, regenerable via `go build`, not source
|
|
234
|
+
clients/hooks/claude-code-hook.exe
|
|
235
|
+
|
|
236
|
+
# Build temp
|
|
237
|
+
.build-tmp/
|
|
238
|
+
|
|
239
|
+
# Temp files for testing / Misc
|
|
240
|
+
bedrock_llm.py
|
|
241
|
+
database/
|
|
242
|
+
my-tests/
|
|
243
|
+
/docs/
|
|
244
|
+
tests/.tmp/
|
|
245
|
+
tests/.pytest_tmp/
|
|
246
|
+
# Local experiments (not tracked)
|
|
247
|
+
dev/
|
|
248
|
+
frontend/node_modules/
|
|
249
|
+
# REAL BUG FIXED 2026-09-21: this was a bare "memory/" (no leading
|
|
250
|
+
# slash), which matches ANY directory named "memory" anywhere in the
|
|
251
|
+
# repo, not just a root-level one. It silently swallowed the real,
|
|
252
|
+
# committed feature directories platform/web/components/memory/ and
|
|
253
|
+
# platform/web/app/(dashboard)/memory/ for their entire lifetime --
|
|
254
|
+
# never once in git history until this fix, discovered only when a
|
|
255
|
+
# Vercel build failed on a genuinely real, on-disk import
|
|
256
|
+
# (MemoryInspector.tsx -> ../memory/SourceDetails) that git had never
|
|
257
|
+
# tracked. Scoped to the repo root explicitly so it can never again
|
|
258
|
+
# collide with a legitimately-named nested directory.
|
|
259
|
+
/memory/
|
|
260
|
+
benchmarks/longmemeval/longmemeval_oracle.json
|
|
261
|
+
"benchmarks/longmemeval/longmemeval_oracle/eval_results.txt"
|
|
262
|
+
"benchmarks/longmemeval/longmemveal_s/longmemeval_s_cleaned.json"
|
|
263
|
+
"benchmarks/longmemeval/longmemeval_oracle/eval_results.txt"
|
|
264
|
+
"benchmarks/longmemeval/longmemveal_s/longmemeval_s_cleaned.json"
|
|
265
|
+
benchmarks/longmemeval/longmemeval_s/*.json
|
|
266
|
+
|
|
267
|
+
Josefin_Sans
|
|
268
|
+
|
|
269
|
+
# BEAM benchmark dataset (5.4MB parquet) — data, not code
|
|
270
|
+
benchmarks/**/*.parquet
|
|
271
|
+
|
|
272
|
+
# Claude Code local tool-permission config — machine-specific, not project content
|
|
273
|
+
.claude/
|
|
274
|
+
# Local retrieval scratch files (kept on disk, never committed)
|
|
275
|
+
engines/retrieval/inspect_user_turns.py
|
|
276
|
+
engines/retrieval/response.json
|
|
277
|
+
|
|
278
|
+
# ─── Benchmark and eval OUTPUT (2026-09-01) ───
|
|
279
|
+
# Regenerable artifacts from LoCoMo/BEAM runs: predictions, scores, judged
|
|
280
|
+
# output, per-conversation cost logs, evidence maps. Added because 56
|
|
281
|
+
# untracked paths had accumulated on the VM, and a noisy `git status` is how
|
|
282
|
+
# a genuinely stranded file goes unnoticed (see infra/scripts/check_git_sync.sh
|
|
283
|
+
# and the Qdrant ulimits commit that nearly died in that noise).
|
|
284
|
+
#
|
|
285
|
+
# Deliberately NOT ignoring the harnesses, scorers or committed baselines
|
|
286
|
+
# (e.g. research/hardning-ctx/m8_baseline_frozen.json) — those are the record
|
|
287
|
+
# of what was measured and must stay in git.
|
|
288
|
+
benchmarks/**/m8_results/
|
|
289
|
+
benchmarks/**/m9_results/
|
|
290
|
+
benchmarks/**/m8_beam_results/
|
|
291
|
+
benchmarks/**/m9_beam_results/
|
|
292
|
+
benchmarks/**/m9_beam1m_results/
|
|
293
|
+
benchmarks/**/predictions*.json
|
|
294
|
+
benchmarks/**/*_cost_result.txt
|
|
295
|
+
benchmarks/**/*_probe_results.json
|
|
296
|
+
benchmarks/**/locomo_window_map.json
|
|
297
|
+
engines/processing/*_evidence_map.json
|
|
298
|
+
full_conv41_results.txt
|
|
299
|
+
|
|
300
|
+
# Hand-edited backups of tracked config. These are a smell rather than an
|
|
301
|
+
# artifact: production config belongs in git, not in a .bak beside it.
|
|
302
|
+
*.bak
|
|
303
|
+
|
|
304
|
+
# Large benchmark/experiment artifacts that exceed GitHub's 100MB file
|
|
305
|
+
# limit (real push rejections hit 2026-09-10 for all three) -- these are
|
|
306
|
+
# generated/downloaded data, not source, and belong on the machine that
|
|
307
|
+
# produced them, not in git history.
|
|
308
|
+
benchmarks/longmemeval_s/longmemeval_s_cleaned.json
|
|
309
|
+
codex-reserach/results/full/beam/beam.sqlite3
|
|
310
|
+
codex-reserach/results/full/locomo/locomo.sqlite3
|
|
311
|
+
|
|
312
|
+
# UNTRIAGED EXPERIMENTAL WORK (2026-09-21) -- gitignored for git-status
|
|
313
|
+
# hygiene ONLY, not a verdict on the work itself. Reviewed via two
|
|
314
|
+
# dedicated agent passes before this list was written: nothing here was
|
|
315
|
+
# found to be disposable scratch -- the V1 retrieval/consolidation
|
|
316
|
+
# rebuild (engines/retrieval/v1/, engines/processing/consolidation/) is
|
|
317
|
+
# real, substantial, tested alternative-architecture work with its own
|
|
318
|
+
# bug-fix history; its frozen baseline (61.2-61.8% LoCoMo judge accuracy,
|
|
319
|
+
# n=152) sits below both its own 80% launch gate and today's measured
|
|
320
|
+
# production number (67.7%, n=1540), but the two were never benchmarked
|
|
321
|
+
# head-to-head at matched scale -- that comparison is genuinely
|
|
322
|
+
# unfinished, not settled. Nothing here should be deleted or assumed
|
|
323
|
+
# dead; this entry exists so it stops cluttering `git status` while its
|
|
324
|
+
# real fate (commit as an alternative-architecture reference, revive,
|
|
325
|
+
# or formally retire) gets decided in a dedicated future pass.
|
|
326
|
+
engines/processing/consolidation/
|
|
327
|
+
engines/retrieval/v1/
|
|
328
|
+
benchmarks/v1_eval/
|
|
329
|
+
production_docs/
|
|
330
|
+
research/
|
|
331
|
+
z-bench/
|
|
332
|
+
z-loop-agentic/
|
|
333
|
+
z-multimodal-ctx/
|
|
334
|
+
z-ui-ux/
|
|
335
|
+
engines/processing/deepseek_extractor.py
|
|
336
|
+
engines/processing/ctx_index.py
|
|
337
|
+
engines/processing/test_stage3.py
|
|
338
|
+
engines/processing/test_stage3_scale.py
|
|
339
|
+
engines/processing/test_stage4.py
|
|
340
|
+
engines/processing/test_stage4_perf.py
|
|
341
|
+
engines/processing/test_conv44_comparison.py
|
|
342
|
+
engines/processing/test_bitemporal_repair.py
|
|
343
|
+
benchmarks/beam100k/build_judge_detail.py
|
|
344
|
+
benchmarks/beam100k/mem0_beam_answer.py
|
|
345
|
+
benchmarks/beam100k/mem0_nugget_judge.py
|
|
346
|
+
benchmarks/beam100k/run_judge_eval.py
|
|
347
|
+
benchmarks/locomo/deep_recall_force_test.py
|
|
348
|
+
benchmarks/longmemeval_s/backfill_qdrant_sync.py
|
|
349
|
+
benchmarks/longmemeval_s/diag_multisession_rank.py
|
|
350
|
+
benchmarks/longmemeval_s/m9_production_accuracy_eval_longmemeval.py
|
|
351
|
+
scripts/test_gemma_context_builder.py
|
contexara-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Contexara
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|