mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-03 11:04:53 -05:00
feat(addons): simplify Office and discover Tables (#13029)
* feat(tables): list accessible databases Let agents discover existing databases through the host gateway. Keep listing actor-scoped and separate from executable tools. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(tables): verify database listing authority Exercise model discovery through the real owner and carrier. Check shared access, revocation, denial and resource limits. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(tables): bundle database search guidance Teach agents to discover existing databases before querying records. Package and verify the skill with the Tables add-on. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * test(tables): cover packaged chat skill gates Load the real receipt-verified Tables instructions through the temporary Studio workspace. Check the index and load refusal after runtime, chat switch and saved-agent grant changes. This fixture starts at the receipt and broker boundary; packaging tests cover artifact construction and integrity separately. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(office): parse Markdown and CSV inputs Convert bounded text inputs into document and workbook structures. Render supported Markdown formatting without fetching external content. Preserve spreadsheet fields as strings rather than inferring formulas. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(office): preserve list markers, breaks and PDF page margins Cover actual DOCX breaks and tabs, explicit zero list starts, empty list rejection, and PDF margin/pagination regressions. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(office): guard Markdown parsing work Check cancellation and nesting during parser callbacks. Validate table dimensions before padded table allocation. Keep parser state isolated to each conversion. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(office): recognize tables before applying limits Leave mismatched table-like paragraphs as ordinary Markdown. Keep oversized real tables bounded before allocation. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(office): simplify document creation inputs Accept Markdown for DOCX and PDF, and CSV for single-sheet XLSX files. Replace nested creation schemas to reduce model tool grammar complexity. Keep existing read, edit and PowerPoint behavior and internal office IDs. Present the add-on as Simple Office and document the compatibility change. Keep same-style Markdown fragments editable in generated DOCX files. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(ci): align add-on fixtures and test inventories Tables fixtures must carry the skill their manifest declares. Preserve its bytes in package tests and mark only binaries executable in UI fixtures. Assert that installation keeps the shipped skill intact. Register the new Tables tests and the connector case from master in exact suite inventories. Include the new database read in tool counts. Run Office regressions through Ginkgo and check reader close errors. Keep all document assertions and the existing CI gates intact. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: nib:gpt-6.1-sol * fix(ci): restore Office and packaging checks Keep the generated Office label consistent with Simple Office. Install Poppler for the PDF layout regressions on Linux and macOS. Separate successful runtime setup from the 300 ms deadline under test. Keep the timeout, cancellation, stop and admission assertions intact. Refresh the packaging inventory from all 209 executed cases, retaining repeated platform checks and the Office and Tables skill checks. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
11fad911c4
commit
16acc8926b
61 files changed
+3763
-497
No files matched your search
@@ -76,6 +76,7 @@ rm -rf "$fixture_dir"
|
||||
mkdir -p "$fixture_dir/tables"
|
||||
cp "$root/addons/tables/manifest.json" "$fixture_dir/tables/manifest.json"
|
||||
cp -R "$pkg/dist/ui" "$fixture_dir/tables/ui"
|
||||
cp -R "$root/addons/tables/skills" "$fixture_dir/tables/skills"
|
||||
|
||||
free_port() { python3 -I -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",0));print(s.getsockname()[1])'; }
|
||||
named_port=$(free_port)
|
||||
|
||||
+104
-6
@@ -4017,7 +4017,22 @@
|
||||
"go: is unavailable when the owner cannot act, and never falls back to a read or a proposal",
|
||||
"go: keeps the argument rules: an identity argument is refused before anything runs",
|
||||
"go: are listed in any state, with the names they replace and whether they run",
|
||||
"go: keeps its namespaced name and carries the built-in it shadows, only for a replaceable name"
|
||||
"go: keeps its namespaced name and carries the built-in it shadows, only for a replaceable name",
|
||||
"go: names the replacement string for legacy arguments at the chat boundary without sending them",
|
||||
"go: synthesizes exactly one strict host read, without enumerating resources at discovery",
|
||||
"go: projects only opaque IDs, optional names and caller roles through a normal data envelope",
|
||||
"go: returns an array even for empty success and truthfully bounds sorted 100/101 results",
|
||||
"go: rejects every input property and non-object rather than resolving selection",
|
||||
"go: fails closed without the optional backend interface and never synthesizes for other add-ons",
|
||||
"go: rejects a reserved Tables manifest collision in discovery and execution even if not advertised",
|
||||
"go: rechecks missing, hidden, disabled, stopped and uninitialized Tables at execution",
|
||||
"go: preserves typed credential, feature, owner, forwarding and registry failures after discovery",
|
||||
"go: rejects missing principals and malformed projections instead of successful empty data",
|
||||
"go: keeps synthesized listing behind consumer allowlists and hidden add-ons",
|
||||
"go: does not let a listing-capable provider invent a named-user principal",
|
||||
"go: revalidates listing failures through an already-bound consumer without namespace fallback",
|
||||
"go: preserves the model read byte bound",
|
||||
"go: offers the host read even when Tables has no executable definitions"
|
||||
]
|
||||
},
|
||||
"tables-admin": {
|
||||
@@ -4073,7 +4088,21 @@
|
||||
"binds an output handle to its operation, person and database",
|
||||
"fails a truncated, grown or vanished stream and never serves it",
|
||||
"fails the transfer when the store cannot write, and when the source is revoked before completion",
|
||||
"expires the file only, enforces the quota per person and leaves the database as it was"
|
||||
"expires the file only, enforces the quota per person and leaves the database as it was",
|
||||
"projects only active owned/shared resources and the caller's own role, never UI management metadata",
|
||||
"projects only active owned/shared resources and the caller's own role, never UI management metadata",
|
||||
"excludes policy reservations and resources whose deletion has begun",
|
||||
"excludes policy reservations and resources whose deletion has begun",
|
||||
"rechecks grants after discovery and independently refuses inspect on a revoked database",
|
||||
"rechecks grants after discovery and independently refuses inspect on a revoked database",
|
||||
"revalidates real credential and feature changes after discovery, not as successful empty lists",
|
||||
"revalidates real credential and feature changes after discovery, not as successful empty lists",
|
||||
"preserves typed missing resource registry and app registry failures",
|
||||
"preserves typed missing resource registry and app registry failures",
|
||||
"uses the service's actual 100/101 bound in ID order with truthful truncation and absent names",
|
||||
"uses the service's actual 100/101 bound in ID order with truthful truncation and absent names",
|
||||
"rechecks credentials at the carrier owner even if the frontend still admits the old principal",
|
||||
"reports an unavailable carrier owner after discovery instead of fabricating empty success"
|
||||
]
|
||||
},
|
||||
"tables-ui": {
|
||||
@@ -4346,7 +4375,6 @@
|
||||
"go: fails closed when no platform is enabled, the file is absent or empty",
|
||||
"go: rejects enabled platforms without a native runner or check, duplicates and unknown fields",
|
||||
"go: prints the enabled platforms with their native runners",
|
||||
"go: ships the checked-in matrix with every platform disabled until its native check passes",
|
||||
"go: renders digest-pinned entries with an explicit add-on signer identity",
|
||||
"go: renders an entry for every first-party add-on from its own template",
|
||||
"go: refuses missing inputs, backend repositories, bad channels and unknown placeholders",
|
||||
@@ -4387,11 +4415,9 @@
|
||||
"go: rejects a plan that does not fail closed on missing configuration",
|
||||
"go: rejects a plan that does not exit 1 for an add-on without an enabled platform on a publishing event",
|
||||
"go: rejects a plan that treats any matrix error as no legs",
|
||||
"go: rejects a repository rule that does not keep the configured repository for tables",
|
||||
"go: rejects a publish or promote matrix that stops the other add-ons on a failure",
|
||||
"go: rejects a publish job that downloads the layouts of other add-ons",
|
||||
"go: rejects a promote job that does not check the digest format",
|
||||
"go: derives a repository that the add-on tools accept for every add-on from the documented variable",
|
||||
"go: fails on a publishing event when an add-on has no enabled platform",
|
||||
"go: publishes when every add-on has an enabled platform",
|
||||
"go: gives an add-on without an enabled platform no legs on an event that publishes nothing",
|
||||
@@ -4439,7 +4465,79 @@
|
||||
"workflow policy rejects a publish job that does not wait for every leg",
|
||||
"workflow policy rejects a validate job that cannot stop the release",
|
||||
"scripts never push, tag, sign or log in",
|
||||
"packaging files never reference backend registries or workflows"
|
||||
"packaging files never reference backend registries or workflows",
|
||||
"go: adds the tool fields to an existing index from the repository manifests, and changes nothing else",
|
||||
"go: caps the tool names at MaxEntryTools and keeps the full count",
|
||||
"go: declares and packages a loadable, receipt-verified skill without shadows",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: enables a platform exactly when its native check is recorded",
|
||||
"go: gives promote an add-on matrix",
|
||||
"go: gives publish an add-on matrix",
|
||||
"go: hands the guest image digest of the sandbox-image job to the package leg",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has a catalog template",
|
||||
"go: has consistent package files for face",
|
||||
"go: has consistent package files for fine-tuning",
|
||||
"go: has consistent package files for office",
|
||||
"go: has consistent package files for quantization",
|
||||
"go: has consistent package files for sandbox",
|
||||
"go: has consistent package files for slack",
|
||||
"go: has consistent package files for studio",
|
||||
"go: has consistent package files for tables",
|
||||
"go: has consistent package files for talk",
|
||||
"go: has consistent package files for telegram",
|
||||
"go: has consistent package files for voice",
|
||||
"go: has consistent package files for web",
|
||||
"go: has no hard-coded add-on path",
|
||||
"go: lays the skills of the add-on in their own layer and verifies them with the install rules",
|
||||
"go: lets only the release-index job write the contents of the repository",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists every release platform with its runner",
|
||||
"go: lists the add-ons in the validate matrix",
|
||||
"go: lists the built-in skills an add-on replaces",
|
||||
"go: lists the built-in tools an add-on replaces after its tools",
|
||||
"go: loops the plan over the same list",
|
||||
"go: publishes every add-on to the one documented repository, with its id as the tag prefix",
|
||||
"go: refuses --from-manifest for a pinned channel or together with a merged layout",
|
||||
"go: refuses to build when the skills folder and the manifest disagree, or a skill breaks a rule",
|
||||
"go: rejects a missing skill, mismatched frontmatter, and scripts",
|
||||
"go: rejects a repository rule that derives a repository for each add-on",
|
||||
"go: renders the development channel as mutable entries: the moving tag, no digest",
|
||||
"go: renders the development entries of every enabled platform from the manifest, without a package",
|
||||
"go: reports the chat tools of the manifest on each entry and not the admin tools",
|
||||
"go: ships a checked-in Tables matrix with at least one enabled platform",
|
||||
"go: takes the package legs from the plan",
|
||||
"package.sh passes SANDBOX_GUEST_IMAGE to the linker",
|
||||
"package.sh refuses a foreign platform without an executable: office",
|
||||
"package.sh refuses a foreign platform without an executable: sandbox",
|
||||
"package.sh refuses a foreign platform without an executable: web",
|
||||
"package.sh refuses a guest image that is not by digest",
|
||||
"package.sh refuses a sandbox release build without SANDBOX_GUEST_IMAGE",
|
||||
"package.sh stamps the sandbox executable with a guest image in a local check"
|
||||
]
|
||||
},
|
||||
"updates": {
|
||||
|
||||
@@ -72,6 +72,7 @@ rm -rf "$fixture_dir"
|
||||
mkdir -p "$fixture_dir/tables"
|
||||
cp "$root/addons/tables/manifest.json" "$fixture_dir/tables/manifest.json"
|
||||
cp -R "$pkg/dist/ui" "$fixture_dir/tables/ui"
|
||||
cp -R "$root/addons/tables/skills" "$fixture_dir/tables/skills"
|
||||
|
||||
free_port() { python3 -I -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",0));print(s.getsockname()[1])'; }
|
||||
named_port=$(free_port)
|
||||
|
||||
@@ -61,6 +61,7 @@ rm -rf "$fixture_dir"
|
||||
mkdir -p "$fixture_dir/tables" "$fixture_dir/tables-next"
|
||||
cp "$root/addons/tables/manifest.json" "$fixture_dir/tables/manifest.json"
|
||||
cp -R "$pkg/dist/ui" "$fixture_dir/tables/ui"
|
||||
cp -R "$root/addons/tables/skills" "$fixture_dir/tables/skills"
|
||||
# A second release, for the stale-tab checks: the same package, one patch up.
|
||||
python3 -I - "$root/addons/tables/manifest.json" "$fixture_dir/tables-next/manifest.json" <<'PY'
|
||||
import json, sys
|
||||
@@ -69,6 +70,7 @@ m['version'] = '0.1.1'
|
||||
json.dump(m, open(sys.argv[2], 'w'))
|
||||
PY
|
||||
cp -R "$pkg/dist/ui" "$fixture_dir/tables-next/ui"
|
||||
cp -R "$root/addons/tables/skills" "$fixture_dir/tables-next/skills"
|
||||
|
||||
free_port() { python3 -I -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",0));print(s.getsockname()[1])'; }
|
||||
named_port=$(free_port)
|
||||
@@ -94,7 +96,7 @@ wait_for() {
|
||||
i=0
|
||||
until [ -s "$file" ] && python3 -I -c "import sys,urllib.request;urllib.request.urlopen('http://127.0.0.1:$port/readyz',timeout=1)" 2>/dev/null; do
|
||||
i=$((i + 1))
|
||||
kill -0 "$pid" 2>/dev/null || { echo 'UI test server exited' >&2; tail -20 "$cache/logs/tables-ui-server.log" "$cache/logs/tables-ui-local-server.log" >&2; exit 1; }
|
||||
kill -0 "$pid" 2>/dev/null || { echo 'UI test server exited' >&2; tail -n 20 "$cache/logs/tables-ui-server.log" "$cache/logs/tables-ui-local-server.log" >&2; exit 1; }
|
||||
[ "$i" -lt 180 ] || { echo 'UI test server readiness timed out' >&2; exit 1; }
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -88,6 +88,7 @@ m['version'] = '0.1.0-dev'
|
||||
json.dump(m, open(sys.argv[2], 'w'))
|
||||
PY
|
||||
cp -R "$pkg/dist/ui" "$d/ui"
|
||||
cp -R "$root/addons/tables/skills" "$d/skills"
|
||||
printf 'build %s\n' "$n" >"$d/build.txt"
|
||||
printf 'development\n' >"$d/.fixture-channel"
|
||||
printf '%s\n' "$n" >"$d/.fixture-generation"
|
||||
|
||||
Reference in new issue
Block a user