@grifhinz/logics-manager 2.2.0 → 2.3.1

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 (43) hide show
  1. package/README.md +95 -1
  2. package/VERSION +1 -1
  3. package/clients/README.md +9 -0
  4. package/clients/shared-web/media/css/board.css +658 -0
  5. package/clients/shared-web/media/css/details.css +457 -0
  6. package/clients/shared-web/media/css/layout.css +123 -0
  7. package/clients/shared-web/media/css/toolbar.css +576 -0
  8. package/clients/shared-web/media/harnessApi.js +324 -0
  9. package/clients/shared-web/media/hostApi.js +213 -0
  10. package/clients/shared-web/media/hostApiContract.js +55 -0
  11. package/clients/shared-web/media/icon.png +0 -0
  12. package/clients/shared-web/media/layoutController.js +246 -0
  13. package/clients/shared-web/media/logics.svg +7 -0
  14. package/clients/shared-web/media/logicsModel.js +910 -0
  15. package/clients/shared-web/media/main.css +112 -0
  16. package/clients/shared-web/media/main.js +3 -0
  17. package/clients/shared-web/media/mainApp.js +1005 -0
  18. package/clients/shared-web/media/mainCore.js +604 -0
  19. package/clients/shared-web/media/mainInteractionHandlers.js +324 -0
  20. package/clients/shared-web/media/mainInteractions.js +378 -0
  21. package/clients/shared-web/media/renderBoard.js +3 -0
  22. package/clients/shared-web/media/renderBoardApp.js +1339 -0
  23. package/clients/shared-web/media/renderDetails.js +685 -0
  24. package/clients/shared-web/media/renderMarkdown.js +449 -0
  25. package/clients/shared-web/media/toolsPanelLayout.js +172 -0
  26. package/clients/shared-web/media/uiStatus.js +54 -0
  27. package/clients/shared-web/media/webviewChrome.js +405 -0
  28. package/clients/shared-web/media/webviewPersistence.js +116 -0
  29. package/clients/shared-web/media/webviewSelectors.js +491 -0
  30. package/clients/viewer/README.md +5 -0
  31. package/clients/viewer/browser-host.js +847 -0
  32. package/clients/viewer/index.html +237 -0
  33. package/clients/viewer/viewer.css +433 -0
  34. package/logics_manager/assist.py +9 -142
  35. package/logics_manager/assist_handoff.py +132 -0
  36. package/logics_manager/assist_surface.py +38 -0
  37. package/logics_manager/cli.py +78 -5
  38. package/logics_manager/flow.py +126 -24
  39. package/logics_manager/flow_evidence.py +63 -0
  40. package/logics_manager/update_check.py +138 -0
  41. package/logics_manager/viewer.py +533 -0
  42. package/package.json +12 -6
  43. package/pyproject.toml +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/AlexAgo83/logics-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/AlexAgo83/logics-manager/actions/workflows/ci.yml)
