docent-python 0.1.64a0__tar.gz → 0.1.67__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 (92) hide show
  1. docent_python-0.1.67/.gitignore +3 -0
  2. docent_python-0.1.67/PKG-INFO +43 -0
  3. docent_python-0.1.67/README.md +29 -0
  4. docent_python-0.1.67/pyproject.toml +30 -0
  5. docent_python-0.1.64a0/.gitignore +0 -210
  6. docent_python-0.1.64a0/PKG-INFO +0 -37
  7. docent_python-0.1.64a0/README.md +0 -21
  8. docent_python-0.1.64a0/docent/__init__.py +0 -22
  9. docent_python-0.1.64a0/docent/_llm_util/__init__.py +0 -0
  10. docent_python-0.1.64a0/docent/_llm_util/data_models/__init__.py +0 -0
  11. docent_python-0.1.64a0/docent/_llm_util/data_models/exceptions.py +0 -89
  12. docent_python-0.1.64a0/docent/_llm_util/data_models/llm_output.py +0 -328
  13. docent_python-0.1.64a0/docent/_llm_util/llm_svc.py +0 -421
  14. docent_python-0.1.64a0/docent/_llm_util/model_registry.py +0 -206
  15. docent_python-0.1.64a0/docent/_llm_util/providers/__init__.py +0 -0
  16. docent_python-0.1.64a0/docent/_llm_util/providers/anthropic.py +0 -601
  17. docent_python-0.1.64a0/docent/_llm_util/providers/common.py +0 -70
  18. docent_python-0.1.64a0/docent/_llm_util/providers/google.py +0 -589
  19. docent_python-0.1.64a0/docent/_llm_util/providers/openai.py +0 -830
  20. docent_python-0.1.64a0/docent/_llm_util/providers/openrouter.py +0 -162
  21. docent_python-0.1.64a0/docent/_llm_util/providers/preference_types.py +0 -268
  22. docent_python-0.1.64a0/docent/_llm_util/providers/provider_registry.py +0 -172
  23. docent_python-0.1.64a0/docent/_log_util/__init__.py +0 -3
  24. docent_python-0.1.64a0/docent/_log_util/logger.py +0 -143
  25. docent_python-0.1.64a0/docent/data_models/__init__.py +0 -16
  26. docent_python-0.1.64a0/docent/data_models/_tiktoken_util.py +0 -91
  27. docent_python-0.1.64a0/docent/data_models/agent_run.py +0 -615
  28. docent_python-0.1.64a0/docent/data_models/chat/__init__.py +0 -39
  29. docent_python-0.1.64a0/docent/data_models/chat/content.py +0 -62
  30. docent_python-0.1.64a0/docent/data_models/chat/message.py +0 -193
  31. docent_python-0.1.64a0/docent/data_models/chat/response_format.py +0 -48
  32. docent_python-0.1.64a0/docent/data_models/chat/tool.py +0 -109
  33. docent_python-0.1.64a0/docent/data_models/citation.py +0 -256
  34. docent_python-0.1.64a0/docent/data_models/context_config.py +0 -88
  35. docent_python-0.1.64a0/docent/data_models/feedback.py +0 -410
  36. docent_python-0.1.64a0/docent/data_models/formatted_objects.py +0 -84
  37. docent_python-0.1.64a0/docent/data_models/judge.py +0 -17
  38. docent_python-0.1.64a0/docent/data_models/metadata_util.py +0 -180
  39. docent_python-0.1.64a0/docent/data_models/reading.py +0 -595
  40. docent_python-0.1.64a0/docent/data_models/regex.py +0 -56
  41. docent_python-0.1.64a0/docent/data_models/report.py +0 -16
  42. docent_python-0.1.64a0/docent/data_models/transcript.py +0 -431
  43. docent_python-0.1.64a0/docent/data_models/util.py +0 -170
  44. docent_python-0.1.64a0/docent/judges/__init__.py +0 -27
  45. docent_python-0.1.64a0/docent/judges/analysis.py +0 -77
  46. docent_python-0.1.64a0/docent/judges/impl.py +0 -717
  47. docent_python-0.1.64a0/docent/judges/runner.py +0 -136
  48. docent_python-0.1.64a0/docent/judges/stats.py +0 -205
  49. docent_python-0.1.64a0/docent/judges/types.py +0 -400
  50. docent_python-0.1.64a0/docent/judges/util/forgiving_json.py +0 -108
  51. docent_python-0.1.64a0/docent/judges/util/meta_schema.json +0 -119
  52. docent_python-0.1.64a0/docent/judges/util/meta_schema.py +0 -37
  53. docent_python-0.1.64a0/docent/judges/util/parse_output.py +0 -55
  54. docent_python-0.1.64a0/docent/judges/util/template_formatter.py +0 -167
  55. docent_python-0.1.64a0/docent/judges/util/voting.py +0 -351
  56. docent_python-0.1.64a0/docent/loaders/load_inspect.py +0 -215
  57. docent_python-0.1.64a0/docent/mcp/__init__.py +0 -9
  58. docent_python-0.1.64a0/docent/mcp/__main__.py +0 -10
  59. docent_python-0.1.64a0/docent/mcp/server.py +0 -643
  60. docent_python-0.1.64a0/docent/py.typed +0 -0
  61. docent_python-0.1.64a0/docent/samples/__init__.py +0 -3
  62. docent_python-0.1.64a0/docent/samples/load.py +0 -9
  63. docent_python-0.1.64a0/docent/samples/log.eval +0 -0
  64. docent_python-0.1.64a0/docent/samples/tb_airline.json +0 -1
  65. docent_python-0.1.64a0/docent/sdk/__init__.py +0 -16
  66. docent_python-0.1.64a0/docent/sdk/_agent_runs.py +0 -217
  67. docent_python-0.1.64a0/docent/sdk/_base.py +0 -346
  68. docent_python-0.1.64a0/docent/sdk/_client_util.py +0 -210
  69. docent_python-0.1.64a0/docent/sdk/_collections.py +0 -425
  70. docent_python-0.1.64a0/docent/sdk/_dql.py +0 -313
  71. docent_python-0.1.64a0/docent/sdk/_feedback.py +0 -157
  72. docent_python-0.1.64a0/docent/sdk/_labels.py +0 -225
  73. docent_python-0.1.64a0/docent/sdk/_readings.py +0 -1550
  74. docent_python-0.1.64a0/docent/sdk/_reports.py +0 -281
  75. docent_python-0.1.64a0/docent/sdk/_results.py +0 -311
  76. docent_python-0.1.64a0/docent/sdk/_rubrics.py +0 -320
  77. docent_python-0.1.64a0/docent/sdk/_sharing.py +0 -229
  78. docent_python-0.1.64a0/docent/sdk/agent_run_writer.py +0 -322
  79. docent_python-0.1.64a0/docent/sdk/client.py +0 -47
  80. docent_python-0.1.64a0/docent/sdk/integrations/__init__.py +0 -27
  81. docent_python-0.1.64a0/docent/sdk/integrations/harbor.py +0 -893
  82. docent_python-0.1.64a0/docent/sdk/integrations/inspect.py +0 -150
  83. docent_python-0.1.64a0/docent/sdk/integrations/nemogym.py +0 -611
  84. docent_python-0.1.64a0/docent/sdk/integrations/util.py +0 -84
  85. docent_python-0.1.64a0/docent/sdk/llm_context.py +0 -1188
  86. docent_python-0.1.64a0/docent/sdk/llm_request.py +0 -47
  87. docent_python-0.1.64a0/docent/sdk/reading.py +0 -327
  88. docent_python-0.1.64a0/docent/sdk/util.py +0 -16
  89. docent_python-0.1.64a0/docent/trace.py +0 -2809
  90. docent_python-0.1.64a0/pyproject.toml +0 -62
  91. docent_python-0.1.64a0/uv.lock +0 -3276
  92. {docent_python-0.1.64a0 → docent_python-0.1.67}/LICENSE.md +0 -0
