stacklink-sdk 0.3.14__tar.gz → 0.3.15__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.
- {stacklink_sdk-0.3.14/stacklink_sdk.egg-info → stacklink_sdk-0.3.15}/PKG-INFO +1 -1
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/pyproject.toml +1 -1
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/billing.py +42 -3
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/client.py +1 -1
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/workbench.py +27 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15/stacklink_sdk.egg-info}/PKG-INFO +1 -1
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/LICENSE +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/README.md +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/setup.cfg +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/__init__.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/api_keys.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/approvals.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/artifacts.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/auth_configs.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/bots.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/claude_agent.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/connected_accounts.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/errors.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/executions.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/knowledge.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/logs.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/mcp.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/memory.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/openai_agents.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/openai_memory.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/projects.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/providers.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/sessions.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/tools.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/triggers.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/types.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/webhooks.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink/x_chat.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink_sdk.egg-info/SOURCES.txt +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink_sdk.egg-info/dependency_links.txt +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink_sdk.egg-info/requires.txt +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/stacklink_sdk.egg-info/top_level.txt +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_client.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_google_docs_provider.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_google_drive_provider.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_google_sheets_provider.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_openai_memory.py +0 -0
- {stacklink_sdk-0.3.14 → stacklink_sdk-0.3.15}/tests/test_zoho_books_provider.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "stacklink-sdk"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.15"
|
|
8
8
|
description = "Python SDK for Stacklink sessions, tools, MCP, auth, workbench, logs, knowledge, and billing."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LicenseRef-Proprietary"
|
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any, TypedDict, cast
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ResourceAllowanceAdjustment(TypedDict, total=False):
|
|
7
|
+
credited: int
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ResourceUsage(ResourceAllowanceAdjustment):
|
|
11
|
+
key: str
|
|
12
|
+
label: str
|
|
13
|
+
unit: str
|
|
14
|
+
included: int
|
|
15
|
+
used: int
|
|
16
|
+
reserved: int
|
|
17
|
+
remaining: int
|
|
18
|
+
additional: int
|
|
19
|
+
additionalCents: int
|
|
20
|
+
priceMicros: str
|
|
21
|
+
unitQuantity: int
|
|
22
|
+
rateVersion: str
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AdditionalSpending(TypedDict):
|
|
26
|
+
approvedCents: int
|
|
27
|
+
usedCents: int
|
|
28
|
+
reservedCents: int
|
|
29
|
+
availableCents: int
|
|
30
|
+
currency: str
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class UsageSummary(TypedDict, total=False):
|
|
34
|
+
agreementVersion: str
|
|
35
|
+
resources: list[ResourceUsage]
|
|
36
|
+
spending: dict[str, AdditionalSpending]
|
|
37
|
+
workspace: dict[str, Any]
|
|
38
|
+
subscription: dict[str, Any]
|
|
39
|
+
plan: dict[str, Any]
|
|
40
|
+
period: dict[str, str]
|
|
41
|
+
usage: dict[str, Any]
|
|
42
|
+
overagePending: bool
|
|
4
43
|
|
|
5
44
|
|
|
6
45
|
class BillingResource:
|
|
@@ -16,8 +55,8 @@ class BillingResource:
|
|
|
16
55
|
def subscription(self):
|
|
17
56
|
return self.client.request("GET", "/v1/subscription")
|
|
18
57
|
|
|
19
|
-
def usage(self, **query):
|
|
20
|
-
return self.client.request("GET", "/v1/usage", query=query)
|
|
58
|
+
def usage(self, **query) -> UsageSummary:
|
|
59
|
+
return cast(UsageSummary, self.client.request("GET", "/v1/usage", query=query))
|
|
21
60
|
|
|
22
61
|
def usage_events(self, **query):
|
|
23
62
|
return self.client.request("GET", "/v1/usage/events", query=query)
|
|
@@ -37,7 +37,7 @@ from .types import Json, Transport
|
|
|
37
37
|
from .webhooks import WebhooksResource
|
|
38
38
|
from .workbench import WorkbenchResource
|
|
39
39
|
|
|
40
|
-
STACKLINK_PYTHON_SDK_VERSION = "0.3.
|
|
40
|
+
STACKLINK_PYTHON_SDK_VERSION = "0.3.15"
|
|
41
41
|
STACKLINK_PYTHON_USER_AGENT = f"stacklink-python/{STACKLINK_PYTHON_SDK_VERSION}"
|
|
42
42
|
|
|
43
43
|
|
|
@@ -68,6 +68,28 @@ class WorkbenchSession(TypedDict, total=False):
|
|
|
68
68
|
updatedAt: str
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
class WorkbenchComputeState(TypedDict, total=False):
|
|
72
|
+
status: str
|
|
73
|
+
stopped: bool
|
|
74
|
+
fundedThrough: int | None
|
|
75
|
+
activeExecutionCount: int
|
|
76
|
+
generation: int | None
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class WorkbenchRuntimeCapacity(TypedDict):
|
|
80
|
+
measurement: Literal["customer_active_ms", "legacy_operations"]
|
|
81
|
+
settlementStatus: Literal["pending", "acknowledgement_pending", "settled"]
|
|
82
|
+
reservedMilliseconds: int
|
|
83
|
+
workspace: dict[str, Any] | None
|
|
84
|
+
intervals: list[dict[str, Any]]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class WorkbenchComputeStatus(TypedDict):
|
|
88
|
+
workbenchSession: WorkbenchSession
|
|
89
|
+
compute: WorkbenchComputeState
|
|
90
|
+
billing: WorkbenchRuntimeCapacity
|
|
91
|
+
|
|
92
|
+
|
|
71
93
|
class WorkbenchSessionUseResponse(TypedDict):
|
|
72
94
|
workbenchSession: WorkbenchSession
|
|
73
95
|
reused: bool
|
|
@@ -1084,6 +1106,11 @@ class WorkbenchResource:
|
|
|
1084
1106
|
return _wait_for_workbench_response(self.client, body, response)
|
|
1085
1107
|
return response
|
|
1086
1108
|
|
|
1109
|
+
def compute_status(self, session_id: str, workbench_session_id: str) -> WorkbenchComputeStatus:
|
|
1110
|
+
return cast(WorkbenchComputeStatus, self.client.request("POST", "/v1/workbench/run", json_body={
|
|
1111
|
+
"sessionId": session_id, "workbenchSessionId": workbench_session_id, "operation": "compute_status",
|
|
1112
|
+
}))
|
|
1113
|
+
|
|
1087
1114
|
def destroy(self, session_id: str, workbench_session_id: str):
|
|
1088
1115
|
return self.run({
|
|
1089
1116
|
"sessionId": session_id,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|