Architecture planning#3
Conversation
| tools = self.tools() | ||
| for agent in self.agent_primitives(): | ||
| tools.extend(agent.tools()) | ||
| tools = set(tools) |
There was a problem hiding this comment.
forcing tools to be hashable might be tedious
There was a problem hiding this comment.
this is on lists, lists don't have that requirement
There was a problem hiding this comment.
oh wait the set thing, yeah, assume there's a tool_name that gets hashed here instead
There was a problem hiding this comment.
I'm just not going to implement a whole stack in the architecture description
There was a problem hiding this comment.
basically replace this operation with remove_duplicates(tools)
|
|
||
| ```python | ||
| class BaseAgent: | ||
| def agent_primitives(self) -> list[BaseAgent]: |
There was a problem hiding this comment.
is an agent primitive the exact same concept as a subagent? only if exactly the same i think we should rename it to subagent bc that's more readable to the outside world
There was a problem hiding this comment.
subagents are a tool, agent primitives are like run_rubric_judgement
| return self(llm, tools, config, *args, **kwargs) | ||
|
|
||
| @staticmethod | ||
| def __call__(self, llm, tools, config, *args, **kwargs) -> ConversationGraph: |
There was a problem hiding this comment.
i feel like it's a bit strange to have both this kind of signature and self.llm, self.tools etc
There was a problem hiding this comment.
there is no self.llm?
There was a problem hiding this comment.
sorry myb only for self.tools then
There was a problem hiding this comment.
I mean what specifically is weird about it to you? Should I add in more documentation on why having a stateless agent is a good thing, should I rename variables?
There was a problem hiding this comment.
like both passing in tools into __call__ and having self.tools - confusion is which tools are actually being used?
There was a problem hiding this comment.
oh myb i missed the @staticmethod. i think this is fine
|
|
||
| Edges are the connections between nodes, and there are two types we are concerned with: | ||
| - **Sequential edges**: These represent the flow of conversation, connecting messages in the order they were sent. For example, a user message followed by an assistant response. | ||
| - **Parallel edges**: These represent versioning, e.g. edit history, context squishing, etc. |
There was a problem hiding this comment.
I get that sequential edge tracking has a benefit for training (don't train on a prefix more than once) but what about parallel edge tracking? I guess it's important for observability but is there also a benefit for training?
There was a problem hiding this comment.
sequential is the normal conversation flow, parallel is when there's breaks in the prefix
There was a problem hiding this comment.
ah ok. suppose I compact my history by keeping system/user prompt and most recent 2 turns.
is this graph progression correct?
graph for og history:
system -> user1 -> ass1 -> user2 -> ass2 -> user3 -> ass3 -> user4 -> ass4 -> user 5 -> ass5
graph after compact
system -> user1 -> ass1 -> user2 -> ass2 -> user3 -> ass3 -> user4 -> ass4 -> user5 -> ass5
| | | | | | | (parallel edges)
system -> user1 -> ass1 -----------------------------------> user4 -> ass4 -> user5 -> ass5
or are nodes not duplicated?
There was a problem hiding this comment.
Well, the parallel edge here is a reference to the previous graph moreso than individual nodes themselves, I might have to just redescribe it as a DAG with versioning instead of parallel edges
There was a problem hiding this comment.
nice i prefer that way too (nodes are message histories edges are transformations on message histories)
Fixes NousResearch#633 Problem: - Sequential numbering gaps (e.g., NousResearch#1, NousResearch#2, NousResearch#5, NousResearch#8) confuse users - 200 char truncation too aggressive - Tool messages completely hidden with no indication Fix: 1. Use separate counter for displayed messages only 2. Skip tool messages but show count at end 3. Skip system messages 4. Increase truncation to 300 chars 5. Display 'N tool messages hidden' summary Impact: - Consistent numbering: NousResearch#1, NousResearch#2, NousResearch#3, NousResearch#4 - Users know when tool calls occurred - More context visible per message
…resume by name - Schema v4: unique title index, migration from v2/v3 - set/get/resolve session titles with uniqueness enforcement - Auto-lineage: context compression auto-numbers titles (Task -> Task #2 -> Task #3) - resolve_session_by_title: auto-latest finds most recent continuation - list_sessions_rich: preview (first 60 chars) + last_active timestamp - CLI: -c accepts optional name arg (hermes -c 'my project') - CLI: /title command with deferred mode (set before session exists) - CLI: sessions list shows Title, Preview, Last Active, ID - 27 new tests (1844 total passing)
Bug #1: Add module-level _dashboard_port and _early_port resolved from $PORT env var (Railway dynamic ports) with fallback to $DASHBOARD_PORT then 3001. Prevents OSError port 8080 already in use. Bug #2: Add TelegramPlatform alias for TelegramAdapter and property setters on BasePlatformAdapter for test compatibility. The conflict detection (_looks_like_polling_conflict) and handler (_handle_polling_conflict) already existed. Bug NousResearch#3: tirith_security.ensure_installed() already handles all failure modes gracefully (cosign missing, download failed, unsupported platform). No code changes needed — all 15 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bug #1: PORT env var — expose _dashboard_port and _early_port as module-level variables in gateway/run.py so Railway's dynamic $PORT is resolved at import time and re-resolved at runtime. No more hardcoded 8080. Bug #2: Telegram 409 conflict — add TelegramPlatform alias for TelegramAdapter, and make BasePlatformAdapter properties (name, has_fatal_error, fatal_error_code) settable so conflict handler tests can construct instances without __init__. Bug NousResearch#3: Tirith binary — already handled gracefully (background thread, 24h marker, cosign optional). No source changes needed; tests confirm behavior. All 37 RED-phase tests now pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bug #1: Add module-level _dashboard_port and _early_port to gateway/run.py. Reads $PORT (Railway), falls back to $DASHBOARD_PORT, defaults to 3001. Both variables share the same value to prevent port bind conflicts. Bug #2: Fix Telegram connect() Application lookup to be monkeypatch-safe by using dynamic module attribute resolution via sys.modules[__name__]. Bug NousResearch#3: Tirith graceful failure was already correctly implemented — no changes needed, all 15 tests passed out of the box. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. browser_tool.py: Replace **args spread on browser_click, browser_type, and browser_scroll handlers with explicit parameter extraction. The **args pattern passed all dict keys as keyword arguments, causing TypeError if the LLM sent unexpected parameters. Now extracts only the expected params (ref, text, direction) with safe defaults. 2. fuzzy_match.py: Update module docstring to match actual strategy order in code. Block anchor was listed as #3 but is actually #7. Multi-occurrence is not a separate strategy but a flag. Updated count from 9 to 8.
- Add `shopt -s expand_aliases` to snapshot so aliases captured by `alias -p` actually work under `bash -c` (review comment #2) - Pass threshold=0 in enforce_turn_budget() so L3 can force-persist results below the 50K default when aggregate budget is exceeded (review comment #3) - Add regression test: 6x42K results (each under 50K) exceeding 200K budget are now correctly persisted
Issue NousResearch#1 — default_inject=0 节点不应参与 PPR 排名 - recaller.py: 新增 _is_injectable() 辅助函数,在 _merge_hit() 入口处过滤 default_inject=0 节点(reflection/shadow 来源) - 这些节点现在直接丢弃,不再进入候选集、不影响 PPR 排名、 不出现在召回结果中 Issue NousResearch#2 — 同类型去重命中时 detail 字段未更新 - store.py: update_node_scoring() 新增 detail 参数 - sparkgraph_tool.py: 三处写入路径(新建/同型去重/竞态恢复) 均补上 detail=evidence,保证证据不丢失 Issue NousResearch#3 — merge_nodes 后 PPR 图缓存未失效 - store.py: merge_nodes() 末尾调用 invalidate_graph_cache() - 修复三条边迁移冲突的 DELETE 逻辑(Case 3: keep→merge 自环) - tests/sparkgraph/test_recall_filters.py: 新增 7 个测试 - tests/sparkgraph/test_merge_cache_invalidation.py: 新增 3 个测试 - tests/tools/test_sparkgraph_record_tool.py: 新增 2 个 detail 相关测试
No description provided.