superdoc-sdk 2.26.0__tar.gz → 2.27.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 (62) hide show
  1. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/PKG-INFO +7 -7
  2. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/pyproject.toml +7 -7
  3. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/__init__.py +3 -0
  4. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/client.py +13 -2
  5. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/errors.py +1 -0
  6. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/generated/client.py +2450 -168
  7. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/generated/contract.py +1 -1
  8. superdoc_sdk-2.27.0/superdoc/notifications.py +265 -0
  9. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/protocol.py +13 -2
  10. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/runtime.py +11 -0
  11. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/catalog.json +42 -2
  12. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/generation-receipt.json +60 -22
  13. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/tools-policy.json +1 -1
  14. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/tools.anthropic.json +42 -2
  15. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/tools.generic.json +42 -2
  16. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/tools.openai.json +42 -2
  17. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/tools.vercel.json +42 -2
  18. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/transport.py +257 -135
  19. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc_sdk.egg-info/PKG-INFO +7 -7
  20. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc_sdk.egg-info/SOURCES.txt +2 -0
  21. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc_sdk.egg-info/requires.txt +5 -5
  22. superdoc_sdk-2.27.0/tests/test_notifications.py +334 -0
  23. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_per_open_collaboration_auth.py +2 -2
  24. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_transport.py +20 -0
  25. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/setup.cfg +0 -0
  26. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/_whitespace.py +0 -0
  27. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/embedded_cli.py +0 -0
  28. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/embedded_platform.py +0 -0
  29. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/generated/__init__.py +0 -0
  30. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/helpers/__init__.py +0 -0
  31. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/helpers/format.py +0 -0
  32. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/introspection.py +0 -0
  33. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/presets/__init__.py +0 -0
  34. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/presets/core.py +0 -0
  35. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/presets/custom.py +0 -0
  36. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/presets/full.py +0 -0
  37. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/presets/legacy.py +0 -0
  38. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/sdk_policy.py +0 -0
  39. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/skill_api.py +0 -0
  40. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/skills/__init__.py +0 -0
  41. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/skills/editing-docx.md +0 -0
  42. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/test_parity_helper.py +0 -0
  43. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/intent_dispatch_generated.py +0 -0
  44. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/system-prompt-mcp.md +0 -0
  45. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools/system-prompt.md +0 -0
  46. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc/tools_api.py +0 -0
  47. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc_sdk.egg-info/dependency_links.txt +0 -0
  48. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/superdoc_sdk.egg-info/top_level.txt +0 -0
  49. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_client_method_naming.py +0 -0
  50. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_core_dispatch_options.py +0 -0
  51. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_custom_actions.py +0 -0
  52. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_custom_actions_async.py +0 -0
  53. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_custom_actions_toolkit.py +0 -0
  54. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_embedded_platform.py +0 -0
  55. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_full_dispatch_options.py +0 -0
  56. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_full_revision_parity.py +0 -0
  57. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_helpers_reexports.py +0 -0
  58. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_local_introspection.py +0 -0
  59. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_presets.py +0 -0
  60. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_protocol.py +0 -0
  61. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_smoke_core_preset.py +0 -0
  62. {superdoc_sdk-2.26.0 → superdoc_sdk-2.27.0}/tests/test_whitespace_boundaries.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superdoc-sdk
3
- Version: 2.26.0
4
- Summary: SuperDoc SDK (CLI-backed)
3
+ Version: 2.27.0
4
+ Summary: Python SDK for SuperDoc, to read and edit .docx files from Python.
5
5
  Author: SuperDoc
6
6
  License-Expression: AGPL-3.0
7
7
  Requires-Python: >=3.9
8
- Requires-Dist: superdoc-sdk-cli-darwin-arm64==2.26.0; platform_system == "Darwin" and (platform_machine == "arm64" or platform_machine == "aarch64" or platform_machine == "ARM64")
9
- Requires-Dist: superdoc-sdk-cli-darwin-x64==2.26.0; platform_system == "Darwin" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
10
- Requires-Dist: superdoc-sdk-cli-linux-x64==2.26.0; platform_system == "Linux" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
11
- Requires-Dist: superdoc-sdk-cli-linux-arm64==2.26.0; platform_system == "Linux" and (platform_machine == "arm64" or platform_machine == "aarch64" or platform_machine == "ARM64")
12
- Requires-Dist: superdoc-sdk-cli-windows-x64==2.26.0; platform_system == "Windows" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
8
+ Requires-Dist: superdoc-sdk-cli-darwin-arm64==2.27.0; platform_system == "Darwin" and (platform_machine == "arm64" or platform_machine == "aarch64" or platform_machine == "ARM64")
9
+ Requires-Dist: superdoc-sdk-cli-darwin-x64==2.27.0; platform_system == "Darwin" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
10
+ Requires-Dist: superdoc-sdk-cli-linux-x64==2.27.0; platform_system == "Linux" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
11
+ Requires-Dist: superdoc-sdk-cli-linux-arm64==2.27.0; platform_system == "Linux" and (platform_machine == "arm64" or platform_machine == "aarch64" or platform_machine == "ARM64")
12
+ Requires-Dist: superdoc-sdk-cli-windows-x64==2.27.0; platform_system == "Windows" and (platform_machine == "x86_64" or platform_machine == "AMD64" or platform_machine == "amd64")
@@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "superdoc-sdk"
7
- version = "2.26.0"
8
- description = "SuperDoc SDK (CLI-backed)"
7
+ version = "2.27.0"
8
+ description = "Python SDK for SuperDoc, to read and edit .docx files from Python."
9
9
  requires-python = ">=3.9"
10
10
  license = "AGPL-3.0"
11
11
  authors = [{ name = "SuperDoc" }]
12
12
  dependencies = [
13
- "superdoc-sdk-cli-darwin-arm64==2.26.0; platform_system == 'Darwin' and (platform_machine == 'arm64' or platform_machine == 'aarch64' or platform_machine == 'ARM64')",
14
- "superdoc-sdk-cli-darwin-x64==2.26.0; platform_system == 'Darwin' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
15
- "superdoc-sdk-cli-linux-x64==2.26.0; platform_system == 'Linux' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
16
- "superdoc-sdk-cli-linux-arm64==2.26.0; platform_system == 'Linux' and (platform_machine == 'arm64' or platform_machine == 'aarch64' or platform_machine == 'ARM64')",
17
- "superdoc-sdk-cli-windows-x64==2.26.0; platform_system == 'Windows' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
13
+ "superdoc-sdk-cli-darwin-arm64==2.27.0; platform_system == 'Darwin' and (platform_machine == 'arm64' or platform_machine == 'aarch64' or platform_machine == 'ARM64')",
14
+ "superdoc-sdk-cli-darwin-x64==2.27.0; platform_system == 'Darwin' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
15
+ "superdoc-sdk-cli-linux-x64==2.27.0; platform_system == 'Linux' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
16
+ "superdoc-sdk-cli-linux-arm64==2.27.0; platform_system == 'Linux' and (platform_machine == 'arm64' or platform_machine == 'aarch64' or platform_machine == 'ARM64')",
17
+ "superdoc-sdk-cli-windows-x64==2.27.0; platform_system == 'Windows' and (platform_machine == 'x86_64' or platform_machine == 'AMD64' or platform_machine == 'amd64')",
18
18
  ]
19
19
 
20
20
  [tool.uv.sources]
@@ -2,6 +2,7 @@ from .presets.custom import define_action
2
2
  from .presets import DEFAULT_PRESET, get_preset, list_presets, register_preset, unregister_preset
3
3
  from .client import AsyncSuperDocClient, AsyncSuperDocDocument, CollaborationAuth, SuperDocClient, SuperDocDocument
4
4
  from .errors import SuperDocError
5
+ from .notifications import AsyncNotifications, Notifications
5
6
  from .skill_api import get_skill, install_skill, list_skills
