reportify-cli 0.1.49__tar.gz → 0.1.50__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.
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/PKG-INFO +1 -1
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/pyproject.toml +1 -1
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/auth.py +6 -6
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/test_auth_commands.py +4 -4
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/.gitignore +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/Makefile +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/README.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/scripts/README.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/scripts/bump_version.sh +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/scripts/publish.sh +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/skills/reportify-agent/SKILL.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/skills/reportify-ai/SKILL.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/skills/reportify-ai/references/API_REFERENCE.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/skills/reportify-ai/references/COMMANDS.md +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/__init__.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/auth_config.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/client.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/__init__.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/agent.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/channels.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/concepts.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/docs.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/following.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/kb.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/macro.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/quant.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/search.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/stock.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/timeline.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/commands/user.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/main.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/output.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/params.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/settings.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/src/utils.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/__init__.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/integration/test_docs_integration.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/integration/test_stock_integration.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/__init__.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/test_auth_config.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/test_docs.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/test_quant.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/tests/test_commands/test_search.py +0 -0
- {reportify_cli-0.1.49 → reportify_cli-0.1.50}/uv.lock +0 -0
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
reportify-cli auth status # 显示当前登录状态
|
|
8
8
|
|
|
9
9
|
后端契约(新 oauth_server 端点):
|
|
10
|
-
POST {base}/
|
|
11
|
-
POST {base}/
|
|
12
|
-
POST {base}/
|
|
10
|
+
POST {base}/v2/oauth/device/code (form: client_id, resource, scope?)
|
|
11
|
+
POST {base}/v2/oauth/token (form: grant_type, device_code, client_id, resource)
|
|
12
|
+
POST {base}/v2/oauth/token (form: grant_type=refresh_token, refresh_token, client_id, resource)
|
|
13
13
|
|
|
14
14
|
返回的 access_token 是 **JWT**(aud=https://api.reportify.cn),客户端把它当
|
|
15
15
|
Bearer 直接发给主 API;主 API 的 TokenMiddleware 会本地验签校验 audience。
|
|
@@ -45,8 +45,8 @@ SCOPE = "api"
|
|
|
45
45
|
GRANT_TYPE_DEVICE = "urn:ietf:params:oauth:grant-type:device_code"
|
|
46
46
|
GRANT_TYPE_REFRESH = "refresh_token"
|
|
47
47
|
|
|
48
|
-
ENDPOINT_DEVICE_CODE = "/
|
|
49
|
-
ENDPOINT_TOKEN = "/
|
|
48
|
+
ENDPOINT_DEVICE_CODE = "/v2/oauth/device/code"
|
|
49
|
+
ENDPOINT_TOKEN = "/v2/oauth/token"
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
# ------------------------------------------------------------------ #
|
|
@@ -88,7 +88,7 @@ def _request_device_code(client: httpx.Client, client_id: str) -> dict:
|
|
|
88
88
|
def _poll_token(
|
|
89
89
|
client: httpx.Client, device_code: str, client_id: str, interval: int, expires_in: int
|
|
90
90
|
) -> dict:
|
|
91
|
-
"""轮询 /
|
|
91
|
+
"""轮询 /v2/oauth/token (grant_type=device_code),直到拿到 JWT 或超时/被拒。"""
|
|
92
92
|
deadline = time.monotonic() + expires_in
|
|
93
93
|
current_interval = max(interval, 1)
|
|
94
94
|
typer.echo("Waiting for authorization", nl=False)
|
|
@@ -81,7 +81,7 @@ def _register_payload() -> dict:
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
def _token_payload() -> dict:
|
|
84
|
-
"""oauth_server /
|
|
84
|
+
"""oauth_server /v2/oauth/token (grant_type=device_code) 的响应。
|
|
85
85
|
|
|
86
86
|
JWT 格式不重要(CLI 不解码),随便给个 header.payload.signature。
|
|
87
87
|
"""
|
|
@@ -166,9 +166,9 @@ class TestLoginHappyPath:
|
|
|
166
166
|
self, tmp_config, fast_sleep, patch_client
|
|
167
167
|
):
|
|
168
168
|
patch_client.post.side_effect = [
|
|
169
|
-
_ok(_register_payload()), # /
|
|
170
|
-
_ok(_device_code_payload()), # /
|
|
171
|
-
_ok(_token_payload()), # /
|
|
169
|
+
_ok(_register_payload()), # /v2/oauth/register (DCR)
|
|
170
|
+
_ok(_device_code_payload()), # /v2/oauth/device/code
|
|
171
|
+
_ok(_token_payload()), # /v2/oauth/token (approved)
|
|
172
172
|
]
|
|
173
173
|
|
|
174
174
|
result = runner.invoke(app, ["login", "--no-browser"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reportify_cli-0.1.49 → reportify_cli-0.1.50}/skills/reportify-ai/references/API_REFERENCE.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|