devin-cli 1.3.1__tar.gz → 1.3.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 (53) hide show
  1. {devin_cli-1.3.1 → devin_cli-1.3.2}/CHANGELOG.md +6 -1
  2. {devin_cli-1.3.1 → devin_cli-1.3.2}/PKG-INFO +3 -1
  3. {devin_cli-1.3.1 → devin_cli-1.3.2}/README.md +2 -0
  4. {devin_cli-1.3.1 → devin_cli-1.3.2}/pyproject.toml +1 -1
  5. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/sessions.py +13 -2
  6. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/cli.py +2 -2
  7. {devin_cli-1.3.1 → devin_cli-1.3.2}/.github/workflows/pypi-publish.yml +0 -0
  8. {devin_cli-1.3.1 → devin_cli-1.3.2}/.gitignore +0 -0
  9. {devin_cli-1.3.1 → devin_cli-1.3.2}/LICENSE +0 -0
  10. {devin_cli-1.3.1 → devin_cli-1.3.2}/assets/logo.png +0 -0
  11. {devin_cli-1.3.1 → devin_cli-1.3.2}/generate_facades.py +0 -0
  12. {devin_cli-1.3.1 → devin_cli-1.3.2}/setup.py +0 -0
  13. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/__init__.py +0 -0
  14. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/__init__.py +0 -0
  15. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/attachments.py +0 -0
  16. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/client.py +0 -0
  17. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/consumption.py +0 -0
  18. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/knowledge.py +0 -0
  19. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/members.py +0 -0
  20. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/organizations.py +0 -0
  21. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/playbooks.py +0 -0
  22. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/repositories.py +0 -0
  23. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/schedules.py +0 -0
  24. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/secrets.py +0 -0
  25. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/sessions.py +0 -0
  26. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/__init__.py +0 -0
  27. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/attachments.py +0 -0
  28. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/knowledge.py +0 -0
  29. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/playbooks.py +0 -0
  30. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/secrets.py +0 -0
  31. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v1/sessions.py +0 -0
  32. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/__init__.py +0 -0
  33. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/attachments.py +0 -0
  34. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/consumption.py +0 -0
  35. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/knowledge.py +0 -0
  36. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/members.py +0 -0
  37. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/organizations.py +0 -0
  38. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/playbooks.py +0 -0
  39. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/repositories.py +0 -0
  40. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/schedules.py +0 -0
  41. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/api/v3/secrets.py +0 -0
  42. {devin_cli-1.3.1 → devin_cli-1.3.2}/src/devin_cli/config.py +0 -0
  43. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/__init__.py +0 -0
  44. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/conftest.py +0 -0
  45. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_attachments.py +0 -0
  46. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_knowledge.py +0 -0
  47. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_playbooks.py +0 -0
  48. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_repositories.py +0 -0
  49. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_schedules.py +0 -0
  50. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_secrets.py +0 -0
  51. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_api/test_sessions.py +0 -0
  52. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_cli.py +0 -0
  53. {devin_cli-1.3.1 → devin_cli-1.3.2}/tests/test_config.py +0 -0
@@ -5,8 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.2] - 2026-03-23
9
+ ### Fixed
10
+ - **Service Token 403s**: `sessions get` and `sessions cost` now seamlessly fall back to the `list` endpoint with a `session_ids` filter to cleanly bypass 403 Forbidden errors for `cog_` Service Tokens.
11
+ - **Empty List Tables**: Fixed a core bug where `sessions list` displayed an empty table on v3 profiles by accurately parsing the returning `items` API key.
12
+ - **Terminate Hang**: Solved an architectural issue where `sessions terminate` would hang indefinitely on a 403 by shifting to the correct POST `/terminate` endpoint and strictly enforcing a 5-second `httpx` timeout.
13
+
8
14
  ## [1.3.1] - 2026-03-16
9
- ### Added
10
15
  - **Global `--json` Output**: New orchestration flag that converts *all* CLI output and API errors into pure, parseable JSON for AI agents.
11
16
  - **Knowledge Get Command**: Added `devin knowledge get <id>` and `devin get-knowledge <id>` to retrieve full note content.
12
17
  - Missing v1 and v3 `get_knowledge` / `create_secret` cross-compatibility polyfills.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devin-cli
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Unofficial CLI for Devin AI - The first AI Software Engineer
5
5
  Project-URL: Homepage, https://github.com/revanthpobala/devin-cli
