-
Notifications
You must be signed in to change notification settings - Fork 4
feat: web domain allowlist and markdown report rendering #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c3c8731
feat(wire): add ToolExecutionStarted and ToolOutputPart events for li…
elkaix 4748fc5
fix(agents): guard against out-of-policy lint findings in explore/pla…
elkaix 1f47119
docs: add agent live tool stream design spec
elkaix c1419b6
docs: add agent live tool stream implementation plan
elkaix f68f050
feat(blocks): add subagent output tracking state and methods to _Tool…
elkaix fd13a88
test: sync default agent-spec snapshot with explore.yaml lint policy
elkaix 14e3c96
fix(tui): refine markdown report rendering
elkaix 0f7e049
feat(agent): guide output formatting and anchor date awareness
elkaix 999ec63
refactor(blocks): align subagent output methods with peer guards, add…
elkaix 92018ad
feat(web): add fetch/search domain allowlist
elkaix c613490
test(web): add domain-allowlist fetch tests and tool-description/conf…
elkaix 539d365
merge: web fetch/search domain allowlist into unified branch
elkaix 3d5835b
merge: markdown rendering, date awareness, and agent output tracking …
elkaix f348913
fix(typos): unparseable -> unparsable in tasks/todo.md to satisfy spe…
elkaix c6d3bc0
fix: address CodeRabbit review findings on web allowlist and markdown
elkaix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| """Domain allowlist matching shared by the web fetch and search tools.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
|
|
||
| def _normalize(entry: str) -> str: | ||
| return entry.strip().strip(".").lower() | ||
|
|
||
|
|
||
| def host_in_allowlist(host: str | None, allowed: list[str] | None) -> bool: | ||
| """Return whether *host* is permitted by the *allowed* domain list. | ||
|
|
||
| A ``None`` or empty allowlist imposes no restriction (returns ``True``), | ||
| preserving unconfigured behavior. Otherwise a host matches when it equals an | ||
| allowlist entry or is a subdomain of one. Matching is label-aware and | ||
| case-insensitive: ``example.com`` matches ``example.com`` and | ||
| ``docs.example.com`` but not ``notexample.com``. | ||
| """ | ||
| entries = [normalized for entry in (allowed or []) if (normalized := _normalize(entry))] | ||
| if not entries: | ||
| return True | ||
|
|
||
| host = (host or "").strip().rstrip(".").lower() | ||
| if not host: | ||
| return False | ||
|
|
||
| return any(host == entry or host.endswith(f".{entry}") for entry in entries) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| Fetch a web page from a URL and extract main text content from it. | ||
| Fetch a web page from a URL and extract main text content from it. Requests may be restricted to a configured set of allowed domains; fetching a disallowed host (including via a redirect) returns an error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| WebSearch tool allows you to search on the internet to get latest information, including news, documents, release notes, blog posts, papers, etc. | ||
| WebSearch tool allows you to search on the internet to get latest information, including news, documents, release notes, blog posts, papers, etc. Results may be limited to a configured set of allowed domains. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.