reviso-cli 0.1.2__tar.gz → 0.3.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 (55) hide show
  1. {reviso_cli-0.1.2/src/reviso_cli.egg-info → reviso_cli-0.3.0}/PKG-INFO +47 -14
  2. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/README.md +45 -13
  3. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/pyproject.toml +2 -2
  4. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/__init__.py +1 -1
  5. reviso_cli-0.3.0/src/reviso_cli/cli/__init__.py +490 -0
  6. reviso_cli-0.3.0/src/reviso_cli/cli/auth.py +87 -0
  7. reviso_cli-0.3.0/src/reviso_cli/cli/credential_file.py +73 -0
  8. reviso_cli-0.3.0/src/reviso_cli/cli/credentials.py +156 -0
  9. reviso_cli-0.3.0/src/reviso_cli/cli/deck.py +81 -0
  10. reviso_cli-0.3.0/src/reviso_cli/cli/dsh_credentials.py +125 -0
  11. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/cli/guest_comments.py +2 -1
  12. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/cli/invites.py +4 -1
  13. reviso_cli-0.3.0/src/reviso_cli/cli/oauth_http.py +53 -0
  14. reviso_cli-0.3.0/src/reviso_cli/cli/oauth_login.py +105 -0
  15. reviso_cli-0.3.0/src/reviso_cli/cli/preflight.py +34 -0
  16. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/cli/versions.py +45 -10
  17. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/client/__init__.py +100 -26
  18. reviso_cli-0.3.0/src/reviso_cli/client/errors.py +55 -0
  19. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/client/http.py +4 -2
  20. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/client/participation.py +3 -1
  21. reviso_cli-0.3.0/src/reviso_cli/deck_assets.py +138 -0
  22. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/local.py +28 -14
  23. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/scope.py +6 -4
  24. {reviso_cli-0.1.2 → reviso_cli-0.3.0/src/reviso_cli.egg-info}/PKG-INFO +47 -14
  25. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli.egg-info/SOURCES.txt +19 -1
  26. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli.egg-info/requires.txt +1 -0
  27. reviso_cli-0.3.0/tests/test_ci_tier.py +141 -0
  28. reviso_cli-0.3.0/tests/test_cli_deck_validate.py +113 -0
  29. reviso_cli-0.3.0/tests/test_cli_documents_paging.py +90 -0
  30. reviso_cli-0.3.0/tests/test_cli_publish_duplicate_hint.py +81 -0
  31. reviso_cli-0.3.0/tests/test_client.py +582 -0
  32. reviso_cli-0.3.0/tests/test_credentials.py +192 -0
  33. reviso_cli-0.3.0/tests/test_deck_assets.py +91 -0
  34. reviso_cli-0.3.0/tests/test_dsh_fallback.py +213 -0
  35. reviso_cli-0.3.0/tests/test_oauth_login.py +112 -0
  36. reviso_cli-0.3.0/tests/test_publish_preflight.py +61 -0
  37. reviso_cli-0.1.2/src/reviso_cli/cli/__init__.py +0 -276
  38. reviso_cli-0.1.2/src/reviso_cli/client/errors.py +0 -28
  39. reviso_cli-0.1.2/tests/test_client.py +0 -148
  40. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/LICENSE +0 -0
  41. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/setup.cfg +0 -0
  42. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/__main__.py +0 -0
  43. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/access.py +0 -0
  44. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/cli/doctor.py +0 -0
  45. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/client/collab.py +0 -0
  46. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/command_journal.py +0 -0
  47. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/document_route_keys.py +0 -0
  48. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/document_search.py +0 -0
  49. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/errors.py +0 -0
  50. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/ids.py +0 -0
  51. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/origin.py +0 -0
  52. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli/paths.py +0 -0
  53. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli.egg-info/dependency_links.txt +0 -0
  54. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli.egg-info/entry_points.txt +0 -0
  55. {reviso_cli-0.1.2 → reviso_cli-0.3.0}/src/reviso_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reviso-cli
3
- Version: 0.1.2
3
+ Version: 0.3.0
4
4
  Summary: Command line client for Reviso: publish drafts for human review, read reviewer comments back, and publish revisions safely.
5
5
  License: MIT License
6
6
 
@@ -46,6 +46,7 @@ Description-Content-Type: text/markdown
46
46
  License-File: LICENSE
47
47
  Provides-Extra: test
48
48
  Requires-Dist: pytest>=8.0; extra == "test"
49
+ Requires-Dist: ruff<0.16,>=0.15.6; extra == "test"
49
50
  Dynamic: license-file
50
51
 
51
52
  # reviso-cli
@@ -74,11 +75,13 @@ pull a dependency graph into an agent's environment.
74
75
 
