getstack 0.16.0__tar.gz → 0.17.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.
Files changed (71) hide show
  1. {getstack-0.16.0 → getstack-0.17.0}/PKG-INFO +1 -1
  2. {getstack-0.16.0 → getstack-0.17.0}/pyproject.toml +1 -1
  3. getstack-0.17.0/src/getstack/_async/usage.py +25 -0
  4. getstack-0.17.0/src/getstack/usage.py +55 -0
  5. getstack-0.16.0/src/getstack/_async/usage.py +0 -15
  6. getstack-0.16.0/src/getstack/usage.py +0 -37
  7. {getstack-0.16.0 → getstack-0.17.0}/.gitignore +0 -0
  8. {getstack-0.16.0 → getstack-0.17.0}/CLAUDE.md +0 -0
  9. {getstack-0.16.0 → getstack-0.17.0}/LICENSE +0 -0
  10. {getstack-0.16.0 → getstack-0.17.0}/README.md +0 -0
  11. {getstack-0.16.0 → getstack-0.17.0}/scripts/verify_sign_claim_crosslang.py +0 -0
  12. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/__init__.py +0 -0
  13. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/__init__.py +0 -0
  14. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/agents.py +0 -0
  15. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/audit.py +0 -0
  16. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/credentials.py +0 -0
  17. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/delivery_methods.py +0 -0
  18. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/detector_config.py +0 -0
  19. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/dropoffs.py +0 -0
  20. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/evidence_packs.py +0 -0
  21. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/identity.py +0 -0
  22. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/inbound_webhooks.py +0 -0
  23. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/intents.py +0 -0
  24. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/llm.py +0 -0
  25. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/missions.py +0 -0
  26. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/notifications.py +0 -0
  27. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/partner_tenants.py +0 -0
  28. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/passport_session.py +0 -0
  29. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/passports.py +0 -0
  30. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/proxy.py +0 -0
  31. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/reviews.py +0 -0
  32. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/scan.py +0 -0
  33. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/security_events.py +0 -0
  34. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/services.py +0 -0
  35. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/skills.py +0 -0
  36. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/_async/team.py +0 -0
  37. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/agent_auth.py +0 -0
  38. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/agents.py +0 -0
  39. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/audit.py +0 -0
  40. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/auth.py +0 -0
  41. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/browser_bootstrap.py +0 -0
  42. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/client.py +0 -0
  43. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/credentials.py +0 -0
  44. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/delivery_methods.py +0 -0
  45. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/detector_config.py +0 -0
  46. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/dropoffs.py +0 -0
  47. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/errors.py +0 -0
  48. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/evidence_packs.py +0 -0
  49. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/identity.py +0 -0
  50. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/inbound_webhooks.py +0 -0
  51. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/intents.py +0 -0
  52. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/llm.py +0 -0
  53. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/missions.py +0 -0
  54. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/notifications.py +0 -0
  55. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/partner_tenants.py +0 -0
  56. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/passport_header_verify.py +0 -0
  57. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/passport_session.py +0 -0
  58. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/passports.py +0 -0
  59. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/proxy.py +0 -0
  60. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/py.typed +0 -0
  61. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/reviews.py +0 -0
  62. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/scan.py +0 -0
  63. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/security_events.py +0 -0
  64. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/services.py +0 -0
  65. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/sign_claim.py +0 -0
  66. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/skills.py +0 -0
  67. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/team.py +0 -0
  68. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/types.py +0 -0
  69. {getstack-0.16.0 → getstack-0.17.0}/src/getstack/verify_offline.py +0 -0
  70. {getstack-0.16.0 → getstack-0.17.0}/tests/test_parity.py +0 -0
  71. {getstack-0.16.0 → getstack-0.17.0}/tests/test_sign_claim.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: getstack
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: Python SDK for STACK — trust infrastructure for AI agents
5
5
  Project-URL: Homepage, https://getstack.run
6
6
  Project-URL: Documentation, https://getstack.run/docs/sdk
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "getstack"
7
- version = "0.16.0"
7
+ version = "0.17.0"
8
8
  description = "Python SDK for STACK — trust infrastructure for AI agents"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -0,0 +1,25 @@
