@nick848/fet 1.1.4 → 1.1.6

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.md CHANGED
@@ -50,6 +50,7 @@ fet --help
50
50
 
51
51
  ```sh
52
52
  fet init
53
+ fet fill-context
53
54
  fet doctor
54
55
  ```
55
56
 
@@ -95,13 +96,25 @@ fet init --lang en
95
96
  | `--verbose` | 输出更多诊断信息。 | `fet doctor --verbose` |
96
97
  | `--no-color` | 禁用终端颜色。 | `fet --no-color doctor` |
97
98
 
99
+ ### 版本更新检查
100
+
101
+ 除 `fet update` 外,FET 在执行其他命令前会检查 npm 上是否有新版本(默认缓存 6 小时)。发现新版本时会提示当前版本与最新版本;在交互式终端中可选择立即升级、跳过并继续当前任务,或取消命令。
102
+
103
+ | 环境变量 | 说明 |
104
+ |----------|------|
105
+ | `FET_UPDATE_CHECK` | `off` 关闭检查;`warn` 仅警告并继续;`confirm` 在 TTY 中交互询问(默认)。 |
106
+ | `FET_SKIP_UPDATE_CHECK` | 设为 `1` 时等同于 `FET_UPDATE_CHECK=off`。 |
107
+ | `FET_UPDATE_CHECK_TTL_MS` | 版本检查缓存时长(毫秒),默认 `21600000`(6 小时)。 |
108
+
109
+ 使用 `--yes` 或 `--json` 时会跳过交互式升级询问;跳过某版本后,同一最新版本不会重复提示,直到检测到更高的新版本。
110
+
98
111
  ## 命令列表
99
112
 
100
113
  | 命令 | 用法 | 说明 |
101
114
  |------|------|------|
102
115
  | `fet init` | `fet init [--yes] [--lang <language>]` | 初始化 FET 和 OpenSpec;生成上下文、状态、Cursor 集成和 Codex 工作流指南。 |
103
116
  | `fet update-context` | `fet update-context [--yes]` | 重新扫描项目并更新 `AGENTS.md` 与 `openspec/config.yaml` 的 FET 托管区域。 |
104
- | `fet fill-context` | `fet fill-context [--yes]` | 刷新 IDE 交接命令,引导 AI 替换 `AGENTS.md` 占位符。 |
117
+ | `fet fill-context` | `fet fill-context [--yes]` | 刷新 IDE 交接命令;自动识别小程序工程并写入包体积/2MB 约束,引导 AI 补齐其余 `AGENTS.md` 占位符。 |
105
118
  | `fet doctor` | `fet doctor [--fix-lock]` | 诊断 OpenSpec、FET 状态、上下文文件、工具集成和锁文件。 |
106
119
  | `fet explore` | `fet explore [...args] [--change <id>]` | 通过 FET 执行 OpenSpec 原生 explore,保留交互式需求澄清。 |
107
120
  | `fet propose` | `fet propose <change-id-or-description>` | 创建 OpenSpec change,并生成第一个 ready 规划产物;后续产物用 `continue` 逐步推进。 |
@@ -169,7 +182,9 @@ FET 可能创建或更新:
169
182
  - `.codex/fet/commands/*.md`
170
183
  - `$CODEX_HOME/prompts/fet-*.md`
171
184
 
172
- FET 只拥有明确标记的托管区域。托管区域之外的用户内容应被保留。`fet init` 还会向 `.gitignore` 添加 FET 本地状态块,避免把锁文件和本地状态误提交。
185
+ FET 只拥有明确标记的托管区域。托管区域之外的用户内容应被保留。
186
+
187
+ **团队与 Git**:`openspec/fet-state.json`、锁文件等是否纳入版本库由团队自行决定。`fet init` 不再自动修改 `.gitignore`。常见做法:(1)提交共享状态并约定每人只改自己负责的 change,减少 `activeChangeId` 冲突;(2)仅在本机用 `.git/info/exclude` 排除锁文件与日志,仓库 `.gitignore` 保持团队统一;(3)整包状态不入库,由每人本地维护(适合无协作场景)。可参考 `src/templates/gitignore.ts` 中的规则片段自行合并。
173
188
 
174
189
  ## 安全边界
175
190
 
package/README_en.md CHANGED
@@ -51,6 +51,7 @@ Run this in a project root that should use OpenSpec:
51
51
 
52
52
  ```sh
53
53
  fet init
54
+ fet fill-context
54
55
  fet doctor
55
56
  ```
56
57
 
@@ -96,6 +97,18 @@ fet init --lang en
96
97
  | `--verbose` | Print more diagnostics. | `fet doctor --verbose` |
97
98
  | `--no-color` | Disable terminal colors. | `fet --no-color doctor` |
98
99
 
100
+ ### Version update check
101
+
102
+ Before most commands (except `fet update`), FET checks npm for a newer release (cached for 6 hours by default). When an update is available, it prints the current and latest versions. In an interactive terminal you can upgrade now, skip and continue the current task, or cancel the command.
103
+
104
+ | Variable | Description |
105
+ |----------|-------------|
106
+ | `FET_UPDATE_CHECK` | `off` disables checks; `warn` prints a warning and continues; `confirm` prompts in a TTY (default). |
107
+ | `FET_SKIP_UPDATE_CHECK` | Set to `1` to disable checks (same as `FET_UPDATE_CHECK=off`). |
108
+ | `FET_UPDATE_CHECK_TTL_MS` | Cache TTL in milliseconds; default `21600000` (6 hours). |
109
+
110
+ `--yes` and `--json` skip the interactive upgrade prompt. If you skip a specific latest version, FET will not prompt again for that version until a newer release appears.
111
+
99
112
  ## Commands
100
113
 
101
114
  | Command | Usage | Description |
@@ -171,7 +184,9 @@ FET may create or update:
171
184
  - `.codex/fet/commands/*.md`
172
185
  - `$CODEX_HOME/prompts/fet-*.md`
173
186
 
174
- FET only owns explicitly marked managed regions. User content outside those regions should be preserved. During `fet init`, FET also adds a managed `.gitignore` block for local workflow state.
187
+ FET only owns explicitly marked managed regions. User content outside those regions should be preserved.
188
+
189
+ **Git and teams**: Whether to commit `openspec/fet-state.json`, lock files, and related paths is a team policy. `fet init` no longer edits `.gitignore` automatically. Common options: (1) commit shared state and coordinate who owns each change to avoid `activeChangeId` conflicts; (2) use per-machine `.git/info/exclude` for locks and journals while keeping a shared `.gitignore`; (3) keep all FET state local when collaboration on state is not needed. See `src/templates/gitignore.ts` for a reference ignore block you can merge manually.
175
190
 
176
191
  ## Safety Model
177
192