75
76
  ```bash
76
77
  reviso auth login --server https://reviso.work
77
- # set REVISO_AUTOMATION_KEY in the environment first, or pass --key
78
+ # opens a browser for consent; use --no-browser to open the URL yourself
78
79
  reviso doctor --json
79
80
 
80
81
  reviso publish draft.md --title "Q3 launch plan" --description "Initial draft"
81
82
  # prints the document URL
83
+ reviso publish draft.md --title "Q3 launch plan" --json
84
+ # prints document_id, version_id, workspace_id, and review_url
82
85
 
83
86
  reviso documents --json # find the document id
84
87
  reviso packet doc_abc123 --format json # reviewer comments and version metadata
@@ -89,21 +92,38 @@ reviso update doc_abc123 revised.md \
89
92
  --base-version-id ver_xyz
90
93
  ```
91
94
 
95
+ ## Browser login
96
+
97
+ Version 0.2 supports browser consent with a temporary loopback callback and PKCE.
98
+ Keep the CLI running and open the login URL in a browser on the same computer.
99
+ `reviso auth status` shows the selected server and login state without credentials;
100
+ `reviso auth logout` removes that server's saved login. Revoke the connection in
101
+ Settings → Integrations to end its server access.
102
+
103
+ Credentials live in an owner-only file at `~/.config/reviso/credentials.json`
104
+ (or under `XDG_CONFIG_HOME`), separately for each server, and refresh automatically.
105
+ An existing `REVISO_AUTOMATION_KEY` or `--key` still supports headless use.
106
+ The credential lock currently supports macOS and Linux.
107
+
92
108
  ## The rule that matters
93
109
 
94
- **Always pass `--base-version-id` when you revise a document.**
110
+ **`update` and `rollback` require `--base-version-id`.**
95
111
 
96
- Omitting it is not a safe default. Without it the command re-bases onto whatever
97
- version is newest and lets your write win, which silently discards a human's
98
- concurrent edit. The safe shape is always two steps:
112
+ The base is the version you actually read. Without it, a write could silently
113
+ discard a human's concurrent edit, so the CLI fails before contacting the server.
114
+ The safe shape is two steps:
99
115
 
100
116
  ```bash
101
117
  reviso versions <document_id> # take the newest version_id
102
118
  reviso update <document_id> file --description "..." --base-version-id <ver_...>
119
+ reviso rollback <document_id> <target_version_id> \
120
+ --description "..." --base-version-id <ver_...>
103
121
  ```
104
122
 
105
- If the write is rejected as a conflict, re-read and re-apply your change on top of
106
- the human's edit. Do not retry with the flag removed.
123
+ If a write is rejected as a conflict, re-read and re-apply your change on top of
124
+ the human's edit. `--force-latest` is the explicit last-writer-wins opt-in: it
125
+ performs one fresh read and uses that version as the base. It cannot be combined
126
+ with `--base-version-id`.
107
127
 
108
128
  ## Command groups
109
129
 
