Add microsoft-365 domain skill#371
Open
cipher982 wants to merge 2 commits into
Open
Conversation
Captures hard-won knowledge for agents working with Microsoft 365: - Full Entra cookie host list including login.microsoft.com and login.windows.net aliases (missing either causes silent re-auth) - Modern CDP CookieParam fields agents should forward when syncing auth (partitionKey object form, sourceScheme, sourcePort, priority) - SharePoint REST /_api/search/query — the SELECT_PROPERTIES list and how to call it from a same-origin tab - The raw .loop file download trap (binary Fluid container; navigating triggers a download modal) and the working ServerRedirectedURL Loop-viewer DOM extraction path - Auth-redirect probe pattern: cookies-on-disk != working auth - Session timeout shapes (ESTSAUTH/ESTSAUTHPERSISTENT KMSI 24h vs 90d)
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/browser_harness/helpers.py">
<violation number="1" location="src/browser_harness/helpers.py:190">
P1: `assert_page_domain` passes when both `expected_domain` and `host` are empty, so a falsy/unset expected value combined with a hostless page (e.g. `about:blank`) silently succeeds instead of failing closed.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| raise RuntimeError(f"assert_page_domain: page has pending dialog: {info['dialog']}") | ||
| host = (urlparse(info.get("url") or "").hostname or "").lower() | ||
| expected = (expected_domain or "").removeprefix("*.").removeprefix(".").lower() | ||
| ok = host == expected or (allow_subdomains and host.endswith(f".{expected}")) |
Contributor
There was a problem hiding this comment.
P1: assert_page_domain passes when both expected_domain and host are empty, so a falsy/unset expected value combined with a hostless page (e.g. about:blank) silently succeeds instead of failing closed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/browser_harness/helpers.py, line 190:
<comment>`assert_page_domain` passes when both `expected_domain` and `host` are empty, so a falsy/unset expected value combined with a hostless page (e.g. `about:blank`) silently succeeds instead of failing closed.</comment>
<file context>
@@ -175,6 +175,28 @@ def page_info():
+ raise RuntimeError(f"assert_page_domain: page has pending dialog: {info['dialog']}")
+ host = (urlparse(info.get("url") or "").hostname or "").lower()
+ expected = (expected_domain or "").removeprefix("*.").removeprefix(".").lower()
+ ok = host == expected or (allow_subdomains and host.endswith(f".{expected}"))
+ if not ok:
+ raise RuntimeError(
</file context>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
.loopdownload trap andServerRedirectedURLnavigation path.Validation
Summary by cubic
Adds Microsoft 365 domain skill docs for SharePoint Online and Loop to help agents authenticate, search, and read Loop docs without download traps. Adds a browser harness domain assertion to fail fast when the active tab is on the wrong domain.
/_api/search/queryfrom a same-origin tab; useServerRedirectedURLfor navigation..looplinks; useloop.cloud.microsoftviewer and simple text extraction.assert_page_domainto validate cookies and target site before actions.Written for commit 19a6ffa. Summary will update on new commits.