1
+ """Async mirror of UsageService."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+ from ..client import AsyncHttpClient
8
+
9
+
10
+ class AsyncUsageService:
11
+ def __init__(self, client: AsyncHttpClient):
12
+ self._client = client
13
+
14
+ async def get(
15
+ self,
16
+ *,
17
+ since: str | None = None,
18
+ until: str | None = None,
19
+ ) -> dict[str, Any]:
20
+ params: dict[str, str] = {}
21
+ if since is not None:
22
+ params["since"] = since
23
+ if until is not None:
24
+ params["until"] = until
25
+ return await self._client.get("/v1/usage", params=params or None)
@@ -0,0 +1,55 @@
1
+ """Usage service — `/v1/usage` (usage + spend + earnings rollup).
2
+
3
+ The one-call rollup of what your operator consumed against its plan,
4
+ spent, and earned this billing period. Superset of the per-domain meters
5
+ (`stack.scan.usage()`, `stack.llm.usage`, `stack.proxy` counts) — one
6
+ authoritative shape the CLI and dashboard read too. Money fields are in
7
+ cents.
8
+
9
+ Example::
10
+
11
+ u = stack.usage.get()
12
+ p = u["consumption"]["passports"]
13
+ print(f"Passports {p['used']}/{p['limit']}")
14
+ print(f"Spent this period: ${u['spend_cents']['total'] / 100:.2f}")
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ from typing import Any
20
+
21
+ from .client import HttpClient
22
+
23
+
24
+ class UsageService:
25
+ def __init__(self, client: HttpClient):
26
+ self._client = client
27
+
28
+ def get(
29
+ self,
30
+ *,
31
+ since: str | None = None,
32
+ until: str | None = None,
33
+ ) -> dict[str, Any]:
34
+ """Usage, spend, and earnings for the current billing period.
35
+
36
+ Args:
37
+ since: Optional window start (ISO-8601 or unix-ms). When set, the
38
+ flow metrics (spend, passports, dropoffs, skill invocations,
39
+ proxy) are scoped to the window; inventory meters gain a
40
+ ``created_in_window`` count. Omit for the billing period.
41
+ until: Optional exclusive window end.
42
+
43
+ Returns:
44
+ Dict with keys: tier, period_start, period_end, period_label,
45
+ consumption (per-meter {used, limit, created_in_window?}),
46
+ spend_cents (skills / llm_compute / identity / overage / total),
47
+ wallet_cents ({balance}), and earnings_cents ({unpaid, lifetime}).
48
+ All money in cents.
49
+ """
50
+ params: dict[str, str] = {}
51
+ if since is not None:
52
+ params["since"] = since
53
+ if until is not None:
54
+ params["until"] = until
55
+ return self._client.get("/v1/usage", params=params or None)
@@ -1,15 +0,0 @@
1
- """Async mirror of UsageService."""
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Any
6
-
7
- from ..client import AsyncHttpClient
8
-
9
-
10
- class AsyncUsageService:
11
- def __init__(self, client: AsyncHttpClient):
12
- self._client = client
13
-
14
- async def get(self) -> dict[str, Any]:
15
- return await self._client.request("GET", "/v1/usage")
@@ -1,37 +0,0 @@
1
- """Usage service — `/v1/usage` (usage + spend + earnings rollup).
2
-
3
- The one-call rollup of what your operator consumed against its plan,
4
- spent, and earned this billing period. Superset of the per-domain meters
5
- (`stack.scan.usage()`, `stack.llm.usage`, `stack.proxy` counts) — one
6
- authoritative shape the CLI and dashboard read too. Money fields are in
7
- cents.
8
-
9
- Example::
10
-
11
- u = stack.usage.get()
12
- p = u["consumption"]["passports"]
13
- print(f"Passports {p['used']}/{p['limit']}")
14
- print(f"Spent this period: ${u['spend_cents']['total'] / 100:.2f}")
15
- """
16
-
17
- from __future__ import annotations
18
-
19
- from typing import Any
20
-
21
- from .client import HttpClient
22
-
23
-
24
- class UsageService:
25
- def __init__(self, client: HttpClient):
26
- self._client = client
27
-
28
- def get(self) -> dict[str, Any]:
29
- """Usage, spend, and earnings for the current billing period.
30
-
31
- Returns:
32
- Dict with keys: tier, period_start, period_end, consumption
33
- (per-meter {used, limit}), spend_cents (skills / llm_compute /
34
- identity / overage / total), wallet_cents ({balance}), and
35
- earnings_cents ({unpaid, lifetime}). All money in cents.
36
- """
37
- return self._client.request("GET", "/v1/usage")
File without changes
File without changes
File without changes
File without changes
File without changes