sinatra-dev 0.1.0__tar.gz → 0.1.2__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 (51) hide show
  1. sinatra_dev-0.1.0/README.md → sinatra_dev-0.1.2/PKG-INFO +49 -5
  2. sinatra_dev-0.1.0/PKG-INFO → sinatra_dev-0.1.2/README.md +21 -31
  3. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/pyproject.toml +19 -5
  4. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tasks/tasks_create.py +16 -12
  5. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/.gitignore +0 -0
  6. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/LICENSE +0 -0
  7. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/__init__.py +0 -0
  8. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_client.py +0 -0
  9. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_errors.py +0 -0
  10. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/__init__.py +0 -0
  11. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/__init__.py +0 -0
  12. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/me/__init__.py +0 -0
  13. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/me/me_get.py +0 -0
  14. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/me/me_revoke_token.py +0 -0
  15. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/messages/__init__.py +0 -0
  16. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/messages/messages_create.py +0 -0
  17. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/messages/messages_list.py +0 -0
  18. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tasks/__init__.py +0 -0
  19. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tasks/tasks_get.py +0 -0
  20. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tasks/tasks_list.py +0 -0
  21. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tasks/tasks_stop.py +0 -0
  22. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tickets/__init__.py +0 -0
  23. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tickets/tickets_delegate.py +0 -0
  24. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/api/tickets/tickets_search.py +0 -0
  25. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/client.py +0 -0
  26. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/errors.py +0 -0
  27. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/__init__.py +0 -0
  28. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/create_message_request.py +0 -0
  29. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/create_message_response.py +0 -0
  30. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/create_task_request.py +0 -0
  31. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/create_task_response.py +0 -0
  32. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/delegate_github_ticket.py +0 -0
  33. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/delegate_linear_ticket.py +0 -0
  34. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/delegate_ticket_response.py +0 -0
  35. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/error.py +0 -0
  36. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/me.py +0 -0
  37. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/me_user.py +0 -0
  38. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/message.py +0 -0
  39. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/message_list.py +0 -0
  40. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/pull_request.py +0 -0
  41. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/stop_task_response.py +0 -0
  42. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/task.py +0 -0
  43. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/task_list.py +0 -0
  44. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/ticket.py +0 -0
  45. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/ticket_search_result.py +0 -0
  46. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/ticket_search_result_github.py +0 -0
  47. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/ticket_search_result_linear.py +0 -0
  48. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/models/workspace.py +0 -0
  49. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_generated/types.py +0 -0
  50. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/_retry.py +0 -0
  51. {sinatra_dev-0.1.0 → sinatra_dev-0.1.2}/src/sinatra_dev/py.typed +0 -0