6
7
  from .tools_api import (
7
8
  choose_tools,
@@ -23,6 +24,8 @@ __all__ = [
23
24
  "AsyncSuperDocDocument",
24
25
  "CollaborationAuth",
25
26
  "SuperDocError",
27
+ "Notifications",
28
+ "AsyncNotifications",
26
29
  "DEFAULT_STDOUT_BUFFER_LIMIT_BYTES",
27
30
  "get_skill",
28
31
  "install_skill",
@@ -23,6 +23,7 @@ from .generated.client import (
23
23
  DocOpenResult as GeneratedDocOpenResult,
24
24
  )
25
25
  from .introspection import describe_contract, describe_contract_operation
26
+ from .notifications import DEFAULT_NOTIFICATION_CAPACITY, AsyncNotifications, Notifications
26
27
  from .runtime import SuperDocAsyncRuntime, SuperDocSyncRuntime
27
28
  from .transport import DEFAULT_STDOUT_BUFFER_LIMIT_BYTES, DEFAULT_WATCHDOG_TIMEOUT_MS
28
29
 
@@ -269,6 +270,9 @@ class SuperDocClient:
269
270
  """
270
271
  self._runtime.connect()
271
272
 
273
+ def subscribe(self, capacity: int = DEFAULT_NOTIFICATION_CAPACITY) -> Notifications:
274
+ return self._runtime.subscribe(capacity)
275
+
272
276
  def open(
273
277
  self,
274
278
  params: GeneratedDocOpenParams,
@@ -276,6 +280,7 @@ class SuperDocClient:
276
280
  timeout_ms: Optional[int] = None,
277
281
  stdin_bytes: Optional[bytes] = None,
278
282
  collaboration_auth: Optional[CollaborationAuth] = None,
283
+ identity_claim: Optional[str] = None,
279
284
  ) -> SuperDocDocument:
280
285
  """Open a document and return a bound document handle.
281
286
 
@@ -295,7 +300,7 @@ class SuperDocClient:
295
300
  self._pending_session_ids.add(explicit_session_id)
296
301
 
297
302
  try:
298
- if collaboration_auth is None:
303
+ if collaboration_auth is None and identity_claim is None:
299
304
  result = self._raw_api.open(params, timeout_ms=timeout_ms, stdin_bytes=stdin_bytes)
300
305
  else:
301
306
  result = self._runtime.invoke(
@@ -304,6 +309,7 @@ class SuperDocClient:
304
309
  timeout_ms=timeout_ms,
305
310
  stdin_bytes=stdin_bytes,
306
311
  collaboration_auth=collaboration_auth,
312
+ identity_claim=identity_claim,
307
313
  )
308
314
  context_id = result.get('contextId', '')
309
315
 
@@ -400,6 +406,9 @@ class AsyncSuperDocClient:
400
406
  """
401
407
  await self._runtime.connect()
402
408
 
409
+ def subscribe(self, capacity: int = DEFAULT_NOTIFICATION_CAPACITY) -> AsyncNotifications:
410
+ return self._runtime.subscribe(capacity)
411
+
403
412
  async def open(
404
413
  self,
405
414
  params: GeneratedDocOpenParams,
@@ -407,6 +416,7 @@ class AsyncSuperDocClient:
407
416
  timeout_ms: Optional[int] = None,
408
417
  stdin_bytes: Optional[bytes] = None,
409
418
  collaboration_auth: Optional[CollaborationAuth] = None,
419
+ identity_claim: Optional[str] = None,
410
420
  ) -> AsyncSuperDocDocument:
411
421
  """Open a document and return a bound document handle.
412
422
 
@@ -425,7 +435,7 @@ class AsyncSuperDocClient:
425
435
  self._pending_session_ids.add(explicit_session_id)
426
436
 
427
437
  try:
428
- if collaboration_auth is None:
438
+ if collaboration_auth is None and identity_claim is None:
429
439
  result = await self._raw_api.open(params, timeout_ms=timeout_ms, stdin_bytes=stdin_bytes)
430
440
  else:
431
441
  result = await self._runtime.invoke(
@@ -434,6 +444,7 @@ class AsyncSuperDocClient:
434
444
  timeout_ms=timeout_ms,
435
445
  stdin_bytes=stdin_bytes,
436
446
  collaboration_auth=collaboration_auth,
447
+ identity_claim=identity_claim,
437
448
  )
438
449
  context_id = result.get('contextId', '')
439
450
 
@@ -6,6 +6,7 @@ HOST_TIMEOUT = 'HOST_TIMEOUT'
6
6
  HOST_QUEUE_FULL = 'HOST_QUEUE_FULL'
7
7
  HOST_HANDSHAKE_FAILED = 'HOST_HANDSHAKE_FAILED'
8
8
  HOST_PROTOCOL_ERROR = 'HOST_PROTOCOL_ERROR'
9
+ NOTIFICATIONS_LAGGED = 'NOTIFICATIONS_LAGGED'
9
10
 
10
11
  # JSON-RPC error code emitted by the CLI for operation timeouts.
11
12
  JSON_RPC_TIMEOUT_CODE = -32011