@@ -130,13 +150,18 @@ If you need MCP tools rather than a shell, the hosted connector is the better
130
150
  path in most hosts. See [reviso-agent](https://github.com/reviso-si/reviso-agent)
131
151
  for the agent skill.
132
152
 
133
- ## Known limitations
153
+ ## Provenance
154
+
155
+ Publishing from an agent runtime binds provenance automatically when the runtime
156
+ exposes `DSH_SESSION_ID`. You can pass an explicit pair instead:
157
+
158
+ ```bash
159
+ reviso publish draft.md --source-kind dsh --source-session-id <session_id>
160
+ ```
134
161
 
135
- - `publish` prints only the document URL. It does not return the document id, so
136
- use `reviso documents --json` to continue from the id.
137
- - `update` and `rollback` accept an omitted base version and fall back to
138
- last-writer-wins. Always pass the flag. A future release should make the safe
139
- behaviour the default.
162
+ `--source-kind` and `--source-session-id` must be supplied together. Use
163
+ `--no-source-binding` for an intentional no-source publish; it cannot be combined
164
+ with either provenance flag.
140
165
 
141
166
  ## License
142
167
 
@@ -146,3 +171,11 @@ The Reviso product itself is **not** open source. This repository covers the
146
171
  client only; it grants no rights to the service or its server software. See
147
172
  [VISIBILITY.md](VISIBILITY.md) for the boundary this repository holds, and
148
173
  [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
174
+
175
+ Publish a presentation with its explicit kind so the server validates and renders it as slides:
176
+
177
+ ```bash
178
+ reviso publish presentation.html --workspace-id <workspace-id> --kind html_deck --deck-contract-version html-deck/1
179
+ ```
180
+
181
+ Ordinary HTML keeps `--kind document` (the default); deck markup without `html_deck` is rejected by the server.
@@ -24,11 +24,13 @@ pull a dependency graph into an agent's environment.
24
24
 
25
25
  ```bash
26
26
  reviso auth login --server https://reviso.work
27
- # set REVISO_AUTOMATION_KEY in the environment first, or pass --key
27
+ # opens a browser for consent; use --no-browser to open the URL yourself
28
28
  reviso doctor --json
29
29
 
30
30
  reviso publish draft.md --title "Q3 launch plan" --description "Initial draft"
31
31
  # prints the document URL
32
+ reviso publish draft.md --title "Q3 launch plan" --json
33
+ # prints document_id, version_id, workspace_id, and review_url
32
34
 
33
35
  reviso documents --json # find the document id
34
36
  reviso packet doc_abc123 --format json # reviewer comments and version metadata
@@ -39,21 +41,38 @@ reviso update doc_abc123 revised.md \
39
41
  --base-version-id ver_xyz
40
42
  ```
41
43
 
44
+ ## Browser login
45
+
46
+ Version 0.2 supports browser consent with a temporary loopback callback and PKCE.
47
+ Keep the CLI running and open the login URL in a browser on the same computer.
48
+ `reviso auth status` shows the selected server and login state without credentials;
49
+ `reviso auth logout` removes that server's saved login. Revoke the connection in
50
+ Settings → Integrations to end its server access.
51
+
52
+ Credentials live in an owner-only file at `~/.config/reviso/credentials.json`
53
+ (or under `XDG_CONFIG_HOME`), separately for each server, and refresh automatically.
54
+ An existing `REVISO_AUTOMATION_KEY` or `--key` still supports headless use.
55
+ The credential lock currently supports macOS and Linux.
56
+
42
57
  ## The rule that matters
43
58
 
44
- **Always pass `--base-version-id` when you revise a document.**
59
+ **`update` and `rollback` require `--base-version-id`.**
45
60
 
46
- Omitting it is not a safe default. Without it the command re-bases onto whatever
47
- version is newest and lets your write win, which silently discards a human's
48
- concurrent edit. The safe shape is always two steps:
61
+ The base is the version you actually read. Without it, a write could silently
62
+ discard a human's concurrent edit, so the CLI fails before contacting the server.
63
+ The safe shape is two steps:
49
64
 
50
65
  ```bash
51
66
  reviso versions <document_id> # take the newest version_id
52
67
  reviso update <document_id> file --description "..." --base-version-id <ver_...>
68
+ reviso rollback <document_id> <target_version_id> \
69
+ --description "..." --base-version-id <ver_...>
53
70
  ```
54
71
 
55
- If the write is rejected as a conflict, re-read and re-apply your change on top of
56
- the human's edit. Do not retry with the flag removed.
72
+ If a write is rejected as a conflict, re-read and re-apply your change on top of
73
+ the human's edit. `--force-latest` is the explicit last-writer-wins opt-in: it
74
+ performs one fresh read and uses that version as the base. It cannot be combined
75
+ with `--base-version-id`.
57
76
 
58
77
  ## Command groups
59
78
 
@@ -80,13 +99,18 @@ If you need MCP tools rather than a shell, the hosted connector is the better
80
99
  path in most hosts. See [reviso-agent](https://github.com/reviso-si/reviso-agent)
81
100
  for the agent skill.
82
101
 
83
- ## Known limitations
102
+ ## Provenance
103
+
104
+ Publishing from an agent runtime binds provenance automatically when the runtime
105
+ exposes `DSH_SESSION_ID`. You can pass an explicit pair instead:
106
+
107
+ ```bash
108
+ reviso publish draft.md --source-kind dsh --source-session-id <session_id>
109
+ ```
84
110
 
85
- - `publish` prints only the document URL. It does not return the document id, so
86
- use `reviso documents --json` to continue from the id.
87
- - `update` and `rollback` accept an omitted base version and fall back to
88
- last-writer-wins. Always pass the flag. A future release should make the safe
89
- behaviour the default.
111
+ `--source-kind` and `--source-session-id` must be supplied together. Use
112
+ `--no-source-binding` for an intentional no-source publish; it cannot be combined
113
+ with either provenance flag.
90
114
 
91
115
  ## License
92
116
 
@@ -96,3 +120,11 @@ The Reviso product itself is **not** open source. This repository covers the
96
120
  client only; it grants no rights to the service or its server software. See
97
121
  [VISIBILITY.md](VISIBILITY.md) for the boundary this repository holds, and
98
122
  [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
123
+
124
+ Publish a presentation with its explicit kind so the server validates and renders it as slides:
125
+
126
+ ```bash
127
+ reviso publish presentation.html --workspace-id <workspace-id> --kind html_deck --deck-contract-version html-deck/1
128
+ ```
129
+
130
+ Ordinary HTML keeps `--kind document` (the default); deck markup without `html_deck` is rejected by the server.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "reviso-cli"
7
- version = "0.1.2"
7
+ version = "0.3.0"
8
8
  description = "Command line client for Reviso: publish drafts for human review, read reviewer comments back, and publish revisions safely."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -26,7 +26,7 @@ classifiers = [
26
26
  dependencies = []
27
27
 
28
28
  [project.optional-dependencies]
29
- test = ["pytest>=8.0"]
29
+ test = ["pytest>=8.0", "ruff>=0.15.6,<0.16"]
30
30
 
31
31
  # PyPI renders these as the package page's links. Without them the page is a
32
32
  # dead end: someone who finds the package by search has no route to the docs,
@@ -3,6 +3,6 @@ from __future__ import annotations
3
3
 
4
4
  from .client import RevisoClient
5
5
 
6
- __version__ = "0.1.2"
6
+ __version__ = "0.3.0"
7
7
 
8
8
  __all__ = ["RevisoClient", "__version__"]