limetry 1.2.99__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,53 @@
1
+ target/
2
+ /.yarn/*
3
+ !/.yarn/releases
4
+ !/.yarn/releases/**
5
+ **/.next
6
+ **/.source
7
+ **/next-env.d.ts
8
+ **/node_modules
9
+ **/*.tsbuildinfo
10
+ **/dist
11
+ **/Pulumi.load-test-config.yaml
12
+ **/Pulumi.load-target-*.yaml
13
+ **/build
14
+ **/coverage
15
+ packages/server/lambda-bundle
16
+ packages/api/lambda-bundle
17
+ packages/assistant/lambda-bundle
18
+ packages/web/out
19
+ # Derived from versions/compatibility.json at build / parent align time
20
+ packages/web/public/compatibility.json
21
+ # Embedded from repo-root build-info.json at SDK build / parent align time
22
+ packages/sdk/src/build-info.generated.ts
23
+ packages/infra/bin
24
+ packages/wasm/pkg
25
+ docs/api
26
+
27
+ # Generated assistant corpus (rebuild with: yarn workspace @limetry/assistant assistant:ingest)
28
+ docs/assistant/corpus/assistant-corpus.json
29
+ docs/assistant/corpus/plain/
30
+
31
+ .DS_Store
32
+ .env*
33
+ !.env.example
34
+ !.env.production.example
35
+ .env.local
36
+ .env.*.local
37
+ *.log
38
+ **/__pycache__/
39
+ **/.venv/
40
+ *.pyc
41
+ .vercel
42
+ .limetry/
43
+
44
+ .env.sentry-build-plugin
45
+
46
+ # Pruned from this history: spend engine and payment-era notes
47
+ archive/
48
+ blog/
49
+ .github/workflows/publish-wasm.yml
50
+ scripts/build-wasm.sh
51
+ .cursor/plans/Canvas - Limetry Cloud free tier reevaluation.md
52
+ .cursor/plans/
53
+ .cursor/rules/package-manager-plans.mdc
limetry-1.2.99/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Limetry
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.
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.5
2
+ Name: limetry
3
+ Version: 1.2.99
4
+ Summary: Python SDK for Limetry agent action governance
5
+ Project-URL: Homepage, https://limetry.org
6
+ Project-URL: Documentation, https://limetry.org/docs/sdk
7
+ Project-URL: Repository, https://github.com/limetrydev/limetry
8
+ Project-URL: Issues, https://github.com/limetrydev/limetry/issues
9
+ Author-email: Limetry <hello@limetry.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: agent,evaluate,governance,limetry,policy
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: httpx>=0.27
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
26
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
27
+ Requires-Dist: pytest>=8.0; extra == 'dev'
28
+ Requires-Dist: respx>=0.21; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # limetry
32
+
33
+ Python SDK for [Limetry](https://limetry.org) agent action governance. Evaluate an
34
+ action before it runs, then record a privacy-safe audit of what happened.
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ pip install limetry
40
+ ```
41
+
42
+ Also available on conda-forge after the first PyPI release:
43
+
44
+ ```bash
45
+ conda install -c conda-forge limetry
46
+ ```
47
+
48
+ Requires Python 3.11 or newer.
49
+
50
+ The TypeScript equivalent is [`@limetry/sdk`](https://www.npmjs.com/package/@limetry/sdk).
51
+
52
+ ## Evaluate an action
53
+
54
+ `LIMETRY_API_KEY` is a bearer token from `limetry setup` or your organization.
55
+ `LIMETRY_BASE_URL` overrides the default API origin.
56
+
57
+ ```python
58
+ from limetry import create_remote_engine, create_slim_action_policy, redact_action_intent
59
+ import uuid
60
+ from datetime import datetime, timezone
61
+
62
+ policy = create_slim_action_policy(
63
+ agent_id="checkout-agent",
64
+ allowed_action_types=["http.request"],
65
+ denied_action_types=["deploy"],
66
+ max_cost_minor=100,
67
+ audit_mode="minimal",
68
+ )
69
+
70
+ intent = {
71
+ "intent_id": str(uuid.uuid4()),
72
+ "policy_id": policy["policy_id"],
73
+ "agent_id": "checkout-agent",
74
+ "action_type": "http.request",
75
+ "resource": "https://example.com/orders",
76
+ "issued_at": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
77
+ }
78
+
79
+ engine = create_remote_engine()
80
+ result = engine.evaluate_action(intent)
81
+ print(result.get("decision"))
82
+
83
+ safe_for_logs = redact_action_intent(intent)
84
+ ```
85
+
86
+ `decision` is `allow`, `deny`, or `approval_required`.
87
+
88
+ Async callers can use `create_async_remote_engine()` / `AsyncRemotePolicyEngine`.
89
+
90
+ ## Privacy
91
+
92
+ Do not put API keys, passwords, or chat transcripts in action metadata. Use
93
+ `redact_details` and `project_intent_for_audit` before you store an audit record.
94
+ The default audit mode keeps a minimized projection.
95
+
96
+ ## License
97
+
98
+ MIT
@@ -0,0 +1,68 @@
1
+ # limetry
2
+
3
+ Python SDK for [Limetry](https://limetry.org) agent action governance. Evaluate an
4
+ action before it runs, then record a privacy-safe audit of what happened.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ pip install limetry
10
+ ```
11
+
12
+ Also available on conda-forge after the first PyPI release:
13
+
14
+ ```bash
15
+ conda install -c conda-forge limetry
16
+ ```
17
+
18
+ Requires Python 3.11 or newer.
19
+
20
+ The TypeScript equivalent is [`@limetry/sdk`](https://www.npmjs.com/package/@limetry/sdk).
21
+
22
+ ## Evaluate an action
23
+
24
+ `LIMETRY_API_KEY` is a bearer token from `limetry setup` or your organization.
25
+ `LIMETRY_BASE_URL` overrides the default API origin.
26
+
27
+ ```python
28
+ from limetry import create_remote_engine, create_slim_action_policy, redact_action_intent
29
+ import uuid
30
+ from datetime import datetime, timezone
31
+
32
+ policy = create_slim_action_policy(
33
+ agent_id="checkout-agent",
34
+ allowed_action_types=["http.request"],
35
+ denied_action_types=["deploy"],
36
+ max_cost_minor=100,
37
+ audit_mode="minimal",
38
+ )
39
+
40
+ intent = {
41
+ "intent_id": str(uuid.uuid4()),
42
+ "policy_id": policy["policy_id"],
43
+ "agent_id": "checkout-agent",
44
+ "action_type": "http.request",
45
+ "resource": "https://example.com/orders",
46
+ "issued_at": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
47
+ }
48
+
49
+ engine = create_remote_engine()
50
+ result = engine.evaluate_action(intent)
51
+ print(result.get("decision"))
52
+
53
+ safe_for_logs = redact_action_intent(intent)
54
+ ```
55
+
56
+ `decision` is `allow`, `deny`, or `approval_required`.
57
+
58
+ Async callers can use `create_async_remote_engine()` / `AsyncRemotePolicyEngine`.
59
+
60
+ ## Privacy
61
+
62
+ Do not put API keys, passwords, or chat transcripts in action metadata. Use
63
+ `redact_details` and `project_intent_for_audit` before you store an audit record.
64
+ The default audit mode keeps a minimized projection.
65
+
66
+ ## License
67
+
68
+ MIT
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "limetry"
7
+ version = "1.2.99"
8
+ description = "Python SDK for Limetry agent action governance"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [
13
+ { name = "Limetry", email = "hello@limetry.com" },
14
+ ]
15
+ keywords = ["limetry", "agent", "governance", "policy", "evaluate"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Software Development :: Libraries",
25
+ "Typing :: Typed",
26
+ ]
27
+ dependencies = [
28
+ "httpx>=0.27",
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://limetry.org"
33
+ Documentation = "https://limetry.org/docs/sdk"
34
+ Repository = "https://github.com/limetrydev/limetry"
35
+ Issues = "https://github.com/limetrydev/limetry/issues"
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest>=8.0",
40
+ "pytest-asyncio>=0.24",
41
+ "pytest-cov>=5.0",
42
+ "respx>=0.21",
43
+ ]
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["src/limetry"]
47
+
48
+ [tool.hatch.build.targets.wheel.sources]
49
+ "src/limetry" = "limetry"
50
+
51
+ [tool.hatch.build.targets.sdist]
52
+ include = [
53
+ "/src",
54
+ "/tests",
55
+ "/README.md",
56
+ "/pyproject.toml",
57
+ ]
58
+
59
+ [tool.pytest.ini_options]
60
+ asyncio_mode = "auto"
61
+ testpaths = ["tests"]
62
+ pythonpath = ["src"]
63
+
64
+ [tool.coverage.run]
65
+ source = ["limetry"]
66
+ branch = true
67
+
68
+ [tool.coverage.report]
69
+ show_missing = true
70
+ fail_under = 80
@@ -0,0 +1,101 @@
1
+ """
2
+ Public entry for the Limetry Python SDK.
3
+
4
+ Re-exports policy engine clients, typed policy/intent contracts, privacy
5
+ helpers for audit projections, and Limetry error classes.
6
+ """
7
+
8
+ from limetry.compatibility import COMPATIBILITY
9
+ from limetry.engine import (
10
+ AsyncRemotePolicyEngine,
11
+ RemotePolicyEngine,
12
+ create_async_remote_engine,
13
+ create_remote_engine,
14
+ )
15
+ from limetry.errors import (
16
+ EngineLoadError,
17
+ LimetryError,
18
+ PaymentInterceptionError,
19
+ PolicyViolationError,
20
+ RateLimitExceededError,
21
+ )
22
+ from limetry.policy.slim import create_slim_action_policy, create_slim_policy
23
+ from limetry.privacy.redact import (
24
+ DEFAULT_AUDIT_MODE,
25
+ AuditIntentProjection,
26
+ AuditMode,
27
+ build_evaluated_audit_details,
28
+ build_minimized_authorization_request,
29
+ build_minimized_authorization_response,
30
+ build_recorded_audit_details,
31
+ is_sensitive_key,
32
+ project_intent_for_audit,
33
+ redact_action_intent,
34
+ redact_details,
35
+ redact_metadata,
36
+ resolve_audit_mode,
37
+ scrub_embedded_secrets,
38
+ scrub_resource,
39
+ )
40
+ from limetry.urls import (
41
+ DEFAULT_LIMETRY_BASE_URL,
42
+ DEFAULT_LIMETRY_CLOUD_BASE_URL,
43
+ LIMETRY_CLOUD_APP_ORIGIN,
44
+ LIMETRY_CLOUD_ORIGINS,
45
+ LIMETRY_OSS_ORIGINS,
46
+ resolve_limetry_base_url,
47
+ resolve_limetry_cloud_base_url,
48
+ )
49
+ from limetry.version import (
50
+ APP_VERSION,
51
+ AppVersion,
52
+ AppVersionChannel,
53
+ AppVersionInfo,
54
+ app_version,
55
+ format_app_version_label,
56
+ resolve_app_version,
57
+ )
58
+
59
+ __all__ = [
60
+ "APP_VERSION",
61
+ "AppVersion",
62
+ "AppVersionChannel",
63
+ "AppVersionInfo",
64
+ "AsyncRemotePolicyEngine",
65
+ "AuditIntentProjection",
66
+ "AuditMode",
67
+ "COMPATIBILITY",
68
+ "DEFAULT_AUDIT_MODE",
69
+ "DEFAULT_LIMETRY_BASE_URL",
70
+ "DEFAULT_LIMETRY_CLOUD_BASE_URL",
71
+ "EngineLoadError",
72
+ "LIMETRY_CLOUD_APP_ORIGIN",
73
+ "LIMETRY_CLOUD_ORIGINS",
74
+ "LIMETRY_OSS_ORIGINS",
75
+ "LimetryError",
76
+ "PaymentInterceptionError",
77
+ "PolicyViolationError",
78
+ "RateLimitExceededError",
79
+ "RemotePolicyEngine",
80
+ "app_version",
81
+ "build_evaluated_audit_details",
82
+ "build_minimized_authorization_request",
83
+ "build_minimized_authorization_response",
84
+ "build_recorded_audit_details",
85
+ "create_async_remote_engine",
86
+ "create_remote_engine",
87
+ "create_slim_action_policy",
88
+ "create_slim_policy",
89
+ "format_app_version_label",
90
+ "is_sensitive_key",
91
+ "project_intent_for_audit",
92
+ "redact_action_intent",
93
+ "redact_details",
94
+ "redact_metadata",
95
+ "resolve_app_version",
96
+ "resolve_audit_mode",
97
+ "resolve_limetry_base_url",
98
+ "resolve_limetry_cloud_base_url",
99
+ "scrub_embedded_secrets",
100
+ "scrub_resource",
101
+ ]
@@ -0,0 +1,9 @@
1
+ """Embedded build metadata. Regenerated by scripts/embed_build_info.py."""
2
+
3
+ BUILD_INFO = {
4
+ "version": "1.2.100",
5
+ "build": 10,
6
+ "builtAt": "2026-11-22T23:26:31.353Z",
7
+ "contentHash": "sha256:13947e15403153ab345aef154bf4583890427b4642f6311b2b8333de8a1025f6",
8
+ "gitSha": "8e62639"
9
+ }
@@ -0,0 +1,25 @@
1
+ """Product, package, website, and schema compatibility for this release."""
2
+
3
+ COMPATIBILITY = {
4
+ "product": "1.2.99",
5
+ "compatibleProduct": ">=1.2.0 <1.3.0",
6
+ "packages": {
7
+ "@limetry/ci": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
8
+ "@limetry/cli": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
9
+ "@limetry/mcp": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
10
+ "@limetry/preflight": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
11
+ "@limetry/sdk": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
12
+ "@limetry/shopify": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
13
+ "@limetry/sql": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
14
+ "@limetry/ui": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
15
+ "limetry": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
16
+ },
17
+ "websites": {
18
+ "@limetry/web": {"version": "1.2.99", "compatible": ">=1.2.0 <1.3.0"},
19
+ },
20
+ "schemas": {
21
+ "openapi.evaluate": {"version": "1.0.5", "compatible": ">=1.0.0 <2.0.0"},
22
+ "openapi.custom-gpt": {"version": "1.0.0", "compatible": ">=1.0.0 <2.0.0"},
23
+ "json.evaluate": {"version": "1.0.0", "compatible": ">=1.0.0 <2.0.0"},
24
+ },
25
+ }