flavor-code 1.4.3-beta.2 → 1.4.3

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.
Files changed (33) hide show
  1. package/README.md +25 -0
  2. package/README.zh-CN.md +25 -0
  3. package/dist/agent/loop.d.ts +1 -0
  4. package/dist/{app-G35YBHPR.js → app-TVY2HM5L.js} +342 -112
  5. package/dist/{chunk-FAJ6YDZK.js → chunk-36IDJRLQ.js} +1 -1
  6. package/dist/{chunk-HGTCIHWA.js → chunk-5BDKRA6U.js} +30 -1
  7. package/dist/{chunk-T6RE76D2.js → chunk-IKGT4MDT.js} +35 -23
  8. package/dist/{chunk-K7UGGWJV.js → chunk-JQM2L2YM.js} +1 -1
  9. package/dist/{chunk-6X62CGMA.js → chunk-ONRY3C2L.js} +3 -0
  10. package/dist/{chunk-IDJAHEG6.js → chunk-QACFKPZP.js} +391 -188
  11. package/dist/{chunk-SJUIIHIA.js → chunk-X6U6BO5D.js} +1 -1
  12. package/dist/{claude-ink-BE56DB6N.js → claude-ink-F554I3GJ.js} +1 -1
  13. package/dist/{cli-3MF6EL2H.js → cli-MAWCV2YR.js} +7 -7
  14. package/dist/cli-main.js +16 -16
  15. package/dist/config/protected-file.d.ts +2 -0
  16. package/dist/config/schema.d.ts +3 -0
  17. package/dist/context/global-instructions.d.ts +12 -0
  18. package/dist/context/manager.d.ts +2 -0
  19. package/dist/desktop/main.js +651 -419
  20. package/dist/desktop-renderer/assets/{index-DCqIrF1S.js → index-CjC0Ibiq.js} +2 -2
  21. package/dist/desktop-renderer/assets/{interactive-terminal-B6GbpzIn.js → interactive-terminal-IjIT3Xoa.js} +1 -1
  22. package/dist/desktop-renderer/index.html +1 -1
  23. package/dist/{doctor-OHCGK52S.js → doctor-SEL32R7M.js} +3 -3
  24. package/dist/harness/local.d.ts +1 -0
  25. package/dist/{load-QK6CMLDF.js → load-RHWXNUCS.js} +2 -2
  26. package/dist/{manager-5SI4MPES.js → manager-IYBNNKUP.js} +2 -2
  27. package/dist/{production-6DIZ6YLQ.js → production-TQROFEPV.js} +6 -6
  28. package/dist/sdk/index.js +6 -6
  29. package/dist/{store-ZIHN6363.js → store-MZZERW7K.js} +2 -2
  30. package/dist/ui/commands.d.ts +11 -3
  31. package/dist/ui/session.d.ts +2 -1
  32. package/package.json +1 -1
  33. package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +649 -1
package/README.md CHANGED
@@ -147,6 +147,28 @@ OpenAI-protocol providers default `thinkingEffort` to `high`. Supported values a
147
147
 
148
148
  Runtime behavior and configuration conventions for OAuth PKCE are described in the [PKCE spec](./docs/specs/pkce-runtime-config.md). The [config schema](./src/config/schema.ts) is the source of truth for all fields.
149
149
 
150
+ ### Global coding instructions
151
+
152
+ Coding rules shared across projects are stored in `~/.flavor-code/GLOBAL.md`. You can edit the file manually or use explicit commands to manage single-line Markdown list items. Flavor Code never extracts or writes global rules automatically from conversation. The limit is 64 KiB. Main agents, subagents, and loop workers receive the rules. Edits or deletion are read before the next model call and appended to the current conversation without rewriting its existing prompt-cache prefix.
153
+
154
+ ```text
155
+ /global show the path and all rules
156
+ /global remember Keep tests focused add one rule
157
+ /global forget Keep tests focused remove one matching list item
158
+ ```
159
+
160
+ `forget` tries an exact text match first, then a unique partial match. It refuses ambiguous matches and preserves other hand-written Markdown.
161
+
162
+ This feature is enabled by default. Disable it in global or project `flavor.json`:
163
+
164
+ ```json
165
+ {
166
+ "globalInstructions": { "enabled": false }
167
+ }
168
+ ```
169
+
170
+ When disabled, `GLOBAL.md` is neither read nor injected, and `/global` cannot write it. The default local Shell and terminal still run with the current user's filesystem permissions; use an isolated execution environment if agent-run commands must be unable to modify this file.
171
+
150
172
  ## Entry Points
151
173
 
152
174
  | Entry point | Best for | How to start |
@@ -184,6 +206,9 @@ Common commands:
184
206
  | `/audit` | View tool failure audits |
185
207
 
186
208
  You can submit steering or queue follow-ups while a run is in progress; once the current model response finishes, the task picks up new instructions at safe boundaries.
