Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_external.py +25 -2
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v75",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "90e9dba",
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v75",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
90e9dba
|
api/routes_external.py
CHANGED
|
@@ -3021,6 +3021,30 @@ _MCP_GUIDE_SPEC = {
|
|
| 3021 |
}
|
| 3022 |
|
| 3023 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3024 |
def _mcp_tool_specs() -> list[dict]:
|
| 3025 |
"""tools/list: the guide first, then the registry, each with its read or write hint."""
|
| 3026 |
specs = [_MCP_GUIDE_SPEC]
|
|
@@ -3070,8 +3094,7 @@ def _handle_mcp(req, session: Session, base_url: str = ""):
|
|
| 3070 |
return protocol_error(rid, -32601, "The requested MCP method was not found.")
|
| 3071 |
if name == MCP_GUIDE_TOOL:
|
| 3072 |
return _mcp_content(rid, {"ok": True, "data": {
|
| 3073 |
-
"instructions": MCP_INSTRUCTIONS,
|
| 3074 |
-
"guide": _portable_skill_document(session, base_url or "https://runloopable.com")}})
|
| 3075 |
arguments = params.get("arguments", {})
|
| 3076 |
for database in _databases_in_arguments(arguments):
|
| 3077 |
_assert_database_scope(session, database)
|
|
|
|
| 3021 |
}
|
| 3022 |
|
| 3023 |
|
| 3024 |
+
def _mcp_guide(session: Session) -> str:
|
| 3025 |
+
"""`loopable_guide`'s answer: the rules, this user's databases and every tool, in one read.
|
| 3026 |
+
|
| 3027 |
+
⛔ NO ROWS ARE READ. The first version lent the per-user skill.md, which reads EVERY database
|
| 3028 |
+
through the Assistant path to list its fields: measured on staging at 52 s and 57 KB, too
|
| 3029 |
+
slow for a tool whose whole job is to be called first. Fields are one describe_database call
|
| 3030 |
+
away, for the one database the question is about.
|
| 3031 |
+
"""
|
| 3032 |
+
lines = ["# Loopable guide", "", f"Signed in as {session.uname}.", "", MCP_INSTRUCTIONS, "",
|
| 3033 |
+
"## Your databases", "",
|
| 3034 |
+
"Call describe_database with a key below for its fields before you query it.", ""]
|
| 3035 |
+
rows = [row for row in _resolve_external_scope(session) if row["permitted"]]
|
| 3036 |
+
for row in rows:
|
| 3037 |
+
note = "" if row["answerable"] else f" Not queryable right now: {_markdown_inline(row['reason'])}"
|
| 3038 |
+
lines.append(f"- `{row['database']}`: {_markdown_inline(row['label'])}.{note}")
|
| 3039 |
+
if not rows:
|
| 3040 |
+
lines.append("- No databases are available to this account.")
|
| 3041 |
+
lines += ["", "## Tools", ""]
|
| 3042 |
+
for key, tool in external_tools.TOOLS.items():
|
| 3043 |
+
kind = "writes, preview then confirm_change" if tool["write"] else "read only"
|
| 3044 |
+
lines.append(f"- `{key}` ({kind}): {_markdown_inline(tool['description'])}")
|
| 3045 |
+
return chr(10).join(lines) + chr(10)
|
| 3046 |
+
|
| 3047 |
+
|
| 3048 |
def _mcp_tool_specs() -> list[dict]:
|
| 3049 |
"""tools/list: the guide first, then the registry, each with its read or write hint."""
|
| 3050 |
specs = [_MCP_GUIDE_SPEC]
|
|
|
|
| 3094 |
return protocol_error(rid, -32601, "The requested MCP method was not found.")
|
| 3095 |
if name == MCP_GUIDE_TOOL:
|
| 3096 |
return _mcp_content(rid, {"ok": True, "data": {
|
| 3097 |
+
"instructions": MCP_INSTRUCTIONS, "guide": _mcp_guide(session)}})
|
|
|
|
| 3098 |
arguments = params.get("arguments", {})
|
| 3099 |
for database in _databases_in_arguments(arguments):
|
| 3100 |
_assert_database_scope(session, database)
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
23555450aa86a7ba0717801c838311f8338328143c11cccde4838b62854f6b56
|