@@ -1,8 +1,38 @@
1
- # sinatra-dev
2
-
3
- A Python client for the [Sinatra API](https://docs.sinatra.dev/docs/api-reference): start, follow and stop Sinatra tasks, and delegate Linear and GitHub issues.
4
-
5
- It runs on Python 3.11 and later, is typed (`py.typed`), and depends only on `httpx` and `attrs`. The client is generated from the API's [OpenAPI spec](https://api.sinatra.dev/openapi.json) and released automatically when the spec changes.
1
+ Metadata-Version: 2.5
2
+ Name: sinatra-dev
3
+ Version: 0.1.2
4
+ Summary: Official Python client for sinatra.dev, the AI coding agent that turns Linear and GitHub issues into pull requests: start, follow and stop tasks, and delegate issues.
5
+ Project-URL: Homepage, https://www.sinatra.dev
6
+ Project-URL: Documentation, https://docs.sinatra.dev/docs/api-reference
7
+ Project-URL: Repository, https://github.com/sinatra-dev/sinatra-python
8
+ Project-URL: Issues, https://github.com/sinatra-dev/sinatra-python/issues
9
+ Author-email: Sinatra <contact@sinatra.dev>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: ai-coding-agent,api-client,automation,background-agent,coding-agent,github,linear,pull-request,sdk,sinatra,sinatra.dev
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: attrs>=22.2.0
26
+ Requires-Dist: httpx<0.29.0,>=0.23.1
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Sinatra Python SDK
30
+
31
+ `sinatra-dev` is the official Python client for [sinatra.dev](https://www.sinatra.dev), the hosted AI coding agent that turns Linear and GitHub issues into pull requests. Assign Sinatra an issue, mention it in Slack, or start a task from code, and it writes the change in its own sandbox and opens a draft pull request for your team to review.
32
+
33
+ With this client you can start, follow and stop Sinatra tasks and delegate Linear and GitHub issues from your own scripts, CI jobs and tools, through the [Sinatra API](https://docs.sinatra.dev/docs/api-reference).
34
+
35
+ It runs on Python 3.11 and later, is typed (`py.typed`), and depends only on `httpx` and `attrs`. The client is generated from the API's [OpenAPI spec](https://api.sinatra.dev/openapi.json) and released automatically when the spec changes. There are also official SDKs for [Node.js / TypeScript](https://github.com/sinatra-dev/sinatra-node) and [Go](https://github.com/sinatra-dev/sinatra-go); see [SDKs](https://docs.sinatra.dev/docs/sdks).
6
36
 
7
37
  ## Install
8
38
 
@@ -44,6 +74,20 @@ with Sinatra() as sinatra: # reads SINATRA_TOKEN
44
74
 
45
75
  The API has no streaming. To wait for a reply, read the conversation after the last entry you've seen, and check the task's `status`: the agent posts one reply per turn, and the turn is done when the task stops working. The loop reads the status before the conversation, so it never stops before printing the reply that ended the turn. An unknown status counts as done, so the loop can't wait forever on a status added after this was written. See [How replies work](https://docs.sinatra.dev/docs/cli-and-api#how-replies-work).
46
76
 
77
+ ## Examples
78
+
79
+ [`examples/`](https://github.com/sinatra-dev/sinatra-python/tree/main/examples) has small programs you can run as they are:
80
+
81
+ - [`delegate_issue.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/delegate_issue.py): hand Sinatra a Linear issue (`ENG-123`) or a GitHub issue (`acme/web#42`), for example from a CI job.
82
+ - [`search_issues.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/search_issues.py): list the open issues you could delegate, yours first.
83
+ - [`open_prs.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/open_prs.py): print the pull requests Sinatra has open in each workspace as a Markdown list, for a standup or a Slack post.
84
+
85
+ With the package installed (`pip install sinatra-dev`), or from a checkout with `uv run`:
86
+
87
+ ```sh
88
+ SINATRA_TOKEN=sntr_... uv run python examples/open_prs.py
89
+ ```
90
+
47
91
  ## Authentication
48
92
 
49
93
  Create a personal access token on the [Access tokens](https://app.sinatra.dev/tokens) page (**CLI & API** in the dashboard). It starts with `sntr_` and acts as you in every workspace you belong to. The client reads it from the `SINATRA_TOKEN` environment variable, or you can pass it:
@@ -1,34 +1,10 @@
1
- Metadata-Version: 2.5
2
- Name: sinatra-dev
3
- Version: 0.1.0
4
- Summary: Python client for the Sinatra API: start, follow and stop Sinatra tasks, and delegate Linear and GitHub issues.
5
- Project-URL: Homepage, https://sinatra.dev
6
- Project-URL: Documentation, https://docs.sinatra.dev/docs/api-reference
7
- Project-URL: Repository, https://github.com/sinatra-dev/sinatra-python
8
- Project-URL: Issues, https://github.com/sinatra-dev/sinatra-python/issues
9
- Author-email: Sinatra <contact@sinatra.dev>
10
- License-Expression: MIT
11
- License-File: LICENSE
12
- Keywords: api-client,coding-agent,sdk,sinatra,sinatra.dev
13
- Classifier: Development Status :: 4 - Beta
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3 :: Only
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Classifier: Programming Language :: Python :: 3.14
21
- Classifier: Typing :: Typed
22
- Requires-Python: >=3.11
23
- Requires-Dist: attrs>=22.2.0
24
- Requires-Dist: httpx<0.29.0,>=0.23.1
25
- Description-Content-Type: text/markdown
26
-
27
- # sinatra-dev
28
-
29
- A Python client for the [Sinatra API](https://docs.sinatra.dev/docs/api-reference): start, follow and stop Sinatra tasks, and delegate Linear and GitHub issues.
30
-
31
- It runs on Python 3.11 and later, is typed (`py.typed`), and depends only on `httpx` and `attrs`. The client is generated from the API's [OpenAPI spec](https://api.sinatra.dev/openapi.json) and released automatically when the spec changes.
1
+ # Sinatra Python SDK
2
+
3
+ `sinatra-dev` is the official Python client for [sinatra.dev](https://www.sinatra.dev), the hosted AI coding agent that turns Linear and GitHub issues into pull requests. Assign Sinatra an issue, mention it in Slack, or start a task from code, and it writes the change in its own sandbox and opens a draft pull request for your team to review.
4
+
5
+ With this client you can start, follow and stop Sinatra tasks and delegate Linear and GitHub issues from your own scripts, CI jobs and tools, through the [Sinatra API](https://docs.sinatra.dev/docs/api-reference).
6
+
7
+ It runs on Python 3.11 and later, is typed (`py.typed`), and depends only on `httpx` and `attrs`. The client is generated from the API's [OpenAPI spec](https://api.sinatra.dev/openapi.json) and released automatically when the spec changes. There are also official SDKs for [Node.js / TypeScript](https://github.com/sinatra-dev/sinatra-node) and [Go](https://github.com/sinatra-dev/sinatra-go); see [SDKs](https://docs.sinatra.dev/docs/sdks).
32
8
 
33
9
  ## Install
34
10
 
@@ -70,6 +46,20 @@ with Sinatra() as sinatra: # reads SINATRA_TOKEN
70
46
 
71
47
  The API has no streaming. To wait for a reply, read the conversation after the last entry you've seen, and check the task's `status`: the agent posts one reply per turn, and the turn is done when the task stops working. The loop reads the status before the conversation, so it never stops before printing the reply that ended the turn. An unknown status counts as done, so the loop can't wait forever on a status added after this was written. See [How replies work](https://docs.sinatra.dev/docs/cli-and-api#how-replies-work).
72
48
 
49
+ ## Examples
50
+
51
+ [`examples/`](https://github.com/sinatra-dev/sinatra-python/tree/main/examples) has small programs you can run as they are:
52
+
53
+ - [`delegate_issue.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/delegate_issue.py): hand Sinatra a Linear issue (`ENG-123`) or a GitHub issue (`acme/web#42`), for example from a CI job.
54
+ - [`search_issues.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/search_issues.py): list the open issues you could delegate, yours first.
55
+ - [`open_prs.py`](https://github.com/sinatra-dev/sinatra-python/blob/main/examples/open_prs.py): print the pull requests Sinatra has open in each workspace as a Markdown list, for a standup or a Slack post.
56
+
57
+ With the package installed (`pip install sinatra-dev`), or from a checkout with `uv run`:
58
+
59
+ ```sh
60
+ SINATRA_TOKEN=sntr_... uv run python examples/open_prs.py
61
+ ```
62
+
73
63
  ## Authentication
74
64
 
75
65
  Create a personal access token on the [Access tokens](https://app.sinatra.dev/tokens) page (**CLI & API** in the dashboard). It starts with `sntr_` and acts as you in every workspace you belong to. The client reads it from the `SINATRA_TOKEN` environment variable, or you can pass it:
@@ -1,16 +1,30 @@
1
1
  [project]
2
2
  name = "sinatra-dev"
3
- version = "0.1.0"
4
- description = "Python client for the Sinatra API: start, follow and stop Sinatra tasks, and delegate Linear and GitHub issues."
3
+ version = "0.1.2"
4
+ description = "Official Python client for sinatra.dev, the AI coding agent that turns Linear and GitHub issues into pull requests: start, follow and stop tasks, and delegate issues."
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  license-files = ["LICENSE"]
8
8
  requires-python = ">=3.11"
9
9
  authors = [{ name = "Sinatra", email = "contact@sinatra.dev" }]
10
- keywords = ["sinatra", "sinatra.dev", "sdk", "api-client", "coding-agent"]
10
+ keywords = [
11
+ "sinatra",
12
+ "sinatra.dev",
13
+ "sdk",
14
+ "api-client",
15
+ "coding-agent",
16
+ "ai-coding-agent",
17
+ "background-agent",
18
+ "linear",
19
+ "github",
20
+ "pull-request",
21
+ "automation",
22
+ ]
11
23
  classifiers = [
12
24
  "Development Status :: 4 - Beta",
13
25
  "Intended Audience :: Developers",
26
+ "Topic :: Software Development",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
14
28
  "Programming Language :: Python :: 3",
15
29
  "Programming Language :: Python :: 3 :: Only",
16
30
  "Programming Language :: Python :: 3.11",
@@ -27,7 +41,7 @@ dependencies = [
27
41
  ]
28
42
 
29
43
  [project.urls]
30
- Homepage = "https://sinatra.dev"
44
+ Homepage = "https://www.sinatra.dev"
31
45
  Documentation = "https://docs.sinatra.dev/docs/api-reference"
32
46
  Repository = "https://github.com/sinatra-dev/sinatra-python"
33
47
  Issues = "https://github.com/sinatra-dev/sinatra-python/issues"
@@ -68,7 +82,7 @@ select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
68
82
  [tool.mypy]
69
83
  python_version = "3.11"
70
84
  strict = true
71
- files = ["src/sinatra_dev", "tests"]
85
+ files = ["src/sinatra_dev", "tests", "examples"]
72
86
 
73
87
  # The generated httpx Client/AuthenticatedClient wrappers don't pass strict
74
88
  # mypy, and the wrapper never uses them (it sends requests itself). The rest
@@ -122,9 +122,10 @@ def sync_detailed(
122
122
  Only `prompt` is required. `title` defaults to the prompt's first line, up to 80 characters. `repo`
123
123
  is optional: omit it to let the agent choose a repository.
124
124
 
125
- Before it makes the task, Sinatra checks that the workspace is connected to GitHub, that billing
126
- allows the task, and that the queue has room. A refusal says which in its `error` code, and a retry
127
- with the same key of a start that already made its task is never refused.
125
+ Before it makes the task, Sinatra checks that the workspace is connected to GitHub when the start
126
+ names a repository (without GitHub a task that names none can still answer, research or plan), that
127
+ billing allows the task, and that the queue has room. A refusal says which in its `error` code, and
128
+ a retry with the same key of a start that already made its task is never refused.
128
129
 
129
130
  Send an `Idempotency-Key` so a retry is safe. A start retried with the same key returns the same
130
131
  task and never starts a second one. The same key with a different prompt, or a different repository
@@ -182,9 +183,10 @@ def sync(
182
183
  Only `prompt` is required. `title` defaults to the prompt's first line, up to 80 characters. `repo`
183
184
  is optional: omit it to let the agent choose a repository.
184
185
 
185
- Before it makes the task, Sinatra checks that the workspace is connected to GitHub, that billing
186
- allows the task, and that the queue has room. A refusal says which in its `error` code, and a retry
187
- with the same key of a start that already made its task is never refused.
186
+ Before it makes the task, Sinatra checks that the workspace is connected to GitHub when the start
187
+ names a repository (without GitHub a task that names none can still answer, research or plan), that
188
+ billing allows the task, and that the queue has room. A refusal says which in its `error` code, and
189
+ a retry with the same key of a start that already made its task is never refused.
188
190
 
189
191
  Send an `Idempotency-Key` so a retry is safe. A start retried with the same key returns the same
190
192
  task and never starts a second one. The same key with a different prompt, or a different repository
@@ -237,9 +239,10 @@ async def asyncio_detailed(
237
239
  Only `prompt` is required. `title` defaults to the prompt's first line, up to 80 characters. `repo`
238
240
  is optional: omit it to let the agent choose a repository.
239
241
 
240
- Before it makes the task, Sinatra checks that the workspace is connected to GitHub, that billing
241
- allows the task, and that the queue has room. A refusal says which in its `error` code, and a retry
242
- with the same key of a start that already made its task is never refused.
242
+ Before it makes the task, Sinatra checks that the workspace is connected to GitHub when the start
243
+ names a repository (without GitHub a task that names none can still answer, research or plan), that
244
+ billing allows the task, and that the queue has room. A refusal says which in its `error` code, and
245
+ a retry with the same key of a start that already made its task is never refused.
243
246
 
244
247
  Send an `Idempotency-Key` so a retry is safe. A start retried with the same key returns the same
245
248
  task and never starts a second one. The same key with a different prompt, or a different repository
@@ -295,9 +298,10 @@ async def asyncio(
295
298
  Only `prompt` is required. `title` defaults to the prompt's first line, up to 80 characters. `repo`
296
299
  is optional: omit it to let the agent choose a repository.
297
300
 
298
- Before it makes the task, Sinatra checks that the workspace is connected to GitHub, that billing
299
- allows the task, and that the queue has room. A refusal says which in its `error` code, and a retry
300
- with the same key of a start that already made its task is never refused.
301
+ Before it makes the task, Sinatra checks that the workspace is connected to GitHub when the start
302
+ names a repository (without GitHub a task that names none can still answer, research or plan), that
303
+ billing allows the task, and that the queue has room. A refusal says which in its `error` code, and
304
+ a retry with the same key of a start that already made its task is never refused.
301
305
 
302
306
  Send an `Idempotency-Key` so a retry is safe. A start retried with the same key returns the same
303
307
  task and never starts a second one. The same key with a different prompt, or a different repository
File without changes
File without changes