@c0sc0s/codex-tags 0.5.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/.codex-plugin/plugin.json +24 -0
- package/AGENTS.md +44 -0
- package/CHANGELOG.md +75 -0
- package/README.md +87 -0
- package/README.zh-CN.md +87 -0
- package/assets/README.md +19 -0
- package/assets/banner.png +0 -0
- package/assets/icon.icns +0 -0
- package/assets/logo.png +0 -0
- package/bin/codex-tags.mjs +89 -0
- package/docs/architecture.md +56 -0
- package/docs/compatibility.md +47 -0
- package/docs/development.md +84 -0
- package/docs/distribution.md +65 -0
- package/docs/protocol.md +89 -0
- package/docs/roadmap.md +40 -0
- package/hooks/hooks.json +40 -0
- package/hooks/session-naming.mjs +107 -0
- package/package.json +65 -0
- package/runtime/dist/injected.js +3161 -0
- package/runtime/src/cdp-client.mjs +100 -0
- package/runtime/src/codex-process.mjs +115 -0
- package/runtime/src/content-index.mjs +138 -0
- package/runtime/src/controller-router.mjs +84 -0
- package/runtime/src/controller-state.mjs +17 -0
- package/runtime/src/controller.mjs +290 -0
- package/runtime/src/inject-expression.mjs +49 -0
- package/runtime/src/protocol.d.mts +31 -0
- package/runtime/src/protocol.mjs +43 -0
- package/runtime/src/runtime-target-registry.mjs +92 -0
- package/runtime/src/search-index.mjs +191 -0
- package/runtime/src/session-catalog.mjs +52 -0
- package/runtime/src/settings-repository.mjs +58 -0
- package/runtime/src/tag-settings.d.mts +18 -0
- package/runtime/src/tag-settings.mjs +65 -0
- package/runtime/src/title-format.d.mts +11 -0
- package/runtime/src/title-format.mjs +33 -0
- package/scripts/cli-options.mjs +17 -0
- package/scripts/health.mjs +20 -0
- package/scripts/lifecycle-lock.mjs +21 -0
- package/scripts/manage.mjs +19 -0
- package/scripts/manager-core.mjs +463 -0
- package/skills/doctor/SKILL.md +18 -0
- package/skills/doctor/agents/openai.yaml +4 -0
- package/skills/initial/SKILL.md +22 -0
- package/skills/initial/agents/openai.yaml +4 -0
- package/skills/rename/SKILL.md +20 -0
- package/skills/rename/agents/openai.yaml +4 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codex-tags",
|
|
3
|
+
"version": "0.5.0+codex.20260907085903",
|
|
4
|
+
"description": "Add tag-aware session browsing and local content search to the Codex desktop sidebar.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Codex Tags contributors"
|
|
7
|
+
},
|
|
8
|
+
"skills": "./skills/",
|
|
9
|
+
"interface": {
|
|
10
|
+
"displayName": "Codex Tags",
|
|
11
|
+
"shortDescription": "Tag, filter, and search local Codex sessions.",
|
|
12
|
+
"longDescription": "Codex Tags installs a reversible local enhancement for the official Codex desktop app. It renders structured session tags, supports custom colors and optional AI classification descriptions, provides a searchable Tags dashboard, and keeps session content on the local machine.",
|
|
13
|
+
"developerName": "Codex Tags contributors",
|
|
14
|
+
"category": "Productivity",
|
|
15
|
+
"capabilities": [
|
|
16
|
+
"Interactive"
|
|
17
|
+
],
|
|
18
|
+
"defaultPrompt": [
|
|
19
|
+
"Use $doctor to check whether Codex Tags is healthy.",
|
|
20
|
+
"Use $initial to tag my active Codex sessions using my configured tags.",
|
|
21
|
+
"Use $rename to name this session with the best matching configured tag."
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Codex Tags engineering guide
|
|
2
|
+
|
|
3
|
+
## Project overview
|
|
4
|
+
|
|
5
|
+
Codex Tags is a reversible macOS enhancement for the official Codex desktop app. It starts Codex with a loopback-only Chrome DevTools Protocol endpoint, indexes local session text, and injects a bundled TypeScript/Preact UI into the renderer. It never edits the signed Codex bundle or `app.asar`.
|
|
6
|
+
|
|
7
|
+
## Read before changing code
|
|
8
|
+
|
|
9
|
+
| Task | Required document |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Local setup, code ownership, build, hot-apply, or debugging | `docs/development.md` |
|
|
12
|
+
| Packaging, release, public distribution, or user installation | `docs/distribution.md` |
|
|
13
|
+
| Runtime boundaries and data flow | `docs/architecture.md` |
|
|
14
|
+
| Architecture evolution, refactoring sequence, or adding a major capability | `docs/roadmap.md` |
|
|
15
|
+
| Title and controller/runtime contracts | `docs/protocol.md` |
|
|
16
|
+
| Codex-version compatibility work | `docs/compatibility.md` |
|
|
17
|
+
|
|
18
|
+
## Hard constraints
|
|
19
|
+
|
|
20
|
+
- Edit source in this repository only. Never edit the installed copy under `~/Library/Application Support/Codex Sidebar Tags`.
|
|
21
|
+
- Keep the official Codex application bundle, code signature, tasks, and authentication data untouched.
|
|
22
|
+
- Keep session content local. Never log conversation bodies or send them to a remote service.
|
|
23
|
+
- Keep private Codex selectors inside `runtime/src/injected/codex-dom-adapter.ts`.
|
|
24
|
+
- The injected runtime must not fetch remote scripts, styles, or assets.
|
|
25
|
+
- Do not hand-edit `runtime/dist/injected.js`; regenerate it with `npm run build` and commit it with its source.
|
|
26
|
+
- Increment `RUNTIME_VERSION` after injected behavior changes. Use the plugin cachebuster update flow for plugin releases.
|
|
27
|
+
|
|
28
|
+
## Required verification
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm run build
|
|
32
|
+
npm run check
|
|
33
|
+
npm run typecheck
|
|
34
|
+
npm test
|
|
35
|
+
node scripts/manage.mjs install
|
|
36
|
+
node scripts/manage.mjs apply
|
|
37
|
+
node scripts/manage.mjs status
|
|
38
|
+
node runtime/qa-runtime.mjs
|
|
39
|
+
git diff --check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`npm run verify` is the local shortcut for the first four commands. `npm run dev:apply` is the supported build → install → hot-apply development loop.
|
|
43
|
+
|
|
44
|
+
`apply` requires Codex to already be running with the owned local CDP endpoint. Follow `docs/development.md` for first-run setup and failure handling.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
Initial public early release. Automated verification and packed-consumer tests pass; clean-account GUI and hook-trust acceptance remain pending.
|
|
6
|
+
|
|
7
|
+
- Use the dedicated Codex Tags.app launcher with its own icon; remove automatic launch takeover and clean up legacy LaunchAgents on installation. Running non-debuggable apps are left untouched.
|
|
8
|
+
- Exclude subagent and guardian-review sessions from the active catalog, dashboard counts and search scope; retain standalone tasks and clean stale cached entries.
|
|
9
|
+
- Add an original project logo, linked English/Chinese GitHub homepages and concise development, architecture and release documentation.
|
|
10
|
+
- Merge legacy cached local IDs without duplicate sessions; index standard user message records and rebuild older extraction caches automatically.
|
|
11
|
+
- Reject symlink installation destinations before lifecycle mutation and keep environment files out of package artifacts.
|
|
12
|
+
- Default the public CLI to installation, with explicit three-hook authorization guidance and nonzero exit status for incomplete activation.
|
|
13
|
+
- Validate arguments, serialize public lifecycle mutations, resolve hoisted npm dependencies, stop old runtime code before updating, and preserve unrelated launchers and marketplaces.
|
|
14
|
+
- Check current UI versions, navigation availability, controller ownership, settings, catalog and index health using one readiness contract.
|
|
15
|
+
- Read active local sessions independently of sidebar expansion, use actual update timestamps, and navigate catalog-only results through the app's thread links.
|
|
16
|
+
- Add tag description/color editing, deletion confirmation/undo, reserved fallback handling and consistent 32-character names; protect settings inputs and menus from background refreshes.
|
|
17
|
+
- Add isolated packed-consumer/native-runtime smoke tests, dashboard interaction regression tests, and macOS CI.
|
|
18
|
+
|
|
19
|
+
All notable changes to Codex Tags are documented here. Versions follow Semantic Versioning.
|
|
20
|
+
|
|
21
|
+
### Included capabilities
|
|
22
|
+
|
|
23
|
+
- Reduced built-in tags to Feature, Bug, Design, and Research with English classification guidance; preserved saved user definitions and custom tags.
|
|
24
|
+
- Replaced the management skill with three English user skills: Doctor, Initial, and Rename, using native Codex task tools for agent-driven classification and naming.
|
|
25
|
+
- Standardized generated titles as `[Tag]Title` without date metadata while preserving legacy title parsing; shared live tag/description context between skills and first-prompt hooks and expanded the context budget for the full supported vocabulary.
|
|
26
|
+
- Added a dedicated macOS launcher with foreign-port protection and reversible lifecycle management.
|
|
27
|
+
- Added a publishable `@c0sc0s/codex-tags` CLI with one-command install, enable, disable, status, doctor, update, and reversible uninstall flows.
|
|
28
|
+
- Delegated naming-hook registration to the official Codex Marketplace and Plugin CLI instead of mutating private configuration or trust records.
|
|
29
|
+
- Replaced the AppleScript launcher compiler dependency with a minimal atomic macOS application bundle.
|
|
30
|
+
- Made clean-machine testing deterministic by removing Codex Tags renderer caches and hook markers during explicit `uninstall --purge`.
|
|
31
|
+
- Added a native-aligned Tags rail above Pinned for filtering visible sidebar sessions without opening the dashboard.
|
|
32
|
+
- Kept the compact rail and dashboard on one filter state while preserving focus, horizontal position, collapsed-group indexing, and reversible native row visibility.
|
|
33
|
+
- Added optional classification descriptions and arbitrary six-digit colors to tag definitions.
|
|
34
|
+
- Added six curated color presets plus a native color picker to tag creation.
|
|
35
|
+
- Upgraded tag settings to schema v2 with automatic legacy tone migration and passed tag descriptions, but not colors, into the first-session naming context.
|
|
36
|
+
- Redesigned tag settings as a compact native-aligned editor with a unified color control and a lightweight, divided configuration list.
|
|
37
|
+
- Reduced sidebar color noise with progressive tag emphasis: quiet at rest, stronger on hover, strongest for the selected filter, and no repeated row labels while a concrete tag is active.
|
|
38
|
+
- Made the controller-owned atomic settings repository authoritative while retaining renderer storage only for first-install migration and last-known caching.
|
|
39
|
+
- Added a protocol-v1 envelope and centralized controller router for settings and search messages.
|
|
40
|
+
- Split process ownership, target injection, settings, title decoration, sidebar filtering, dashboard rendering, session bindings, styles, and host refresh lifecycle into independently owned modules.
|
|
41
|
+
- Removed the injected runtime's permissive TypeScript boundary and added fail-closed runtime configuration validation plus service/contract tests.
|
|
42
|
+
- Made modal exit and observer refresh converge when Chromium suspends animation frames in an occluded Electron window.
|
|
43
|
+
- Rebuild stale owned overlays after Codex replaces a renderer execution context while retaining host DOM.
|
|
44
|
+
- Replaced the ambiguous four-tile Tags launcher icon with a native-weight tag glyph.
|
|
45
|
+
- Added English and Simplified Chinese UI resources that follow Codex's active language and update without restarting the injected runtime.
|
|
46
|
+
|
|
47
|
+
## 0.3.0 — 2026-09-04
|
|
48
|
+
|
|
49
|
+
- Added locally bundled Motion animations for dashboard entry and exit, menu and tab transitions, search feedback, and interaction states with reduced-motion support.
|
|
50
|
+
- Replaced full conversation transfer to the renderer with asynchronous local search requests.
|
|
51
|
+
- Added a persistent, incremental SQLite FTS5 index with Chinese substring search support.
|
|
52
|
+
- Added a persistent CDP binding for search requests and bounded result delivery.
|
|
53
|
+
- Added loading and failure states while keeping title and tag matches immediate.
|
|
54
|
+
- Added search-index lifecycle tests and packaged the SQLite runtime dependency during installation.
|
|
55
|
+
- Added a plugin-native first-prompt hook that gives the Codex agent the current tag vocabulary and naming protocol without editing session data.
|
|
56
|
+
- Added versioned tag-settings synchronization and lifecycle tests for new versus resumed sessions.
|
|
57
|
+
|
|
58
|
+
## 0.2.0 — 2026-09-04
|
|
59
|
+
|
|
60
|
+
- Migrated the injected runtime build to TypeScript, Preact, and esbuild.
|
|
61
|
+
- Split strict session models, dashboard state, search/ranking, result rendering, and Codex DOM discovery into independent modules.
|
|
62
|
+
- Added title/content search tests, snippet selection coverage, and typed build validation.
|
|
63
|
+
- Bundled the browser runtime as an installable local artifact with no runtime package-manager or network dependency.
|
|
64
|
+
- Preserved the existing Tags UI, IME handling, sorting, filtering, navigation, and reversible native DOM behavior.
|
|
65
|
+
- Added dedicated local-development/debugging and distribution/installation guides, plus an agent-readable project entry point.
|
|
66
|
+
|
|
67
|
+
## 0.1.0 — 2026-09-04
|
|
68
|
+
|
|
69
|
+
- Productized the existing sidebar enhancement as a Codex plugin source tree.
|
|
70
|
+
- Added reproducible install, status, enable, apply, restore, and uninstall commands.
|
|
71
|
+
- Added controller ownership checks and safe handling for foreign CDP port occupants.
|
|
72
|
+
- Replaced repeated full synchronization with health polling and changed-content refreshes.
|
|
73
|
+
- Added expiring Session file discovery so newly created sessions can be indexed.
|
|
74
|
+
- Preserved native title DOM and accessibility attributes during reversible enhancement.
|
|
75
|
+
- Added architecture, protocol, compatibility, and contributor documentation.
|
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<p align="center"><img src="assets/banner.png" alt="Codex Tags — Less scrolling. More finding." width="100%"></p>
|
|
2
|
+
<p align="center"><b>English</b> · <a href="README.zh-CN.md">简体中文</a></p>
|
|
3
|
+
<p align="center"><a href="#get-started">Get started</a> · <a href="#commands">Commands</a> · <a href="docs/development.md">Development</a> · <a href="docs/architecture.md">Architecture</a></p>
|
|
4
|
+
|
|
5
|
+
An independent, local-first enhancement for Codex: organize sessions with tags, search conversation text, and give the agent your classification rules.
|
|
6
|
+
|
|
7
|
+
**macOS · Node.js 22+ · English / 简体中文**
|
|
8
|
+
|
|
9
|
+
> **Early release** — Automated checks pass. Clean-account cold-start and manually trusted first-turn naming still need full end-to-end acceptance; see [verification coverage](docs/compatibility.md).
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Native-aligned sidebar:** tag filtering, quiet title labels, and a Tags dashboard.
|
|
14
|
+
- **Local search:** titles and indexed user/assistant text, with highlighted matches.
|
|
15
|
+
- **Your vocabulary:** Feature, Bug, Design, Research defaults; custom colors and optional classification descriptions.
|
|
16
|
+
- **Agent-assisted naming:** `[Tag]Title`, without dates. First prompts receive current classification guidance.
|
|
17
|
+
- **Three plugin skills:** `doctor` checks health; `initial` classifies existing active sessions; `rename` names the current session.
|
|
18
|
+
- **English and Chinese UI:** follows Codex's language without translating user-defined tags.
|
|
19
|
+
|
|
20
|
+
## Get started
|
|
21
|
+
|
|
22
|
+
### 1. Install the CLI and plugin
|
|
23
|
+
|
|
24
|
+
Finish active tasks and quit Codex if it is open without Tags, then run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @c0sc0s/codex-tags@latest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Authorize the hooks
|
|
31
|
+
|
|
32
|
+
Open **Codex → Plugins → Codex Tags** and review/trust **SessionStart**, **UserPromptSubmit**, and **SessionEnd**.
|
|
33
|
+
|
|
34
|
+
**Next time:** open `~/Applications/Codex Tags.app` and pin it to the Dock. It launches the official app, not a second Codex installation. No automatic restart or launch supervisor. Naming is agent-assisted, not a guaranteed title rewrite.
|
|
35
|
+
|
|
36
|
+
<details>
|
|
37
|
+
<summary>Develop or install from source</summary>
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/c0sc0s/codex-tags.git
|
|
41
|
+
cd codex-tags
|
|
42
|
+
npm ci
|
|
43
|
+
npm run verify
|
|
44
|
+
node bin/codex-tags.mjs install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then authorize the same three hooks above.
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
Run `npx @c0sc0s/codex-tags@latest <command>`. From source: `node bin/codex-tags.mjs <command>`.
|
|
54
|
+
|
|
55
|
+
| Command | Effect |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `install`, `on`, `enable` | Install this package version and activate all components |
|
|
58
|
+
| `off`, `restore`, `disable` | Stop injection and remove the naming plugin; keep data |
|
|
59
|
+
| `status` / `doctor` | Inspect state / diagnose readiness without changes |
|
|
60
|
+
| `update` | Install the invoked version; use `@latest` to fetch the newest |
|
|
61
|
+
| `uninstall` | Remove owned components and index; keep tag settings |
|
|
62
|
+
| `uninstall --purge` | Also remove settings and owned caches |
|
|
63
|
+
|
|
64
|
+
Operational commands support `--json`. Hook trust remains a manual Codex security decision.
|
|
65
|
+
|
|
66
|
+
## Privacy and compatibility
|
|
67
|
+
|
|
68
|
+
The CLI installs local code and registers the plugin through Codex's plugin commands. It does **not** patch the signed app, edit transcripts, or change authentication data. A local SQLite index supplies bounded matching snippets to the UI.
|
|
69
|
+
|
|
70
|
+
Injection relies on a loopback debugging endpoint and private Codex DOM/database interfaces—not an official sidebar extension API. Future Codex updates can require adapter changes. Debugging access is powerful; use only on a trusted machine. See [verified coverage and limitations](docs/compatibility.md).
|
|
71
|
+
|
|
72
|
+
## Development
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm run dev:apply # build → refresh installed files → hot-apply
|
|
76
|
+
npm run verify # build, syntax, types, regression tests
|
|
77
|
+
npm run test:package
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The fast loop requires an already activated, debug-enabled app. No HMR server is used.
|
|
81
|
+
|
|
82
|
+
- [Development and debugging](docs/development.md)
|
|
83
|
+
- [Installation and release](docs/distribution.md)
|
|
84
|
+
- [Architecture](docs/architecture.md) · [Data and naming protocol](docs/protocol.md)
|
|
85
|
+
- [Roadmap](docs/roadmap.md) · [Changelog](CHANGELOG.md)
|
|
86
|
+
|
|
87
|
+
Not affiliated with or endorsed by OpenAI. No open-source license is currently granted (`UNLICENSED`).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<p align="center"><img src="assets/banner.png" alt="Codex Tags — 少翻列表,快速找到会话。" width="100%"></p>
|
|
2
|
+
<p align="center"><a href="README.md">English</a> · <b>简体中文</b></p>
|
|
3
|
+
<p align="center"><a href="#开始使用">开始使用</a> · <a href="#命令">命令</a> · <a href="docs/development.md">本地开发</a> · <a href="docs/architecture.md">架构设计</a></p>
|
|
4
|
+
|
|
5
|
+
为 Codex 提供本地会话管理增强:按标签整理会话、搜索正文,并让 Agent 按你的分类规则命名。
|
|
6
|
+
|
|
7
|
+
**macOS · Node.js 22+ · 中英文界面**
|
|
8
|
+
|
|
9
|
+
> **早期版本** — 自动化检查已通过。全新账户冷启动及手动授权后的首次命名仍需完整端到端验收,详见[验证范围](docs/compatibility.md)。
|
|
10
|
+
|
|
11
|
+
## 功能
|
|
12
|
+
|
|
13
|
+
- **融入侧边栏:** 标签筛选、低干扰的标题标签,以及 Tags 会话看板。
|
|
14
|
+
- **本地搜索:** 搜索标题和已索引的用户/助手正文,高亮关键词。
|
|
15
|
+
- **自定义分类:** 默认 Feature、Bug、Design、Research 四类;可自定义颜色和可选分类描述。
|
|
16
|
+
- **Agent 辅助命名:** 使用 `[Tag]标题`,不带日期;首次提交时获得最新分类规则。
|
|
17
|
+
- **三个插件 Skill:** `doctor` 检查健康状态,`initial` 分类已有活跃会话,`rename` 命名当前会话。
|
|
18
|
+
- **中英文界面:** 跟随 Codex 当前语言,不翻译用户自己的标签。
|
|
19
|
+
|
|
20
|
+
## 开始使用
|
|
21
|
+
|
|
22
|
+
### 1. 安装 CLI 和插件
|
|
23
|
+
|
|
24
|
+
先完成正在运行的任务。如果 Codex 已打开但未启用 Tags,请手动退出,再执行:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @c0sc0s/codex-tags@latest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. 授权 Hook
|
|
31
|
+
|
|
32
|
+
打开 **Codex → Plugins → Codex Tags**,检查并信任/启用 **SessionStart、UserPromptSubmit、SessionEnd**。
|
|
33
|
+
|
|
34
|
+
**下次启动:** 使用 `~/Applications/Codex Tags.app`,可拖到 Dock 固定。它启动的是官方 App,不是第二套 Codex;不会自动重启或安装启动守护进程。命名由 Agent 辅助完成,不保证每次确定性改名。
|
|
35
|
+
|
|
36
|
+
<details>
|
|
37
|
+
<summary>从源码开发或安装</summary>
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/c0sc0s/codex-tags.git
|
|
41
|
+
cd codex-tags
|
|
42
|
+
npm ci
|
|
43
|
+
npm run verify
|
|
44
|
+
node bin/codex-tags.mjs install
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
随后按上面的步骤授权三个 Hook。
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
## 命令
|
|
52
|
+
|
|
53
|
+
执行 `npx @c0sc0s/codex-tags@latest <命令>`;源码安装:`node bin/codex-tags.mjs <命令>`。
|
|
54
|
+
|
|
55
|
+
| 命令 | 作用 |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `install`、`on`、`enable` | 安装当前调用的包版本并开启全部组件 |
|
|
58
|
+
| `off`、`restore`、`disable` | 停止注入并移除命名插件,保留数据 |
|
|
59
|
+
| `status` / `doctor` | 只读查看状态 / 诊断是否就绪 |
|
|
60
|
+
| `update` | 安装当前调用的版本;使用 `@latest` 才会获取最新版 |
|
|
61
|
+
| `uninstall` | 移除自有组件和索引,保留标签设置 |
|
|
62
|
+
| `uninstall --purge` | 进一步移除标签设置和自有缓存 |
|
|
63
|
+
|
|
64
|
+
操作命令支持 `--json`。Hook 授权必须由用户在 Codex 中手动确认。
|
|
65
|
+
|
|
66
|
+
## 隐私与兼容性
|
|
67
|
+
|
|
68
|
+
CLI 安装本地代码,通过 Codex 插件命令注册插件;**不会**修改官方签名应用、会话记录或登录信息。本地 SQLite 索引只向界面返回有限的命中片段。
|
|
69
|
+
|
|
70
|
+
注入依赖本机调试端口及 Codex 私有 DOM/数据库结构,不是官方侧边栏扩展 API;Codex 更新后可能需要适配。调试权限较高,请只在可信电脑上使用。详见[验证范围与限制](docs/compatibility.md)。
|
|
71
|
+
|
|
72
|
+
## 开发
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm run dev:apply # 构建 → 更新安装文件 → 热应用
|
|
76
|
+
npm run verify # 构建、语法、类型与回归测试
|
|
77
|
+
npm run test:package
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
快速调试需要 Codex 已激活且带调试端口运行;目前没有 HMR 服务。
|
|
81
|
+
|
|
82
|
+
- [本地开发与调试](docs/development.md)
|
|
83
|
+
- [安装与发布](docs/distribution.md)
|
|
84
|
+
- [架构](docs/architecture.md) · [数据与命名协议](docs/protocol.md)
|
|
85
|
+
- [后续规划](docs/roadmap.md) · [更新记录](CHANGELOG.md)
|
|
86
|
+
|
|
87
|
+
本项目独立开发,不隶属于 OpenAI,也未经其背书。目前没有开放源代码许可授权(`UNLICENSED`)。
|
package/assets/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Project identity
|
|
2
|
+
|
|
3
|
+
`logo.png` is the shared Codex Tags project mark: a cobalt-blue background with a white dot-and-ring ASCII-style tag. It is independent of OpenAI's branding.
|
|
4
|
+
|
|
5
|
+
`banner.png` is the wide README masthead shared by both languages. It pairs the project name and tagline with the approved tag artwork; the square App icon remains unchanged. The READMEs include localized alt text and separate language/navigation links.
|
|
6
|
+
|
|
7
|
+
`icon.icns` is the macOS launcher asset derived from the same image, containing 16, 32, 128, 256 and 512-point representations at 1× and 2×. Convert with macOS `sips` and `iconutil`; do not generate the app and README marks independently.
|
|
8
|
+
|
|
9
|
+
The final source is the user's explicitly selected image. Preserve it without regenerating or changing the composition. Install updated assets with `node scripts/manage.mjs install`; this does not restart the app.
|
|
10
|
+
|
|
11
|
+
## Visual direction
|
|
12
|
+
|
|
13
|
+
A diagonal tag with a punched hole, finely detailed white and pale-blue rings, tonal shading and a cobalt background. Use this same approved artwork across project and launcher surfaces.
|
|
14
|
+
|
|
15
|
+
## Banner generation
|
|
16
|
+
|
|
17
|
+
Created with the built-in image generation tool, using `logo.png` as the edit reference. Final prompt:
|
|
18
|
+
|
|
19
|
+
Use case: compositing. Asset: finished GitHub README hero banner, panoramic 3:1 ratio, 1536x512. Extend the supplied approved cobalt-blue dot-matrix tag artwork into a refined horizontal project masthead. Preserve the tag's fine white rings, diagonal shape, punched hole, brightness and original blue palette faithfully; place it on the RIGHT third, fully visible with comfortable padding, seamless blue background edge-to-edge (no square image tile or seam). LEFT side: precise large white modern sans-serif typography reading exactly 'Codex Tags'. Beneath it, smaller pale-blue text exactly 'Less scrolling. More finding.' Left text aligned with generous margins, vertically centered. Overall composition left 60% quiet typography, right 40% detailed tag art. Restrained editorial technology identity; minimal, polished, crisp readable typography at 800px display width. No additional words, badges, icons, UI, borders, cards, buttons, watermark, textures or decoration. Keep strong contrast and ample negative space. Output one complete banner, not a mockup.
|
|
Binary file
|
package/assets/icon.icns
ADDED
|
Binary file
|
package/assets/logo.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
import { createManager } from "../scripts/manager-core.mjs";
|
|
7
|
+
import { parseCliOptions } from "../scripts/cli-options.mjs";
|
|
8
|
+
import { activationHealth } from "../scripts/health.mjs";
|
|
9
|
+
import { withLifecycleLock } from "../scripts/lifecycle-lock.mjs";
|
|
10
|
+
|
|
11
|
+
const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
12
|
+
const packageJson = JSON.parse(await readFile(join(packageRoot, "package.json"), "utf8"));
|
|
13
|
+
const args = process.argv.slice(2);
|
|
14
|
+
const json = args.includes("--json");
|
|
15
|
+
|
|
16
|
+
const help = `Codex Tags ${packageJson.version}
|
|
17
|
+
|
|
18
|
+
Usage: codex-tags [command] [options]
|
|
19
|
+
Without a command, installs and activates Codex Tags.
|
|
20
|
+
|
|
21
|
+
Commands:
|
|
22
|
+
install, enable, on Install every component and turn Codex Tags on
|
|
23
|
+
disable, off Turn UI injection and the naming hook off; keep data
|
|
24
|
+
status Show runtime, plugin, index, and UI status
|
|
25
|
+
doctor Diagnose the complete installation without changing it
|
|
26
|
+
update Install this package version and turn it on
|
|
27
|
+
restore Alias for disable
|
|
28
|
+
uninstall Remove owned files; keep tag settings by default
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
--json Machine-readable output
|
|
32
|
+
--purge With uninstall, also remove tag settings
|
|
33
|
+
-h, --help Show help
|
|
34
|
+
-v, --version Show version
|
|
35
|
+
|
|
36
|
+
Recommended:
|
|
37
|
+
npx @c0sc0s/codex-tags@latest install
|
|
38
|
+
npx @c0sc0s/codex-tags@latest off
|
|
39
|
+
npx @c0sc0s/codex-tags@latest on
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
function print(result) {
|
|
43
|
+
if (json) return console.log(JSON.stringify(result, null, 2));
|
|
44
|
+
if (result.status === "enabled") {
|
|
45
|
+
console.log(`Codex Tags ${result.installation.pluginVersion} is enabled.`);
|
|
46
|
+
console.log("Use ~/Applications/Codex Tags.app to launch with Tags; add it to your Dock. The official entry does not auto-activate Tags.");
|
|
47
|
+
console.log("Next: open Codex → Plugins → Codex Tags and trust/enable all three hooks (SessionStart, UserPromptSubmit, SessionEnd).");
|
|
48
|
+
console.log("New sessions can then use your tags automatically. Existing sessions are unchanged; the optional initial skill organizes them.");
|
|
49
|
+
} else if (result.status === "incomplete") {
|
|
50
|
+
console.error("Files were installed, but activation is not ready:");
|
|
51
|
+
for (const check of result.health.checks.filter(({ ok }) => !ok)) console.error(` - ${check.message}`);
|
|
52
|
+
console.error("Run codex-tags doctor for details; rerun install to retry, or off to disable.");
|
|
53
|
+
} else if (result.status === "disabled") {
|
|
54
|
+
console.log("Codex Tags is disabled. Tag settings and the local index were preserved.");
|
|
55
|
+
} else if (result.status === "uninstalled") {
|
|
56
|
+
console.log(`Codex Tags was uninstalled. Settings preserved: ${result.settingsPreserved ? "yes" : "no"}.`);
|
|
57
|
+
} else {
|
|
58
|
+
const health = result.checks ? result : activationHealth(result);
|
|
59
|
+
console.log(health.ok ? "Tags runtime is ready." : "Tags runtime is not fully active (it may be disabled or Codex may be closed).");
|
|
60
|
+
for (const check of health.checks) console.log(`${check.ok ? "OK" : "--"} ${check.message}`);
|
|
61
|
+
console.log("Hook trust is managed in Codex Plugins and must be reviewed there. Use --json for technical details.");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
try {
|
|
66
|
+
const { command, purge } = parseCliOptions(args);
|
|
67
|
+
const manager = ["help", "version"].includes(command) ? null : createManager({ packageRoot });
|
|
68
|
+
const mutate = (operation) => withLifecycleLock(manager.paths.installRoot, operation);
|
|
69
|
+
if (command === "version") console.log(packageJson.version);
|
|
70
|
+
else if (command === "help") console.log(help);
|
|
71
|
+
else if (["install", "enable", "on", "update"].includes(command)) {
|
|
72
|
+
if (!json) console.error("Installing Codex Tags. If Codex is already open without Tags, quit it first. No automatic restart will occur.");
|
|
73
|
+
const result = await mutate(() => manager.enable());
|
|
74
|
+
print(result);
|
|
75
|
+
if (result.status !== "enabled") process.exitCode = 1;
|
|
76
|
+
}
|
|
77
|
+
else if (["disable", "off", "restore"].includes(command)) print(await mutate(() => manager.disable()));
|
|
78
|
+
else if (command === "status") print(await manager.status());
|
|
79
|
+
else if (command === "doctor") {
|
|
80
|
+
const result = await manager.doctor();
|
|
81
|
+
print(result);
|
|
82
|
+
if (!result.ok) process.exitCode = 1;
|
|
83
|
+
} else if (command === "uninstall") print(await mutate(() => manager.uninstall({ purge })));
|
|
84
|
+
else throw new Error(`Unknown command: ${command}`);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
if (json) console.error(JSON.stringify({ ok: false, error: error.message }, null, 2));
|
|
87
|
+
else console.error(`Codex Tags: ${error.message}`);
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
[Development](development.md) · [Protocol](protocol.md) · [Roadmap](roadmap.md)
|
|
4
|
+
|
|
5
|
+
Codex Tags is a reversible enhancement, not a Codex fork.
|
|
6
|
+
|
|
7
|
+
## Ownership
|
|
8
|
+
|
|
9
|
+
| Layer | Owns | Must not own |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| CLI / manager | Installation, activation, removal, diagnostics | Session naming or UI behavior |
|
|
12
|
+
| Dedicated launcher | Explicitly start the official app with loopback debugging | Monitoring launches or restarting a running app |
|
|
13
|
+
| Controller services | CDP targets, settings, catalog, search index | DOM selectors or UI state |
|
|
14
|
+
| Injected UI | Presentation, interactions, reversible decoration | Filesystem access or durable settings |
|
|
15
|
+
| Host adapter | Codex selectors and native row bindings | Classification policy |
|
|
16
|
+
| Hooks / skills | Live classification guidance for the agent | Direct transcript/title database writes |
|
|
17
|
+
|
|
18
|
+
## Data flow
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Codex state database ──read-only──▶ SessionCatalog ──metadata──┐
|
|
22
|
+
Codex session JSONL ──read-only──▶ SQLite FTS5 ──snippets──────┤
|
|
23
|
+
▼
|
|
24
|
+
settings.json ◀── SettingsRepository ◀── ControllerRouter ⇄ injected UI
|
|
25
|
+
│ │
|
|
26
|
+
└── hook / naming skills → Codex agent └── host adapter
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The active local catalog is independent of sidebar expansion. Remote-only sessions remain best-effort DOM discovery. Schema mismatch reports an incomplete catalog and falls back to visible/cached rows. Conversation text stays in the local index; only bounded matching snippets cross the bridge.
|
|
30
|
+
|
|
31
|
+
## Resource boundaries
|
|
32
|
+
|
|
33
|
+
- **SettingsRepository:** normalization, migration, serialized atomic writes. Renderer storage is only a cache; concurrent windows currently use last-writer-wins.
|
|
34
|
+
- **SessionCatalog:** read-only schema-checked metadata, changed snapshots about every 5 seconds. Excludes subagents and internal guardian reviews using `thread_source` and legacy `source` provenance; standalone agent-created tasks remain visible. Filtered snapshots prune cached local entries, keeping counts and search scope consistent.
|
|
35
|
+
- **SessionRegistry:** joins metadata and temporary native bindings using canonical local IDs.
|
|
36
|
+
- **SessionSearchIndex:** incremental FTS5 indexing, with discovery/refresh about every 30 seconds and bounded text extraction.
|
|
37
|
+
- **CodexProcess / TargetRegistry:** process ownership, target discovery, versioned injection and client cleanup.
|
|
38
|
+
- **HostLifecycle:** coalesced native changes and pointer/input-safe refresh.
|
|
39
|
+
- **DashboardView:** modal controls and interaction state; Preact result rows. Background updates preserve IME, menus, drafts and scroll.
|
|
40
|
+
- **ControllerRouter:** validated intent-shaped messages. Navigation requires a UUID present in the current catalog.
|
|
41
|
+
|
|
42
|
+
## Stack and evolution
|
|
43
|
+
|
|
44
|
+
Browser: strict TypeScript, Preact result components, bundled Motion, esbuild IIFE. Controller/CLI: Node ESM and better-sqlite3. No remotely loaded runtime scripts.
|
|
45
|
+
|
|
46
|
+
The dashboard mixes imperative controls and Preact rows. Migrate to a single Preact root when interaction complexity justifies it; do not introduce a general framework solely for uniformity.
|
|
47
|
+
|
|
48
|
+
## Safety
|
|
49
|
+
|
|
50
|
+
Native title DOM and listeners have restoration paths. Missing host capabilities should disable the enhancement without damaging native navigation. The signed bundle, session records and authentication data remain untouched.
|
|
51
|
+
|
|
52
|
+
`Codex Tags.app` explicitly launches the official app with loopback debugging. If a non-debuggable Codex is already open, activation stops with instructions to quit it manually. No launch supervisor is installed; upgrades unload and remove the legacy LaunchAgent. Updates stop old code before replacing files and are retryable, not automatically rolled back.
|
|
53
|
+
|
|
54
|
+
Private DOM/schema/CDP dependencies cannot be guaranteed across future Codex releases. Keep them at adapter/process/catalog boundaries and verify [compatibility](compatibility.md).
|
|
55
|
+
|
|
56
|
+
For every new capability, identify its owner, command/message, failure isolation, cleanup and tests. Reuse shared normalization; never add another settings store, selectors outside the adapter, or complete-transcript transfer.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Compatibility policy
|
|
2
|
+
|
|
3
|
+
Codex Tags integrates with private Codex renderer DOM and therefore cannot promise compatibility with every future Codex build.
|
|
4
|
+
|
|
5
|
+
Each release must:
|
|
6
|
+
|
|
7
|
+
- record the tested Codex application version
|
|
8
|
+
- verify required stable `data-*` anchors before mutation
|
|
9
|
+
- disable only the enhancement when an adapter check fails
|
|
10
|
+
- preserve native title content and attributes for exact restoration
|
|
11
|
+
- keep the launcher, compact tag filtering, title rendering, search, IME, menus, scrolling, collapsed groups, and restore path in the real-app smoke matrix
|
|
12
|
+
- expose the detected adapter and last error through `status`
|
|
13
|
+
|
|
14
|
+
Compatibility failures must never trigger edits to the official application bundle. A failed injection leaves the original sidebar operational.
|
|
15
|
+
|
|
16
|
+
## Candidate verification — 2026-09-07
|
|
17
|
+
|
|
18
|
+
- Codex desktop: `26.901.51231` (build `8109`), macOS, bundle identifier `com.openai.codex`.
|
|
19
|
+
- Runtime candidate: `6.0.11`; npm candidate: `@c0sc0s/codex-tags@0.5.0`.
|
|
20
|
+
- Actual tarball installation and repeated source installation both reached healthy state without restarting the already-debuggable app.
|
|
21
|
+
- Live UI checks passed: navigation/dialog, Chinese input composition, local search response, sort menu persistence/contrast, unsaved tag editor retention, and title highlighting.
|
|
22
|
+
- Production dependency audit reported zero known vulnerabilities at verification time.
|
|
23
|
+
- Pending: a clean-account cold launch from the dedicated Tags launcher, manual hook authorization and an actual first-turn naming check. Automated hook contract tests do not replace that permission boundary.
|
|
24
|
+
|
|
25
|
+
`npm run qa:app` is a content-free, non-restarting smoke against an already injected app. It does not rename sessions or save tag edits. Broader cold-launch and rollback scenarios remain manual release gates.
|
|
26
|
+
|
|
27
|
+
## Release acceptance matrix
|
|
28
|
+
|
|
29
|
+
| Scenario | Required result | Status |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Source verification | Build, syntax, types and regression tests pass | Passed locally |
|
|
32
|
+
| Packed npm consumer | CLI, standalone native SQLite and three skills load | Passed locally |
|
|
33
|
+
| Already-open app | UI mounts; search, IME, menus and drafts stay stable | Passed locally |
|
|
34
|
+
| Clean-account cold launch | Dedicated launcher activates; running non-debuggable app is left untouched | Pending |
|
|
35
|
+
| Manual hook trust | First new prompt gets current tags; resumed/later prompts do not | Pending real-app check |
|
|
36
|
+
| Never-expanded navigation | Catalog result opens the correct session | Pending real-app check |
|
|
37
|
+
| Lifecycle recovery | off/on/update/restore and both uninstall modes preserve unrelated data | Pending clean-account check |
|
|
38
|
+
| Published npm entry | Exact `npx …@latest` flow succeeds | Pending publication |
|
|
39
|
+
|
|
40
|
+
## Known limits
|
|
41
|
+
|
|
42
|
+
- macOS only; no verified Windows/Linux installer.
|
|
43
|
+
- The catalog uses a private, schema-checked local database. Remote-only sessions are best-effort sidebar discovery.
|
|
44
|
+
- Text extraction supports local user/assistant message records, caps fields at 24,000 characters and sessions at 500,000, and excludes tool output. Search returns at most 100 unique sessions; it is not exhaustive transcript export.
|
|
45
|
+
- A newer extractor rebuilds the owned search cache; original session files are unchanged.
|
|
46
|
+
- Multi-window settings use last-writer-wins. Updates are retryable but do not yet offer transactional rollback.
|
|
47
|
+
- Future Codex builds require renewed adapter and lifecycle checks. Hook trust cannot be granted or certified by doctor.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Development and debugging
|
|
2
|
+
|
|
3
|
+
[English home](../README.md) · [中文首页](../README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Use macOS, Node.js 22+, and the official Codex desktop app. The installer verifies its bundle identity, not just its filename.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/c0sc0s/codex-tags.git
|
|
11
|
+
cd codex-tags
|
|
12
|
+
npm ci
|
|
13
|
+
npm run verify
|
|
14
|
+
node bin/codex-tags.mjs install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Activation never restarts a running Codex. If the app is open without debugging, ask the user to quit it before launching `~/Applications/Codex Tags.app`. Review the three hooks in Codex Plugins separately.
|
|
18
|
+
|
|
19
|
+
Edit this checkout, never installed files in Application Support or the plugin cache.
|
|
20
|
+
|
|
21
|
+
## Edit → preview
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run dev:apply
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This runs build → repository `install` → `apply` against an already debug-enabled app. No watcher/HMR is provided. Unlike public CLI installation, repository `node scripts/manage.mjs install` only refreshes files and the dedicated launcher and removes the legacy supervisor; it does not register/enable the plugin or activate the UI.
|
|
28
|
+
|
|
29
|
+
- Browser changes: bump `RUNTIME_VERSION` in `runtime/src/inject-expression.mjs`, then build/install/apply.
|
|
30
|
+
- Controller changes: install/apply so the controller uses the updated installed modules.
|
|
31
|
+
- Hook/skill changes: refresh the plugin cachebuster and use the public installer; renewed hook review may be required.
|
|
32
|
+
- Never edit `runtime/dist/injected.js` manually; commit the generated bundle with source changes.
|
|
33
|
+
|
|
34
|
+
## Code map
|
|
35
|
+
|
|
36
|
+
| Concern | Owner |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| CLI and installation | `bin/codex-tags.mjs`, `scripts/{cli-options,manager-core}.mjs` |
|
|
39
|
+
| Readiness / mutation lock | `scripts/{health,lifecycle-lock}.mjs` |
|
|
40
|
+
| App lifecycle / CDP | `runtime/src/{codex-process,cdp-client,runtime-target-registry}.mjs` |
|
|
41
|
+
| Controller / bridge | `runtime/src/{controller,controller-router,protocol}.mjs` |
|
|
42
|
+
| Catalog / search | `runtime/src/{session-catalog,content-index,search-index}.mjs` |
|
|
43
|
+
| Saved definitions | `runtime/src/{settings-repository,tag-settings}.mjs` |
|
|
44
|
+
| Host selectors | `runtime/src/injected/codex-dom-adapter.ts` |
|
|
45
|
+
| UI lifecycle | `runtime/src/injected/{runtime,host-lifecycle}.ts` |
|
|
46
|
+
| Dashboard / sidebar | `runtime/src/injected/dashboard-view.ts`, `components/`, `sidebar-tag-filter.ts`, `title-decorator.ts` |
|
|
47
|
+
| UI data / language | `runtime/src/injected/{session-registry,search,store,i18n}.ts` |
|
|
48
|
+
| Naming / skills | `hooks/session-naming.mjs`, `skills/{doctor,initial,rename}/` |
|
|
49
|
+
|
|
50
|
+
## Verification
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run verify
|
|
54
|
+
npm run test:package
|
|
55
|
+
npm run dev:apply
|
|
56
|
+
node bin/codex-tags.mjs doctor
|
|
57
|
+
npm run qa:app
|
|
58
|
+
git diff --check
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The package smoke installs the actual tarball into a temporary consumer and checks hoisted dependencies, standalone SQLite, CLI validation and plugin payload without changing real Codex data.
|
|
62
|
+
|
|
63
|
+
App QA requires an already injected app. It checks IME, search, menu persistence/contrast, draft retention, highlighting and cleanup without restarting, renaming tasks or saving tag edits. Cold launch, trusted first-turn naming and uninstall/restore remain separate [release checks](compatibility.md).
|
|
64
|
+
|
|
65
|
+
## Debugging
|
|
66
|
+
|
|
67
|
+
Start with `node bin/codex-tags.mjs doctor --json`.
|
|
68
|
+
|
|
69
|
+
Logs under `~/Library/Application Support/Codex Sidebar Tags/`: `controller.log`, `launcher.log`. Installation metadata is in `install.json`. Never share credentials or conversation text in diagnostics.
|
|
70
|
+
|
|
71
|
+
Renderer diagnostics: `window.__codexSidebarTags.status()`, `debug()`, `dispose()`.
|
|
72
|
+
|
|
73
|
+
| Symptom | Check |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Missing UI | Owned CDP, source/active versions, sidebar mount |
|
|
76
|
+
| Port 9341 conflict | Report it; never kill a foreign process |
|
|
77
|
+
| Stale UI | Build → install → apply; runtime version bump |
|
|
78
|
+
| Missing body match | Index status, supported record shapes, text limits and refresh delay |
|
|
79
|
+
| Codex update regression | Host adapter / catalog schema; never patch the signed app |
|
|
80
|
+
| Stale CLI lock | Confirm no Tags CLI is running, then remove only the named lock |
|
|
81
|
+
|
|
82
|
+
Testing overrides: `CODEX_TAGS_INSTALL_DIR` (runtime), `CODEX_TAGS_APPLICATIONS_DIR` (launcher), `CODEX_TAGS_CDP_PORT` (default 9341), `CODEX_HOME` (Codex data), `CODEX_TAGS_SETTINGS_PATH` (hook settings), `CODEX_TAGS_STATE_DIR` (hook markers). They do not isolate every macOS/plugin side effect; unit tests use injected fake process runners.
|
|
83
|
+
|
|
84
|
+
Use `node bin/codex-tags.mjs off` to disable all components while keeping settings. Uninstall only with explicit user permission.
|