stacklink-sdk 0.6.5__tar.gz → 0.6.7__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.6.5/stacklink_sdk.egg-info → stacklink_sdk-0.6.7}/PKG-INFO +6 -1
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/README.md +5 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/pyproject.toml +1 -1
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/__init__.py +2 -2
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/bots.py +82 -2
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/client.py +1 -1
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7/stacklink_sdk.egg-info}/PKG-INFO +6 -1
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/LICENSE +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/setup.cfg +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/api_keys.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/approvals.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/artifacts.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/auth_configs.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/billing.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/claude_agent.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/connected_accounts.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/errors.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/executions.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/knowledge.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/logs.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/mcp.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/memory.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/openai_agents.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/openai_memory.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/projects.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/providers.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/sessions.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/tools.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/triggers.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/types.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/webhooks.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/workbench.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/workflows.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink/x_chat.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink_sdk.egg-info/SOURCES.txt +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink_sdk.egg-info/dependency_links.txt +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink_sdk.egg-info/requires.txt +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/stacklink_sdk.egg-info/top_level.txt +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_amazon_seller_provider.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_client.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_google_docs_provider.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_google_drive_provider.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_google_sheets_provider.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_openai_memory.py +0 -0
- {stacklink_sdk-0.6.5 → stacklink_sdk-0.6.7}/tests/test_zoho_books_provider.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stacklink-sdk
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.7
|
|
4
4
|
Summary: Python SDK for Stacklink sessions, tools, MCP, auth, workbench, logs, knowledge, and billing.
|
|
5
5
|
Author: Stacklink
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -185,3 +185,8 @@ review ID; read that ID rather than submitting another task. Repository permissi
|
|
|
185
185
|
Bot budgets and the existing credit system apply to both entry paths.
|
|
186
186
|
|
|
187
187
|
[Bot job examples](https://docs.stacklink.in/docs/bots/sdk#add-review-code-to-any-bot)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## Issue Triage (0.6.6 staging candidate)
|
|
191
|
+
|
|
192
|
+
Use `bots.issues.report`, `list`, `get` and `action` on a Bot with a published Issue Triage Job. Report once with a stable `requestId`, then read the returned `issueId`. A receipt is not a completed investigation. Ticket actions use the existing approval flow; source connections do not change the Bot’s Slack or Teams author. Draft previews and job setup use the `bots.issues.preview`, `setup` and `save` methods. These additions require the staging candidate package until the matching public SDK is released.
|
|
@@ -164,3 +164,8 @@ review ID; read that ID rather than submitting another task. Repository permissi
|
|
|
164
164
|
Bot budgets and the existing credit system apply to both entry paths.
|
|
165
165
|
|
|
166
166
|
[Bot job examples](https://docs.stacklink.in/docs/bots/sdk#add-review-code-to-any-bot)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## Issue Triage (0.6.6 staging candidate)
|
|
170
|
+
|
|
171
|
+
Use `bots.issues.report`, `list`, `get` and `action` on a Bot with a published Issue Triage Job. Report once with a stable `requestId`, then read the returned `issueId`. A receipt is not a completed investigation. Ticket actions use the existing approval flow; source connections do not change the Bot’s Slack or Teams author. Draft previews and job setup use the `bots.issues.preview`, `setup` and `save` methods. These additions require the staging candidate package until the matching public SDK is released.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "stacklink-sdk"
|
|
7
|
-
version = "0.6.
|
|
7
|
+
version = "0.6.7"
|
|
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,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from .bots import BotJobs, ReviewHost, ReviewRepository, ReviewSettings, ReviewRequest, ReviewPreviewRequest, BotAvatar, verify_bot_api_request, sign_bot_trigger_request, BotRun, BotConnectionAction, BotExecutionWait, BotCapabilityFact, BotRequirement
|
|
3
|
+
from .bots import TriageSourceProvider, TriageReport, IssueTriageSettings, TriageAction, BotJobs, ReviewHost, ReviewRepository, ReviewSettings, ReviewRequest, ReviewPreviewRequest, BotAvatar, verify_bot_api_request, sign_bot_trigger_request, BotRun, BotConnectionAction, BotExecutionWait, BotCapabilityFact, BotRequirement
|
|
4
4
|
from .approvals import ApprovalDecision, ApprovalRecord, ApprovalEvent, ApprovalPermissions, CustomerApprovalGrantInput
|
|
5
5
|
from .webhooks import verify_webhook_signature
|
|
6
6
|
from .client import AsyncStacklink, STACKLINK_PYTHON_SDK_VERSION, Stacklink
|
|
@@ -27,7 +27,7 @@ from .types import (
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
-
"BotJobs", "ReviewHost", "ReviewRepository", "ReviewSettings", "ReviewRequest", "ReviewPreviewRequest",
|
|
30
|
+
"TriageSourceProvider", "TriageReport", "IssueTriageSettings", "TriageAction", "BotJobs", "ReviewHost", "ReviewRepository", "ReviewSettings", "ReviewRequest", "ReviewPreviewRequest",
|
|
31
31
|
"BotAvatar", "BotRun", "BotConnectionAction", "BotExecutionWait", "BotCapabilityFact", "BotRequirement",
|
|
32
32
|
"ApprovalDecision", "ApprovalRecord", "ApprovalEvent", "ApprovalPermissions",
|
|
33
33
|
"CustomerApprovalGrantInput",
|
|
@@ -201,8 +201,51 @@ class ReviewSettings(TypedDict):
|
|
|
201
201
|
reviewFocus: str
|
|
202
202
|
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
TriageSourceProvider = Literal["sentry", "datadog", "aws", "google_cloud", "sonarcloud", "github"]
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class TriageReport(TypedDict, total=False):
|
|
208
|
+
requestId: str
|
|
209
|
+
title: str
|
|
210
|
+
description: str
|
|
211
|
+
sourceId: str
|
|
212
|
+
resourceId: str
|
|
213
|
+
externalId: str
|
|
214
|
+
url: str
|
|
215
|
+
occurredAt: str
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class IssueTriageSettings(TypedDict):
|
|
219
|
+
sources: list[dict[str, Any]]
|
|
220
|
+
triggerIds: list[str]
|
|
221
|
+
destinations: list[dict[str, str]]
|
|
222
|
+
tickets: list[dict[str, Any]]
|
|
223
|
+
instructions: str
|
|
224
|
+
services: list[dict[str, Any]]
|
|
225
|
+
github: dict[str, list[str]]
|
|
226
|
+
watch: dict[str, int]
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class TriageAction(TypedDict, total=False):
|
|
230
|
+
requestId: str
|
|
231
|
+
action: Literal["continue", "retry_delivery", "ask", "watch", "stop_watch", "confirm_resolved", "reopen", "keep_together", "split", "prepare_ticket", "file_ticket"]
|
|
232
|
+
deliveryId: str
|
|
233
|
+
message: str
|
|
234
|
+
note: str
|
|
235
|
+
intervalMinutes: int
|
|
236
|
+
durationHours: int
|
|
237
|
+
relatedIssueId: str
|
|
238
|
+
receiptId: str
|
|
239
|
+
proposalId: str
|
|
240
|
+
destinationId: str
|
|
241
|
+
title: str
|
|
242
|
+
description: str
|
|
243
|
+
fields: dict[str, Any]
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
class BotJobs(TypedDict, total=False):
|
|
205
247
|
reviewCode: ReviewSettings | None
|
|
248
|
+
issueTriage: IssueTriageSettings | None
|
|
206
249
|
|
|
207
250
|
|
|
208
251
|
class ReviewRequest(TypedDict):
|
|
@@ -243,11 +286,48 @@ class BotReviews:
|
|
|
243
286
|
return self.client.request("GET", self._path(bot_id) + "/reviews/" + quote(review_id, safe=""))
|
|
244
287
|
|
|
245
288
|
|
|
289
|
+
class BotIssues:
|
|
290
|
+
"""Issue Triage shares the Bot's publication, funding, connections and approvals."""
|
|
291
|
+
def __init__(self, client):
|
|
292
|
+
self.client = client
|
|
293
|
+
|
|
294
|
+
def _path(self, bot_id: str) -> str:
|
|
295
|
+
return f"/v1/bots/{quote(bot_id, safe='')}"
|
|
296
|
+
|
|
297
|
+
def setup(self, bot_id: str):
|
|
298
|
+
return self.client.request("GET", self._path(bot_id) + "/issue-triage")
|
|
299
|
+
|
|
300
|
+
def save(self, bot_id: str, revision: int, settings: IssueTriageSettings):
|
|
301
|
+
return self.client.request("PUT", self._path(bot_id) + "/issue-triage", json_body={"revision": revision, "settings": settings})
|
|
302
|
+
|
|
303
|
+
def resources(self, bot_id: str, provider_key: TriageSourceProvider, connected_account_id: str):
|
|
304
|
+
return self.client.request("GET", self._path(bot_id) + "/issue-triage/resources", query={"providerKey": provider_key, "connectedAccountId": connected_account_id})
|
|
305
|
+
|
|
306
|
+
def ticket_options(self, bot_id: str, connected_account_id: str, resource_id: str, issue_type_id: str | None = None):
|
|
307
|
+
return self.client.request("GET", self._path(bot_id) + "/issue-triage/ticket-options", query={"connectedAccountId": connected_account_id, "resourceId": resource_id, **({"issueTypeId": issue_type_id} if issue_type_id else {})})
|
|
308
|
+
|
|
309
|
+
def preview(self, bot_id: str, revision: int, report: TriageReport):
|
|
310
|
+
return self.client.request("POST", self._path(bot_id) + "/issue-triage/preview", json_body={**report, "revision": revision})
|
|
311
|
+
|
|
312
|
+
def report(self, bot_id: str, report: TriageReport):
|
|
313
|
+
return self.client.request("POST", self._path(bot_id) + "/issues", json_body=report)
|
|
314
|
+
|
|
315
|
+
def list(self, bot_id: str, *, mode: Literal["live", "preview"] = "live", status: str | None = None, cursor: str | None = None, limit: int = 30):
|
|
316
|
+
return self.client.request("GET", self._path(bot_id) + "/issues", query={"limit": limit, "mode": mode, **({"status": status} if status else {}), **({"cursor": cursor} if cursor else {})})
|
|
317
|
+
|
|
318
|
+
def get(self, bot_id: str, issue_id: str):
|
|
319
|
+
return self.client.request("GET", self._path(bot_id) + "/issues/" + quote(issue_id, safe=""))
|
|
320
|
+
|
|
321
|
+
def action(self, bot_id: str, issue_id: str, action: TriageAction):
|
|
322
|
+
return self.client.request("POST", self._path(bot_id) + "/issues/" + quote(issue_id, safe="") + "/actions", json_body=action)
|
|
323
|
+
|
|
324
|
+
|
|
246
325
|
class BotsResource:
|
|
247
326
|
def __init__(self, client, *, async_mode: bool = False):
|
|
248
327
|
self.client = client
|
|
249
328
|
self.files = BotFiles(client)
|
|
250
329
|
self.reviews = BotReviews(client)
|
|
330
|
+
self.issues = BotIssues(client)
|
|
251
331
|
self.async_mode = async_mode
|
|
252
332
|
|
|
253
333
|
def _path(self, bot_id: str, run_id: str | None = None) -> str:
|
|
@@ -257,7 +337,7 @@ class BotsResource:
|
|
|
257
337
|
def jobs(self):
|
|
258
338
|
return self.client.request("GET", "/v1/bots/jobs")
|
|
259
339
|
|
|
260
|
-
def install(self, key: Literal["code-reviewer"], request_id: str):
|
|
340
|
+
def install(self, key: Literal["code-reviewer", "issue-triage"], request_id: str):
|
|
261
341
|
return self.client.request("POST", "/v1/bots/library/" + quote(key, safe="") + "/install", json_body={"requestId": request_id})
|
|
262
342
|
|
|
263
343
|
def apis(self):
|
|
@@ -38,7 +38,7 @@ from .types import Json, Transport
|
|
|
38
38
|
from .webhooks import WebhooksResource
|
|
39
39
|
from .workbench import WorkbenchResource
|
|
40
40
|
|
|
41
|
-
STACKLINK_PYTHON_SDK_VERSION = "0.6.
|
|
41
|
+
STACKLINK_PYTHON_SDK_VERSION = "0.6.7"
|
|
42
42
|
STACKLINK_PYTHON_USER_AGENT = f"stacklink-python/{STACKLINK_PYTHON_SDK_VERSION}"
|
|
43
43
|
|
|
44
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stacklink-sdk
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.7
|
|
4
4
|
Summary: Python SDK for Stacklink sessions, tools, MCP, auth, workbench, logs, knowledge, and billing.
|
|
5
5
|
Author: Stacklink
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -185,3 +185,8 @@ review ID; read that ID rather than submitting another task. Repository permissi
|
|
|
185
185
|
Bot budgets and the existing credit system apply to both entry paths.
|
|
186
186
|
|
|
187
187
|
[Bot job examples](https://docs.stacklink.in/docs/bots/sdk#add-review-code-to-any-bot)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## Issue Triage (0.6.6 staging candidate)
|
|
191
|
+
|
|
192
|
+
Use `bots.issues.report`, `list`, `get` and `action` on a Bot with a published Issue Triage Job. Report once with a stable `requestId`, then read the returned `issueId`. A receipt is not a completed investigation. Ticket actions use the existing approval flow; source connections do not change the Bot’s Slack or Teams author. Draft previews and job setup use the `bots.issues.preview`, `setup` and `save` methods. These additions require the staging candidate package until the matching public SDK is released.
|
|
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
|
|
File without changes
|