@armadra/agent 0.7.6 → 0.8.1

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 (516) hide show
  1. package/CHANGELOG.md +51 -31
  2. package/CHANGELOG.zh-CN.md +68 -48
  3. package/README.md +162 -204
  4. package/README.zh-CN.md +150 -199
  5. package/dist/acp.d.ts +1 -1
  6. package/dist/acp.js +1 -1
  7. package/dist/agent/limits.d.ts +1 -1
  8. package/dist/agent/limits.js +1 -1
  9. package/dist/agent/loop-guard.d.ts +1 -1
  10. package/dist/agent/loop-guard.js +1 -1
  11. package/dist/agent/prompt-rules.d.ts +1 -1
  12. package/dist/agent/prompt-rules.js +1 -1
  13. package/dist/agent/reminders.d.ts +1 -1
  14. package/dist/agent/reminders.js +1 -1
  15. package/dist/agent/session-cache-key.d.ts +1 -1
  16. package/dist/agent/session-cache-key.js +1 -1
  17. package/dist/agent/session-extensions.d.ts +1 -1
  18. package/dist/agent/session-extensions.js +1 -1
  19. package/dist/agent/session-images.d.ts +1 -1
  20. package/dist/agent/session-images.js +1 -1
  21. package/dist/agent/session-plan.d.ts +1 -1
  22. package/dist/agent/session-plan.js +1 -1
  23. package/dist/agent/session-rewind.d.ts +1 -1
  24. package/dist/agent/session-rewind.js +1 -1
  25. package/dist/agent/session-settings.d.ts +1 -1
  26. package/dist/agent/session-settings.js +1 -1
  27. package/dist/agent/session-subagent.d.ts +1 -1
  28. package/dist/agent/session-subagent.js +1 -1
  29. package/dist/agent/session-telemetry.d.ts +1 -1
  30. package/dist/agent/session-telemetry.js +1 -1
  31. package/dist/agent/session-trace-writer.d.ts +1 -1
  32. package/dist/agent/session-trace-writer.js +1 -1
  33. package/dist/agent/session.js +1 -1
  34. package/dist/agent/subagent-background.d.ts +1 -1
  35. package/dist/agent/subagent-background.js +1 -1
  36. package/dist/agent/subagent-direct.d.ts +1 -1
  37. package/dist/agent/subagent-direct.js +1 -1
  38. package/dist/agent/subagent-fork.d.ts +1 -1
  39. package/dist/agent/subagent-fork.js +1 -1
  40. package/dist/agent/subagent-registry.d.ts +1 -1
  41. package/dist/agent/subagent-registry.js +1 -1
  42. package/dist/agent/system-prompt.js +1 -1
  43. package/dist/agent/tool-availability.d.ts +1 -1
  44. package/dist/agent/tool-availability.js +1 -1
  45. package/dist/agent/types-w5.d.ts +2 -2
  46. package/dist/agent/types-w5.js +1 -1
  47. package/dist/agent/types-w6.d.ts +1 -1
  48. package/dist/agent/types-w6.js +1 -1
  49. package/dist/agent/types.d.ts +1 -1
  50. package/dist/agent/worktree.d.ts +1 -1
  51. package/dist/agent/worktree.js +1 -1
  52. package/dist/agents/builtin.d.ts +1 -1
  53. package/dist/agents/builtin.js +1 -1
  54. package/dist/agents/catalog.d.ts +1 -1
  55. package/dist/agents/catalog.js +1 -1
  56. package/dist/agents/discover.d.ts +1 -1
  57. package/dist/agents/discover.js +1 -1
  58. package/dist/agents/external.d.ts +1 -1
  59. package/dist/agents/external.js +1 -1
  60. package/dist/agents/parse.d.ts +1 -1
  61. package/dist/agents/parse.js +1 -1
  62. package/dist/agents/result.d.ts +1 -1
  63. package/dist/agents/result.js +2 -2
  64. package/dist/agents/task-record.d.ts +3 -3
  65. package/dist/agents/task-record.js +2 -2
  66. package/dist/agents/types.d.ts +1 -1
  67. package/dist/agents/types.js +1 -1
  68. package/dist/ai/apis/anthropic-compat.d.ts +2 -2
  69. package/dist/ai/apis/anthropic-compat.js +2 -2
  70. package/dist/ai/apis/cache-params.d.ts +1 -1
  71. package/dist/ai/apis/cache-params.js +1 -1
  72. package/dist/ai/apis/chatgpt-backend.d.ts +4 -2
  73. package/dist/ai/apis/chatgpt-backend.js +11 -2
  74. package/dist/ai/apis/chatgpt-rate-limits.d.ts +1 -1
  75. package/dist/ai/apis/chatgpt-rate-limits.js +1 -1
  76. package/dist/ai/apis/max-tokens.d.ts +1 -1
  77. package/dist/ai/apis/max-tokens.js +1 -1
  78. package/dist/ai/apis/shared.d.ts +1 -1
  79. package/dist/ai/apis/shared.js +1 -1
  80. package/dist/ai/image-intern.d.ts +2 -2
  81. package/dist/ai/image-intern.js +1 -1
  82. package/dist/ai/image-limits.d.ts +1 -1
  83. package/dist/ai/image-limits.js +1 -1
  84. package/dist/ai/json-body.d.ts +1 -1
  85. package/dist/ai/json-body.js +1 -1
  86. package/dist/ai/providers/builtin.d.ts +2 -2
  87. package/dist/ai/providers/builtin.js +4 -4
  88. package/dist/ai/providers/catalog.d.ts +2 -2
  89. package/dist/ai/providers/catalog.js +1 -1
  90. package/dist/ai/providers/channels.d.ts +1 -1
  91. package/dist/ai/providers/channels.js +1 -1
  92. package/dist/ai/providers/enrich.d.ts +1 -1
  93. package/dist/ai/providers/enrich.js +1 -1
  94. package/dist/ai/providers/models-dev-cache.d.ts +1 -1
  95. package/dist/ai/providers/models-dev-cache.js +1 -1
  96. package/dist/ai/providers/models-dev-data.d.ts +1 -1
  97. package/dist/ai/providers/models-dev-data.js +1 -1
  98. package/dist/ai/providers/models-dev-snapshot.d.ts +1 -1
  99. package/dist/ai/providers/models-dev-snapshot.js +1 -1
  100. package/dist/ai/providers/models-dev.d.ts +4 -4
  101. package/dist/ai/providers/models-dev.js +3 -3
  102. package/dist/ai/types.d.ts +2 -2
  103. package/dist/ai/types.js +1 -1
  104. package/dist/auth/chatgpt/cli.d.ts +1 -1
  105. package/dist/auth/chatgpt/cli.js +1 -1
  106. package/dist/auth/chatgpt/host-id.d.ts +1 -1
  107. package/dist/auth/chatgpt/host-id.js +1 -1
  108. package/dist/auth/chatgpt/login.d.ts +1 -1
  109. package/dist/auth/chatgpt/login.js +1 -1
  110. package/dist/auth/chatgpt/presets.d.ts +1 -1
  111. package/dist/auth/chatgpt/presets.js +1 -1
  112. package/dist/auth/oauth/callback-server.d.ts +1 -1
  113. package/dist/auth/oauth/callback-server.js +1 -1
  114. package/dist/auth/oauth/flows.d.ts +1 -1
  115. package/dist/auth/oauth/flows.js +1 -1
  116. package/dist/auth/oauth/oidc.d.ts +1 -1
  117. package/dist/auth/oauth/oidc.js +1 -1
  118. package/dist/auth/oauth/pkce.d.ts +1 -1
  119. package/dist/auth/oauth/pkce.js +1 -1
  120. package/dist/auth/oauth/refresh.d.ts +1 -1
  121. package/dist/auth/oauth/refresh.js +1 -1
  122. package/dist/auth/oauth/token-client.d.ts +1 -1
  123. package/dist/auth/oauth/token-client.js +1 -1
  124. package/dist/auth/oauth/token-store.d.ts +1 -1
  125. package/dist/auth/oauth/token-store.js +1 -1
  126. package/dist/auth/testing/fake-oauth.d.ts +1 -1
  127. package/dist/auth/testing/fake-oauth.js +1 -1
  128. package/dist/bundle/ama.cjs +1041 -359
  129. package/dist/checkpoints/blobs.d.ts +1 -1
  130. package/dist/checkpoints/blobs.js +1 -1
  131. package/dist/checkpoints/gc.d.ts +1 -1
  132. package/dist/checkpoints/gc.js +1 -1
  133. package/dist/checkpoints/git-head.d.ts +1 -1
  134. package/dist/checkpoints/git-head.js +1 -1
  135. package/dist/checkpoints/index.d.ts +1 -1
  136. package/dist/checkpoints/index.js +1 -1
  137. package/dist/checkpoints/replay.d.ts +1 -1
  138. package/dist/checkpoints/replay.js +1 -1
  139. package/dist/checkpoints/restore.d.ts +1 -1
  140. package/dist/checkpoints/restore.js +1 -1
  141. package/dist/checkpoints/settings.d.ts +1 -1
  142. package/dist/checkpoints/settings.js +1 -1
  143. package/dist/checkpoints/shadow-git.d.ts +1 -1
  144. package/dist/checkpoints/shadow-git.js +1 -1
  145. package/dist/checkpoints/shadow-restore.d.ts +1 -1
  146. package/dist/checkpoints/shadow-restore.js +1 -1
  147. package/dist/checkpoints/tracker.d.ts +1 -1
  148. package/dist/checkpoints/tracker.js +1 -1
  149. package/dist/checkpoints/types.d.ts +1 -1
  150. package/dist/checkpoints/types.js +1 -1
  151. package/dist/cli/args.d.ts +2 -2
  152. package/dist/cli/args.js +1 -1
  153. package/dist/cli/bootstrap.js +1 -1
  154. package/dist/cli/choice-prompt.d.ts +1 -1
  155. package/dist/cli/choice-prompt.js +1 -1
  156. package/dist/cli/codemode-notice.d.ts +1 -1
  157. package/dist/cli/codemode-notice.js +1 -1
  158. package/dist/cli/compose-agents.d.ts +1 -1
  159. package/dist/cli/compose-agents.js +1 -1
  160. package/dist/cli/compose-extensions.d.ts +1 -1
  161. package/dist/cli/compose-extensions.js +1 -1
  162. package/dist/cli/compose-memory.d.ts +1 -1
  163. package/dist/cli/compose-memory.js +1 -1
  164. package/dist/cli/compose-providers.d.ts +1 -1
  165. package/dist/cli/compose-providers.js +1 -1
  166. package/dist/cli/compose-request.d.ts +1 -1
  167. package/dist/cli/compose-request.js +1 -1
  168. package/dist/cli/from-prompt.d.ts +1 -1
  169. package/dist/cli/from-prompt.js +1 -1
  170. package/dist/cli/main.d.ts +1 -1
  171. package/dist/cli/main.js +1 -1
  172. package/dist/cli/subcommands/auth.d.ts +1 -1
  173. package/dist/cli/subcommands/auth.js +1 -1
  174. package/dist/cli/subcommands/config-set.d.ts +1 -1
  175. package/dist/cli/subcommands/config-set.js +1 -1
  176. package/dist/cli/subcommands/doctor.js +1 -1
  177. package/dist/cli/subcommands/init.d.ts +1 -1
  178. package/dist/cli/subcommands/init.js +1 -1
  179. package/dist/cli/subcommands/memory.d.ts +1 -1
  180. package/dist/cli/subcommands/memory.js +1 -1
  181. package/dist/cli/subcommands/models.js +1 -1
  182. package/dist/cli/subcommands/providers-list.d.ts +1 -1
  183. package/dist/cli/subcommands/providers-list.js +1 -1
  184. package/dist/cli/subcommands/providers-plan.d.ts +1 -1
  185. package/dist/cli/subcommands/providers-plan.js +1 -1
  186. package/dist/cli/subcommands/providers.d.ts +1 -1
  187. package/dist/cli/subcommands/providers.js +1 -1
  188. package/dist/cli/subcommands/sessions-export.d.ts +1 -1
  189. package/dist/cli/subcommands/sessions-export.js +1 -1
  190. package/dist/cli/subcommands/sessions-trace.d.ts +1 -1
  191. package/dist/cli/subcommands/sessions-trace.js +1 -1
  192. package/dist/cli/subcommands/sessions.d.ts +1 -1
  193. package/dist/cli/subcommands/sessions.js +1 -1
  194. package/dist/cli/subcommands/stats.d.ts +1 -1
  195. package/dist/cli/subcommands/stats.js +1 -1
  196. package/dist/codemode/capability.d.ts +1 -1
  197. package/dist/codemode/capability.js +1 -1
  198. package/dist/codemode/host-side.d.ts +2 -2
  199. package/dist/codemode/host-side.js +2 -2
  200. package/dist/compaction/image-budget.d.ts +1 -1
  201. package/dist/compaction/image-budget.js +1 -1
  202. package/dist/config/edit.d.ts +1 -1
  203. package/dist/config/edit.js +1 -1
  204. package/dist/config/init.d.ts +1 -1
  205. package/dist/config/init.js +1 -1
  206. package/dist/config/json-schema.d.ts +2 -2
  207. package/dist/config/json-schema.js +2 -2
  208. package/dist/config/schema-w5.d.ts +1 -1
  209. package/dist/config/schema-w5.js +1 -1
  210. package/dist/config/schema-w6.d.ts +1 -1
  211. package/dist/config/schema-w6.js +1 -1
  212. package/dist/config/settings-registry.d.ts +1 -1
  213. package/dist/config/settings-registry.js +1 -1
  214. package/dist/config/types-w5.d.ts +2 -2
  215. package/dist/config/types-w5.js +2 -2
  216. package/dist/config/types-w6.d.ts +5 -5
  217. package/dist/config/types-w6.js +1 -1
  218. package/dist/config/types.d.ts +6 -6
  219. package/dist/config/types.js +1 -1
  220. package/dist/drivers/acp/client.d.ts +1 -1
  221. package/dist/drivers/acp/client.js +1 -1
  222. package/dist/drivers/acp/driver.d.ts +23 -2
  223. package/dist/drivers/acp/driver.js +60 -6
  224. package/dist/drivers/acp/testing/fake-agent.d.ts +1 -1
  225. package/dist/drivers/acp/testing/fake-agent.js +1 -1
  226. package/dist/drivers/acp/types.d.ts +1 -1
  227. package/dist/drivers/acp/types.js +1 -1
  228. package/dist/drivers/agents.d.ts +1 -1
  229. package/dist/drivers/agents.js +4 -1
  230. package/dist/drivers/base.d.ts +1 -1
  231. package/dist/drivers/base.js +1 -1
  232. package/dist/drivers/catalog.d.ts +3 -1
  233. package/dist/drivers/catalog.js +95 -5
  234. package/dist/drivers/env.d.ts +1 -1
  235. package/dist/drivers/env.js +1 -1
  236. package/dist/drivers/host-runners.d.ts +1 -1
  237. package/dist/drivers/host-runners.js +1 -1
  238. package/dist/drivers/jsonrpc.d.ts +1 -1
  239. package/dist/drivers/jsonrpc.js +1 -1
  240. package/dist/drivers/native/claude-normalize.d.ts +9 -1
  241. package/dist/drivers/native/claude-normalize.js +28 -1
  242. package/dist/drivers/native/claude-stream.d.ts +1 -1
  243. package/dist/drivers/native/claude-stream.js +17 -2
  244. package/dist/drivers/native/codex-app-server.d.ts +1 -1
  245. package/dist/drivers/native/codex-app-server.js +5 -3
  246. package/dist/drivers/native/codex-normalize.d.ts +1 -1
  247. package/dist/drivers/native/codex-normalize.js +1 -1
  248. package/dist/drivers/native/oneshot.d.ts +1 -1
  249. package/dist/drivers/native/oneshot.js +13 -3
  250. package/dist/drivers/native/pi-gate.d.ts +19 -0
  251. package/dist/drivers/native/pi-gate.js +39 -0
  252. package/dist/drivers/native/pi-rpc.d.ts +29 -0
  253. package/dist/drivers/native/pi-rpc.js +483 -0
  254. package/dist/drivers/permissions.d.ts +1 -1
  255. package/dist/drivers/permissions.js +1 -1
  256. package/dist/drivers/pids.d.ts +1 -1
  257. package/dist/drivers/pids.js +1 -1
  258. package/dist/drivers/pool.d.ts +1 -1
  259. package/dist/drivers/pool.js +1 -1
  260. package/dist/drivers/probe.d.ts +1 -1
  261. package/dist/drivers/probe.js +1 -1
  262. package/dist/drivers/process.d.ts +1 -1
  263. package/dist/drivers/process.js +1 -1
  264. package/dist/drivers/runner.d.ts +1 -1
  265. package/dist/drivers/runner.js +2 -1
  266. package/dist/drivers/store.d.ts +1 -1
  267. package/dist/drivers/store.js +1 -1
  268. package/dist/drivers/types.d.ts +2 -2
  269. package/dist/drivers/types.js +1 -1
  270. package/dist/git/info.d.ts +1 -1
  271. package/dist/git/info.js +1 -1
  272. package/dist/host/api-impl.d.ts +1 -1
  273. package/dist/host/api-impl.js +1 -1
  274. package/dist/host/types.d.ts +2 -2
  275. package/dist/i18n/catalog.d.ts +5 -2
  276. package/dist/i18n/catalog.js +2 -2
  277. package/dist/i18n/format.d.ts +1 -1
  278. package/dist/i18n/format.js +1 -1
  279. package/dist/i18n/index.d.ts +1 -1
  280. package/dist/i18n/index.js +1 -1
  281. package/dist/i18n/messages/acp.d.ts +1 -1
  282. package/dist/i18n/messages/acp.js +1 -1
  283. package/dist/i18n/messages/agents.d.ts +1 -1
  284. package/dist/i18n/messages/agents.js +1 -1
  285. package/dist/i18n/messages/approval.d.ts +1 -1
  286. package/dist/i18n/messages/approval.js +1 -1
  287. package/dist/i18n/messages/auth.d.ts +3 -1
  288. package/dist/i18n/messages/auth.js +3 -1
  289. package/dist/i18n/messages/cli.d.ts +1 -1
  290. package/dist/i18n/messages/cli.js +1 -1
  291. package/dist/i18n/messages/config-keys.js +12 -12
  292. package/dist/i18n/messages/config.d.ts +1 -1
  293. package/dist/i18n/messages/config.js +3 -3
  294. package/dist/i18n/messages/drivers.d.ts +5 -1
  295. package/dist/i18n/messages/drivers.js +5 -1
  296. package/dist/i18n/messages/errors.d.ts +1 -1
  297. package/dist/i18n/messages/errors.js +1 -1
  298. package/dist/i18n/messages/interactive-line.d.ts +1 -1
  299. package/dist/i18n/messages/interactive-line.js +1 -1
  300. package/dist/i18n/messages/interactive-startup.d.ts +1 -1
  301. package/dist/i18n/messages/interactive-startup.js +1 -1
  302. package/dist/i18n/messages/interactive-view.d.ts +1 -1
  303. package/dist/i18n/messages/interactive-view.js +1 -1
  304. package/dist/i18n/messages/interactive.d.ts +1 -1
  305. package/dist/i18n/messages/interactive.js +1 -1
  306. package/dist/i18n/messages/memory.d.ts +1 -1
  307. package/dist/i18n/messages/memory.js +1 -1
  308. package/dist/i18n/messages/panels.d.ts +1 -1
  309. package/dist/i18n/messages/panels.js +1 -1
  310. package/dist/i18n/messages/permissions.d.ts +1 -1
  311. package/dist/i18n/messages/permissions.js +1 -1
  312. package/dist/i18n/messages/plan.d.ts +1 -1
  313. package/dist/i18n/messages/plan.js +1 -1
  314. package/dist/i18n/messages/print.d.ts +2 -2
  315. package/dist/i18n/messages/print.js +2 -2
  316. package/dist/i18n/messages/report-context.d.ts +1 -1
  317. package/dist/i18n/messages/report-context.js +1 -1
  318. package/dist/i18n/messages/report.d.ts +1 -1
  319. package/dist/i18n/messages/report.js +1 -1
  320. package/dist/i18n/messages/rewind.d.ts +1 -1
  321. package/dist/i18n/messages/rewind.js +1 -1
  322. package/dist/i18n/messages/session.d.ts +1 -1
  323. package/dist/i18n/messages/session.js +1 -1
  324. package/dist/i18n/messages/settings.d.ts +1 -1
  325. package/dist/i18n/messages/settings.js +1 -1
  326. package/dist/i18n/messages/subcommands.d.ts +1 -1
  327. package/dist/i18n/messages/subcommands.js +1 -1
  328. package/dist/i18n/messages/trace.d.ts +1 -1
  329. package/dist/i18n/messages/trace.js +1 -1
  330. package/dist/i18n/types.d.ts +1 -1
  331. package/dist/i18n/types.js +1 -1
  332. package/dist/memory/frontmatter.d.ts +1 -1
  333. package/dist/memory/frontmatter.js +1 -1
  334. package/dist/memory/index.d.ts +1 -1
  335. package/dist/memory/index.js +1 -1
  336. package/dist/memory/lock.d.ts +1 -1
  337. package/dist/memory/lock.js +1 -1
  338. package/dist/memory/paths.d.ts +1 -1
  339. package/dist/memory/paths.js +1 -1
  340. package/dist/memory/runtime.d.ts +1 -1
  341. package/dist/memory/runtime.js +1 -1
  342. package/dist/memory/secrets.d.ts +1 -1
  343. package/dist/memory/secrets.js +1 -1
  344. package/dist/memory/section.d.ts +1 -1
  345. package/dist/memory/section.js +1 -1
  346. package/dist/memory/store.d.ts +1 -1
  347. package/dist/memory/store.js +1 -1
  348. package/dist/memory/tool.d.ts +1 -1
  349. package/dist/memory/tool.js +1 -1
  350. package/dist/modes/acp/acp-auth-gate.d.ts +1 -1
  351. package/dist/modes/acp/acp-auth-gate.js +1 -1
  352. package/dist/modes/acp/acp-config.d.ts +1 -1
  353. package/dist/modes/acp/acp-config.js +1 -1
  354. package/dist/modes/acp/acp-connection.d.ts +1 -1
  355. package/dist/modes/acp/acp-connection.js +1 -1
  356. package/dist/modes/acp/acp-events.d.ts +1 -1
  357. package/dist/modes/acp/acp-events.js +1 -1
  358. package/dist/modes/acp/acp-mode.d.ts +1 -1
  359. package/dist/modes/acp/acp-mode.js +1 -1
  360. package/dist/modes/acp/acp-server.d.ts +2 -2
  361. package/dist/modes/acp/acp-server.js +2 -2
  362. package/dist/modes/acp/acp-sessions.d.ts +2 -2
  363. package/dist/modes/acp/acp-sessions.js +2 -2
  364. package/dist/modes/acp/acp-tool-text.d.ts +1 -1
  365. package/dist/modes/acp/acp-tool-text.js +1 -1
  366. package/dist/modes/commands-core.js +1 -1
  367. package/dist/modes/image-input.d.ts +1 -1
  368. package/dist/modes/image-input.js +1 -1
  369. package/dist/modes/interactive/agent-bar.d.ts +1 -1
  370. package/dist/modes/interactive/agent-bar.js +1 -1
  371. package/dist/modes/interactive/agent-transcript.d.ts +1 -1
  372. package/dist/modes/interactive/agent-transcript.js +1 -1
  373. package/dist/modes/interactive/agent-view.d.ts +1 -1
  374. package/dist/modes/interactive/agent-view.js +1 -1
  375. package/dist/modes/interactive/approval-dock.d.ts +1 -1
  376. package/dist/modes/interactive/approval-dock.js +1 -1
  377. package/dist/modes/interactive/config-panel.d.ts +1 -1
  378. package/dist/modes/interactive/config-panel.js +1 -1
  379. package/dist/modes/interactive/config-ui.d.ts +1 -1
  380. package/dist/modes/interactive/config-ui.js +1 -1
  381. package/dist/modes/interactive/memory-panel.d.ts +1 -1
  382. package/dist/modes/interactive/memory-panel.js +1 -1
  383. package/dist/modes/interactive/plan-command.d.ts +1 -1
  384. package/dist/modes/interactive/plan-command.js +1 -1
  385. package/dist/modes/interactive/plan-dialog.d.ts +1 -1
  386. package/dist/modes/interactive/plan-dialog.js +1 -1
  387. package/dist/modes/interactive/plan-flow.d.ts +1 -1
  388. package/dist/modes/interactive/plan-flow.js +1 -1
  389. package/dist/modes/interactive/subagent-view.d.ts +1 -1
  390. package/dist/modes/interactive/subagent-view.js +1 -1
  391. package/dist/modes/interactive/task-background.d.ts +1 -1
  392. package/dist/modes/interactive/task-background.js +1 -1
  393. package/dist/modes/interactive/trace-view.d.ts +1 -1
  394. package/dist/modes/interactive/trace-view.js +1 -1
  395. package/dist/modes/print/json-event.d.ts +1 -1
  396. package/dist/modes/print/json-event.js +2 -2
  397. package/dist/modes/print/print-mode.d.ts +1 -1
  398. package/dist/modes/print/print-mode.js +1 -1
  399. package/dist/modes/print/search-hint.d.ts +1 -1
  400. package/dist/modes/print/search-hint.js +1 -1
  401. package/dist/modes/rpc/commands.js +2 -2
  402. package/dist/permissions/auto-safe.d.ts +1 -1
  403. package/dist/permissions/auto-safe.js +1 -1
  404. package/dist/permissions/bypass.d.ts +1 -1
  405. package/dist/permissions/bypass.js +1 -1
  406. package/dist/permissions/classifier.d.ts +1 -1
  407. package/dist/permissions/classifier.js +1 -1
  408. package/dist/permissions/memory-class.d.ts +1 -1
  409. package/dist/permissions/memory-class.js +1 -1
  410. package/dist/permissions/pipeline.d.ts +2 -2
  411. package/dist/permissions/pipeline.js +2 -2
  412. package/dist/permissions/protected.d.ts +1 -1
  413. package/dist/permissions/protected.js +1 -1
  414. package/dist/permissions/readonly-bash.d.ts +1 -1
  415. package/dist/permissions/readonly-bash.js +1 -1
  416. package/dist/permissions/types.d.ts +2 -2
  417. package/dist/plan/done-markers.d.ts +1 -1
  418. package/dist/plan/done-markers.js +1 -1
  419. package/dist/plan/extract.d.ts +1 -1
  420. package/dist/plan/extract.js +1 -1
  421. package/dist/plan/prompts.d.ts +1 -1
  422. package/dist/plan/prompts.js +1 -1
  423. package/dist/plan/store.d.ts +1 -1
  424. package/dist/plan/store.js +1 -1
  425. package/dist/rpc.d.ts +3 -3
  426. package/dist/rpc.js +3 -3
  427. package/dist/sandbox/bash.d.ts +1 -1
  428. package/dist/sandbox/bash.js +1 -1
  429. package/dist/sandbox/detect.d.ts +1 -1
  430. package/dist/sandbox/detect.js +1 -1
  431. package/dist/sandbox/index.d.ts +1 -1
  432. package/dist/sandbox/index.js +1 -1
  433. package/dist/sandbox/profile.d.ts +1 -1
  434. package/dist/sandbox/profile.js +1 -1
  435. package/dist/sandbox/wrap.d.ts +1 -1
  436. package/dist/sandbox/wrap.js +1 -1
  437. package/dist/sdk.d.ts +3 -3
  438. package/dist/sdk.js +2 -2
  439. package/dist/session/line-reader.d.ts +1 -1
  440. package/dist/session/line-reader.js +1 -1
  441. package/dist/session/list.d.ts +1 -1
  442. package/dist/session/list.js +1 -1
  443. package/dist/session/migrate.d.ts +1 -1
  444. package/dist/session/migrate.js +1 -1
  445. package/dist/session/store.d.ts +1 -1
  446. package/dist/session/store.js +1 -1
  447. package/dist/skills/builtin.js +2 -2
  448. package/dist/tools/background-jobs.d.ts +1 -1
  449. package/dist/tools/background-jobs.js +1 -1
  450. package/dist/tools/clipboard-image.d.ts +1 -1
  451. package/dist/tools/clipboard-image.js +1 -1
  452. package/dist/tools/edit.d.ts +1 -1
  453. package/dist/tools/edit.js +1 -1
  454. package/dist/tools/grep.d.ts +1 -1
  455. package/dist/tools/grep.js +1 -1
  456. package/dist/tools/image-resize.d.ts +1 -1
  457. package/dist/tools/image-resize.js +1 -1
  458. package/dist/tools/read-lines.d.ts +1 -1
  459. package/dist/tools/read-lines.js +1 -1
  460. package/dist/tools/read.d.ts +1 -1
  461. package/dist/tools/read.js +1 -1
  462. package/dist/tools/task-ctl.d.ts +1 -1
  463. package/dist/tools/task-ctl.js +1 -1
  464. package/dist/tools/task.d.ts +2 -2
  465. package/dist/tools/task.js +2 -2
  466. package/dist/tools/types.d.ts +3 -3
  467. package/dist/tools/types.js +1 -1
  468. package/dist/trace/build.d.ts +1 -1
  469. package/dist/trace/build.js +1 -1
  470. package/dist/trace/detail.d.ts +1 -1
  471. package/dist/trace/detail.js +1 -1
  472. package/dist/trace/flatten.d.ts +1 -1
  473. package/dist/trace/flatten.js +1 -1
  474. package/dist/trace/format.d.ts +1 -1
  475. package/dist/trace/format.js +1 -1
  476. package/dist/trace/html-template.d.ts +1 -1
  477. package/dist/trace/html-template.js +1 -1
  478. package/dist/trace/html.d.ts +1 -1
  479. package/dist/trace/html.js +1 -1
  480. package/dist/trace/query-session.d.ts +1 -1
  481. package/dist/trace/query-session.js +1 -1
  482. package/dist/trace/query.d.ts +1 -1
  483. package/dist/trace/query.js +1 -1
  484. package/dist/trace/types.d.ts +1 -1
  485. package/dist/trace/types.js +1 -1
  486. package/dist/tui/components/settings-list.d.ts +1 -1
  487. package/dist/tui/components/settings-list.js +1 -1
  488. package/docs/README.md +85 -0
  489. package/docs/assets/ama-wordmark-dark.svg +37 -0
  490. package/docs/assets/ama-wordmark-light.svg +37 -0
  491. package/docs/en/README.md +39 -0
  492. package/docs/en/{permissions.md → guides/permissions.md} +14 -14
  493. package/docs/en/{providers.md → guides/providers.md} +13 -12
  494. package/docs/en/{sessions.md → guides/sessions.md} +6 -6
  495. package/docs/en/{tui.md → guides/tui.md} +15 -15
  496. package/docs/en/{acp.md → reference/acp.md} +6 -6
  497. package/docs/en/{host-api.md → reference/host-api.md} +7 -7
  498. package/docs/en/{rpc.md → reference/rpc.md} +13 -13
  499. package/docs/{agents.md → guides/agents.md} +68 -23
  500. package/docs/{codemode.md → guides/codemode.md} +3 -3
  501. package/docs/{hooks.md → guides/hooks.md} +2 -2
  502. package/docs/guides/i18n.md +93 -0
  503. package/docs/{memory.md → guides/memory.md} +1 -1
  504. package/docs/{permissions.md → guides/permissions.md} +2 -2
  505. package/docs/{plan.md → guides/plan.md} +4 -4
  506. package/docs/{providers.md → guides/providers.md} +11 -10
  507. package/docs/{sessions.md → guides/sessions.md} +5 -5
  508. package/docs/{tui.md → guides/tui.md} +8 -8
  509. package/docs/{acp.md → reference/acp.md} +5 -5
  510. package/docs/{host-api.md → reference/host-api.md} +4 -4
  511. package/docs/{rpc.md → reference/rpc.md} +11 -11
  512. package/docs/{session-format.md → reference/session-format.md} +7 -7
  513. package/package.json +12 -23
  514. package/docs/rewind-plan.md +0 -181
  515. package/docs/tui-design.md +0 -764
  516. /package/docs/{sandbox.md → guides/sandbox.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ English · [简体中文](CHANGELOG.zh-CN.md)
5
5
  > This file is in English starting with 0.6.0. Release notes for 0.1 through 0.5.1 are in Chinese in
6
6
  > [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md). New entries go into both files.
7
7
 
8
+ ## 0.8.1 (2026-10-11)
9
+
10
+ ### Maintenance
11
+
12
+ - **Repository moved to the AMA-Link organization**: the source, issues and releases now live at github.com/AMA-Link/armadra-agent; the package metadata, the built-in docs link, the OpenRouter `HTTP-Referer` and the config schema `$id` point there. Old links redirect (#206, #207).
13
+ - **Toolchain**: development uses pnpm 12.8.1 and CI runs single-version jobs on Node 24; the published package still supports Node ≥ 22 and is tested on 22 and 24 (#205).
14
+
15
+ ## 0.8.0 (2026-10-10)
16
+
17
+ ### External agents
18
+
19
+ - **New `pi` driver**: `task(agent="pi")` drives `pi --mode rpc` (verified with pi 1.1.0). pi has no approval channel of its own, so ama loads a minimal extension for that run (`-e`, written to a per-session temp dir and deleted on close; pi's config is untouched) that routes every non-read-only tool call to ama: rejected in `plan` / `allowlist` (which also only enable `read,grep,find,ls`), `edit` / `write` allowed from `auto-edit` up, everything else asks you. Dialogs from your own pi extensions are cancelled, never answered. Two-turn resume, steer, interrupt, USD usage and context occupancy are reported. The community `pi-acp` adapter is not listed: it never sends permission requests (#198).
20
+ - **Cursor CLI listed as unverified**: `task(agent="cursor")` runs `cursor-agent acp` per Cursor's ACP docs (modes `agent` / `plan` / `ask`); not tested locally because it is not installed (#198).
21
+ - **Codex one-shot mode works outside git repos**: `codex exec` / `exec resume` now pass `--skip-git-repo-check` (ama only starts external agents in directories it already trusts); previously they failed immediately in a non-git directory (#198).
22
+ - **ACP adapters no longer stay in a looser mode**: explicit mode maps for claude-agent-acp (`auto-edit` → `acceptEdits`, `full-auto` → `auto`, so a user default of `bypassPermissions` is replaced), codex-acp (`plan` / `default` → `read-only`, `auto-edit` → `workspace-write`, `auto` / `full-auto` → `agent`; `plan` used to refuse to start) and Copilot (URL mode ids `…#plan` / `…#agent`). Modes that open every permission are never chosen (#198).
23
+ - **`model` reaches ACP agents**: `agents.<id>.model` and the `task` `model` argument are now applied through the agent's `model` session config option (matched by value, name, or the model part of `provider/model`); when nothing matches you get a notice and the agent's default model (#198).
24
+ - **Usage numbers corrected**: Codex (app-server and `exec`) and Copilot report input tokens including cache hits, and Copilot's ACP usage is a session total; ama now subtracts the cached part and takes per-turn differences, so totals no longer count cache reads twice. Claude stream-json now reports context occupancy and window like the other drivers (#198).
25
+ - **Verified ranges updated** after a real-CLI audit on 2026-10-10: claude-agent-acp 0.89, codex-acp 2.2, Copilot 1.0.95, OpenCode 1.18, pi 1.1; capability matrix in docs/guides/agents.md, numbers in docs/benchmarks/external-agents-2026-10.md (#198).
26
+ - **`model_unavailable` for ChatGPT models the account cannot use**: a codex-backend 400 "model is not supported when using Codex with a ChatGPT account" now fails with `model_unavailable` and tells you to refresh the list with `ama models discover chatgpt` (the backend withdrew `gpt-6-astra`, which an older discovery cache still listed) (#198).
27
+
8
28
  ## 0.7.6 (2026-10-10)
9
29
 
10
30
  ### Model efficiency
@@ -17,7 +37,7 @@ English · [简体中文](CHANGELOG.zh-CN.md)
17
37
  ### Sessions
18
38
 
19
39
  - **Unreadable session images are reported**: when a downgraded image cannot be read back because the session file was changed by another process, the warning now reaches the session log (`ama: [warn] cannot read session entry …` on stderr, filtered by `AMA_LOG`; a notice in the TUI) instead of being dropped. Warnings raised while the file is being opened are buffered and shown once the session is ready (at most 16, the rest counted); the source session of `--fork` reports through the same log.
20
- - **`subagents.forkMaxContextRatio`**: the share of (window − `compaction.reserveTokens`) above which a fork sub-agent falls back to fresh is now configurable (0.05–0.95, default 0.5, user level only). Built-in types, `general` included, stay fresh by default; docs/agents.md explains the per-turn cost of re-reading the parent context.
40
+ - **`subagents.forkMaxContextRatio`**: the share of (window − `compaction.reserveTokens`) above which a fork sub-agent falls back to fresh is now configurable (0.05–0.95, default 0.5, user level only). Built-in types, `general` included, stay fresh by default; docs/guides/agents.md explains the per-turn cost of re-reading the parent context.
21
41
  - **Fork sub-agents are told `task` / `task_ctl` are unavailable**: the `<task>` message now lists them and asks not to call them (they stay in the tool list and are still rejected by depth). In two DeepSeek retests the sub-agent still made one rejected `task` call each time.
22
42
  - **Background fork tasks report their mode right away**: the `running` result of a background `task` now carries `details.context` (`fork` / `fresh`) once the mode is known; a queued task or one waiting for its worktree still gets it later in `TaskInfo.context`.
23
43
  - **Background `bash` job output fits the session result limit in one cut**: `{job, action: "wait" | "output" | "stop"}` now tail-truncates to the same byte limit as foreground `bash` (50 KB or `maxToolResultChars` − 512, whichever is smaller) instead of a fixed 2000 lines / 50 KB that the session then cut again in the middle; the note still gives the shown line count and `Full output: <path>`.
@@ -43,7 +63,7 @@ English · [简体中文](CHANGELOG.zh-CN.md)
43
63
 
44
64
  ### Model efficiency
45
65
 
46
- Fewer full-price re-reads of the prompt prefix and fewer failed requests (docs/model-efficiency-plan.md; measurements in docs/benchmarks/efficiency-2026-10.md). Grouped by area: sub-agents, prompt prefix and compaction, the request layer, then catalog and tools.
66
+ Fewer full-price re-reads of the prompt prefix and fewer failed requests (docs/history/model-efficiency-plan.md; measurements in docs/benchmarks/efficiency-2026-10.md). Grouped by area: sub-agents, prompt prefix and compaction, the request layer, then catalog and tools.
47
67
 
48
68
  - **Fork-style sub-agents** (`task.context: "fork"`, or `context: fork` in an agent definition; default stays `fresh`): the sub-agent inherits the conversation up to the `task` call, with the same system prompt and tool table as the parent, so its first request reuses the parent's cached prefix (measured on relays: Kimi 97.5% cached, DeepSeek the same as the parent's own next turn). Type tool limits are enforced at execution time instead of changing the tool table. Falls back to `fresh` (logged, `details.context` and `TaskInfo.context` show the actual mode) when another model or thinking level is requested, the parent has not sent a request yet, or the parent context exceeds half of the usable window. The turn-limit final round no longer sends `toolChoice: "none"`, which broke the cached prefix; the report prompt alone asks for no tools.
49
69
  - **The head of the prompt is written once per session**: compaction no longer folds mid-session system patches back into the leading system prompt — the checkpoint replays only what was sent before the conversation started and later patches follow the summary as a `<system-reminder>`, so the first request after compaction has the same system + tools bytes as before. Removing a tool mid-session keeps its declaration in the tool table, adds a reminder that it is no longer available and rejects calls with `Tool "X" is not available in this session.` (also the text for unknown tools, which used to be `Tool X not found`); adding it back only says it is available again. The reminder's closing sentence now also mentions tool availability notes.
@@ -61,7 +81,7 @@ Fewer full-price re-reads of the prompt prefix and fewer failed requests (docs/m
61
81
 
62
82
  ### Memory footprint
63
83
 
64
- Lower peaks with large inputs and long sessions, and closed ACP sessions are freed (docs/memory-plan.md; report in docs/research/memory-2026-10.md, before / after measurements in docs/benchmarks/memory-2026-10.md). Grouped by area: large files and sessions, requests and images, protocol modes, then distribution and limits. Session files, request bytes and tool output are unchanged.
84
+ Lower peaks with large inputs and long sessions, and closed ACP sessions are freed (docs/history/memory-plan.md; report in docs/research/memory-2026-10.md, before / after measurements in docs/benchmarks/memory-2026-10.md). Grouped by area: large files and sessions, requests and images, protocol modes, then distribution and limits. Session files, request bytes and tool output are unchanged.
65
85
 
66
86
  - **`read` on large files no longer loads the whole file**: text files over 1 MiB are scanned in 64 KiB blocks and only the lines being shown are decoded; reading 100 lines of a 256 MB file peaks at about 103 MB instead of 775 MB. Output (line numbers, total line count, truncation notes) is byte-for-byte the same.
67
87
  - **Session list and resume no longer read whole files**: session files are read line by line in chunks. `ama sessions list` (and the resume picker and ACP `session/list`, which share it) only parses each file's header, first entry, renames and first prompt — 4 × 55 MB sessions: about 540 → 88 MB; `--resume` parses line by line without a whole-file string and split array — 55 MB session: about 300 → 218 MB. The listed fields are unchanged.
@@ -119,7 +139,7 @@ Lower peaks with large inputs and long sessions, and closed ACP sessions are fre
119
139
  prompt and tool declarations that are about to be sent (stats only; nothing is written to the session and the request
120
140
  body is unchanged), so a new session no longer shows `Ctx 0.0%`. `SessionStats.context` (`getStats()`, RPC
121
141
  `get_session_stats`) tells where the number comes from (`usage` / `estimate` / `prefix`) and carries the
122
- auto-compaction thresholds `autoCompactAt` / `pruneAt`; absent fields mean "unknown" (docs/sessions.md).
142
+ auto-compaction thresholds `autoCompactAt` / `pruneAt`; absent fields mean "unknown" (docs/guides/sessions.md).
123
143
  - **Status bar**: `full` shows `Ctx 3.0% 8.2k/272k auto` (used / window, `auto` while auto-compaction is on; narrow
124
144
  screens drop `auto`, then `/window`, then the used tokens); estimates get a leading `≈`; the warning color starts at
125
145
  the tier-one pruning threshold; `compact` keeps one decimal below 1%. Ctx refreshes right after a message is submitted
@@ -146,7 +166,7 @@ Lower peaks with large inputs and long sessions, and closed ACP sessions are fre
146
166
  ## 0.7.0 (2026-10-04)
147
167
 
148
168
  ACP completion: `ama --mode acp` as an agent for editors (Zed and other ACP clients) and `AcpClient` / `AcpDriver` as a
149
- client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/acp.md (English: docs/en/acp.md).
169
+ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/reference/acp.md (English: docs/en/reference/acp.md).
150
170
 
151
171
  - **No model, no exit**: without a model `ama --mode acp` no longer exits with code 4. It answers `initialize` (two
152
172
  terminal auth methods when the client declares `clientCapabilities.auth.terminal`: their `args`,
@@ -192,7 +212,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
192
212
  withdrawing a pending permission request closes the approval and answers `cancelled`. `AcpDriver` falls back to a
193
213
  `mode`-category config option when an agent has no `modes`, reports -32000 as `agent_auth_required` listing the
194
214
  agent's auth methods (terminal ones with the command to run), treats -32800 after a cancel as `cancelled`, and counts
195
- `diff` paths in `filesTouched`. Docs: docs/agents.md.
215
+ `diff` paths in `filesTouched`. Docs: docs/guides/agents.md.
196
216
  - **Types and tests**: the ACP types gain `authenticate`, `$/cancel_request`, -32800, terminal auth methods, client
197
217
  `session` / `auth` capabilities, tool call `name` / `_meta`, `config_option_update` and `ACP_META_KEY` (exported from
198
218
  `@armadra/agent/acp`); the prompt `usage` is marked UNSTABLE; select config options are either all flat or all grouped
@@ -211,14 +231,14 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
211
231
  to `accept` / `decline` / `cancel`; pending ones resolve `cancel` on `cancel(sessionId)` or connection close). New
212
232
  `setConfigOption(sessionId, configId, value)` and `configOptions` on session-open results. `AcpClient.features` gains
213
233
  `elicitation` and `configOptions`. Without a handler the wire is unchanged. The fake ACP agent adds `[elicit]`, `[model]`
214
- and `[env NAME]` markers and `--config-options`. Docs: docs/acp.md.
234
+ and `[env NAME]` markers and `--config-options`. Docs: docs/reference/acp.md.
215
235
 
216
236
  ## 0.6.7 (2026-10-03)
217
237
 
218
238
  - **A host runner with id `ama` is used**: when the host registers a runner for `ama` via `HostApi.runners.provide`
219
239
  (for example another ama node on an Armadra canvas), `task(agent="ama")` now goes to it instead of being unknown; without
220
240
  one nothing changes, and the built-in types (`general` / `explore` / `plan`) are always ama sub-sessions. Docs:
221
- docs/agents.md.
241
+ docs/guides/agents.md.
222
242
 
223
243
  ## 0.6.6 (2026-10-03)
224
244
 
@@ -229,15 +249,15 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
229
249
  (e.g. `pattern "src/*"`), otherwise a file inside it. In `-p` with the `minimal` / `coordinator` preset, a denied bash
230
250
  `grep` / `rg` / `find` adds one stderr line on how to bring the tools back (`tools.default: ["+grep","+glob"]`). Tools
231
251
  get the session's active tool set as the optional, read-only `ToolContext.activeTools`. This changes the `default`
232
- prefix (about +35 tokens), so the first request after upgrading misses the cache once. Docs: docs/design.md §5.6,
233
- docs/codemode.md.
252
+ prefix (about +35 tokens), so the first request after upgrading misses the cache once. Docs: docs/design/design.md §5.6,
253
+ docs/guides/codemode.md.
234
254
 
235
255
  ## 0.6.5 (2026-10-03)
236
256
 
237
257
  - **`AcpClient` can pass MCP servers when opening a session**: `newSession`, `resumeSession` and `loadSession` take an
238
258
  optional third argument `{ mcpServers }` that is forwarded as-is in `session/new|resume|load` (default still `[]`, the
239
259
  wire is unchanged when it is omitted). `AcpClient.features.mcpServers` lets a host detect support. ama itself still
240
- sends none. Docs: docs/acp.md "As a client".
260
+ sends none. Docs: docs/reference/acp.md "As a client".
241
261
 
242
262
  ## 0.6.4 (2026-10-03)
243
263
 
@@ -251,7 +271,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
251
271
  external agent is interrupted when its driver can cancel a single turn (ACP, Claude stream-json, Codex) and otherwise the
252
272
  message is queued with a hint. Line mode accepts `/interrupt <text>`; RPC `prompt` / `steer` and the SDK take
253
273
  `interrupt: true`. The new request keeps the interrupted request as its prefix, so the cache keeps hitting. Docs:
254
- docs/tui.md, docs/rpc.md.
274
+ docs/guides/tui.md, docs/reference/rpc.md.
255
275
  - **Status line split into sides; quota labels fixed**: the `full` layout now keeps state and switches on the left and
256
276
  metrics and the model on the right. The rate line's left side holds `codemode on` (with `net!`) · sandbox · preset ·
257
277
  `→ fallback model` · queue count · host status, and its right side `tps … (avg · ttft) · ↑ ↓ · cache · re-billing · [-]`;
@@ -259,7 +279,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
259
279
  narrow, right-side metrics drop before left-side switches; the permission mode, `tps` and `[-]` never drop; the
260
280
  single-line `compact` layout keeps its token order. Quota labels follow the window length: a weekly window sent as
261
281
  primary reads `Weekly` instead of `7d:`, and the 5-hour window comes first; the all-zero "no such window" the server
262
- sends is no longer rendered as `0d: 0.0%` (filtered both when parsing and when rendering). Docs: docs/tui.md.
282
+ sends is no longer rendered as `0d: 0.0%` (filtered both when parsing and when rendering). Docs: docs/guides/tui.md.
263
283
 
264
284
  ## 0.6.3 (2026-10-03)
265
285
 
@@ -272,7 +292,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
272
292
  line (line mode too). Esc interrupts only the foreground and says which background tasks keep running. Approvals of
273
293
  background tasks no longer pop up while the main session is busy or the input box has a draft: they dock in the agent bar
274
294
  ("needs approval", running line `↓ handle approval`) and pop up once the main session is idle with an empty input, or
275
- when you open that task's view; approvals of the main session and of foreground tasks are unchanged. Docs: docs/tui.md.
295
+ when you open that task's view; approvals of the main session and of foreground tasks are unchanged. Docs: docs/guides/tui.md.
276
296
  - **Background sub-agents: config, `-p` and RPC**: new `subagents.background: "auto" | "always" | "never"` (default auto:
277
297
  task runs in the background by default in the TUI / RPC / ACP and in the foreground with `-p`; the call argument and the
278
298
  agent type's `background:` take precedence) and `subagents.autoBackgroundAfterMs` (move a foreground task to the background
@@ -280,7 +300,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
280
300
  tasks are still running after the main turn, `-p` prints one stderr line and waits for them and their notification turns
281
301
  before printing the result (bounded by `--max-turns` / `--max-cost`, exit 8 at the limit; Ctrl+C still stops); the json
282
302
  result carries `tasks`. RPC adds `background_task { taskId? }` → `{ backgrounded }` and the `subagent_background` event
283
- (44 commands), and the SDK `session.backgroundTask(taskId?)`. Docs: docs/agents.md, docs/rpc.md.
303
+ (44 commands), and the SDK `session.backgroundTask(taskId?)`. Docs: docs/guides/agents.md, docs/reference/rpc.md.
284
304
  - **Agent bar is reachable again**: `↓` on an empty input is now the only default key into the agent bar and works whenever
285
305
  the session has tasks, even after the bar collapsed (it used to require the bar to be visible). `Ctrl+B` no longer enters
286
306
  the bar (tmux's default prefix swallowed it); it is reserved for moving foreground tasks to the background and still moves
@@ -314,7 +334,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
314
334
  placeholder until the first request, siwc without data and non-subscription models show nothing). `compact` only appends a
315
335
  short `5h 10% wk 31%` item at the end, keeping the existing order. The `full` lines are recolored after the reference (dim
316
336
  labels; purple rates, durations and reset times; blue model, thinking level and amounts; green directory and branch; yellow
317
- cost; threshold-colored percentages), and the branch shows `↑N` / `↓N` ahead of / behind its upstream. Docs: docs/tui.md
337
+ cost; threshold-colored percentages), and the branch shows `↑N` / `↓N` ahead of / behind its upstream. Docs: docs/guides/tui.md
318
338
  "Layout".
319
339
  - **Startup header with an AMA logo and a short light-up animation**: the boxed info block is replaced by a 5-row "AMA" logo
320
340
  (block characters, colored letter by letter with the theme's accent → user → tool; a `_ / \ |` version in ASCII mode) with
@@ -322,7 +342,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
322
342
  two-line header is shown. On startup a one-off sweep of about a second lights the logo up and settles in place, leaving no
323
343
  frames in the scrollback; any key settles it at once and still reaches the input box. It does not play with
324
344
  `ui.animation: false`, without colors, outside a TTY, in an embedding host, under `CI`, with a command-line prompt or in a
325
- short terminal. New `ui.logo: "auto" | "off"` (off shows only the info lines). Docs: docs/en/tui.md "Startup screen".
345
+ short terminal. New `ui.logo: "auto" | "off"` (off shows only the info lines). Docs: docs/en/guides/tui.md "Startup screen".
326
346
 
327
347
  ## 0.6.2 (2026-10-03)
328
348
 
@@ -339,7 +359,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
339
359
  lists the likely causes (plan, workspace account, region or preview rollout — the most likely one for Pro accounts) and
340
360
  suggests `--flavor codex`; a siwc login notes that eligibility is only confirmed on the first request. Also fixed: an
341
361
  unlisted slug with an explicit `@channel` (`chatgpt/<slug>@siwc`) kept the default channel's endpoint. Docs:
342
- docs/en/providers.md "ChatGPT login".
362
+ docs/en/guides/providers.md "ChatGPT login".
343
363
 
344
364
  ## 0.6.1 (2026-10-03)
345
365
 
@@ -353,7 +373,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
353
373
  (read-only, no usage) into `<dataDir>/models/discovered/chatgpt.json`, `ama models discover chatgpt` rewrites it and
354
374
  logout deletes it; the registry merges the cache into providers with an empty model table, so ChatGPT models appear in
355
375
  `/model` and `ama models list`. Note: with only a ChatGPT sign-in and no `defaultModel`, the first cached ChatGPT model can
356
- now be chosen as the default model. Docs: docs/en/tui.md, docs/en/providers.md "ChatGPT login".
376
+ now be chosen as the default model. Docs: docs/en/guides/tui.md, docs/en/guides/providers.md "ChatGPT login".
357
377
 
358
378
  - **`ama auth login chatgpt` explains a refused sign-in**: when the OAuth callback carries `error=access_denied` (or another
359
379
  error) the message now lists the likely causes (the authorization page was cancelled or plan usage was not checked; the
@@ -370,7 +390,7 @@ client, checked in-repo against the official ACP v1 schema 1.24.1. Docs: docs/ac
370
390
  ## 0.6.0 (2026-10-03)
371
391
 
372
392
  Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/config` settings panel, and a bilingual
373
- (Chinese / English) interface. The design and decision table are in docs/wave6-plan.md; current docs per topic are linked below.
393
+ (Chinese / English) interface. The design and decision table are in docs/history/wave6-plan.md; current docs per topic are linked below.
374
394
 
375
395
  ### Breaking changes and upgrade notes
376
396
 
@@ -407,7 +427,7 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
407
427
 
408
428
  ### Agent bar and sub-agent view
409
429
 
410
- - **Agent bar** ([docs/en/tui.md](docs/en/tui.md) "Agent bar"): sub-agent tasks are listed above the status line (queued /
430
+ - **Agent bar** ([docs/en/guides/tui.md](docs/en/guides/tui.md) "Agent bar"): sub-agent tasks are listed above the status line (queued /
411
431
  running · elapsed · turns · latest tool / awaiting approval / done / failed / stopped), at most 3 lines plus "N more"; finished
412
432
  tasks stay until viewed, at most 10 minutes. Enter it with `Ctrl+B` or `↓` on an empty input (key action `app.agents.focus`;
413
433
  with text `Ctrl+B` still moves the cursor left; use `↓` in tmux), ↑↓ to select, Enter to open. Hidden by default in embedding
@@ -423,23 +443,23 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
423
443
  - **Timing on disk**: every model request records an `ama.trace` entry (time to first token, decode, tools, retry waits,
424
444
  fallbacks, compaction, auxiliary requests); sub-sessions measure time to first token and throughput too. Ids, times and counts
425
445
  only, no content.
426
- - **`/trace`** ([docs/en/tui.md](docs/en/tui.md) "Traces"): turn → request → tool → sub-call / sub-agent, each row with duration,
446
+ - **`/trace`** ([docs/en/guides/tui.md](docs/en/guides/tui.md) "Traces"): turn → request → tool → sub-call / sub-agent, each row with duration,
427
447
  TTFT / decode / tool bars, tokens and cache hits; Enter for details; sub-agents expand into their sub-sessions; long sessions
428
448
  load from the tail and follow while running; `/trace <task id>` for one task; line mode prints a text tree. Older sessions
429
449
  without timing records are estimated from entry times and marked `≈`, without changing the session file.
430
- - **`ama sessions trace <id|file>`** ([docs/en/sessions.md](docs/en/sessions.md) "Traces"): exports a self-contained single-file
450
+ - **`ama sessions trace <id|file>`** ([docs/en/guides/sessions.md](docs/en/guides/sessions.md) "Traces"): exports a self-contained single-file
431
451
  HTML page (tree + waterfall, TTFT / decode / tool colors, nested sub-agents and external agents, search, jump to turn, zoom,
432
452
  details, virtual list, light and dark; inline styles and script with a CSP that blocks all external loads; data and content
433
453
  redacted twice and the data block escaped against injection). `--json` prints the same shape as `get_trace`, `--no-content`
434
454
  keeps only structure and numbers, `--children` embeds child-session previews, `--open` opens a browser and `--now` pins the
435
455
  generation time (byte-for-byte deterministic output).
436
- - **RPC `get_trace`** ([docs/en/rpc.md](docs/en/rpc.md) "Traces"): tail-first paging (`turnLimit` / `before`), increments by
456
+ - **RPC `get_trace`** ([docs/en/reference/rpc.md](docs/en/reference/rpc.md) "Traces"): tail-first paging (`turnLimit` / `before`), increments by
437
457
  `since` (driven by `entry_appended`), `taskId` sub-traces and redacted previews with `content: "preview"`; 43 RPC commands in
438
458
  total. SDK `session.trace()`; the pure function `buildTrace()` and the `Trace` type are exported from the package entry.
439
459
 
440
460
  ### Memory
441
461
 
442
- - Cross-session memory ([docs/memory.md](docs/memory.md), Chinese), **off by default**: enable with `ama memory enable`,
462
+ - Cross-session memory ([docs/guides/memory.md](docs/guides/memory.md), Chinese), **off by default**: enable with `ama memory enable`,
443
463
  `--memory` or `AMA_MEMORY=1`. Entries are Markdown files with frontmatter under
444
464
  `<data dir>/memory/{user,projects/<dir>-<sha8>}/`, with an auto-rebuilt `MEMORY.md` index; the project scope requires a
445
465
  trusted project; when disabled the request body is byte-for-byte unchanged.
@@ -454,7 +474,7 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
454
474
 
455
475
  ### ChatGPT login
456
476
 
457
- - `ama auth login chatgpt` drives ama with your own ChatGPT Plus / Pro plan ([docs/en/providers.md](docs/en/providers.md)
477
+ - `ama auth login chatgpt` drives ama with your own ChatGPT Plus / Pro plan ([docs/en/guides/providers.md](docs/en/guides/providers.md)
458
478
  "ChatGPT login"). By default it uses OpenAI's official Sign in with ChatGPT (dynamic registration, id_token verified against
459
479
  JWKS); `--flavor codex` is an opt-in fallback (borrowing the Codex CLI public client after a one-time "unofficial, personal use
460
480
  only" confirmation). `--paste` pastes the callback URL (SSH / hosts), `--device` uses a device code (codex only);
@@ -470,7 +490,7 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
470
490
 
471
491
  ### `/config` and `ama config`
472
492
 
473
- - **`/config` settings panel** ([docs/en/tui.md](docs/en/tui.md) "The `/config` settings panel and `ama config`"): lists scalar
493
+ - **`/config` settings panel** ([docs/en/guides/tui.md](docs/en/guides/tui.md) "The `/config` settings panel and `ama config`"): lists scalar
474
494
  settings by group with their effective value, source (default / user / profile / project / cli / env) and when a change takes
475
495
  effect (immediately / new session / restart); ↑↓ Enter / Space to change, `/` to search, Tab to switch the target layer
476
496
  (project level may only tighten), overridden items marked locked. Changes are written at once (re-read before writing, one key
@@ -492,9 +512,9 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
492
512
  validation diagnostics, and `ama init` output all follow it. Chinese output is unchanged word for word; compact status line
493
513
  notation (`ctx`, `cache`, `$`, `↑ ↓`) is not translated; JSON fields of RPC and `-p --output-format json` do not change.
494
514
  `config.schema.json` descriptions are written in the current language; run `ama init` again after switching.
495
- - **Hosts decide by `code`** and must never parse the human-readable `error` / `message` ([docs/en/rpc.md](docs/en/rpc.md)).
515
+ - **Hosts decide by `code`** and must never parse the human-readable `error` / `message` ([docs/en/reference/rpc.md](docs/en/reference/rpc.md)).
496
516
  - **Bilingual docs**: `docs/en/` adds English versions of `tui`, `permissions`, `providers`, `rpc`, `host-api` and `sessions`
497
- (each header records the Chinese commit it translates); development conventions are in [docs/i18n.md](docs/i18n.md) (Chinese).
517
+ (each header records the Chinese commit it translates); development conventions are in [docs/guides/i18n.md](docs/guides/i18n.md) (Chinese).
498
518
 
499
519
  ### Other fixes and improvements
500
520
 
@@ -510,7 +530,7 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
510
530
 
511
531
  ### Interfaces, tests and release
512
532
 
513
- - Wave 6 contracts (docs/wave6-plan.md §7, all optional and backward compatible): the `Trace` type and `buildTrace()`, SDK
533
+ - Wave 6 contracts (docs/history/wave6-plan.md §7, all optional and backward compatible): the `Trace` type and `buildTrace()`, SDK
514
534
  `session.trace()` and the `memory` option, RPC `get_trace` (optional result fields `task` and `previews`), the `quota_update`
515
535
  event, `oauth` in `KeySource`, OAuth entries in `auth.json`, and the config keys `ui.language` / `ui.replyLanguage` /
516
536
  `ui.agentBar` / `memory.*` / `auth.chatgpt.*` (written to `config.schema.json`).
@@ -521,7 +541,7 @@ Wave 6: the agent bar and sub-agent view, traces, memory, ChatGPT login, the `/c
521
541
  - New bundle-level e2e: `ama auth status` without entries, deterministic `ama sessions trace --html` without external links,
522
542
  `AMA_LANG=en -p` requests byte-identical to zh, `ama config set / get / unset` round trips, and a `--memory` write visible in
523
543
  `ama memory list`.
524
- - The npm package now also ships `docs/memory.md` and `docs/en/*.md`.
544
+ - The npm package now also ships `docs/guides/memory.md` and `docs/en/*.md`.
525
545
 
526
546
  ### Known limitations
527
547