mancode 0.6.0 → 0.6.2

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.en.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <p align="center">
18
18
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="License: AGPL-3.0" /></a>
19
19
  <a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm version" /></a>
20
- <img src="https://img.shields.io/badge/status-Continuity%20v0.6.0-2f855a?style=flat-square" alt="Status: mancode Continuity v0.6.0" />
20
+ <img src="https://img.shields.io/badge/status-Continuity%20v0.6.2-2f855a?style=flat-square" alt="Status: mancode Continuity v0.6.2" />
21
21
  <img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode%20%7C%20Kimi%20Code%20%7C%20Qoder%20%7C%20DeepSeek%20Harness-5865F2?style=flat-square" alt="Platforms: Claude Code, Cursor, Codex in ChatGPT desktop and CLI, GitHub Copilot, ZCode, Kimi Code, Qoder, DeepSeek Harness" />
22
22
  </p>
23
23
 
@@ -155,7 +155,7 @@ the quality gate for models that need explicit review structure.
155
155
 
156
156
  ## Installation
157
157
 
158
- **Status**: mancode Continuity v0.6.0. Claude Code, Cursor, Codex in the ChatGPT
158
+ **Status**: mancode Continuity v0.6.2. Claude Code, Cursor, Codex in the ChatGPT
159
159
  desktop app and CLI, GitHub Copilot, ZCode, Kimi Code, Qoder, and DeepSeek Harness adapters are included.
160
160
 
161
161
  Requires Node.js 22 or newer. macOS, Linux, Windows CMD, PowerShell, and Git Bash
@@ -176,10 +176,14 @@ mancode init --platform all
176
176
 
177
177
  `init` guides you through the agent choice and marks a detected agent as a hint;
178
178
  it never silently installs every adapter. Choose one or more adapters, or choose
179
- **All platforms**. In a brand-new empty folder it asks whether to initialize a
180
- generic project, so users do not need to know `git init` or `npm init -y` first.
181
- Adding Git or a manifest later is safe; run `mancode refresh-project` to update
182
- the detected project facts and installed static adapters.
179
+ **All platforms**. Git is not an initialization prerequisite. A non-empty
180
+ directory is recognized as a project when its top level contains a common
181
+ manifest, source file (such as `.html`, `.js`, `.py`, or `.go`), or source root
182
+ (such as `src/`, `app/`, or `web/`). Detection intentionally inspects only the
183
+ current directory's top level, so a nested project does not make an asset-pack
184
+ parent directory look like a project. In a brand-new empty folder, `init` asks
185
+ whether to initialize a generic project. Run `mancode refresh-project` after
186
+ adding Git, manifests, source, dependencies, or validation commands.
183
187
 
184
188
  After initialization, keep using your coding agent normally. `solo` mode runs by
185
189
  default: practice day, no ceremony. Use `/man` when a task needs planning,
@@ -530,7 +534,7 @@ platform bootstrap and original mode entry. Coding agents should combine
530
534
  Simplified output:
531
535
 
