Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/schedule_envelope.py +1 -1
- api/tool_groups/sheet.py +16 -0
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
- web/src/assistant/AssistantPage.tsx +2 -1
- web/src/connectors/DatabasesTab.tsx +2 -1
- web/src/filter-kit/scopeLimit.ts +2 -2
- web/src/home/homeModel.ts +2 -1
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "300a34ef5",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
300a34ef5
|
api/schedule_envelope.py
CHANGED
|
@@ -263,7 +263,7 @@ def render(envelope):
|
|
| 263 |
f"{envelope['rowCount']} rows." + (" " + ", ".join(totals) + "." if totals else ""),
|
| 264 |
f"{len(envelope['entered'])} entered, {len(envelope['left'])} left.",
|
| 265 |
f"{len(table['rows'])} of {table['total']} shown" + (" (groups)." if table["unit"] == "groups" else "."),
|
| 266 |
-
"Open in
|
| 267 |
for name in ("entered", "left"):
|
| 268 |
if envelope[name]:
|
| 269 |
text.insert(-1, name.title() + ": " + ", ".join(
|
|
|
|
| 263 |
f"{envelope['rowCount']} rows." + (" " + ", ".join(totals) + "." if totals else ""),
|
| 264 |
f"{len(envelope['entered'])} entered, {len(envelope['left'])} left.",
|
| 265 |
f"{len(table['rows'])} of {table['total']} shown" + (" (groups)." if table["unit"] == "groups" else "."),
|
| 266 |
+
"Open in Table: " + envelope["dataLink"]]
|
| 267 |
for name in ("entered", "left"):
|
| 268 |
if envelope[name]:
|
| 269 |
text.insert(-1, name.title() + ": " + ", ".join(
|
api/tool_groups/sheet.py
CHANGED
|
@@ -31,10 +31,20 @@ def _readable_workbooks(ctx):
|
|
| 31 |
return sorted(rows.values(), key=lambda row: (row["name"], row["id"]))
|
| 32 |
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
def workbook_list(ctx, args):
|
| 35 |
"""Page every currently readable workbook identity without a total result cap."""
|
| 36 |
from routes_external import _decode_query_cursor, _encode_query_cursor, _json_digest
|
| 37 |
|
|
|
|
|
|
|
|
|
|
| 38 |
rows = _readable_workbooks(ctx)
|
| 39 |
query = _json_digest({"action": "sheet.workbook.list"})
|
| 40 |
snapshot = _json_digest(rows)
|
|
@@ -53,6 +63,9 @@ def workbook_get(ctx, args):
|
|
| 53 |
from deps import err
|
| 54 |
|
| 55 |
ctx.session.require("sheets")
|
|
|
|
|
|
|
|
|
|
| 56 |
if ("workbook_id" in args) == ("name" in args):
|
| 57 |
raise err(400, "tool_arguments_invalid", "Send either workbook_id or an exact name.")
|
| 58 |
if "workbook_id" in args:
|
|
@@ -161,10 +174,13 @@ for name, handler, properties in (
|
|
| 161 |
("workbook.get", workbook_get, {
|
| 162 |
"workbook_id": {"type": "string", "minLength": 1},
|
| 163 |
"name": {"type": "string", "minLength": 1}})):
|
|
|
|
|
|
|
| 164 |
GROUP["actions"][name] = {
|
| 165 |
"read": True, "destructive": False, "confirm": False, "grants": ("sheets",), "handler": handler,
|
| 166 |
"schema": {"type": "object", "description": handler.__doc__, "properties": properties,
|
| 167 |
"additionalProperties": False},
|
|
|
|
| 168 |
}
|
| 169 |
GROUP["actions"]["workbook.view"] = {
|
| 170 |
"read": True, "destructive": False, "confirm": True, "grants": ("sheets",),
|
|
|
|
| 31 |
return sorted(rows.values(), key=lambda row: (row["name"], row["id"]))
|
| 32 |
|
| 33 |
|
| 34 |
+
def _released_shape(ctx, verb, args):
|
| 35 |
+
"""Answer a call in the released verb-in-arguments shape (D-9630) through the legacy object door."""
|
| 36 |
+
if "action" not in args and "arguments" not in args:
|
| 37 |
+
return None
|
| 38 |
+
return external_tools.dispatch(ctx, "workbook_object", {**args, "action": verb})
|
| 39 |
+
|
| 40 |
+
|
| 41 |
def workbook_list(ctx, args):
|
| 42 |
"""Page every currently readable workbook identity without a total result cap."""
|
| 43 |
from routes_external import _decode_query_cursor, _encode_query_cursor, _json_digest
|
| 44 |
|
| 45 |
+
released = _released_shape(ctx, "list", args)
|
| 46 |
+
if released is not None:
|
| 47 |
+
return released
|
| 48 |
rows = _readable_workbooks(ctx)
|
| 49 |
query = _json_digest({"action": "sheet.workbook.list"})
|
| 50 |
snapshot = _json_digest(rows)
|
|
|
|
| 63 |
from deps import err
|
| 64 |
|
| 65 |
ctx.session.require("sheets")
|
| 66 |
+
released = _released_shape(ctx, "get", args)
|
| 67 |
+
if released is not None:
|
| 68 |
+
return released
|
| 69 |
if ("workbook_id" in args) == ("name" in args):
|
| 70 |
raise err(400, "tool_arguments_invalid", "Send either workbook_id or an exact name.")
|
| 71 |
if "workbook_id" in args:
|
|
|
|
| 174 |
("workbook.get", workbook_get, {
|
| 175 |
"workbook_id": {"type": "string", "minLength": 1},
|
| 176 |
"name": {"type": "string", "minLength": 1}})):
|
| 177 |
+
# The released D-9630 shape stays accepted: the verb inside arguments, its options nested.
|
| 178 |
+
properties = {**properties, "action": {"enum": [name.rsplit(".", 1)[-1]]}, "arguments": {"type": "object"}}
|
| 179 |
GROUP["actions"][name] = {
|
| 180 |
"read": True, "destructive": False, "confirm": False, "grants": ("sheets",), "handler": handler,
|
| 181 |
"schema": {"type": "object", "description": handler.__doc__, "properties": properties,
|
| 182 |
"additionalProperties": False},
|
| 183 |
+
"available": lambda operation=name: _object_available(operation),
|
| 184 |
}
|
| 185 |
GROUP["actions"]["workbook.view"] = {
|
| 186 |
"read": True, "destructive": False, "confirm": True, "grants": ("sheets",),
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
0f3b9319b1d5688b6ced051f3cde4b11c88660354a88155e614579e6bbed6a6a
|
web/src/assistant/AssistantPage.tsx
CHANGED
|
@@ -403,7 +403,8 @@ export function ScheduledResult({ result }: { result: ScheduledResultEnvelope })
|
|
| 403 |
</tr>)}</tbody>
|
| 404 |
</table>
|
| 405 |
</div>
|
| 406 |
-
{result.dataLink?.startsWith("#/
|
|
|
|
| 407 |
</> : <p className="as-scheduled-meta" role="status">{worklistText(result.message || "The saved query could not run.")}</p>}
|
| 408 |
</section>;
|
| 409 |
}
|
|
|
|
| 403 |
</tr>)}</tbody>
|
| 404 |
</table>
|
| 405 |
</div>
|
| 406 |
+
{result.dataLink?.startsWith("#/table?") || result.dataLink?.startsWith("#/data?")
|
| 407 |
+
? <a className="as-scheduled-link" href={result.dataLink}>Open in Table</a> : null}
|
| 408 |
</> : <p className="as-scheduled-meta" role="status">{worklistText(result.message || "The saved query could not run.")}</p>}
|
| 409 |
</section>;
|
| 410 |
}
|
web/src/connectors/DatabasesTab.tsx
CHANGED
|
@@ -760,7 +760,8 @@ interface DependentKind {
|
|
| 760 |
}
|
| 761 |
|
| 762 |
function dependentHref(value: unknown): string | null {
|
| 763 |
-
return typeof value === "string"
|
|
|
|
| 764 |
? value : null;
|
| 765 |
}
|
| 766 |
|
|
|
|
| 760 |
}
|
| 761 |
|
| 762 |
function dependentHref(value: unknown): string | null {
|
| 763 |
+
return typeof value === "string"
|
| 764 |
+
&& (value.startsWith("#/table?") || value.startsWith("#/data?") || value.startsWith("#/sheet?"))
|
| 765 |
? value : null;
|
| 766 |
}
|
| 767 |
|
web/src/filter-kit/scopeLimit.ts
CHANGED
|
@@ -138,9 +138,9 @@ export function fetchScopeLimits(): Promise<ScopeLimit[]> {
|
|
| 138 |
return promise;
|
| 139 |
}
|
| 140 |
|
| 141 |
-
/** The database a Data or App route names (`#/
|
| 142 |
export function dataRouteDatabase(hash: string): string | null {
|
| 143 |
-
const prefix = ["#/data?", "#/app?"].find((p) => hash.startsWith(p));
|
| 144 |
if (!prefix) return null;
|
| 145 |
try {
|
| 146 |
return new URLSearchParams(hash.slice(prefix.length)).get("database") || null;
|
|
|
|
| 138 |
return promise;
|
| 139 |
}
|
| 140 |
|
| 141 |
+
/** The database a Table (or legacy Data) or App route names (`#/table?database=<key>`), or null anywhere else. */
|
| 142 |
export function dataRouteDatabase(hash: string): string | null {
|
| 143 |
+
const prefix = ["#/table?", "#/data?", "#/app?"].find((p) => hash.startsWith(p));
|
| 144 |
if (!prefix) return null;
|
| 145 |
try {
|
| 146 |
return new URLSearchParams(hash.slice(prefix.length)).get("database") || null;
|
web/src/home/homeModel.ts
CHANGED
|
@@ -21,6 +21,7 @@
|
|
| 21 |
// component reads the clock once and hands the numbers in here.
|
| 22 |
// ---------------------------------------------------------------------------
|
| 23 |
|
|
|
|
| 24 |
import type { DatabaseEntry, Recent } from "../shell/nav";
|
| 25 |
import type { FolderIcon } from "../customer-grid/types";
|
| 26 |
import { groupDataDatabases } from "../customer-grid/dataPath";
|
|
@@ -186,7 +187,7 @@ export function allDatabases(
|
|
| 186 |
// Data owns one canonical, shareable address for every user-table database. This also
|
| 187 |
// repairs old/stale nav rows that pre-date that address without inventing any database:
|
| 188 |
// the row still had to arrive through the granted `/nav` payload above.
|
| 189 |
-
href: e.href ?? `#/
|
| 190 |
external: e.kind === "handoff" && !e.key.startsWith("ut_"),
|
| 191 |
};
|
| 192 |
})
|
|
|
|
| 21 |
// component reads the clock once and hands the numbers in here.
|
| 22 |
// ---------------------------------------------------------------------------
|
| 23 |
|
| 24 |
+
import { DATA_ROUTE } from "../shell/nav";
|
| 25 |
import type { DatabaseEntry, Recent } from "../shell/nav";
|
| 26 |
import type { FolderIcon } from "../customer-grid/types";
|
| 27 |
import { groupDataDatabases } from "../customer-grid/dataPath";
|
|
|
|
| 187 |
// Data owns one canonical, shareable address for every user-table database. This also
|
| 188 |
// repairs old/stale nav rows that pre-date that address without inventing any database:
|
| 189 |
// the row still had to arrive through the granted `/nav` payload above.
|
| 190 |
+
href: e.href ?? `#/${DATA_ROUTE}?database=${encodeURIComponent(e.key)}`,
|
| 191 |
external: e.kind === "handoff" && !e.key.startsWith("ut_"),
|
| 192 |
};
|
| 193 |
})
|