Commit 63faa85
authored
feat(soul): agent logic upgrade (#149)
* fix(update): improve native update flow (#64)
* feat(soul): port blackbox agent-loop observability and session tools
Add wire events for todo updates, tool skips, subagent fallback, agent-list
deltas, and overflow recovery. Wire opt-in ToolUseSkipped telemetry,
AgentList injection, budget nudge, microcompact pruning, ToolSearch
discovery, session worktree enter/exit, and opt-in harvest-on-stop memory
capture. Update changelog, architecture docs, and tests.
* feat(toolset): surface cross-step dedup via ToolUseSkipped wire event
Add opt-in emits_tool_use_skipped hook for cross-step duplicate visibility,
pin exclusive default for unflagged plugin tools, and document the gate contract.
* feat(todo): emit TodoListUpdated wire event on write/read
* feat(agent): emit SubagentToolFallback wire event on unknown type
* feat(soul): emit ContextOverflowRecovered wire event; assert one-shot reactive retry
* feat(soul): add opt-in token-budget nudge (config-gated, one-shot per turn)
* docs(agent): add brief hygiene note to Agent tool description
* docs: changelog + architecture note for agent-loop best-practice port
* test: refresh inline snapshots for agent-loop port
* test: refresh default agent snapshot for hygiene note
* test: align agent-loop port tests with wire and fail-fast semantics
* test(e2e): refresh wire snapshots for TodoListUpdated events
* chore(test): fix ruff/pyright and format snapshot refresh files
* fix(soul): resolve merge duplicates from blackbox port integration
Drop duplicate budget-nudge, ToolUseSkipped emit paths, and conflicting
tests introduced when merging feat/blackbox-agent-loop-port into main.
* fix(wire): remove duplicate ContextOverflowRecovered class definition
* test: refresh snapshots for new worktree/tool_search tools and AgentListDelta wire events
* test: fix ruff formatting and refresh wire snapshots for agent-logic-upgrade
4 files were unformatted (ruff would-reformat). 5 e2e snapshot tests were
stale after new slash commands (/recap, /accept-edits, /goal, /learn,
/best-practices) and skill entries were added to the wire initialize handshake.
* fix: address PR #149 review comments from code-quality and security bots
- ci-pythinker-host.yml: add workflow-level `permissions: contents: read`
- llm.py: use urlparse hostname check instead of substring match for dashscope
and workspace endpoint detection (prevents false positives from path segments)
- dependencies.py: remove duplicate '=' from _VERSION_PREFIX_RE character class
- test_memory_phase_bcd.py: consolidate to single import style for pythinkersoul module
- test_toolset.py: replace standalone awaits with gather/assignment forms
- test_toolset_concurrency.py: remove always-true redundant assertion
- examples/feedback-worker/index.ts: replace .+? with [^<]*? to prevent ReDoS
* fix(examples): linear parseMailbox to avoid polynomial ReDoS
CodeQL flagged the angle-bracket regex in the feedback-worker example as a
polynomial regular expression on uncontrolled header input. Replace it with
an indexOf/slice parse that is linear in input length while preserving the
"Name <addr>" parsing behavior.1 parent 920d998 commit 63faa85
51 files changed
Lines changed: 2869 additions & 1243 deletions
File tree
- .cursor/rules
- .github/workflows
- docs
- en
- customization
- release-notes
- superpowers/plans
- examples/feedback-worker/src
- packages/pythinker-review/src/pythinker_review/security_scan
- src/pythinker_code
- agents/default
- prompts
- soul
- dynamic_injections
- tools
- agent
- todo
- tool_search
- worktree
- wire
- tests_e2e
- tests
- core
- tools
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
18 | 40 | | |
19 | 41 | | |
20 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
| |||
0 commit comments