Teknium
244f70aae5
fix(agent): scope install-tree guard to fallback-picked cwds, allow cli/tui in-tree dev
...
Follow-up on the salvaged #64611 commit: the original guard blocked the
install tree unconditionally, which would have broken the legitimate
'developing Hermes from a source clone' CLI flow (launching hermes inside
the repo and getting its AGENTS.md as project context).
Refined policy:
- resolve_context_cwd(): validates configured paths (missing dir -> None +
warning) but honors an EXPLICIT install-tree cwd verbatim — deliberate
user choice.
- build_context_files_prompt(): blocks only the cwd=None -> os.getcwd()
FALLBACK into the install tree, with a new allow_install_tree_fallback
param. system_prompt.py passes it for platform cli/tui (launch dir is
the user's real shell cwd there); desktop/gateway surfaces keep the
guard (their fallback dir is self-spawned, never user-picked).
- Warning log names the resolved dir and the terminal.cwd remedy.
E2E-verified all five scenarios: desktop fallback blocked, in-tree CLI dev
keeps AGENTS.md, explicit install-tree cwd honored, invalid TERMINAL_CWD
falls to None then blocked, normal workspace loads.
2026-07-16 04:32:23 -07:00
..
2026-06-30 16:22:18 -07:00
2026-07-15 09:47:37 -07:00
2026-07-14 03:23:19 -07:00
2026-07-12 00:26:49 -07:00
2026-07-01 01:36:34 -07:00
2026-06-27 19:14:43 -07:00
2026-06-17 13:20:29 +05:30
2026-06-23 23:59:40 -07:00
2026-07-04 15:16:13 +05:30
2026-07-06 12:46:20 -07:00
2026-06-26 19:15:18 -07:00
2026-07-04 15:44:50 -07:00
2026-06-26 11:21:05 +05:30
2026-07-15 07:47:18 -07:00
2026-06-27 21:22:49 -07:00
2026-07-01 17:00:30 +05:30
2026-07-02 04:51:56 +05:30
2026-07-16 04:23:12 -07:00
2026-07-16 04:23:12 -07:00
2026-06-29 01:27:10 -07:00
2026-07-06 12:46:20 -07:00
2026-07-05 19:23:26 -07:00
2026-07-02 01:09:37 -07:00
2026-06-14 02:09:16 -07:00
2026-07-15 09:59:38 -07:00
2026-07-08 01:51:05 +05:30
2026-07-07 14:54:50 +05:30
2026-06-19 01:53:32 +05:30
2026-07-05 14:00:20 -07:00
2026-06-27 11:43:08 -07:00
2026-06-25 12:24:34 -05:00
2026-07-01 17:08:59 +05:30
2026-07-06 12:46:20 -07:00
2026-07-15 09:47:37 -07:00
2026-07-15 04:55:48 -07:00
2026-06-30 00:59:59 -05:00
2026-07-14 02:19:40 +05:30
2026-07-11 22:59:49 +05:30
2026-06-12 16:47:15 -07:00
2026-07-14 00:14:55 +05:30
2026-06-21 11:34:47 -07:00
2026-07-15 12:28:09 -07:00
2026-06-20 21:32:30 -07:00
2026-06-25 12:56:05 -07:00
2026-06-22 15:51:52 +05:30
2026-07-14 02:19:40 +05:30
2026-07-08 11:56:17 -07:00
2026-07-01 18:23:01 +05:30
2026-07-15 09:47:04 -07:00
2026-06-22 16:26:56 +05:30
2026-07-05 21:42:19 +05:30
2026-06-29 09:18:10 -04:00
2026-07-01 02:48:32 -07:00
2026-07-16 14:34:03 +05:30
2026-07-14 02:19:40 +05:30
2026-07-01 13:36:50 +05:30
2026-07-01 02:43:49 -07:00
2026-06-30 00:19:49 -07:00
2026-07-14 17:09:40 +05:30
2026-07-13 23:20:48 +05:30
2026-07-01 02:45:07 -07:00
2026-07-12 03:00:53 -07:00
2026-07-07 14:54:50 +05:30
2026-07-12 23:07:02 -07:00
2026-06-12 01:06:46 -07:00
2026-06-12 08:51:10 +00:00
2026-06-12 08:51:10 +00:00
2026-07-11 11:07:34 +05:30
2026-06-17 05:40:05 -07:00
2026-07-05 13:42:46 -07:00
2026-07-10 18:32:32 +05:30
2026-06-13 02:01:09 -07:00
2026-07-12 23:30:52 -07:00
2026-06-25 00:17:17 -07:00
2026-07-10 19:14:06 +05:30
2026-07-10 19:14:06 +05:30
2026-06-17 17:32:14 -07:00
2026-07-16 00:27:39 +05:30
2026-06-20 10:46:01 -07:00
2026-07-16 00:18:38 -07:00
2026-07-01 01:02:35 -07:00
2026-07-05 13:44:33 -07:00
2026-07-13 22:26:19 -07:00
2026-07-05 03:15:03 -07:00
2026-07-11 05:59:42 -07:00
2026-06-30 03:20:11 -07:00
2026-07-14 16:47:33 +05:30
2026-06-30 16:56:01 -07:00
2026-06-30 11:54:16 -05:00
2026-07-01 16:25:48 -05:00
2026-06-30 15:16:25 -05:00
2026-07-16 14:34:03 +05:30
2026-07-05 13:42:46 -07:00
2026-07-09 03:21:54 +05:30
2026-06-25 02:17:29 +05:30
2026-06-16 10:37:37 -07:00
2026-06-22 07:00:42 -07:00
2026-06-19 15:23:41 +08:00
2026-07-04 20:59:02 +05:30
2026-07-01 06:02:33 -07:00
2026-07-15 00:11:04 -07:00
2026-06-30 03:39:50 -07:00
2026-06-30 03:39:50 -07:00
2026-07-01 04:07:46 -07:00
2026-06-30 03:27:12 -07:00
2026-07-09 14:08:44 +05:30
2026-07-09 19:57:43 -07:00
2026-06-13 05:51:41 -07:00
2026-07-02 17:05:05 +05:30
2026-07-09 21:10:07 -07:00
2026-06-12 08:51:10 +00:00
2026-06-23 08:01:50 +00:00
2026-06-30 15:41:44 -05:00
2026-06-25 00:44:53 -05:00
2026-07-08 06:18:18 -07:00
2026-06-18 14:28:01 -07:00
2026-07-16 01:13:43 -07:00
2026-06-25 01:20:23 +05:30
2026-07-09 14:08:44 +05:30
2026-07-16 04:32:23 -07:00
2026-07-09 14:35:14 +05:30
2026-07-10 05:41:59 -05:00
2026-07-09 15:04:14 +05:30
2026-07-05 13:58:19 -07:00
2026-07-11 05:41:58 -07:00
2026-06-27 20:04:45 -07:00
2026-07-16 04:32:23 -07:00
2026-06-19 07:34:15 -07:00
2026-06-30 00:59:29 -05:00
2026-07-05 14:48:11 -07:00
2026-06-26 19:15:18 -07:00
2026-07-14 16:41:21 +05:30
2026-07-09 02:41:24 +05:30
2026-06-13 21:14:32 -07:00
2026-07-02 04:51:56 +05:30
2026-07-01 04:55:15 -07:00
2026-07-15 00:10:22 -07:00
2026-06-16 09:50:17 -05:00
2026-07-16 04:32:23 -07:00
2026-07-16 01:07:29 +05:30
2026-06-25 19:00:48 -07:00
2026-06-30 17:28:33 -07:00
2026-07-01 04:18:48 -07:00
2026-06-28 02:44:06 -07:00
2026-07-11 05:41:58 -07:00
2026-07-11 05:41:58 -07:00
2026-07-07 15:12:49 -07:00
2026-07-14 02:59:39 +05:30
2026-07-14 03:32:45 +05:30
2026-06-22 13:57:59 -07:00
2026-07-14 03:32:46 +05:30
2026-06-23 23:52:28 -07:00
2026-07-10 11:53:58 +05:30
2026-07-01 05:25:33 -07:00
2026-07-16 04:23:12 -07:00
2026-07-16 04:23:12 -07:00
2026-07-16 04:24:14 -07:00
2026-06-24 23:03:45 -05:00
2026-07-01 02:26:06 -07:00
2026-07-12 04:32:52 -07:00
2026-06-30 00:59:29 -05:00
2026-07-02 06:07:56 +05:30
2026-07-14 02:59:39 +05:30