@@ -0,0 +1,3 @@
1
+ # LICENSE.md is generated by scripts/push_to_pypi.sh from docent/LICENSE.md
2
+ # at build time so we keep one source of truth for license text.
3
+ LICENSE.md
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.4
2
+ Name: docent-python
3
+ Version: 0.1.67
4
+ Summary: Renamed to 'docent'. This package is a redirect that depends on 'docent'.
5
+ Project-URL: Homepage, https://github.com/TransluceAI/docent
6
+ Project-URL: Issues, https://github.com/TransluceAI/docent/issues
7
+ Project-URL: Docs, https://transluce.mintlify.app
8
+ Author-email: Transluce <info@transluce.org>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE.md
11
+ Requires-Python: >=3.11
12
+ Requires-Dist: docent==0.1.67
13
+ Description-Content-Type: text/markdown
14
+
15
+ # docent-python
16
+
17
+ This package has been renamed to [`docent`](https://pypi.org/project/docent/).
18
+
19
+ `docent-python` is now a thin redirect that depends on `docent`. Installing it
20
+ will install `docent` automatically, and `import docent` continues to work
21
+ without any code changes.
22
+
23
+ ## Migrating
24
+
25
+ Replace `docent-python` with `docent` in your project's dependencies:
26
+
27
+ ```diff
28
+ - docent-python
29
+ + docent
30
+ ```
31
+
32
+ The import path is unchanged:
33
+
34
+ ```python
35
+ import docent
36
+ ```
37
+
38
+ ## Source
39
+
40
+ Source code, issues, and documentation live in the canonical project:
41
+
42
+ - Repository: <https://github.com/TransluceAI/docent>
43
+ - Docs: <https://transluce.mintlify.app>
@@ -0,0 +1,29 @@
1
+ # docent-python
2
+
3
+ This package has been renamed to [`docent`](https://pypi.org/project/docent/).
4
+
5
+ `docent-python` is now a thin redirect that depends on `docent`. Installing it
6
+ will install `docent` automatically, and `import docent` continues to work
7
+ without any code changes.
8
+
9
+ ## Migrating
10
+
11
+ Replace `docent-python` with `docent` in your project's dependencies:
12
+
13
+ ```diff
14
+ - docent-python
15
+ + docent
16
+ ```
17
+
18
+ The import path is unchanged:
19
+
20
+ ```python
21
+ import docent
22
+ ```
23
+
24
+ ## Source
25
+
26
+ Source code, issues, and documentation live in the canonical project:
27
+
28
+ - Repository: <https://github.com/TransluceAI/docent>
29
+ - Docs: <https://transluce.mintlify.app>
@@ -0,0 +1,30 @@
1
+ [project]
2
+ name = "docent-python"
3
+ description = "Renamed to 'docent'. This package is a redirect that depends on 'docent'."
4
+ version = "0.1.67"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name="Transluce", email="info@transluce.org" },
8
+ ]
9
+ license = "Apache-2.0"
10
+ license-files = ["LICENSE.md"]
11
+
12
+ requires-python = ">=3.11"
13
+ dependencies = [
14
+ "docent==0.1.67",
15
+ ]
16
+
17
+ [build-system]
18
+ requires = ["hatchling"]
19
+ build-backend = "hatchling.build"
20
+
21
+ [tool.hatch.build.targets.wheel]
22
+ bypass-selection = true
23
+
24
+ [tool.hatch.build.targets.sdist]
25
+ only-include = ["README.md", "LICENSE.md", "pyproject.toml"]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/TransluceAI/docent"
29
+ Issues = "https://github.com/TransluceAI/docent/issues"
30
+ Docs = "https://transluce.mintlify.app"
@@ -1,210 +0,0 @@
1
- **/*_gitignore.*
2
- **/*_gitignore/
3
- *.db
4
- .stignore
5
- *syncthing*
6
- .DS_Store
7
- # *.sql (neil: disabled for ursid)
8
- *.gz
9
- *.tgz
10
-
11
- *.tfstate
12
- *.tfstate.backup
13
- */.terraform/
14
- */*.terraform.*
15
-
16
- .idea/
17
-
18
- # Byte-compiled / optimized / DLL files
19
- __pycache__/
20
- *.py[cod]
21
- *$py.class
22
-
23
- # C extensions
24
- *.so
25
-
26
- # Distribution / packaging
27
- .Python
28
- build/
29
- develop-eggs/
30
- dist/
31
- downloads/
32
- eggs/
33
- .eggs/
34
- parts/
35
- sdist/
36
- var/
37
- wheels/
38
- share/python-wheels/
39
- *.egg-info/
40
- .installed.cfg
41
- *.egg
42
- MANIFEST
43
-
44
- # PyInstaller
45
- # Usually these files are written by a python script from a template
46
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
47
- *.manifest
48
- *.spec
49
-
50
- # Installer logs
51
- pip-log.txt
52
- pip-delete-this-directory.txt
53
-
54
- # Unit test / coverage reports
55
- htmlcov/
56
- .tox/
57
- .nox/
58
- .coverage
59
- .coverage.*
60
- .cache
61
- nosetests.xml
62
- coverage.xml
63
- *.cover
64
- *.py,cover
65
- .hypothesis/
66
- .pytest_cache/
67
- cover/
68
-
69
- # Translations
70
- *.mo
71
- *.pot
72
-
73
- # Django stuff:
74
- *.log
75
- local_settings.py
76
- db.sqlite3
77
- db.sqlite3-journal
78
-
79
- # Flask stuff:
80
- instance/
81
- .webassets-cache
82
-
83
- # Scrapy stuff:
84
- .scrapy
85
-
86
- # Sphinx documentation
87
- docs/_build/
88
-
89
- # PyBuilder
90
- .pybuilder/
91
- target/
92
-
93
- # Jupyter Notebook
94
- .ipynb_checkpoints
95
-
96
- # IPython
97
- profile_default/
98
- ipython_config.py
99
-
100
- # pyenv
101
- # For a library or package, you might want to ignore these files since the code is
102
- # intended to run in multiple environments; otherwise, check them in:
103
- .python-version
104
-
105
- # pipenv
106
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
107
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
108
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
109
- # install all needed dependencies.
110
- #Pipfile.lock
111
-
112
- # poetry
113
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
114
- # This is especially recommended for binary packages to ensure reproducibility, and is more
115
- # commonly ignored for libraries.
116
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
117
- #poetry.lock
118
-
119
- # pdm
120
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
121
- #pdm.lock
122
- # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
123
- # in version control.
124
- # https://pdm.fming.dev/#use-with-ide
125
- .pdm.toml
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
- .env.*
140
- !.env.template
141
- .venv
142
- env/
143
- venv/
144
- ENV/
145
- env.bak/
146
- venv.bak/
147
-
148
- # Docent
149
- docent.env*
150
- docent_analyses/
151
-
152
- # Spyder project settings
153
- .spyderproject
154
- .spyproject
155
-
156
- # Rope project settings
157
- .ropeproject
158
-
159
- # mkdocs documentation
160
- /site
161
-
162
- # mypy
163
- .mypy_cache/
164
- .dmypy.json
165
- dmypy.json
166
-
167
- # Pyre type checker
168
- .pyre/
169
-
170
- # pytype static type analyzer
171
- .pytype/
172
-
173
- # Cython debug symbols
174
- cython_debug/
175
-
176
- # PyCharm
177
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
178
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
179
- # and can be added to the global gitignore or merged into this file. For a more nuclear
180
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
181
- #.idea/
182
-
183
- # wandb
184
- **/wandb/
185
-
186
- # Marimo notebook outputs
187
- **/__marimo__/
188
-
189
- # yarn
190
- **/.yarn/
191
- **/.pnp.*
192
-
193
- # data
194
- *.npy
195
- *.csv
196
- *.pkl
197
-
198
- # personal
199
- inspect_evals
200
-
201
- *.swp
202
-
203
- # test data cache
204
- data/cache
205
-
206
- # dont commit package lock, force use of bun lock
207
- package-lock.json
208
-
209
- # Claude Code worktrees
210
- .claude/worktrees/
@@ -1,37 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: docent-python
3
- Version: 0.1.64a0
4
- Summary: Docent SDK
5
- Project-URL: Homepage, https://github.com/TransluceAI/docent
6
- Project-URL: Issues, https://github.com/TransluceAI/docent/issues
7
- Project-URL: Docs, https://transluce.mintlify.app
8
- Author-email: Transluce <info@transluce.org>
9
- License-Expression: Apache-2.0
10
- License-File: LICENSE.md
11
- Requires-Python: >=3.11
12
- Requires-Dist: anthropic>=0.47.0
13
- Requires-Dist: backoff>=2.2.1
14
- Requires-Dist: google-genai>=1.16.1
15
- Requires-Dist: httpx>=0.27.0
16
- Requires-Dist: inspect-ai>=0.3.132
17
- Requires-Dist: jsonschema>=4.24.0
18
- Requires-Dist: mcp>=1.0.0
19
- Requires-Dist: openai>=1.68.0
20
- Requires-Dist: opentelemetry-api>=1.34.1
21
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.34.1
22
- Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.34.1
23
- Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.14
24
- Requires-Dist: opentelemetry-instrumentation-bedrock>=0.40.14
25
- Requires-Dist: opentelemetry-instrumentation-google-generativeai>=0.40.14
26
- Requires-Dist: opentelemetry-instrumentation-langchain>=0.40.14
27
- Requires-Dist: opentelemetry-instrumentation-openai>=0.40.14
28
- Requires-Dist: opentelemetry-instrumentation-threading>=0.55b1
29
- Requires-Dist: opentelemetry-sdk>=1.34.1
30
- Requires-Dist: orjson>=3.11.6
31
- Requires-Dist: pandas>=2.3.3
32
- Requires-Dist: pydantic>=2.11.7
33
- Requires-Dist: pyjwt>=2.12.0
34
- Requires-Dist: python-dotenv>=1.0.0
35
- Requires-Dist: pyyaml>=6.0.2
36
- Requires-Dist: tiktoken>=0.7.0
37
- Requires-Dist: tqdm>=4.67.1
@@ -1,21 +0,0 @@
1
- !!! note
2
- Docent remains in alpha. The API is subject to change.
3
-
4
- # Docent Python SDK
5
-
6
- The official Python SDK for [Docent](https://github.com/TransluceAI/docent) - a platform for analyzing and visualizing AI agent execution traces.
7
-
8
- ## Overview
9
-
10
- Docent helps you understand AI agent behavior by providing tools to collect, analyze, and visualize agent execution data. This SDK allows you to programmatically interact with the Docent platform to:
11
-
12
- - Create and manage collections of agent runs
13
- - Upload agent execution traces and transcripts
14
- - Define custom dimensions and filters
15
- - Perform searches and analyses on agent behavior
16
-
17
- ## Installation
18
-
19
- ```bash
20
- pip install docent-python
21
- ```
@@ -1,22 +0,0 @@
1
- __all__ = [
2
- "Docent",
3
- "init",
4
- "load_config_file",
5
- "AgentRunRef",
6
- "TranscriptRef",
7
- "TranscriptSliceRef",
8
- "ReadingResultRef",
9
- "ResultRef",
10
- "Prompt",
11
- ]
12
-
13
- from docent.sdk.agent_run_writer import init
14
- from docent.sdk.client import Docent, load_config_file
15
- from docent.sdk.llm_context import (
16
- AgentRunRef,
17
- Prompt,
18
- ReadingResultRef,
19
- ResultRef,
20
- TranscriptRef,
21
- TranscriptSliceRef,
22
- )
File without changes
@@ -1,89 +0,0 @@
1
- from typing import Any
2
-
3
-
4
- class LLMException(Exception):
5
- error_type_id = "other"
6
- user_message = "The model failed to respond. Please try again later."
7
-
8
- def serialize(self) -> dict[str, Any]:
9
- data: dict[str, Any] = {
10
- "type": self.__class__.__name__,
11
- "user_message": getattr(self, "user_message", None),
12
- "error_type_id": getattr(self, "error_type_id", None),
13
- }
14
- if failed_output := getattr(self, "failed_output", None):
15
- data["failed_output"] = str(failed_output)
16
- return data
17
-
18
- @classmethod
19
- def serialize_llm_errors(cls, errors: list["LLMException"]) -> list[dict[str, Any]]:
20
- return [error.serialize() for error in errors]
21
-
22
-
23
- class CompletionTooLongException(LLMException):
24
- error_type_id = "completion_too_long"
25
- user_message = "Completion too long."
26
-
27
-
28
- class RateLimitException(LLMException):
29
- error_type_id = "rate_limit"
30
- user_message = "Rate limited by the model provider. Please wait and try again."
31
-
32
-
33
- class ContextWindowException(LLMException):
34
- error_type_id = "context_window"
35
- user_message = "Context window exceeded."
36
-
37
-
38
- class InvalidPromptException(LLMException):
39
- error_type_id = "invalid_prompt"
40
- user_message = "The model provider rejected this prompt for safety reasons."
41
-
42
-
43
- class NoResponseException(LLMException):
44
- error_type_id = "no_response"
45
- user_message = "The model returned an empty response. Please try again later."
46
-
47
-
48
- class DocentUsageLimitException(LLMException):
49
- error_type_id = "docent_usage_limit"
50
- user_message = "Free daily usage limit reached. Add your own API key in settings or contact us for increased limits."
51
-
52
-
53
- class ProviderAuthenticationException(LLMException):
54
- error_type_id = "provider_authentication"
55
-
56
- def __init__(self, message: str = ""):
57
- super().__init__(message)
58
- self.user_message = (
59
- "The model provider API key could not be authenticated. "
60
- "If you added your own key, update it in Settings > Model providers."
61
- )
62
-
63
-
64
- class ValidationFailedException(LLMException):
65
- error_type_id = "validation_failed"
66
- user_message = "The model returned invalid output that failed validation."
67
-
68
- def __init__(self, message: str = "", failed_output: str | None = None):
69
- super().__init__(message)
70
- self.failed_output = failed_output
71
-
72
-
73
- class TimeoutException(LLMException):
74
- error_type_id = "timeout"
75
- user_message = "The request timed out. The model took too long to respond."
76
-
77
-
78
- LLM_ERROR_TYPES: list[type[LLMException]] = [
79
- LLMException,
80
- CompletionTooLongException,
81
- RateLimitException,
82
- ContextWindowException,
83
- InvalidPromptException,
84
- NoResponseException,
85
- DocentUsageLimitException,
86
- ProviderAuthenticationException,
87
- ValidationFailedException,
88
- TimeoutException,
89
- ]