Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_sheet.py +26 -8
- api/routes_tables.py +9 -0
- platform/core/route_system.py +1 -1
- platform/core/user_tables.py +3 -2
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "e7aa88be1",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
e7aa88be1
|
api/routes_sheet.py
CHANGED
|
@@ -1541,16 +1541,29 @@ def activity_read_policy(session: Session, object):
|
|
| 1541 |
return False
|
| 1542 |
workbook = object["workbook"]
|
| 1543 |
addresses = object["id"]
|
| 1544 |
-
if not isinstance(
|
|
|
|
| 1545 |
return False
|
| 1546 |
-
|
| 1547 |
-
|
| 1548 |
-
|
| 1549 |
-
|
| 1550 |
-
|
| 1551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1552 |
return False
|
| 1553 |
-
tabs =
|
|
|
|
| 1554 |
for address in addresses:
|
| 1555 |
if not isinstance(address, str) or "!" not in address:
|
| 1556 |
return False
|
|
@@ -1565,6 +1578,10 @@ def activity_read_policy(session: Session, object):
|
|
| 1565 |
if column > int(tab.get("cols", 0)) or int(match[2]) > int(tab.get("rows", 0)):
|
| 1566 |
return False
|
| 1567 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1568 |
admitted = {}
|
| 1569 |
|
| 1570 |
def cell_allowed(cell):
|
|
@@ -1633,6 +1650,7 @@ def activity_read_policy(session: Session, object):
|
|
| 1633 |
return False
|
| 1634 |
position = page.get("next_cursor")
|
| 1635 |
if position is None:
|
|
|
|
| 1636 |
return True
|
| 1637 |
remaining -= min(activity_log.MAX_PAGE, remaining)
|
| 1638 |
return False
|
|
|
|
| 1541 |
return False
|
| 1542 |
workbook = object["workbook"]
|
| 1543 |
addresses = object["id"]
|
| 1544 |
+
if (not isinstance(workbook, str) or not isinstance(addresses, list)
|
| 1545 |
+
or not addresses or len(addresses) > 1000):
|
| 1546 |
return False
|
| 1547 |
+
memo = getattr(session, "_sheet_read_memo", None)
|
| 1548 |
+
books = memo.setdefault("activity_workbooks", {}) if isinstance(memo, dict) else {}
|
| 1549 |
+
identity = (session.tenant, session.uname, id(session.runtime), workbook)
|
| 1550 |
+
if identity not in books:
|
| 1551 |
+
# A refused workbook stays refused for this principal and request only.
|
| 1552 |
+
books[identity] = None
|
| 1553 |
+
book = sheets.get_workbook(_store(session), workbook)
|
| 1554 |
+
_require_reader(session, book)
|
| 1555 |
+
claims = session.claims or {}
|
| 1556 |
+
access, databases = external_access.scope_of({"access": claims.get("external_access"),
|
| 1557 |
+
"databases": claims.get("external_databases")})
|
| 1558 |
+
if access == external_access.ACCESS_REFRESH and workbook not in claims.get("external_workbooks", []):
|
| 1559 |
+
return False
|
| 1560 |
+
books[identity] = {"tabs": {tab["id"]: tab for tab in book.get("sheets", [])},
|
| 1561 |
+
"databases": databases}
|
| 1562 |
+
context = books[identity]
|
| 1563 |
+
if context is None:
|
| 1564 |
return False
|
| 1565 |
+
tabs = context["tabs"]
|
| 1566 |
+
databases = context["databases"]
|
| 1567 |
for address in addresses:
|
| 1568 |
if not isinstance(address, str) or "!" not in address:
|
| 1569 |
return False
|
|
|
|
| 1578 |
if column > int(tab.get("cols", 0)) or int(match[2]) > int(tab.get("rows", 0)):
|
| 1579 |
return False
|
| 1580 |
|
| 1581 |
+
# Addresses stay event-specific even when all current and historical cells are admitted once.
|
| 1582 |
+
if "values_allowed" in context:
|
| 1583 |
+
return context["values_allowed"]
|
| 1584 |
+
context["values_allowed"] = False
|
| 1585 |
admitted = {}
|
| 1586 |
|
| 1587 |
def cell_allowed(cell):
|
|
|
|
| 1650 |
return False
|
| 1651 |
position = page.get("next_cursor")
|
| 1652 |
if position is None:
|
| 1653 |
+
context["values_allowed"] = True
|
| 1654 |
return True
|
| 1655 |
remaining -= min(activity_log.MAX_PAGE, remaining)
|
| 1656 |
return False
|
api/routes_tables.py
CHANGED
|
@@ -511,6 +511,15 @@ def _activity_cursor(session, query, position=None, token=None):
|
|
| 511 |
def query_activity(session: Session, *, object=None, by=None, since=None, until=None,
|
| 512 |
cursor=None, limit=100, scan_limit=10000):
|
| 513 |
"""Read a session-bound activity page through both activity and current source permissions."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 514 |
from core import activity_log, perm_scope
|
| 515 |
|
| 516 |
key = activity_log.DATABASE_KEY
|
|
|
|
| 511 |
def query_activity(session: Session, *, object=None, by=None, since=None, until=None,
|
| 512 |
cursor=None, limit=100, scan_limit=10000):
|
| 513 |
"""Read a session-bound activity page through both activity and current source permissions."""
|
| 514 |
+
import routes_sheet
|
| 515 |
+
with routes_sheet._sheet_request_scope(session):
|
| 516 |
+
return _query_activity_page(session, object=object, by=by, since=since, until=until,
|
| 517 |
+
cursor=cursor, limit=limit, scan_limit=scan_limit)
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
def _query_activity_page(session: Session, *, object=None, by=None, since=None, until=None,
|
| 521 |
+
cursor=None, limit=100, scan_limit=10000):
|
| 522 |
+
"""Resolve one activity page within its caller's request scope."""
|
| 523 |
from core import activity_log, perm_scope
|
| 524 |
|
| 525 |
key = activity_log.DATABASE_KEY
|
platform/core/route_system.py
CHANGED
|
@@ -101,7 +101,7 @@ def field_axes(field):
|
|
| 101 |
limits = dict(field.get("limits") or {})
|
| 102 |
limits["maxOptions"] = MAX_OPTIONS
|
| 103 |
field["limits"] = limits
|
| 104 |
-
if ftype == "json":
|
| 105 |
field["label"] = "Table"
|
| 106 |
return field
|
| 107 |
|
|
|
|
| 101 |
limits = dict(field.get("limits") or {})
|
| 102 |
limits["maxOptions"] = MAX_OPTIONS
|
| 103 |
field["limits"] = limits
|
| 104 |
+
if ftype == "json" and not str(field.get("label") or "").strip():
|
| 105 |
field["label"] = "Table"
|
| 106 |
return field
|
| 107 |
|
platform/core/user_tables.py
CHANGED
|
@@ -3365,6 +3365,9 @@ def _clean_field(raw, previous=None, recurrence_validator=None, valid_keys=None)
|
|
| 3365 |
str(raw.get('key') or prev.get('key') or _slug(label)).strip().lower())
|
| 3366 |
key = key.strip('_')[:60]
|
| 3367 |
ftype = str(raw.get('type') or prev.get('type') or 'text').strip().lower()
|
|
|
|
|
|
|
|
|
|
| 3368 |
if not key or not label or ftype not in UT_FIELD_TYPES:
|
| 3369 |
return None
|
| 3370 |
origin = str(raw.get('origin') if 'origin' in raw else prev.get('origin') or 'user')
|
|
@@ -3374,8 +3377,6 @@ def _clean_field(raw, previous=None, recurrence_validator=None, valid_keys=None)
|
|
| 3374 |
return None
|
| 3375 |
out = {'key': key, 'label': label, 'type': ftype, 'source': 'overlay', 'kind': ftype,
|
| 3376 |
'origin': origin, 'valueAuthority': authority, 'scope': scope}
|
| 3377 |
-
if ftype == 'json':
|
| 3378 |
-
out['label'] = 'Table'
|
| 3379 |
if bool(raw.get('deletionLocked') if 'deletionLocked' in raw else prev.get('deletionLocked')):
|
| 3380 |
out['deletionLocked'] = True
|
| 3381 |
# ⭐ 2026-08-10 — the DISPLAY format, on the add/patch door too. ⚠ `'format' in raw` rather than
|
|
|
|
| 3365 |
str(raw.get('key') or prev.get('key') or _slug(label)).strip().lower())
|
| 3366 |
key = key.strip('_')[:60]
|
| 3367 |
ftype = str(raw.get('type') or prev.get('type') or 'text').strip().lower()
|
| 3368 |
+
if ftype == 'json':
|
| 3369 |
+
label_raw = raw.get('label') if 'label' in raw else prev.get('label')
|
| 3370 |
+
label = ' '.join(str(label_raw or '').split())[:80] or 'Table'
|
| 3371 |
if not key or not label or ftype not in UT_FIELD_TYPES:
|
| 3372 |
return None
|
| 3373 |
origin = str(raw.get('origin') if 'origin' in raw else prev.get('origin') or 'user')
|
|
|
|
| 3377 |
return None
|
| 3378 |
out = {'key': key, 'label': label, 'type': ftype, 'source': 'overlay', 'kind': ftype,
|
| 3379 |
'origin': origin, 'valueAuthority': authority, 'scope': scope}
|
|
|
|
|
|
|
| 3380 |
if bool(raw.get('deletionLocked') if 'deletionLocked' in raw else prev.get('deletionLocked')):
|
| 3381 |
out['deletionLocked'] = True
|
| 3382 |
# ⭐ 2026-08-10 — the DISPLAY format, on the add/patch door too. ⚠ `'format' in raw` rather than
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
02a11b588d633739fa714937a4f10d7b746424ef63fb5c49c525ddd524a3cf60
|