532
536
  ```text
533
- mancode v0.6.0
537
+ mancode v0.6.2
534
538
 
535
539
  Project: my-app
536
540
  Runtime: ready
@@ -702,11 +706,16 @@ refreshing project facts does not require reinstalling them.
702
706
 
703
707
  ### `mancode init` says "not a project directory"
704
708
 
705
- In an interactive terminal, an empty directory is offered as a new generic
706
- project. No Git or package command is required. To protect existing files,
707
- non-empty unrecognized directories are rejected; enter the project directory
708
- instead. For scripts, use `mancode init --empty --platform <platform>` only for
709
- a deliberately empty directory.
709
+ Git is not required. mancode accepts common manifests, top-level source files
710
+ (such as `.html`, `.js`, `.py`, or `.go`), and source roots (such as `src/`,
711
+ `app/`, or `web/`) as project evidence. It inspects only the current directory's
712
+ top level, so enter the actual source directory instead of an asset-pack parent.
713
+
714
+ An empty directory is offered as a new generic project in an interactive
715
+ terminal. To protect existing files, a non-empty directory containing only
716
+ assets or documentation and no project evidence is still rejected. For scripts,
717
+ use `mancode init --empty --platform <platform>` only for a deliberately empty
718
+ directory. Home and filesystem root directories can never be initialized.
710
719
 
711
720
  ### Claude Code hooks not triggering
712
721
 
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <p align="center">
18
18
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="许可证:AGPL-3.0" /></a>
19
19
  <a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm 版本" /></a>
20
- <img src="https://img.shields.io/badge/status-Continuity%20v0.6.0-2f855a?style=flat-square" alt="状态:mancode Continuity v0.6.0" />
20
+ <img src="https://img.shields.io/badge/status-Continuity%20v0.6.2-2f855a?style=flat-square" alt="状态:mancode Continuity v0.6.2" />
21
21
  <img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode%20%7C%20Kimi%20Code%20%7C%20Qoder%20%7C%20DeepSeek%20Harness-5865F2?style=flat-square" alt="平台:Claude Code、Cursor、ChatGPT 桌面端 Codex、Codex CLI、GitHub Copilot、ZCode、Kimi Code、Qoder、DeepSeek Harness" />
22
22
  </p>
23
23
 
@@ -124,7 +124,7 @@ mancode 不是 Claude Code、Cursor、Codex 或 Copilot 的替代品。它是在
124
124
 
125
125
  ## 安装方法
126
126
 
127
- **状态**:mancode Continuity v0.6.0。Claude Code、Cursor、ChatGPT 桌面端中的
127
+ **状态**:mancode Continuity v0.6.2。Claude Code、Cursor、ChatGPT 桌面端中的
128
128
  Codex、Codex CLI、GitHub Copilot、ZCode、Kimi Code、Qoder 和 DeepSeek Harness adapter 均已接入。
129
129
 
130
130
  需要 Node.js 22 或更高版本。原生支持 macOS、Linux、Windows CMD、
@@ -143,8 +143,9 @@ mancode init --platform all
143
143
  ```
144
144
 
145
145
  `init` 会引导选择 Agent,并把检测到的 Agent 仅作为提示;不会悄悄安装全部适配器。
146
- 可以选择一个、多个或“全部平台”。全新空目录会询问是否初始化为通用项目,因此用户不必
147
- 先知道 `git init` 或 `npm init -y`。之后再加入 Git 或项目 manifest 也安全,执行
146
+ 可以选择一个、多个或“全部平台”。Git 不是初始化前提;已有 manifest、顶层源码文件或
147
+ 常见源码目录的项目可直接初始化。全新空目录会询问是否初始化为通用项目,因此用户不必
148
+ 先知道 `git init` 或 `npm init -y`。之后再加入 Git 或项目源码也安全,执行
148
149
  `mancode refresh-project` 即可刷新项目事实和已安装的静态适配器。
149
150
 
150
151
  初始化后,继续正常使用你的编码代理。`solo` 默认自动生效:日常训练,零仪式感。遇到需要
@@ -472,7 +473,7 @@ transport 和各平台 bootstrap/原 mode 入口的实际就绪状态。编码 A
472
473
  以下是简化输出示例:
473
474
 
474
475
  ```text
475
- mancode v0.6.0
476
+ mancode v0.6.2
476
477
 
477
478
  Project: my-app
478
479
  Runtime: ready
@@ -609,9 +610,13 @@ Monorepo 可显式选择一个仓库内 UI 根目录,例如 `mancode refresh-s
609
610
 
610
611
  ### `mancode init` 提示"not a project directory"
611
612
 
612
- 交互式终端中的空目录会询问是否初始化为通用项目,不需要 Git npm 命令。为了保护已有
613
- 文件,未识别且非空的目录仍会被拒绝;请进入真正的项目目录。脚本里只应针对明确为空的
614
- 目录使用 `mancode init --empty --platform <platform>`。
613
+ Git 不是初始化前提。mancode 会把常见 manifest、顶层源码文件(如 `.html`、`.js`、
614
+ `.py`、`.go`)或源码目录(如 `src/`、`app/`、`web/`)视为项目证据。检测只看当前目录
615
+ 顶层,不会因为子目录里有代码而把素材包父目录误认为项目;此时请进入实际源码目录。
616
+
617
+ 交互式终端中的空目录会询问是否初始化为通用项目。为了保护已有文件,只有素材、文档等
618
+ 内容且没有项目证据的非空目录仍会被拒绝。脚本里只应针对明确为空的目录使用
619
+ `mancode init --empty --platform <platform>`。Home 与磁盘根目录始终不能初始化。
615
620
 
