Move pack-specific scripts into their pack repos

scripts/outlook-auth.py, playwright-browsers.py, and simplex-address.py now
live in pack.outlook/pack.browser/pack.simplex under scripts/. bootstrap.sh,
the Outlook bridge hints, and the docs reference packs/<name>/scripts/; the
Outlook auth helper locates the checkout (and its default token path) by
walking up to the semif_agent package.
This commit is contained in:
gabby committed 2026-10-13 22:21:06 +00:00
1 parent 1329de42c4
commit 16e8583921
11 files changed
+27 -385

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ and `outlook_bridge_token` from `ctx.config` and calls a documented route.
There is no service daemon and no third-party dependency: Graph is plain HTTPS,
so the bridge is stdlib-only (`urllib`) and starts instantly, like Nextcloud.
Authorization is the OAuth2 device code flow, run once with
`scripts/outlook-auth.py`; the resulting tokens are stored (0600) under the
`packs/outlook/scripts/outlook-auth.py`; the resulting tokens are stored (0600) under the
checkout's `.runtime/outlook/token.json`. The bridge starts without them and an
unauthenticated route returns 503 telling the operator to run that helper.
@@ -116,7 +116,7 @@ class OutlookBridge(BridgeService):
"any request -> 401 {\"error\": \"unauthorized\"} when the token is "
"configured and the auth header is missing or wrong",
"503 {\"error\": \"...\"} when the bridge is not authenticated "
"(run scripts/outlook-auth.py) or has no client id configured; 502 "
"(run packs/outlook/scripts/outlook-auth.py) or has no client id configured; 502 "
"{\"error\": \"...\"} on a real Microsoft Graph failure (transport, "
"HTTP error, or bad reply)",
),
@@ -198,7 +198,7 @@ class OutlookBridge(BridgeService):
return 503, {
"error": (
"the Outlook bridge has no connection configured (set "
"bridges.outlook.client_id, then run scripts/outlook-auth.py)"
"bridges.outlook.client_id, then run packs/outlook/scripts/outlook-auth.py)"
)
}
+2 -2
View File
@@ -10,7 +10,7 @@ Authorization is the OAuth2 **device code flow** (a public client: no secret):
`run_device_code_flow` prints a code the user enters at a Microsoft URL, then
stores the resulting access + refresh tokens. The bridge starts without a token;
the first authenticated call raises `OutlookAuthRequired`, which the bridge maps
to a 503 telling the operator to run `scripts/outlook-auth.py`. Every other
to a 503 telling the operator to run `packs/outlook/scripts/outlook-auth.py`. Every other
failure is an `OutlookError` carrying the HTTP status when there was one, so the
bridge maps it to a 502 (a real Graph failure) rather than a fabricated success.
@@ -49,7 +49,7 @@ DEFAULT_SCOPES = (
TOKEN_REFRESH_SKEW = 120.0
MAX_PAGES = 20
MAX_RETRIES = 3
AUTH_HINT = "run scripts/outlook-auth.py to authorize Outlook"
AUTH_HINT = "run packs/outlook/scripts/outlook-auth.py to authorize Outlook"
class OutlookError(Exception):
+1 -1
View File
@@ -715,7 +715,7 @@ def _gateway_address_callback(adapter):
"""Return an `on_connected` coroutine that prints the bot's contact link once.
A human cannot reach the gateway without the bot's SimpleX contact address,
and the only thing that surfaced it before was `scripts/simplex-address.py`
and the only thing that surfaced it before was `packs/simplex/scripts/simplex-address.py`
run once at provision time. Print it on connect, from the operator front end
(the CLI), through the daemon the gateway already owns — show-or-create, no
second connection, no new transport surface. The lookup is best-effort: a