Use Phast app for product names and preserve phast wordplay
This commit is contained in:
1 parent
1f15789abd
commit
64d2374f60
7 files changed
+51
-28
No files matched your search
@@ -95,7 +95,7 @@ def path(value: str) -> Path:
|
||||
def read(value: str) -> dict[str, Any]:
|
||||
p = path(value)
|
||||
if not p.exists():
|
||||
raise KeyError("unknown Phast")
|
||||
raise KeyError("unknown Phast app")
|
||||
return json.loads(p.read_text())
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ def write(value: str, data: dict[str, Any]) -> dict[str, Any]:
|
||||
def mine(value: str) -> dict[str, Any]:
|
||||
data = read(value)
|
||||
if data.get("owner") != actor():
|
||||
raise PermissionError("not your Phast")
|
||||
raise PermissionError("not your Phast app")
|
||||
return data
|
||||
|
||||
|
||||
@@ -180,14 +180,14 @@ def human(data: dict[str, Any]) -> str:
|
||||
'<!doctype html><meta name="viewport" content="width=device-width">'
|
||||
+ "<title>"
|
||||
+ data["name"]
|
||||
+ " - phast</title>"
|
||||
+ " - Phast app</title>"
|
||||
+ "<style>body{margin:0;background:#f5f3ee;color:#121211;font:14px system-ui}"
|
||||
+ "main{max-width:1000px;margin:auto;padding:32px}header{display:flex;justify-content:space-between}"
|
||||
+ "b{font-size:28px}em{color:#ff4d00}h1{font-size:72px;letter-spacing:-5px;margin:80px 0 40px}"
|
||||
+ "section{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}"
|
||||
+ "article{border:1px solid #d5d1c8;padding:18px;min-height:150px}p{color:#77746c}"
|
||||
+ "@media(max-width:700px){section{grid-template-columns:1fr}}</style>"
|
||||
+ "<main><header><b>phast<em>.</em></b><code>"
|
||||
+ "<main><header><b>Phast app<em>.</em></b><code>"
|
||||
+ data["host"]
|
||||
+ "/mcp</code></header><h1>"
|
||||
+ data["name"]
|
||||
@@ -198,9 +198,9 @@ def human(data: dict[str, Any]) -> str:
|
||||
|
||||
|
||||
m = FastMCP(
|
||||
"My Phast",
|
||||
"My Phast app",
|
||||
version="0.2.0",
|
||||
instructions="Create and manage portable Phast MCP tool belts and Prefab homes.",
|
||||
instructions="Create and manage portable Phast app MCP tool belts and Prefab homes.",
|
||||
auth=auth("https://my.phast.app"),
|
||||
mask_error_details=True,
|
||||
)
|
||||
@@ -317,7 +317,7 @@ def inst(value: str):
|
||||
personal = FastMCP(
|
||||
data["name"],
|
||||
version="0.2.0",
|
||||
instructions="Portable personal Phast MCP.",
|
||||
instructions="Portable personal Phast app MCP.",
|
||||
auth=auth("https://my.phast.app", "https://" + data["host"]),
|
||||
mask_error_details=True,
|
||||
)
|
||||
@@ -385,7 +385,7 @@ class Router:
|
||||
try:
|
||||
data = read(value)
|
||||
except Exception:
|
||||
await JSONResponse({"error": "unknown Phast"}, status_code=404)(scope, receive, send)
|
||||
await JSONResponse({"error": "unknown Phast app"}, status_code=404)(scope, receive, send)
|
||||
return
|
||||
|
||||
if request_path == "/" and method in {"GET", "HEAD"}:
|
||||
|
||||
Reference in new issue
Block a user