616
621
  ### Claude Code hooks 不生效
617
622
 
@@ -6158,23 +6158,65 @@ var PROJECT_MANIFESTS = [
6158
6158
  "Package.swift",
6159
6159
  "pubspec.yaml"
6160
6160
  ];
6161
+ var PROJECT_SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
6162
+ ".c",
6163
+ ".cc",
6164
+ ".cpp",
6165
+ ".cs",
6166
+ ".css",
6167
+ ".dart",
6168
+ ".go",
6169
+ ".html",
6170
+ ".java",
6171
+ ".js",
6172
+ ".jsx",
6173
+ ".kt",
6174
+ ".kts",
6175
+ ".m",
6176
+ ".mm",
6177
+ ".php",
6178
+ ".py",
6179
+ ".rb",
6180
+ ".rs",
6181
+ ".scala",
6182
+ ".sh",
6183
+ ".swift",
6184
+ ".ts",
6185
+ ".tsx",
6186
+ ".vue"
6187
+ ]);
6188
+ var PROJECT_SOURCE_ROOTS = [
6189
+ "src",
6190
+ "app",
6191
+ "apps",
6192
+ "packages",
6193
+ "web",
6194
+ "lib",
6195
+ "Sources",
6196
+ "cmd",
6197
+ "server",
6198
+ "backend",
6199
+ "mobile",
6200
+ "ios",
6201
+ "android"
6202
+ ];
6203
+ var PROJECT_MANIFEST_NAMES = new Set(PROJECT_MANIFESTS);
6204
+ var PROJECT_SOURCE_ROOT_NAMES = new Set(PROJECT_SOURCE_ROOTS);
6205
+ async function hasProjectEvidence(projectRoot) {
6206
+ const entries = await readdir3(projectRoot, { withFileTypes: true }).catch(
6207
+ () => []
6208
+ );
6209
+ return entries.some((entry) => {
6210
+ if (entry.isDirectory()) return PROJECT_SOURCE_ROOT_NAMES.has(entry.name);
6211
+ if (!entry.isFile()) return false;
6212
+ return PROJECT_MANIFEST_NAMES.has(entry.name) || PROJECT_SOURCE_EXTENSIONS.has(path6.extname(entry.name).toLowerCase());
6213
+ });
6214
+ }
6161
6215
  async function detectProjectProfile(projectRoot) {
6162
6216
  const entries = await readdir3(projectRoot).catch(() => []);
6163
6217
  const manifests = PROJECT_MANIFESTS.filter((file) => entries.includes(file));
6164
6218
  const sourceRoots = await existingDirs(projectRoot, [
6165
- "src",
6166
- "app",
6167
- "apps",
6168
- "packages",
6169
- "web",
6170
- "lib",
6171
- "Sources",
6172
- "cmd",
6173
- "server",
6174
- "backend",
6175
- "mobile",
6176
- "ios",
6177
- "android",
6219
+ ...PROJECT_SOURCE_ROOTS,
6178
6220
  "data",
6179
6221
  "notebooks"
6180
6222
  ]);
@@ -7286,7 +7328,7 @@ export {
7286
7328
  createConfirmedDecision,
7287
7329
  publishConfirmedDecision,
7288
7330
  readConfirmedDecision,
7289
- PROJECT_MANIFESTS,
7331
+ hasProjectEvidence,
7290
7332
  detectProjectProfile,
7291
7333
  primaryUiLibrary,
7292
7334
  createProjectFacts,
@@ -7297,4 +7339,4 @@ export {
7297
7339
  V3ContextStore,
7298
7340
  storedTaskAggregateDigest
7299
7341
  };
7300
- //# sourceMappingURL=chunk-LXRKJBSG.js.map
7342
+ //# sourceMappingURL=chunk-44UHUCE6.js.map