stacklink-sdk 0.6.2__tar.gz → 0.6.4__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 (45) hide show
  1. {stacklink_sdk-0.6.2/stacklink_sdk.egg-info → stacklink_sdk-0.6.4}/PKG-INFO +7 -2
  2. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/README.md +6 -1
  3. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/pyproject.toml +1 -1
  4. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/client.py +1 -1
  5. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/memory.py +9 -2
  6. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/workflows.py +16 -2
  7. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4/stacklink_sdk.egg-info}/PKG-INFO +7 -2
  8. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_client.py +8 -0
  9. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/LICENSE +0 -0
  10. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/setup.cfg +0 -0
  11. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/__init__.py +0 -0
  12. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/api_keys.py +0 -0
  13. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/approvals.py +0 -0
  14. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/artifacts.py +0 -0
  15. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/auth_configs.py +0 -0
  16. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/billing.py +0 -0
  17. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/bots.py +0 -0
  18. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/claude_agent.py +0 -0
  19. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/connected_accounts.py +0 -0
  20. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/errors.py +0 -0
  21. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/executions.py +0 -0
  22. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/knowledge.py +0 -0
  23. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/logs.py +0 -0
  24. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/mcp.py +0 -0
  25. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/openai_agents.py +0 -0
  26. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/openai_memory.py +0 -0
  27. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/projects.py +0 -0
  28. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/providers.py +0 -0
  29. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/sessions.py +0 -0
  30. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/tools.py +0 -0
  31. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/triggers.py +0 -0
  32. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/types.py +0 -0
  33. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/webhooks.py +0 -0
  34. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/workbench.py +0 -0
  35. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink/x_chat.py +0 -0
  36. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink_sdk.egg-info/SOURCES.txt +0 -0
  37. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink_sdk.egg-info/dependency_links.txt +0 -0
  38. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink_sdk.egg-info/requires.txt +0 -0
  39. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/stacklink_sdk.egg-info/top_level.txt +0 -0
  40. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_amazon_seller_provider.py +0 -0
  41. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_google_docs_provider.py +0 -0
  42. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_google_drive_provider.py +0 -0
  43. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_google_sheets_provider.py +0 -0
  44. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/tests/test_openai_memory.py +0 -0
  45. {stacklink_sdk-0.6.2 → stacklink_sdk-0.6.4}/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.2
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.2)
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
@@ -107,7 +107,7 @@ The async client provides the same operations with `await` and `async for`.
107
107
 
108
108
  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.
109
109
 
110
- ## Workflows (0.6.2)
110
+ ## Workflows (0.6.3)
111
111
 
112
112
  Use `https://api.stacklink.in` for production.
113
113
  Workflow trigger changes now follow draft → publish. `workflows.triggers(id)`
@@ -124,6 +124,11 @@ supported. Pausing blocks new starts; publishing does not resume a paused workfl
124
124
  The [Workflows guide](https://docs.stacklink.in/docs/workflows) covers definitions,
125
125
  permissions, stable job keys and recovery.
126
126
 
127
+ Drafting supports exact resource mentions. Use `workflows.search_mentions(search=..., kind=..., offset=..., limit=...)` and `resolve_mentions(references, workflow_id=...)`
128
+ to discover and recheck permitted apps, Bots, workflows and saved API operations.
129
+ Pass optional `mentions` with UTF-16 `start`/`end` ranges to `suggest`; the server
130
+ rechecks access before drafting. A mention never grants permissions or connects an account.
131
+
127
132
  Your Python backend can issue customer editor access through
128
133
  `workflows.issue_embedded_access(customer_id=..., user_id=..., origin=..., role=...)`.
129
134
  Derive those values from your authenticated application session. Mount the hosted
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "stacklink-sdk"
7
- version = "0.6.2"
7
+ version = "0.6.4"
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"
@@ -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.2"
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
 
@@ -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
- return self.memory.update(memory_id, {"sessionId": self.session_id, "patch": patch})
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}
@@ -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 suggest(self, workflow_id: str, description: str, revision: int, session_id: str):
86
- return self._request('POST', self._path(workflow_id) + '/suggest', json_body={'description': description, 'revision': revision, 'sessionId': session_id}, timeout_ms=60_000)
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.2
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.2)
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
@@ -123,6 +123,14 @@ class StacklinkClientTests(unittest.TestCase):
123
123
  self.assertEqual(calls[5][3], {"kind": "webhook", "expectedRevision": 3})
124
124
  client.workflows.delete_trigger("wf-1", "trigger-1", expected_revision=4)
125
125
  self.assertEqual(calls[6][4], {"expectedRevision": 4})
126
+ reference = {"kind": "api", "id": "tickets", "callId": "read"}
127
+ client.workflows.search_mentions(search="ticket", kind="api", offset=10, workflow_id="wf-1")
128
+ self.assertEqual(calls[7][4], {"search": "ticket", "kind": "api", "offset": 10, "limit": 10, "workflowId": "wf-1"})
129
+ client.workflows.resolve_mentions([reference], workflow_id="wf-1")
130
+ self.assertEqual(calls[8][3], {"references": [reference], "workflowId": "wf-1"})
131
+ client.workflows.suggest("wf-1", "Read @ticket", 3, "session-1", mentions=[{"reference": reference, "start": 5, "end": 12}])
132
+ self.assertEqual(calls[9][3]["mentions"], [{"reference": reference, "start": 5, "end": 12}])
133
+
126
134
 
127
135
 
128
136
  def test_workbench_lost_acknowledgement_keeps_upload_and_artifact_identity(self):
File without changes
File without changes