@ycodium-ai/plugin-office 0.2.5407 → 0.2.5448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as NodePath5 from "node:path";
|
|
|
3
3
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
4
4
|
|
|
5
5
|
// ../../packages/plugin-api/src/version.ts
|
|
6
|
-
var PLUGIN_API_VERSION =
|
|
6
|
+
var PLUGIN_API_VERSION = 171;
|
|
7
7
|
|
|
8
8
|
// src/paths.ts
|
|
9
9
|
import * as NodeFSP from "node:fs/promises";
|
|
@@ -849,6 +849,7 @@ var documentHasCjk = async (invocation, source) => {
|
|
|
849
849
|
var render = (deps) => ({
|
|
850
850
|
name: "render",
|
|
851
851
|
description: "Render Word documents, PowerPoint slides, Excel worksheet ranges or OpenDocument files (docx, pptx, xlsx, doc, ppt, xls, odt, odp, ods), or PDF pages, to PNG images with the bundled LibreOffice engine for visual checks of layout, pagination, charts and fonts. Returns the page count, image paths, and missing fonts; up to four images are attached for models that read images. `outputDir` must be a new directory.",
|
|
852
|
+
argumentUsage: { valid: { path: "report.docx", outputDir: "preview" } },
|
|
852
853
|
inputSchema: {
|
|
853
854
|
type: "object",
|
|
854
855
|
properties: {
|
|
@@ -924,6 +925,9 @@ var render = (deps) => ({
|
|
|
924
925
|
var convertLike = (deps, spec) => ({
|
|
925
926
|
name: spec.name,
|
|
926
927
|
description: spec.name === "convert" ? "Convert an Office document with the bundled LibreOffice engine; the output suffix selects the format (pdf, docx, xlsx, pptx, csv, odt, ods, odp). The output file must be new." : "Recalculate every formula in a workbook (xls, xlsx, ods) with the bundled LibreOffice engine and save the results to a new xlsx or ods file.",
|
|
928
|
+
argumentUsage: {
|
|
929
|
+
valid: spec.name === "convert" ? { path: "report.docx", output: "report.pdf" } : { path: "budget.xlsx", output: "calculated.xlsx" }
|
|
930
|
+
},
|
|
927
931
|
inputSchema: {
|
|
928
932
|
type: "object",
|
|
929
933
|
properties: {
|
|
@@ -969,6 +973,7 @@ ${missingFontsLine(result.missingFonts)}`);
|
|
|
969
973
|
var check = (deps) => ({
|
|
970
974
|
name: "check",
|
|
971
975
|
description: "Run the read-only OOXML checker on a docx, pptx, or xlsx: ZIP/XML integrity, internal relationships, paragraph/table/section, slide and sheet summaries, and optional text assertions. Returns JSON. It does not check pagination, fonts, or appearance; use office_render for that.",
|
|
976
|
+
argumentUsage: { valid: { path: "report.docx" } },
|
|
972
977
|
inputSchema: {
|
|
973
978
|
type: "object",
|
|
974
979
|
properties: {
|
|
@@ -1020,6 +1025,7 @@ ${result.stderr.trim()}`.trim());
|
|
|
1020
1025
|
var python = (deps) => ({
|
|
1021
1026
|
name: "python",
|
|
1022
1027
|
description: "Return the shared Ycodium Python executable and required arguments for creating or editing Word documents (docx), PowerPoint presentations (pptx) and Excel workbooks (xlsx), with python-docx, python-pptx, openpyxl, pandas, Pillow, lxml, and XlsxWriter preinstalled. Run your scripts with the returned executable AND args instead of installing packages or looking for a system Python.",
|
|
1028
|
+
argumentUsage: { valid: {} },
|
|
1023
1029
|
inputSchema: { type: "object", properties: {} },
|
|
1024
1030
|
handle: async () => {
|
|
1025
1031
|
const runtime = await deps.resolvePython();
|
package/package.json
CHANGED