6
6
  Project-URL: Repository, https://github.com/revanthpobala/devin-cli.git
@@ -153,6 +153,8 @@ Profiles are stored in `~/.config/devin/config.json` — fully isolated includin
153
153
  | `insights` | `[session_id]` | ACU / performance insights (v3) |
154
154
  | `cost` | `[session_id]` | ACU consumption |
155
155
 
156
+ > **Note for Service Tokens (`cog_`):** When retrieving a specific session via `devin sessions get <id>`, the CLI automatically falls back to filtering the org-wide `sessions list` via a `?session_ids=[<id>]` query parameter to gracefully bypass the `403 Forbidden` error natively returned by the direct API endpoint for service accounts.
157
+
156
158
  #### `sessions create` / `create-session` — Full Flag Reference
157
159
 
158
160
  | Flag | Type | Description |
@@ -117,6 +117,8 @@ Profiles are stored in `~/.config/devin/config.json` — fully isolated includin
117
117
  | `insights` | `[session_id]` | ACU / performance insights (v3) |
118
118
  | `cost` | `[session_id]` | ACU consumption |
119
119
 
120
+ > **Note for Service Tokens (`cog_`):** When retrieving a specific session via `devin sessions get <id>`, the CLI automatically falls back to filtering the org-wide `sessions list` via a `?session_ids=[<id>]` query parameter to gracefully bypass the `403 Forbidden` error natively returned by the direct API endpoint for service accounts.
121
+
120
122
  #### `sessions create` / `create-session` — Full Flag Reference
121
123
 
122
124
  | Flag | Type | Description |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devin-cli"
3
- version = "1.3.1"
3
+ version = "1.3.2"
4
4
  description = "Unofficial CLI for Devin AI - The first AI Software Engineer"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -62,7 +62,18 @@ def create_session(
62
62
  return client.post("sessions", json=data)
63
63
 
64
64
  def get_session(session_id: str):
65
- return client.get(f"sessions/{session_id}")
65
+ try:
66
+ return client.get(f"sessions/{session_id}")
67
+ except Exception as e:
68
+ from devin_cli.api.client import APIError
69
+ if isinstance(e, APIError) and e.status_code in (403, 404):
70
+ # Fallback to list endpoint with session_ids filter (especially for cog_ tokens)
71
+ res = client.get("sessions", params={"session_ids": [session_id]})
72
+ items = res.get("items", [])
73
+ if items:
74
+ return items[0]
75
+ raise
76
+ raise
66
77
 
67
78
  def get_session_messages(session_id: str):
68
79
  return client.get(f"sessions/{session_id}/messages")
@@ -83,7 +94,7 @@ def append_session_tags(session_id: str, tags: List[str]):
83
94
  return client.post(f"sessions/{session_id}/tags", json={"tags": tags})
84
95
 
85
96
  def terminate_session(session_id: str):
86
- return client.delete(f"sessions/{session_id}")
97
+ return client.post(f"sessions/{session_id}/terminate", timeout=5.0)
87
98
 
88
99
  def archive_session(session_id: str):
89
100
  return client.post(f"sessions/{session_id}/archive")
@@ -323,7 +323,7 @@ def list_sessions_cmd(
323
323
  """List sessions."""
324
324
  if org: config.temporary_org_id = org
325
325
  resp = sessions.list_sessions(limit=limit)
326
- sess_list = resp.get("sessions", [])
326
+ sess_list = resp.get("items", resp.get("sessions", []))
327
327
 
328
328
  if not sess_list and config.api_token and config.api_token.startswith("cog_"):
329
329
  console.print("[yellow]Warning: Service tokens (cog_) may only have visibility into sessions they explicitly created, not all organization sessions.[/yellow]")
@@ -943,7 +943,7 @@ def list_sessions_top_cmd(
943
943
  ):
944
944
  """List recent sessions (alias for: devin sessions list)."""
945
945
  resp = sessions.list_sessions(limit=limit)
946
- sess_list = resp.get("sessions", [])
946
+ sess_list = resp.get("items", resp.get("sessions", []))
947
947
  if json_output:
948
948
  console.print(json.dumps(sess_list, indent=2))
949
949
  return
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes