cdx-manager 0.7.8 → 0.8.0
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.
- package/README.md +14 -3
- package/changelogs/CHANGELOGS_0_7_8.md +12 -0
- package/changelogs/CHANGELOGS_0_8_0.md +39 -0
- package/checksums/release-archives.json +8 -0
- package/package.json +4 -3
- package/pyproject.toml +1 -1
- package/src/cli.py +7 -2
- package/src/cli_commands.py +1 -0
- package/src/cli_view.py +101 -0
- package/src/logics_view.py +37 -0
- package/src/session_service.py +1 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CDX Manager
|
|
2
2
|
|
|
3
|
-
[](LICENSE) ](LICENSE)  
|
|
4
4
|
|
|
5
5
|
**Run multiple Codex, Claude, Antigravity, and Ollama sessions from one terminal. Switch between accounts instantly.**
|
|
6
6
|
|
|
@@ -42,6 +42,7 @@ One command to launch any session. Zero auth juggling.
|
|
|
42
42
|
- **Persistent launch settings.** Pin per-session power, permission, and fast-mode preferences once; `cdx` reapplies them on every launch until you unset them.
|
|
43
43
|
- **Launch history.** Inspect recent launches with provider, result, duration, working directory, launch settings, and transcript path.
|
|
44
44
|
- **Update prompts.** Periodic update checks surface `cdx update` directly in the `cdx`, `cdx status`, and launch output when a newer release is available. When `logics-manager` is installed, `cdx` can also suggest `logics-manager self-update`.
|
|
45
|
+
- **Logics viewer shortcut.** `cdx view` opens the Logics browser/focus viewer through `logics-manager view` when the companion CLI is installed; `cdx view --json` reports availability and update diagnostics without opening the viewer.
|
|
45
46
|
- **Shared handoff context.** Keep a per-workspace Markdown context, or build one from a source session transcript, and install it into another assistant session before switching providers or accounts.
|
|
46
47
|
- **Passive status resolution.** Codex status is read from the local Codex app-server rate-limit API when available, with legacy transcript/history parsing kept as a fallback.
|
|
47
48
|
- **Session transcript capture.** Every launch is recorded to a local log file via `script`, giving you a full terminal transcript for each session.
|
|
@@ -136,7 +137,7 @@ For a specific version:
|
|
|
136
137
|
|
|
137
138
|
```bash
|
|
138
139
|
curl -fsSL https://raw.githubusercontent.com/AlexAgo83/cdx-manager/main/install.sh -o install.sh
|
|
139
|
-
CDX_VERSION=v0.
|
|
140
|
+
CDX_VERSION=v0.8.0 sh install.sh
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
From source:
|
|
@@ -189,6 +190,13 @@ Security note:
|
|
|
189
190
|
- Prefer `npm`, `pipx`, or `uv` when you want registry-backed install flows.
|
|
190
191
|
- If you use the standalone script, download it first, inspect it, and prefer a release with an official checksum entry.
|
|
191
192
|
|
|
193
|
+
Release maintainer note:
|
|
194
|
+
|
|
195
|
+
- Before publishing npm or PyPI packages, run `npm run release:validate`.
|
|
196
|
+
- The release tag must match `package.json`, `pyproject.toml`, `src/cli.py`, and `VERSION`.
|
|
197
|
+
- `checksums/release-archives.json` must include the matching `vX.Y.Z` entry with both `github_tarball_sha256` and `github_zip_sha256`.
|
|
198
|
+
- Use `python3 scripts/update_release_checksums.py --tag vX.Y.Z` after the GitHub tag archives exist, commit the checksum update to `main`, then publish the GitHub release only after `npm run release:validate`, `npm run lint`, and `npm test` pass.
|
|
199
|
+
|
|
192
200
|
### Environment
|
|
193
201
|
|
|
194
202
|
By default, `cdx` stores all data under `~/.cdx/`. Override with:
|
|
@@ -344,6 +352,7 @@ cdx history --summary --from 2026-05-01 --to 2026-05-28
|
|
|
344
352
|
| `cdx import <file> [--sessions a,b] [--passphrase-env VAR] [--force] [--json]` | Import sessions from a bundle into the current `CDX_HOME` |
|
|
345
353
|
| `cdx doctor [--json]` | Inspect CLI dependencies, CDX_HOME permissions, missing state, orphan profiles, and pending quarantines |
|
|
346
354
|
| `cdx repair [--dry-run] [--force] [--json]` | Plan or apply safe repairs for missing state files, quarantines, and orphan profiles |
|
|
355
|
+
| `cdx view [--json]` | Open the Logics browser/focus viewer by delegating to `logics-manager view`; JSON mode reports diagnostics without launching it |
|
|
347
356
|
| `cdx update [--check] [--yes] [--json] [--version TAG]` | Update cdx-manager using the installer that matches how it was installed |
|
|
348
357
|
| `cdx ready [--refresh] [--json]` | Schedule an OS notification for the next cooling-down assistant that becomes ready, then return immediately |
|
|
349
358
|
| `cdx notify <name> --at-reset [--poll seconds] [--once] [--schedule] [--refresh] [--json]` | Wait for a session reset time or schedule an OS wake-up notification when due |
|
|
@@ -387,6 +396,7 @@ Commands with machine-readable output:
|
|
|
387
396
|
- `cdx last --json`
|
|
388
397
|
- `cdx doctor --json`
|
|
389
398
|
- `cdx repair --json`
|
|
399
|
+
- `cdx view --json`
|
|
390
400
|
- `cdx update --json`
|
|
391
401
|
- `cdx ready --json`
|
|
392
402
|
- `cdx notify ... --json`
|
|
@@ -500,7 +510,8 @@ Notes:
|
|
|
500
510
|
|
|
501
511
|
- `npm test`: run the Python test suite
|
|
502
512
|
- `npm run test:py`: run the Python unit tests through the portable launcher
|
|
503
|
-
- `npm run lint`: check the Node launcher and byte-compile the Python sources and tests
|
|
513
|
+
- `npm run lint`: check project guidance, the Node launcher, and byte-compile the Python sources, scripts, and tests
|
|
514
|
+
- `npm run release:validate`: verify version alignment and required GitHub release archive checksum metadata before publication
|
|
504
515
|
- `npm run link`: link `cdx` globally for local development (`npm link`)
|
|
505
516
|
- `npm run unlink`: remove the global link
|
|
506
517
|
|
|
@@ -5,6 +5,7 @@ Release date: 2026-06-08
|
|
|
5
5
|
## Launch Guidance
|
|
6
6
|
|
|
7
7
|
- Added update guidance for `logics-manager` so `cdx` can surface a newer companion CLI version alongside the existing `cdx-manager` update notice.
|
|
8
|
+
- Added `cdx view` as a thin shortcut for `logics-manager view`, plus `cdx view --json` diagnostics for companion availability and update suggestions.
|
|
8
9
|
- Added RTK launch preference handling so noisy assistant shell commands can be wrapped with `rtk` when the session setting asks for filtered command output.
|
|
9
10
|
- Extended provider launch metadata and health checks so companion tool hints appear without making `logics-manager` or RTK hard runtime dependencies.
|
|
10
11
|
|
|
@@ -16,9 +17,20 @@ Release date: 2026-06-08
|
|
|
16
17
|
|
|
17
18
|
- Updated package metadata, CLI version output, README badge, pinned installer example, and release changelog to `v0.7.8`.
|
|
18
19
|
|
|
20
|
+
## Release Governance
|
|
21
|
+
|
|
22
|
+
- Added `npm run release:validate` as the required pre-publication gate for version alignment and GitHub archive checksum metadata.
|
|
23
|
+
- The npm and PyPI publication workflows now run the checksum/version gate before registry upload.
|
|
24
|
+
- Release prep now requires generating `checksums/release-archives.json` entries for the matching `vX.Y.Z` tag before publication.
|
|
25
|
+
|
|
26
|
+
## Maintainability
|
|
27
|
+
|
|
28
|
+
- Extracted the `cdx view` command domain into a dedicated module while keeping the existing CLI routing and JSON diagnostics unchanged.
|
|
29
|
+
|
|
19
30
|
## Validation and Regression Evidence
|
|
20
31
|
|
|
21
32
|
- `npm run lint`
|
|
33
|
+
- `npm run release:validate`
|
|
22
34
|
- `npm test`
|
|
23
35
|
- `python -m unittest discover -s test -p 'test_*_py.py'`
|
|
24
36
|
- `python3 -m logics_manager lint --require-status`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog (`0.7.8 -> 0.8.0`)
|
|
2
|
+
|
|
3
|
+
Release date: 2026-06-08
|
|
4
|
+
|
|
5
|
+
## Release Governance
|
|
6
|
+
|
|
7
|
+
- Added a pre-publication release checksum gate that validates version alignment across `package.json`, `pyproject.toml`, `src/cli.py`, and `VERSION`.
|
|
8
|
+
- Publication workflows now require matching GitHub archive checksum metadata before npm or PyPI upload.
|
|
9
|
+
- Documented the release ordering for version bump, tag/archive checksum generation, checksum commit, and publication.
|
|
10
|
+
|
|
11
|
+
## Logics Workflow
|
|
12
|
+
|
|
13
|
+
- Versioned `LOGICS.md` as normal project guidance instead of treating it as an ignored local artifact.
|
|
14
|
+
- Added project documentation validation to ensure core Logics command families stay documented.
|
|
15
|
+
- Added `cdx view` as a thin shortcut for `logics-manager view`.
|
|
16
|
+
- Added `cdx view --json` diagnostics for companion availability, delegated command details, failure reason, and update suggestions.
|
|
17
|
+
|
|
18
|
+
## Maintainability
|
|
19
|
+
|
|
20
|
+
- Extracted the `cdx view` command domain into `src/cli_view.py` while keeping `src/cli_commands.py` as a compatibility facade for handler routing.
|
|
21
|
+
|
|
22
|
+
## Release Metadata
|
|
23
|
+
|
|
24
|
+
- Updated package metadata, CLI version output, README badge, pinned installer example, and release changelog to `v0.8.0`.
|
|
25
|
+
|
|
26
|
+
## Validation and Regression Evidence
|
|
27
|
+
|
|
28
|
+
- `python -m py_compile bin/cdx src/*.py test/test_*_py.py`
|
|
29
|
+
- `python -m unittest discover -s test -p 'test_*_py.py'`
|
|
30
|
+
- `npm pack --dry-run`
|
|
31
|
+
- `npm run lint`
|
|
32
|
+
- `npm test`
|
|
33
|
+
- `logics-manager lint --require-status`
|
|
34
|
+
- `logics-manager audit`
|
|
35
|
+
- `git diff --check`
|
|
36
|
+
- `node bin/cdx.js --version`
|
|
37
|
+
- `python3 bin/cdx --version`
|
|
38
|
+
- `python -m build`
|
|
39
|
+
- `python -m twine check dist/*`
|
|
@@ -56,6 +56,14 @@
|
|
|
56
56
|
"v0.7.6": {
|
|
57
57
|
"github_tarball_sha256": "cf6390c2071c710edd7c55d89fd75914e1d94ae5a62330d6fe15029484f88c13",
|
|
58
58
|
"github_zip_sha256": "f58be3078daaa9523053dab7b59d681dfb359d5f2a94276aa46000dd7f1360ed"
|
|
59
|
+
},
|
|
60
|
+
"v0.7.8": {
|
|
61
|
+
"github_tarball_sha256": "8afa0c1f0293a973973158d249aaa627d3aede785cd5a36941be067633580e2a",
|
|
62
|
+
"github_zip_sha256": "207e000dc1192d12324616cc4671f42cf07c22e2eb895556117b681ab5a6ab93"
|
|
63
|
+
},
|
|
64
|
+
"v0.8.0": {
|
|
65
|
+
"github_tarball_sha256": "62cd461f9e22636bb85d801e21209b1762859b6662623e74c01fd40c107ea29a",
|
|
66
|
+
"github_zip_sha256": "4674c8b61110f52b99c76312e9962202a2e8fc6928327f8927781f45eeaa980f"
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdx-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Terminal session manager for Codex and Claude accounts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alexandre Agostini",
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
"scripts": {
|
|
45
45
|
"test": "npm run test:py",
|
|
46
46
|
"test:py": "node bin/python-runner.js -m unittest discover -s test -p test_*_py.py",
|
|
47
|
-
"lint": "node --check bin/cdx.js && node --check bin/python-runner.js && node bin/python-runner.js -m py_compile bin/cdx src/*.py test/test_*_py.py",
|
|
48
|
-
"
|
|
47
|
+
"lint": "node --check bin/cdx.js && node --check bin/python-runner.js && node bin/python-runner.js scripts/verify_project_docs.py && node bin/python-runner.js -m py_compile bin/cdx src/*.py scripts/*.py test/test_*_py.py",
|
|
48
|
+
"release:validate": "node bin/python-runner.js scripts/verify_release_checksums.py",
|
|
49
|
+
"prepublishOnly": "npm run release:validate && npm run lint && npm test",
|
|
49
50
|
"link": "npm link",
|
|
50
51
|
"unlink": "npm unlink -g cdx-manager"
|
|
51
52
|
}
|
package/pyproject.toml
CHANGED
package/src/cli.py
CHANGED
|
@@ -37,6 +37,7 @@ from .cli_commands import (
|
|
|
37
37
|
handle_set,
|
|
38
38
|
handle_unset,
|
|
39
39
|
handle_update,
|
|
40
|
+
handle_view,
|
|
40
41
|
)
|
|
41
42
|
from .cli_render import (
|
|
42
43
|
_format_sessions,
|
|
@@ -60,7 +61,7 @@ from .status_view import (
|
|
|
60
61
|
)
|
|
61
62
|
from .update_check import check_for_update, check_logics_manager_for_update
|
|
62
63
|
|
|
63
|
-
VERSION = "0.
|
|
64
|
+
VERSION = "0.8.0"
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
# ---------------------------------------------------------------------------
|
|
@@ -104,6 +105,7 @@ def _print_help(use_color=False):
|
|
|
104
105
|
f" {_style('cdx import <file> [--sessions a,b] [--passphrase-env VAR] [--force] [--json]', '36', use_color)}",
|
|
105
106
|
f" {_style('cdx doctor [--json]', '36', use_color)}",
|
|
106
107
|
f" {_style('cdx repair [--dry-run] [--force] [--json]', '36', use_color)}",
|
|
108
|
+
f" {_style('cdx view [--json]', '36', use_color)}",
|
|
107
109
|
f" {_style('cdx update [--check] [--yes] [--json] [--version TAG]', '36', use_color)}",
|
|
108
110
|
f" {_style('cdx ready [--refresh] [--json]', '36', use_color)}",
|
|
109
111
|
f" {_style('cdx notify <name> --at-reset [--schedule] [--refresh] [--json]', '36', use_color)}",
|
|
@@ -275,7 +277,7 @@ def main(argv, options=None):
|
|
|
275
277
|
"version": VERSION,
|
|
276
278
|
"cwd": options.get("cwd") or os.getcwd(),
|
|
277
279
|
"update_notices": _get_update_notices(service, env, options) if command not in (
|
|
278
|
-
"add", "cp", "ren", "rename", "mv", "rmv", "clean", "doctor", "repair", "update", "ready", "notify", "next", "context", "config", "configs", "set", "unset", "power", "perm", "fast", "model", "history", "stats", "handoff", "login", "logout", "disable", "enable", "export", "import", "select", "run", "help", "version"
|
|
280
|
+
"add", "cp", "ren", "rename", "mv", "rmv", "clean", "doctor", "repair", "view", "update", "ready", "notify", "next", "context", "config", "configs", "set", "unset", "power", "perm", "fast", "model", "history", "stats", "handoff", "login", "logout", "disable", "enable", "export", "import", "select", "run", "help", "version"
|
|
279
281
|
) else None,
|
|
280
282
|
"use_color": use_color,
|
|
281
283
|
}
|
|
@@ -313,6 +315,9 @@ def main(argv, options=None):
|
|
|
313
315
|
if command == "repair":
|
|
314
316
|
return handle_repair(rest, ctx)
|
|
315
317
|
|
|
318
|
+
if command == "view":
|
|
319
|
+
return handle_view(rest, ctx)
|
|
320
|
+
|
|
316
321
|
if command == "update":
|
|
317
322
|
return handle_update(rest, ctx)
|
|
318
323
|
|
package/src/cli_commands.py
CHANGED
package/src/cli_view.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from .cli_render import _warn
|
|
4
|
+
from .errors import CdxError
|
|
5
|
+
from .logics_view import (
|
|
6
|
+
LOGICS_MANAGER_INSTALL_HINT,
|
|
7
|
+
build_viewer_diagnostics,
|
|
8
|
+
missing_logics_manager_failure,
|
|
9
|
+
resolve_logics_manager,
|
|
10
|
+
run_logics_viewer,
|
|
11
|
+
)
|
|
12
|
+
from .update_check import check_logics_manager_for_update
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
VIEW_USAGE = "Usage: cdx view [--json]"
|
|
16
|
+
API_SCHEMA_VERSION = 1
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _json_success(action, message, warnings=None, **extra):
|
|
20
|
+
payload = {
|
|
21
|
+
"schema_version": API_SCHEMA_VERSION,
|
|
22
|
+
"ok": True,
|
|
23
|
+
"action": action,
|
|
24
|
+
"message": message,
|
|
25
|
+
"warnings": warnings or [],
|
|
26
|
+
}
|
|
27
|
+
payload.update(extra)
|
|
28
|
+
return payload
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _write_json(ctx, payload):
|
|
32
|
+
ctx["out"](f"{json.dumps(payload, indent=2)}\n")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _update_notice_warnings(notices):
|
|
36
|
+
warnings = []
|
|
37
|
+
for notice in notices or []:
|
|
38
|
+
if not notice:
|
|
39
|
+
continue
|
|
40
|
+
tool = notice.get("tool") or "logics-manager"
|
|
41
|
+
current = notice.get("current_version")
|
|
42
|
+
command = notice.get("update_command")
|
|
43
|
+
message = f"Update available: {tool} {notice['latest_version']}"
|
|
44
|
+
if current:
|
|
45
|
+
message = f"{message} (current {current})"
|
|
46
|
+
if command:
|
|
47
|
+
message = f"{message}. Run: {command}"
|
|
48
|
+
warnings.append({
|
|
49
|
+
"code": f"{tool.replace('-', '_')}_update_available",
|
|
50
|
+
"message": message,
|
|
51
|
+
"tool": tool,
|
|
52
|
+
"latest_version": notice["latest_version"],
|
|
53
|
+
"current_version": current,
|
|
54
|
+
"update_command": command,
|
|
55
|
+
"url": notice.get("url"),
|
|
56
|
+
})
|
|
57
|
+
return warnings
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _logics_manager_update_notice(ctx, env):
|
|
61
|
+
checker = ctx["options"].get("checkLogicsManagerForUpdate") or check_logics_manager_for_update
|
|
62
|
+
return checker(
|
|
63
|
+
ctx["service"]["base_dir"],
|
|
64
|
+
env=env,
|
|
65
|
+
now_fn=ctx["options"].get("now"),
|
|
66
|
+
runner=ctx["options"].get("runLogicsVersionCheck"),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def handle_view(rest, ctx):
|
|
71
|
+
json_flag = "--json" in rest
|
|
72
|
+
unknown = [arg for arg in rest if arg != "--json"]
|
|
73
|
+
if unknown:
|
|
74
|
+
raise CdxError(VIEW_USAGE)
|
|
75
|
+
|
|
76
|
+
env = ctx.get("env")
|
|
77
|
+
cwd = ctx.get("cwd")
|
|
78
|
+
executable = resolve_logics_manager(env=env)
|
|
79
|
+
update_notice = _logics_manager_update_notice(ctx, env) if executable else None
|
|
80
|
+
failure = None if executable else missing_logics_manager_failure()
|
|
81
|
+
diagnostics = build_viewer_diagnostics(executable, cwd, update_notice=update_notice, failure=failure)
|
|
82
|
+
warnings = _update_notice_warnings([update_notice])
|
|
83
|
+
|
|
84
|
+
if json_flag:
|
|
85
|
+
_write_json(ctx, _json_success("view", "Collected Logics viewer diagnostics", warnings=warnings, viewer=diagnostics))
|
|
86
|
+
return 0
|
|
87
|
+
|
|
88
|
+
if not executable:
|
|
89
|
+
raise CdxError(f"logics-manager is required for cdx view. {LOGICS_MANAGER_INSTALL_HINT}")
|
|
90
|
+
|
|
91
|
+
for warning in warnings:
|
|
92
|
+
ctx["out"](f"{_warn(warning['message'], ctx['use_color'])}\n")
|
|
93
|
+
|
|
94
|
+
try:
|
|
95
|
+
result = run_logics_viewer(executable, cwd, env=env, runner=ctx.get("spawn_sync"))
|
|
96
|
+
except FileNotFoundError as error:
|
|
97
|
+
raise CdxError(f"logics-manager is required for cdx view. {LOGICS_MANAGER_INSTALL_HINT}") from error
|
|
98
|
+
returncode = getattr(result, "returncode", 0)
|
|
99
|
+
if returncode not in (0, None):
|
|
100
|
+
raise CdxError("logics-manager view failed.", exit_code=returncode)
|
|
101
|
+
return 0
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
import subprocess
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
LOGICS_MANAGER_INSTALL_HINT = "Install or update it with: npm install -g @grifhinz/logics-manager"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def resolve_logics_manager(env=None):
|
|
9
|
+
env = env or {}
|
|
10
|
+
return shutil.which("logics-manager", path=env.get("PATH", ""))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def build_viewer_diagnostics(executable, cwd, update_notice=None, failure=None):
|
|
14
|
+
command = [executable or "logics-manager", "view"]
|
|
15
|
+
return {
|
|
16
|
+
"available": bool(executable),
|
|
17
|
+
"executable": executable,
|
|
18
|
+
"command": command,
|
|
19
|
+
"cwd": cwd,
|
|
20
|
+
"update": update_notice,
|
|
21
|
+
"failure": failure,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def missing_logics_manager_failure():
|
|
26
|
+
return {
|
|
27
|
+
"code": "logics_manager_missing",
|
|
28
|
+
"message": f"logics-manager is required for cdx view. {LOGICS_MANAGER_INSTALL_HINT}",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def run_logics_viewer(executable, cwd, env=None, runner=None):
|
|
33
|
+
runner = runner or subprocess.run
|
|
34
|
+
argv = [executable, "view"]
|
|
35
|
+
if runner is subprocess.run:
|
|
36
|
+
return subprocess.run(argv, cwd=cwd, env=env)
|
|
37
|
+
return runner(argv, cwd=cwd, env=env)
|