209
+ While a run is active, Enter queues the text for the next turn; `/steer <message>` changes the current turn. Type `/queue` to inspect all queued messages, use Up/Down to select one, Enter to move it back to the draft, or `d` to cancel it. Escape closes the queue; outside that view it restores the latest queued message for editing.
210
+
211
+ When reading older output, a status line indicates if new output has arrived. Press End to return to the latest output, Home to jump to the top, or Ctrl+Up/Down to move between visible turns. Approval and question views keep their action keys visible while their details scroll with PageUp/PageDown or the mouse wheel.
187
212
 
188
213
  During planned work, a wide CLI shows the main task plan and sub-agent exploration side by side; if only one track exists it uses the full row, and narrow terminals stack both tracks. Long streamed responses keep a live `Writing response` activity below the latest output. LSP tools locate the nearest nested project configuration for each target file, so monorepos and sandbox/worktree projects do not need a `tsconfig.json` or `jsconfig.json` at the Flavor workspace root; JavaScript and CommonJS files are supported by the bundled TypeScript server as well.
189
214
 
package/README.zh-CN.md CHANGED
@@ -147,6 +147,28 @@ OpenAI 协议 Provider 的 `thinkingEffort` 默认值为 `high`,支持 `minima
147
147
 
148
148
  OAuth PKCE 的运行时行为与配置约定见 [PKCE 规范](./docs/specs/pkce-runtime-config.md)。完整配置字段以 [配置 Schema](./src/config/schema.ts) 为准。
149
149
 
150
+ ### 全局编程规范
151
+
152
+ 跨项目编程规范存放在 `~/.flavor-code/GLOBAL.md`。可以手动编辑文件,也可以使用明确的命令管理单行 Markdown 列表项;Flavor Code 不会从对话自动提取或写入全局规范。文件大小上限为 64 KiB。主 Agent、子 Agent 和 loop worker 都会收到这些规范。编辑或删除文件后,下一次模型调用会读取新内容,并把变更追加到当前会话,不改写已有的 prompt cache 前缀。
153
+
154
+ ```text
155
+ /global 显示文件路径和全部规范
156
+ /global remember 保持测试聚焦 添加一条规范
157
+ /global forget 保持测试聚焦 删除唯一匹配的列表项
158
+ ```
159
+
160
+ `forget` 优先按完整文本匹配,其次按唯一的部分文本匹配;匹配到多条时不会删除。文件中的其他手写 Markdown 会保留。
161
+
162
+ 默认启用。可在全局或项目 `flavor.json` 中关闭:
163
+
164
+ ```json
165
+ {
166
+ "globalInstructions": { "enabled": false }
167
+ }
168
+ ```
169
+
170
+ 关闭时不会读取或注入 `GLOBAL.md`,`/global` 修改命令也不会写入。默认本地 Shell 和终端仍以当前用户权限运行;若需要阻止 Agent 执行的命令修改该文件,需另行使用隔离执行环境。
171
+
150
172
  ## 使用入口
151
173
 
152
174
  | 入口 | 适合场景 | 启动方式 |
@@ -184,6 +206,9 @@ OAuth PKCE 的运行时行为与配置约定见 [PKCE 规范](./docs/specs/pkce-
184
206
  | `/audit` | 查看工具失败审计 |
185
207
 
186
208
  运行中可以提交 steering 或排队 follow-up;当前模型响应结束后,任务会在安全边界处接收新指令。
209
+ 运行中按 Enter 会把输入排到下一轮;输入 `/steer <内容>` 会影响当前回合。输入 `/queue` 可查看全部待发送消息,用上下键选中,按 Enter 移回输入框编辑,或按 `d` 取消。Esc 关闭队列视图;在普通输入界面则会取回最后一条待发送消息供编辑。
210
+
211
+ 查看较早输出时,状态栏会提示是否有新内容。按 End 回到最新输出,Home 跳到顶部,Ctrl+上下键在当前可见的回合间跳转。审批和提问界面的操作键固定显示,详情可用 PageUp/PageDown 或鼠标滚轮翻阅。
187
212
 
188
213
  有任务规划时,宽终端会把主任务计划与子 Agent 探索左右并排展示;只有一类工作时占满整行,窄终端则自动纵向排列。长内容流式输出期间,最新内容下方会持续显示 `Writing response` 动作。LSP 工具会从目标文件向上寻找最近的嵌套项目配置,因此 monorepo、sandbox 或 worktree 项目无需在 Flavor 工作区根部额外放置 `tsconfig.json` / `jsconfig.json`;内置 TypeScript 服务也支持 JavaScript 与 CommonJS 文件。
189
214
 
@@ -29,6 +29,7 @@ export interface AgentLoopOptions {
29
29
  extendIterations?: number;
30
30
  maxExtensions?: number;
31
31
  hasActiveProgress?(): boolean;
32
+ beforeModelCall?(signal?: AbortSignal): Promise<void>;
32
33
  agent?: "main" | "subagent";
33
34
  ownerId?: string;
34
35
  hallucinationGuard?: HallucinationGuard;