Skip to content

Commit dd1c427

Browse files
committed
fix: align project path and package identity to public devcodex
Rename remaining source-root/active-root references from devcodex-v1 to devcodex, and align package identity to @devcodex/devcodex with devcodex-labs GitHub and public npmjs publish settings. Update probe paths, fixtures, skills, docs, and isSourceRepo detection so local and published surfaces stay consistent. Leave historical release changelogs unchanged.
1 parent 26a01fc commit dd1c427

61 files changed

Lines changed: 207 additions & 175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/publish.yml‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
concurrency:
9+
group: publish-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v6
25+
with:
26+
node-version: 24
27+
registry-url: https://registry.npmjs.org
28+
package-manager-cache: false
29+
30+
- name: Verify tag matches package.json version
31+
run: |
32+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
33+
PKG_VERSION=$(node -p "require('./package.json').version")
34+
if [ "${TAG_VERSION}" != "${PKG_VERSION}" ]; then
35+
echo "Tag v${TAG_VERSION} does not match package.json version ${PKG_VERSION}"
36+
exit 1
37+
fi
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Run package release checks
43+
run: npm run test:package-release
44+
45+
- name: Preview package contents
46+
run: npm pack --dry-run
47+
48+
- name: Publish
49+
run: npm publish --provenance --access public
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎README.md‎

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> AI 开发规范注入器 — 默认五宿主:Copilot / Claude Code / Codex / Gemini / Grok(Hook-First / Instruction-Fallback)
44
5-
[![npm](https://img.shields.io/badge/npm-%40vextjs%2Fdevcodex-blue)](https://github.com/vextjs/devcodex)
5+
[![npm](https://img.shields.io/npm/v/@devcodex/devcodex.svg)](https://www.npmjs.com/package/@devcodex/devcodex)
66
[![License](https://img.shields.io/badge/license-AGPL--3.0-green)](LICENSE)
77

88
## DevCodex 是什么?
@@ -114,31 +114,29 @@ DevCodex 通过 npm 全局安装把 Copilot、Claude Code、Codex、Gemini CLI
114114

115115
| 通道 | 当前状态 | 用途 |
116116
|---|---|---|
117-
| GitHub Packages | ✅ v1.15.3 | 当前唯一发布通道;安装需要 GitHub Packages `read:packages` 认证 |
117+
| npmjs | 待发布 v1.15.3 | 新 canonical 发布通道;发布后可直接安装 |
118+
| GitHub Packages | 历史包 `@devcodex-labs/devcodex@1.15.3` | 组织改名后转移的历史兼容包;不作为新安装主路径 |
118119

119120
1. 确认 CLI 运行时(文档站维护另需 Node `^20.19.0 || >=22.12.0`):
120121

121122
```bash
122123
node --version # CLI 需要 Node.js >=18
123124
```
124125

125-
2. 配置 GitHub Packages registry 与认证:
126+
2. 安装 CLI:
126127

127-
```ini
128-
@vextjs:registry=https://npm.pkg.github.com
129-
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
128+
```bash
129+
npm install -g @devcodex/devcodex
130130
```
131131

132-
当前 shell 的 `NODE_AUTH_TOKEN` 需使用具备 `read:packages` 的 GitHub PAT。
133-
134-
3. 本地验证当前 global-only 候选:
132+
3. 本地验证当前候选:
135133

136134
```bash
137135
npm pack
138-
npm install -g ./vextjs-devcodex-1.15.3.tgz
136+
npm install -g ./devcodex-devcodex-1.15.3.tgz
139137
```
140138

141-
发布后的正式入口为 `npm install -g devcodex`;本阶段只验证本地 tarball 和 CLI 行为,不验证 npm 包名 owner、registry、dist-tag 或版本唯一性。
139+
发布后的正式入口为 `npm install -g @devcodex/devcodex`;本阶段只验证本地 tarball 和 CLI 行为,不验证 registry dist-tag 或版本唯一性。
142140

143141
4. 在目标工作区初始化 `.devcodex` 并验证:
144142

@@ -153,38 +151,21 @@ devcodex status
153151

154152
## 安装
155153

156-
以下是当前 v1.15.3 的完整安装说明。当前版本仅发布到 GitHub Packages,安装需要读取认证。
157-
158-
### 1. 配置 GitHub Packages
159-
160-
```bash
161-
# 创建 .npmrc(推荐使用环境变量注入 GitHub PAT,避免把 token 写入仓库或本地文件)
162-
echo "@vextjs:registry=https://npm.pkg.github.com" >> .npmrc
163-
echo "//npm.pkg.github.com/:_authToken=\${NODE_AUTH_TOKEN}" >> .npmrc
164-
```
165-
166-
```bash
167-
# 当前 shell 注入 PAT(需具备 read:packages;发布时还需 write:packages)
168-
export NODE_AUTH_TOKEN=YOUR_GITHUB_PAT
169-
```
170-
171-
这里的环境变量仅用于 GitHub Packages 认证流程,不代表项目里的普通配置默认都应 env 化;未明确要求 env 时,AI 不得主动把明文或硬编码改成 env、`secretRef`、secret manager 或 `config.local.json`。
172-
173-
> v1.15.3 未发布到 npmjs;缺少上述 registry 或读取认证时,安装不会自动回退到其他通道。
154+
以下是当前 v1.15.3 的完整安装说明。新 canonical 包名为 `@devcodex/devcodex`,发布目标为 npmjs。
174155

175-
### 2. 安装并初始化
156+
### 1. 安装并初始化
176157

177158
```bash
178159
npm pack
179-
npm install -g ./vextjs-devcodex-1.15.3.tgz # 本地候选:安装 CLI 并自动配置五宿主用户级 adapter
160+
npm install -g ./devcodex-devcodex-1.15.3.tgz # 本地候选:安装 CLI 并自动配置五宿主用户级 adapter
180161
devcodex init # 只初始化当前 workspace 的 .devcodex
181162
devcodex status
182163
```
183164

184165
发布后的命令语义:
185166

186167
```bash
187-
npm install -g devcodex # 安装全局 CLI,并由 postinstall 配置五宿主用户级 adapter
168+
npm install -g @devcodex/devcodex # 安装全局 CLI,并由 postinstall 配置五宿主用户级 adapter
188169
npm update -g devcodex # 升级全局包,并由 postinstall 刷新五宿主用户级 adapter
189170
npm install devcodex # 仅加入当前项目依赖;不配置宿主,并提示必须使用 -g
190171
```
@@ -327,8 +308,8 @@ Phase 1 采用“薄 Rule + `host-capability-routing` Skill + 三份 V1 契约/
327308
|------|------|
328309
| `devcodex global-adapters apply` | **源码维护者日常(R1a)**:从当前包根刷新用户级五宿主 adapter;支持 `--dry-run` / `--json`;不 pack、不 publish |
329310
| `npm install -g .` | **本地旁路(R1b)**:全局安装当前目录并走 postinstall 刷新 adapter |
330-
| `npm pack` + `npm install -g ./vextjs-devcodex-*.tgz` | **预发冒烟(R2)**:接近真实 tarball 安装面 |
331-
| `npm install -g devcodex` | **已发布(R3)**:安装全局 CLI;`postinstall` 自动刷新全局宿主 adapter |
311+
| `npm pack` + `npm install -g ./devcodex-devcodex-*.tgz` | **预发冒烟(R2)**:接近真实 tarball 安装面 |
312+
| `npm install -g @devcodex/devcodex` | **已发布(R3)**:安装全局 CLI;`postinstall` 自动刷新全局宿主 adapter |
332313
| `npm update -g devcodex` | **已发布(R3)**:升级全局包并 `postinstall` 刷新 adapter |
333314
| `npm install devcodex` | 仅安装到当前项目依赖;`postinstall` 不写宿主配置并提示必须使用 `-g` |
334315
| `devcodex update` | **workspace only(R4)**:只刷新当前 `.devcodex` 运行态,不写用户级宿主配置 |
@@ -500,7 +481,7 @@ AO-3 默认轻注入必须在 Shadow green 后单独确认,并继续受 `full-
500481

501482
```bash
502483
# 克隆仓库
503-
git clone https://github.com/vextjs/devcodex.git
484+
git clone https://github.com/devcodex-labs/devcodex.git
504485
cd devcodex
505486
```
506487

@@ -601,7 +582,7 @@ README / 用户使用文档当前补充四类专项 Skill:`user-manual-authori
601582
| **OpenAI Codex app/CLI** | 用户级 `.codex/AGENTS.md`、hooks、config 与 `.agents/skills/` | ⚠️ isolated direct probe;阻断输出按事件契约分级 | ⚠️ Hook + 文本确认 | ✅ 用户级 MCP managed block | 🟢 Direct probe |
602583
| **ChatGPT 普通对话** | 不读取本地工作区 `AGENTS.md` / `.agents/` / `.codex/`;可手工粘贴规则 | ❌ | ⚠️ 文本 | ❌ | 🔴 Unsupported |
603584

604-
> **安装命令**:`npm install -g devcodex` 安装 CLI 并配置五宿主用户级 adapter;`npm update -g devcodex` 升级并刷新。当前候选用本地 tarball验证,不代表 npm registry 已发布。
585+
> **安装命令**:`npm install -g @devcodex/devcodex` 安装 CLI 并配置五宿主用户级 adapter;`npm update -g @devcodex/devcodex` 升级并刷新。当前候选用本地 tarball 验证,不代表 npm registry 已发布。
605586
>
606587
> **Grok 全局插件**:plugin source、配置和稳定 runtime 均位于用户级 Grok 根;`devcodex grok` 从当前 cwd 发现 workspace `.devcodex`,不依赖工作区 `.grok` 或 `AGENTS.md`。`doctor/status` 读取全局 receipt;工作区旧插件只报告为 legacy。
607588
>
@@ -672,7 +653,7 @@ DevCodex Hook runtime 不再把所有拦截都等同为“停止”。拦截会
672653
- 维护 DevCodex 源仓或 workspace-namespace 时,运行 `node scripts/validate-all-profiles.js --workspace <workspace-root>` 校验所有 Profile;发布前需要严格处理 warning 时追加 `--strict-warnings`
673654
3. **Codex / Copilot 想用 MCP**
674655
- 先确认宿主本身是否支持本地 MCP
675-
- **Codex**:重新执行 `npm install -g devcodex`(首次/修复)或 `npm update -g devcodex`(升级),再重启 Codex。用户其它 `mcp_servers` 会保留
656+
- **Codex**:重新执行 `npm install -g @devcodex/devcodex`(首次/修复)或 `npm update -g @devcodex/devcodex`(升级),再重启 Codex。用户其它 `mcp_servers` 会保留
676657
- **Copilot CLI**:同一全局安装/升级会维护 `~/.copilot/mcp-config.json` 的 DevCodex managed servers,并保留用户其它 servers;重启 Copilot CLI 后用 `devcodex doctor` 核对原生 CLI 状态
677658
- **Copilot IDE**:不继承 Copilot CLI 的用户级 Hooks/MCP 就绪结论,仍按目标 IDE 自身能力验证
678659
- Claude 使用用户级 MCP 配置,不要求工作区 `.mcp.json`
@@ -698,7 +679,7 @@ DevCodex Hook runtime 不再把所有拦截都等同为“停止”。拦截会
698679
- `CheckpointValidationResultV1` 分开记录 response-time 与 post-execution;PostToolUse/PreCompact 或缺失证据不能让 post-execution 通过,只有实际 Stop terminal evidence 才能完成
699680
- `devcodex trace show|replay --state <lifecycle-state.json> --json` 可检查当前 turn 的 sequence/duplicate/terminal;replay 只读且不会执行 payload
700681
- 工具或 Agent 仍持有有效长租约时不会按 120/300 秒误判;任何恢复都不得自动重放未知副作用的写操作
701-
- gray sidecar 可执行 `npm run check:turn-liveness -- --state <lifecycle-state.json> --json`;安装包消费者可直接运行 `node node_modules/@vextjs/devcodex/scripts/check-turn-liveness.js --state <lifecycle-state.json> --json`
682+
- gray sidecar 可执行 `npm run check:turn-liveness -- --state <lifecycle-state.json> --json`;安装包消费者可直接运行 `node node_modules/@devcodex/devcodex/scripts/check-turn-liveness.js --state <lifecycle-state.json> --json`
702683
- sidecar 只做一次读取和分类,不 watch、不写状态、不唤醒宿主、不重放操作、不控制进程;输出 `sidecar-observed` 不能冒充 `host-native-verified`
703684

704685
## IDE 兼容性

‎RULES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ DevCodex 同时支持五宿主的用户级加载路径,规则语义保持一
6262

6363
## 相关链接
6464

65-
- [GitHub 仓库](https://github.com/vextjs/devcodex)
65+
- [GitHub 仓库](https://github.com/devcodex-labs/devcodex)
6666
- [变更日志](CHANGELOG.md)
6767

‎SECURITY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
## Security Disclosure Policy
2222

2323
- 我们遵循 90 天披露政策
24-
- 修复后会在 [Releases](https://github.com/vextjs/devcodex/releases) 发布安全公告
24+
- 修复后会在 [Releases](https://github.com/devcodex-labs/devcodex/releases) 发布安全公告
2525
- CVE 编号申请视严重程度决定

‎changelogs/TEMPLATE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
## ✅ 验证
8080

8181
```bash
82-
npx @vextjs/devcodex init --dry-run
83-
npx @vextjs/devcodex status
82+
npx @devcodex/devcodex init --dry-run
83+
npx @devcodex/devcodex status
8484
```
8585

8686
---
@@ -93,7 +93,7 @@ devcodex global-adapters apply
9393
# 预发冒烟:
9494
# npm pack && npm install -g ./vextjs-devcodex-<version>.tgz
9595
# 已发布用户:
96-
# npm update -g @vextjs/devcodex
96+
# npm update -g @devcodex/devcodex
9797
# workspace 运行态 only:
9898
# devcodex update
9999
```

‎changelogs/unreleased.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
> **当前**: v1.15.3 已归档到 `changelogs/releases/v1.15.3.md`;本文件仅保留历史锚点索引与镜像供 validate 探针消费。发版后新实现再写入下方「当前未发布」。
55
66
## 当前未发布实现候选
7+
- **目录与包身份统一为 devcodex(本地/公开)**:源码目录与 active-root 由 devcodex-v1 对齐为 devcodex;npm 包 @devcodex/devcodex、仓库 devcodex-labs/devcodex、npmjs public 发布配置与 probe/fixtures/Skill 示例同步;isSourceRepo 识别新包名;历史 releases 台账不回溯改写。
78

89
- **维护者站点×清单一致性(Fix-1 分母重冻)**:`docs-surface-inventory` npm scripts 下限 **≥113**、scripts/lib **≥102**;基线 `scripts/fixtures/docs-surface-baseline-20260727.json`;intro 能力证据表补 scripts/lib/validation/delivery-honesty 与五宿主 L0 摘要表。需求:`maintainer-site-docs-consistency`。
910
- **跨宿主 MCP runtime 闭包 + tools/call 烟雾 + hang 有界 + 模板真/重/路径列 + Track Q**:`CLAUDE_MCP_RUNTIME_SCRIPT_DEPS` 补 `executable-absorption-gates.js`;`mcpToolCallProbe` 进 Grok runtime verify;`test:mcp-runtime-closure` 挂 host-parity;ConfirmBinding mismatch nextStep;概况 §11/§12 真实性/去重;delivery/report 禁无路径短名表;memory Skill package vs activeRoot。需求:`跨宿主MCP卡死与Runtime依赖不全修复`(L4 真机仍待执行)。

‎index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function beginManagedDeployment(cwd, surfaces, { tenantId = null, grokWorkspaceB
113113
targetRoot: cwd,
114114
manifestFile,
115115
descriptors: buildDeploymentDescriptors(surfaces, { tenantId, grokWorkspaceBridge, grokWorkspaceScope }),
116-
packageName: packageJson.name || '@vextjs/devcodex',
116+
packageName: packageJson.name || '@devcodex/devcodex',
117117
packageVersion: packageJson.version || 'unknown'
118118
})
119119
const preview = session.preview
@@ -144,7 +144,7 @@ const LEGACY_TARGETS = []
144144
function isSourceRepo(dir) {
145145
try {
146146
const pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'))
147-
return pkg.name === '@vextjs/devcodex'
147+
return pkg.name === '@devcodex/devcodex'
148148
} catch { return false }
149149
}
150150

‎instructions/02-output-paths.instructions.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ reports/<子目录>/<agent>/YYYYMMDD/NN--<简述>.md
173173

174174
```markdown
175175
#### 完成交付文件
176-
- [最终执行与验证报告](E:/Worker/.devcodex/devcodex-v1/reports/.../12--最终执行报告.md) — 汇总完成范围、验证结果和残余风险;路径:`.devcodex/devcodex-v1/reports/.../12--最终执行报告.md`;操作:查看结论
176+
- [最终执行与验证报告](E:/Worker/.devcodex/devcodex/reports/.../12--最终执行报告.md) — 汇总完成范围、验证结果和残余风险;路径:`.devcodex/devcodex/reports/.../12--最终执行报告.md`;操作:查看结论
177177
```
178178

179179
自由文本表示例:
@@ -183,13 +183,13 @@ reports/<子目录>/<agent>/YYYYMMDD/NN--<简述>.md
183183

184184
| 语义名称 | 用途 | 路径 | 操作 |
185185
|----------|------|------|------|
186-
| 最终执行与验证报告 | 汇总完成范围与残余风险 | `.devcodex/devcodex-v1/reports/.../12--最终执行报告.md` | 查看结论 |
186+
| 最终执行与验证报告 | 汇总完成范围与残余风险 | `.devcodex/devcodex/reports/.../12--最终执行报告.md` | 查看结论 |
187187
```
188188

189189
Portable 示例保持同一语义项,链接 target 与路径列均为工作区相对路径:
190190

191191
```markdown
192-
- [最终执行与验证报告](.devcodex/devcodex-v1/reports/requirements/codex/20260719/12--最终执行报告.md) — 汇总完成范围、验证结果和残余风险;路径:`.devcodex/devcodex-v1/reports/requirements/codex/20260719/12--最终执行报告.md`;操作:查看结论
192+
- [最终执行与验证报告](.devcodex/devcodex/reports/requirements/codex/20260719/12--最终执行报告.md) — 汇总完成范围、验证结果和残余风险;路径:`.devcodex/devcodex/reports/requirements/codex/20260719/12--最终执行报告.md`;操作:查看结论
193193
```
194194

195195
Portable/Plain 在同一 semanticDigest 下只改变链接形式,不改变文件集合、顺序、状态、动作或路径列语义。legacy “主要产物 + 绝对路径”文本最多识别为 `unverified-legacy`,不能作为 verified delivery receipt。当且仅当 fallback 激活时,可追加 `绝对路径:E:/...` 并记录 reason。

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@vextjs/devcodex",
2+
"name": "@devcodex/devcodex",
33
"version": "1.15.3",
44
"description": "DevCodex — AI-powered development workflow rules for Copilot, Claude Code, Codex, Gemini CLI and Grok",
55
"main": "index.js",
@@ -133,22 +133,22 @@
133133
"codex",
134134
"grok"
135135
],
136-
"author": "Rocky <rocky@vextjs.com> (https://github.com/vextjs)",
136+
"author": "Rocky <rocky@vextjs.com> (https://github.com/devcodex-labs)",
137137
"license": "AGPL-3.0-or-later",
138138
"repository": {
139139
"type": "git",
140-
"url": "git+https://github.com/vextjs/devcodex.git"
140+
"url": "git+https://github.com/devcodex-labs/devcodex.git"
141141
},
142142
"homepage": "https://devcodex.dev",
143143
"bugs": {
144-
"url": "https://github.com/vextjs/devcodex/issues"
144+
"url": "https://github.com/devcodex-labs/devcodex/issues"
145145
},
146146
"engines": {
147147
"node": ">=18"
148148
},
149149
"publishConfig": {
150-
"registry": "https://npm.pkg.github.com/",
151-
"access": "restricted"
150+
"registry": "https://registry.npmjs.org/",
151+
"access": "public"
152152
},
153153
"files": [
154154
"index.js",
@@ -321,4 +321,3 @@
321321
"c8": "10.1.3"
322322
}
323323
}
324-

0 commit comments

Comments
 (0)