4
4
  [![License](https://img.shields.io/github/license/AlexAgo83/logics-manager)](LICENSE)
5
- ![Version](https://img.shields.io/badge/version-v2.2.0-4C8BF5)
5
+ ![Version](https://img.shields.io/badge/version-v2.3.1-4C8BF5)
6
6
  ![VS Code](https://img.shields.io/badge/VS%20Code-1.86.0-007ACC?logo=visualstudiocode&logoColor=white)
7
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.3.3-3178C6?logo=typescript&logoColor=white)
8
8
  ![Vitest](https://img.shields.io/badge/Vitest-2.1.8-6E9F18?logo=vitest&logoColor=white)
@@ -58,6 +58,15 @@ python3.11 -m pip install .
58
58
  logics-manager --help
59
59
  ```
60
60
 
61
+ On Debian, Ubuntu, or WSL environments where Python is externally managed, use `pipx` instead of installing into the system Python:
62
+
63
+ ```bash
64
+ sudo apt update
65
+ sudo apt install pipx python3-venv
66
+ pipx ensurepath
67
+ pipx install logics-manager
68
+ ```
69
+
61
70
  Or install the npm package:
62
71
 
63
72
  ```bash
@@ -95,6 +104,7 @@ The CLI is the stable contract for Logics. It supports:
95
104
  - closing tasks, backlog items, and requests with consistency checks;
96
105
  - linting and auditing workflow traceability;
97
106
  - exporting indexes, context packs, and graph data;
107
+ - serving a read-only local browser viewer for the Logics corpus;
98
108
  - serving the bounded MCP tool surface.
99
109
 
100
110
  Useful commands:
@@ -105,8 +115,48 @@ logics-manager flow promote request-to-backlog req_001_example
105
115
  logics-manager flow promote backlog-to-task item_001_example
106
116
  logics-manager flow finish task task_001_example
107
117
  logics-manager sync context-pack req_001_example --format json
118
+ logics-manager view --open
119
+ logics-manager view --focus req_001_example --read --open
120
+ ```
121
+
122
+ ### Local Browser Viewer
123
+
124
+ Use the CLI viewer when you want to inspect the Logics corpus outside VS Code:
125
+
126
+ ```bash
127
+ logics-manager view --open
128
+ ```
129
+
130
+ The viewer starts a localhost-only, read-only browser UI on `127.0.0.1:8765` by default. It shows the same workflow board/list experience as the extension, with search, filters, document previews, corpus insights, lint/audit health, Mermaid rendering, auto-refresh, and an edit shortcut that opens the selected Markdown file in the system editor.
131
+
132
+ Useful options:
133
+
134
+ ```bash
135
+ logics-manager view --port 0 --open
136
+ logics-manager view --host 127.0.0.1 --port 9876
137
+ logics-manager view --focus req_001_example --open
138
+ logics-manager view --focus logics/tasks/task_001_example.md --read --open
139
+ logics-manager view --no-open
140
+ ```
141
+
142
+ Use `--port 0` when the default port is already taken. The viewer is intentionally read-only; use the canonical CLI commands such as `flow promote`, `flow finish`, `lint`, and `audit` for workflow mutations.
143
+
144
+ Focused viewer links can point directly at a corpus item:
145
+
146
+ ```text
147
+ http://127.0.0.1:8765/?focus=logics/request/req_001_example.md
148
+ http://127.0.0.1:8765/?focus=logics/request/req_001_example.md&read=1
149
+ ```
150
+
151
+ If the viewer server is not already running, start it with the equivalent fallback command:
152
+
153
+ ```bash
154
+ logics-manager view --focus logics/request/req_001_example.md --open
155
+ logics-manager view --focus req_001_example --read --open
108
156
  ```
109
157
 
158
+ This is the recommended assistant handoff pattern: provide the local viewer link for an already-running viewer and the CLI fallback command for a stopped server. Focus targets accept workflow refs such as `req_001_example`, `item_001_example`, or `task_001_example`, plus repo-relative Logics Markdown paths. Traversal and non-Logics paths are rejected.
159
+
110
160
  ### CLI Contracts
111
161
 
112
162
  Workflow target arguments accept these forms:
@@ -156,6 +206,32 @@ To update the installed CLI later:
156
206
  logics-manager self-update
157
207
  ```
158
208
 
209
+ If `self-update` reports an externally managed Python environment, migrate the Python install through `pipx`:
210
+
211
+ ```bash
212
+ sudo apt update
213
+ sudo apt install pipx python3-venv
214
+ pipx ensurepath
215
+ pipx install --force logics-manager
216
+ ```
217
+
218
+ For npm installs, update with:
219
+
220
+ ```bash
221
+ npm install -g @grifhinz/logics-manager@latest
222
+ ```
223
+
224
+ If npm reports a successful update but `logics-manager --version` still shows an older version, another installation is earlier on `PATH`. Diagnose it with:
225
+
226
+ ```bash
227
+ command -v -a logics-manager
228
+ npm prefix -g
229
+ npm list -g @grifhinz/logics-manager --depth=0
230
+ "$(npm prefix -g)/bin/logics-manager" --version
231
+ ```
232
+
233
+ If the direct npm binary shows the expected version, remove the older Python install or move the npm global `bin` directory earlier on `PATH`.
234
+
159
235
  ## VS Code Extension
160
236
 
161
237
  The VS Code extension is the human cockpit around the same runtime. It helps you:
@@ -347,6 +423,7 @@ Windows notes:
347
423
  - Create a fixture request with `logics-manager flow new request --title "Smoke test"` and confirm the compact synthetic request shape is generated.
348
424
  - Create a backlog item and a task from the UI and confirm markdown is generated.
349
425
  - Open `Read` on a Mermaid-bearing doc and confirm the graph is rendered.
426
+ - Run `logics-manager view --port 0 --open`, confirm the browser viewer loads repository docs, then stop it with `Ctrl+C`.
350
427
  - Promote request -> backlog and confirm links are updated.
351
428
  - Confirm request/backlog/task generation fails fast if a Mermaid signature or traceability block is stale instead of waiting for audit to find it later.
352
429
  - Promote backlog -> task and confirm task document is generated.
@@ -391,6 +468,22 @@ npm run dev
391
468
 
392
469
  `npm run dev` requires the `code` CLI on PATH, so the F5 path above remains the safest cross-platform dev entrypoint.
393
470
 
471
+ ### Browser UI Debugging
472
+
473
+ Use the real local viewer for repository data:
474
+
475
+ ```bash
476
+ logics-manager view --open
477
+ ```
478
+
479
+ Use the mock webview harness only when developing the shared browser/webview UI without VS Code:
480
+
481
+ ```bash
482
+ npm run debug:webview
483
+ ```
484
+
485
+ The harness runs at `http://localhost:4173/` and supports mock scenarios such as `/?scenario=empty` and `/?scenario=error`. It does not execute real VS Code commands or workflow writes.
486
+
394
487
  ## Deploy / Release (VSIX)
395
488
 
396
489
  1. Bump the version in `package.json`, `pyproject.toml`, and root `VERSION` when preparing a release manually.
@@ -446,6 +539,7 @@ If the current plugin version is already published, `logics-manager assist next-
446
539
  - Logics docs lint: `npm run lint:logics`
447
540
  - Logics workflow audit + docs lint: `npm run audit:logics`
448
541
  - Strict Logics governance audit: `npm run audit:logics:strict`
542
+ - Local browser viewer smoke: `logics-manager view --port 0 --open`
449
543
  - Fast extension-focused local check: `npm run ci:fast`
450
544
  - Full CI-equivalent local check: `npm run ci:check`
451
545
  - Security audit policy gate: `npm run audit:ci`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.3.1
@@ -0,0 +1,9 @@
1
+ # Logics Clients
2
+
3
+ This directory separates user-facing clients from the shared Logics runtime.
4
+
5
+ - `vscode/` contains the VS Code extension host implementation.
6
+ - `shared-web/` contains browser/webview assets that can be reused by the VS Code extension and the future local viewer.
7
+ - `viewer/` is reserved for the CLI-launched local browser viewer.
8
+
9
+ The Python CLI/runtime remains in `logics_manager/`.