stacklink-sdk 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl
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/client.py +1 -1
- stacklink/memory.py +9 -2
- stacklink/workflows.py +16 -2
- {stacklink_sdk-0.6.2.dist-info → stacklink_sdk-0.6.4.dist-info}/METADATA +7 -2
- {stacklink_sdk-0.6.2.dist-info → stacklink_sdk-0.6.4.dist-info}/RECORD +8 -8
- {stacklink_sdk-0.6.2.dist-info → stacklink_sdk-0.6.4.dist-info}/WHEEL +0 -0
- {stacklink_sdk-0.6.2.dist-info → stacklink_sdk-0.6.4.dist-info}/licenses/LICENSE +0 -0
- {stacklink_sdk-0.6.2.dist-info → stacklink_sdk-0.6.4.dist-info}/top_level.txt +0 -0
stacklink/client.py
CHANGED
|
@@ -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.4"
|
|
42
42
|
STACKLINK_PYTHON_USER_AGENT = f"stacklink-python/{STACKLINK_PYTHON_SDK_VERSION}"
|
|
43
43
|
|
|
44
44
|
|
stacklink/memory.py
CHANGED
|
@@ -232,8 +232,15 @@ class SessionMemoryResource:
|
|
|
232
232
|
def history(self, memory_id: str):
|
|
233
233
|
return self.memory.history(memory_id, sessionId=self.session_id)
|
|
234
234
|
|
|
235
|
-
def update(self, memory_id: str, patch: dict[str, Any]):
|
|
236
|
-
|
|
235
|
+
def update(self, memory_id: str, patch: dict[str, Any], *, consent: dict[str, Any] | None = None, expected_version_id: str | None = None, idempotency_key: str | None = None):
|
|
236
|
+
body: dict[str, Any] = {"sessionId": self.session_id, "patch": patch}
|
|
237
|
+
if consent is not None:
|
|
238
|
+
body["consent"] = consent
|
|
239
|
+
if expected_version_id is not None:
|
|
240
|
+
body["expectedVersionId"] = expected_version_id
|
|
241
|
+
if idempotency_key is not None:
|
|
242
|
+
body["idempotencyKey"] = idempotency_key
|
|
243
|
+
return self.memory.update(memory_id, body)
|
|
237
244
|
|
|
238
245
|
def forget(self, memory_id: str, reason: str | None = None):
|
|
239
246
|
body: dict[str, Any] = {"sessionId": self.session_id}
|
stacklink/workflows.py
CHANGED
|
@@ -82,8 +82,22 @@ class WorkflowsResource:
|
|
|
82
82
|
def preview_schedule(self, cron: str, timezone: str = 'UTC'):
|
|
83
83
|
return self._request('POST', self._path() + '/schedule/preview', json_body={'cron': cron, 'timezone': timezone})
|
|
84
84
|
|
|
85
|
-
def
|
|
86
|
-
|
|
85
|
+
def search_mentions(self, *, search: str = '', workflow_id: str | None = None, kind: str | None = None, offset: int = 0, limit: int = 10):
|
|
86
|
+
query = {'search': search, 'offset': offset, 'limit': limit}
|
|
87
|
+
if workflow_id is not None:
|
|
88
|
+
query['workflowId'] = workflow_id
|
|
89
|
+
if kind is not None:
|
|
90
|
+
query['kind'] = kind
|
|
91
|
+
return self._request('GET', self._path() + '/mentions', query=query)
|
|
92
|
+
|
|
93
|
+
def resolve_mentions(self, references, workflow_id=None):
|
|
94
|
+
body = {'references': references}
|
|
95
|
+
if workflow_id is not None:
|
|
96
|
+
body['workflowId'] = workflow_id
|
|
97
|
+
return self._request('POST', self._path() + '/mentions/resolve', json_body=body)
|
|
98
|
+
|
|
99
|
+
def suggest(self, workflow_id: str, description: str, revision: int, session_id: str, mentions=None):
|
|
100
|
+
return self._request('POST', self._path(workflow_id) + '/suggest', json_body={'description': description, 'revision': revision, 'sessionId': session_id, **({'mentions': mentions} if mentions is not None else {})}, timeout_ms=60_000)
|
|
87
101
|
|
|
88
102
|
|
|
89
103
|
def issue_embedded_access(self, customer_id: str, user_id: str, origin: str, role: str, *, decide_approvals: bool = False, view_usage: bool = False, workflow_id: str | None = None, customer_name: str | None = None, user_name: str | None = None):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stacklink-sdk
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
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
|
|
@@ -128,7 +128,7 @@ The async client provides the same operations with `await` and `async for`.
|
|
|
128
128
|
|
|
129
129
|
Reuse the returned `conversationId` for the next message. Preserve the last event sequence to resume observation. Published invocations are available through the existing session MCP endpoint using `STACKLINK_BOTS`; no separate server per bot is needed.
|
|
130
130
|
|
|
131
|
-
## Workflows (0.6.
|
|
131
|
+
## Workflows (0.6.3)
|
|
132
132
|
|
|
133
133
|
Use `https://api.stacklink.in` for production.
|
|
134
134
|
Workflow trigger changes now follow draft → publish. `workflows.triggers(id)`
|
|
@@ -145,6 +145,11 @@ supported. Pausing blocks new starts; publishing does not resume a paused workfl
|
|
|
145
145
|
The [Workflows guide](https://docs.stacklink.in/docs/workflows) covers definitions,
|
|
146
146
|
permissions, stable job keys and recovery.
|
|
147
147
|
|
|
148
|
+
Drafting supports exact resource mentions. Use `workflows.search_mentions(search=..., kind=..., offset=..., limit=...)` and `resolve_mentions(references, workflow_id=...)`
|
|
149
|
+
to discover and recheck permitted apps, Bots, workflows and saved API operations.
|
|
150
|
+
Pass optional `mentions` with UTF-16 `start`/`end` ranges to `suggest`; the server
|
|
151
|
+
rechecks access before drafting. A mention never grants permissions or connects an account.
|
|
152
|
+
|
|
148
153
|
Your Python backend can issue customer editor access through
|
|
149
154
|
`workflows.issue_embedded_access(customer_id=..., user_id=..., origin=..., role=...)`.
|
|
150
155
|
Derive those values from your authenticated application session. Mount the hosted
|
|
@@ -6,14 +6,14 @@ stacklink/auth_configs.py,sha256=j07EgP9-Pd8eR59FZetxyrXcC2LM7uH46sqAI8LDvqc,105
|
|
|
6
6
|
stacklink/billing.py,sha256=1ix-Z8a1A-zypJbtXyn1MpbvAc8kS3mCiTHNPK5gpW8,2490
|
|
7
7
|
stacklink/bots.py,sha256=6WqBMp_vavf0vXDhEvWVyXbZ1P3XdsG5qVxsb9-Zing,19330
|
|
8
8
|
stacklink/claude_agent.py,sha256=qGmFY6gIHaGOSkpyGW9RSGuN48juIvG12ffNPXqNzns,757
|
|
9
|
-
stacklink/client.py,sha256=
|
|
9
|
+
stacklink/client.py,sha256=t1VHYYVKQEOGlW8TOKdTxh6bVDiw582gJ0VXpsLtTWc,36390
|
|
10
10
|
stacklink/connected_accounts.py,sha256=SCDzA3CAQBun0gi0XZqr4-2f-GAwXIB5TcSZBHQtL24,3946
|
|
11
11
|
stacklink/errors.py,sha256=MLEUUwPNbNZr-PpvtbM3Kvl-JgYUiLXz0_nooeo2hu8,793
|
|
12
12
|
stacklink/executions.py,sha256=PKWGuaSSYzv--yaa_YKKK9etrk05oY3snKxgjaFJghk,2603
|
|
13
13
|
stacklink/knowledge.py,sha256=vzRxJIWgHMbH1_v3eRD4vTmYtwQUzNS9XXbfuMwSVr0,798
|
|
14
14
|
stacklink/logs.py,sha256=cf-7VGpFWEcfNeoCTh6b7xp6CdObuJVgRYSy5iYSiJ0,970
|
|
15
15
|
stacklink/mcp.py,sha256=Pk8P41OZ7mMRJCP9V5DeSgR6ATDC-UCYOqRfNE2crVk,6188
|
|
16
|
-
stacklink/memory.py,sha256=
|
|
16
|
+
stacklink/memory.py,sha256=BpdI7NWCioZjB50yfxSXi4y8LAcw407bJ5B2gBI2VH4,10004
|
|
17
17
|
stacklink/openai_agents.py,sha256=HV5BJ5Ye3x9sxloUY916pTF-cpVSnSylJXrMS4CwnS4,1197
|
|
18
18
|
stacklink/openai_memory.py,sha256=94kR08gyf0jhTewr2gMplHODNN1J_TgXA9wYKBpcJ2w,24957
|
|
19
19
|
stacklink/projects.py,sha256=XZNVz8ZuGvd-fBUSqqDr6mp1ZEv4yf9rLOkXfbE7jYA,658
|
|
@@ -24,10 +24,10 @@ stacklink/triggers.py,sha256=RGB7gd_DPbx4PTQWlwMEup8-42yHBkVmr1iVZZ_2Wi0,952
|
|
|
24
24
|
stacklink/types.py,sha256=sO2ofetRNP06WtWTe-Ls8k2V2NjptlSF63NDnFhILJ4,8703
|
|
25
25
|
stacklink/webhooks.py,sha256=2C3CIrVV3k1Y5efWGFovBA3oDGEjnU61CxKoYOcsF10,1973
|
|
26
26
|
stacklink/workbench.py,sha256=Jt8MU0McOZSbMP1d-OhG07f2ZEVkmOMlP6GvvoVUyco,50323
|
|
27
|
-
stacklink/workflows.py,sha256=
|
|
27
|
+
stacklink/workflows.py,sha256=gCVhWc_NKBn9tPQn-mPv6tvVYlBuZjcK-hysiqVYrtI,8972
|
|
28
28
|
stacklink/x_chat.py,sha256=Sy-BrPY7KxgU_hidi4HlEuWHNSn10L6CDx5qmzktmgU,5851
|
|
29
|
-
stacklink_sdk-0.6.
|
|
30
|
-
stacklink_sdk-0.6.
|
|
31
|
-
stacklink_sdk-0.6.
|
|
32
|
-
stacklink_sdk-0.6.
|
|
33
|
-
stacklink_sdk-0.6.
|
|
29
|
+
stacklink_sdk-0.6.4.dist-info/licenses/LICENSE,sha256=Je4dQL-m555y5qBe8IhbO-YOFIvC4qZZSfyt67hCCkk,412
|
|
30
|
+
stacklink_sdk-0.6.4.dist-info/METADATA,sha256=bj9EcpJt3jmRA_dTx83CU7EhbA8XGDGHsFwwu_JB6Gg,11313
|
|
31
|
+
stacklink_sdk-0.6.4.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
32
|
+
stacklink_sdk-0.6.4.dist-info/top_level.txt,sha256=rGAB6iqp4vzE7YArYOPTZGsAF221SnxNbemNHpzVKgg,10
|
|
33
|
+
stacklink_sdk-0.6.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|