trulens-apps-cursor 2.14.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.
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: trulens-apps-cursor
|
|
3
|
+
Version: 2.14.0
|
|
4
|
+
Summary: Cursor hook instrumentation plugin for TruLens.
|
|
5
|
+
License: MIT
|
|
6
|
+
Author: Snowflake Inc.
|
|
7
|
+
Author-email: ml-observability-wg-dl@snowflake.com
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Requires-Dist: trulens-core (>=2.0.0,<3.0.0)
|
|
18
|
+
Project-URL: Homepage, https://trulens.org/
|
|
19
|
+
Project-URL: Repository, https://github.com/truera/trulens
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# trulens-apps-cursor
|
|
23
|
+
|
|
24
|
+
Cursor hook configuration and payload mapping for TruLens client-hook
|
|
25
|
+
instrumentation.
|
|
26
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "poetry.core.masonry.api"
|
|
3
|
+
requires = [
|
|
4
|
+
"poetry-core",
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
[tool.poetry]
|
|
8
|
+
name = "trulens-apps-cursor"
|
|
9
|
+
version = "2.14.0"
|
|
10
|
+
description = "Cursor hook instrumentation plugin for TruLens."
|
|
11
|
+
authors = [
|
|
12
|
+
"Snowflake Inc. <ml-observability-wg-dl@snowflake.com>",
|
|
13
|
+
]
|
|
14
|
+
license = "MIT"
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
packages = [
|
|
17
|
+
{ include = "trulens" },
|
|
18
|
+
]
|
|
19
|
+
homepage = "https://trulens.org/"
|
|
20
|
+
repository = "https://github.com/truera/trulens"
|
|
21
|
+
|
|
22
|
+
[tool.poetry.dependencies]
|
|
23
|
+
python = "^3.9"
|
|
24
|
+
trulens-core = { version = "^2.0.0" }
|
|
25
|
+
|
|
26
|
+
[tool.poetry.group.dev.dependencies]
|
|
27
|
+
trulens-core = { path = "../../core" }
|
|
28
|
+
|
|
29
|
+
[tool.poetry.plugins."trulens.client_hooks"]
|
|
30
|
+
cursor = "trulens.apps.cursor:client_spec"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Minimal Cursor-native hook specification."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from trulens.core.otel.client_hooks.clients import ClientSpec
|
|
6
|
+
from trulens.core.otel.client_hooks.clients import FieldAliases
|
|
7
|
+
|
|
8
|
+
_HOOK_EVENTS = (
|
|
9
|
+
"beforeSubmitPrompt",
|
|
10
|
+
"preToolUse",
|
|
11
|
+
"postToolUse",
|
|
12
|
+
"postToolUseFailure",
|
|
13
|
+
"subagentStart",
|
|
14
|
+
"subagentStop",
|
|
15
|
+
"beforeShellExecution",
|
|
16
|
+
"afterShellExecution",
|
|
17
|
+
"beforeMCPExecution",
|
|
18
|
+
"afterMCPExecution",
|
|
19
|
+
"afterFileEdit",
|
|
20
|
+
"afterAgentResponse",
|
|
21
|
+
"stop",
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _config(command: str):
|
|
26
|
+
return {
|
|
27
|
+
"version": 1,
|
|
28
|
+
"hooks": {event: [{"command": command}] for event in _HOOK_EVENTS},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
client_spec = ClientSpec(
|
|
33
|
+
name="cursor",
|
|
34
|
+
aliases=(),
|
|
35
|
+
user_config_path=Path("~/.cursor/hooks.json"),
|
|
36
|
+
project_config_path=Path(".cursor/hooks.json"),
|
|
37
|
+
hook_events=_HOOK_EVENTS,
|
|
38
|
+
field_aliases=FieldAliases(
|
|
39
|
+
conversation=("conversation_id",),
|
|
40
|
+
turn=("generation_id",),
|
|
41
|
+
operation=(
|
|
42
|
+
"tool_call_id",
|
|
43
|
+
"operation_id",
|
|
44
|
+
"subagent_id",
|
|
45
|
+
"agent_id",
|
|
46
|
+
),
|
|
47
|
+
response=("response", "text"),
|
|
48
|
+
),
|
|
49
|
+
config_builder=_config,
|
|
50
|
+
)
|