@sanqianx/ai-coding-event-bridge-console 0.4.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/LICENSE +21 -0
- package/README.md +63 -0
- package/console/index.html +921 -0
- package/package.json +29 -0
- package/src/agent-detect.js +128 -0
- package/src/bin.js +53 -0
- package/src/pick-folder.js +623 -0
- package/src/server.js +719 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SanQianX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @sanqianx/ai-coding-event-bridge-console
|
|
2
|
+
|
|
3
|
+
Local console for the AI coding event bridge: a vector-hub-style dark UI for
|
|
4
|
+
browsing captured conversations, a JSON query API shared with AI agents, and
|
|
5
|
+
project import that pins each project's records to a local storage address.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# from the repository root
|
|
11
|
+
npm install
|
|
12
|
+
npm run serve # http://127.0.0.1:8790
|
|
13
|
+
|
|
14
|
+
# or as a CLI once published
|
|
15
|
+
npx ai-coding-event-bridge-console serve [--port 8790] [--host 127.0.0.1] [--home DIR]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The server binds to `127.0.0.1` by default — journals contain full
|
|
19
|
+
conversation bodies, so they stay on this machine unless `--host` says
|
|
20
|
+
otherwise.
|
|
21
|
+
|
|
22
|
+
## Projects
|
|
23
|
+
|
|
24
|
+
- **导入项目** (sidebar): pick a local Git work tree (subdirectories resolve to
|
|
25
|
+
the repo root) and optionally a **记录保存地址**. From then on, conversations
|
|
26
|
+
and commit boundaries captured inside that project are appended to
|
|
27
|
+
`<store>/journal` instead of the global journal. Legacy events already in the
|
|
28
|
+
global journal are still shown for the project.
|
|
29
|
+
- **自动发现** (`auto` tag): repos that were captured but never imported read
|
|
30
|
+
from the global journal only.
|
|
31
|
+
- **注销** (hover a registered project): removes the registration only; data on
|
|
32
|
+
disk is never deleted, and new capture falls back to the global journal.
|
|
33
|
+
- The folder picker uses a native dialog on Windows; elsewhere (or with
|
|
34
|
+
`BRIDGE_CONSOLE_PICK_FOLDER=0`) type the path manually.
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
| Route | Description |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `GET /api/health` | `{ ok, home, registeredProjects, first/lastSequence }` |
|
|
41
|
+
| `GET /api/system/agents` | Detect installed agent tools (Claude Code / Codex / OpenCode: CLI, config, hook wiring) + bridge runtime info + consumers |
|
|
42
|
+
| `POST /api/system/upgrade-runtime` | Materialize/activate the runtime at the core package version (designed same-major upgrade path) |
|
|
43
|
+
| `GET /api/system/pick-folder` | Native folder dialog (win32; 501 elsewhere) |
|
|
44
|
+
| `GET /api/projects` | Registered + auto-discovered projects with turn counts |
|
|
45
|
+
| `POST /api/projects` | `{ path, store? }` — import (Git work trees only) |
|
|
46
|
+
| `DELETE /api/projects?id=` | Unregister (data stays on disk) |
|
|
47
|
+
| `GET /api/dates?project=` | Days with turns + counts (for the date chips) |
|
|
48
|
+
| `GET /api/turns?project&date&cursor&limit` | Merged turns + `annotations` (commit shas per turn) |
|
|
49
|
+
| `GET /api/sessions?project=` | Session index |
|
|
50
|
+
| `GET /api/search?q&project&limit` | Substring search over conversation bodies |
|
|
51
|
+
|
|
52
|
+
Turn merging: for a registered project, the project journal and the global
|
|
53
|
+
journal (legacy pre-import events) are both read, filtered by repo identity,
|
|
54
|
+
ordered by capture time. Sequence-span commit annotations only compare within
|
|
55
|
+
one journal's sequence space; `openTurnIdsAtCommit` binding works across both.
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- Node >= 18, CommonJS, zero runtime dependencies beyond the core package.
|
|
60
|
+
- The console never writes journals; it only reads them and mutates
|
|
61
|
+
`projects.json` on import/unregister.
|
|
62
|
+
- Consumer-cursor compaction applies to the global journal only — project
|
|
63
|
+
journals are archival stores and are not auto-compacted.
|