feat: add document-editor workflow entry — run + descriptor exports

This commit is contained in:
jiayiyan
2026-05-18 16:17:27 +08:00
parent 50a6ab9b9f
commit 43969446e9
2 changed files with 4548 additions and 0 deletions
+4522
View File
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
import { createOfficeAgent } from "@uncaged/workflow-agent-office";
import { createWorkflow } from "@uncaged/workflow-runtime";
import { env } from "@uncaged/workflow-util";
import {
buildDocumentEditorDescriptor,
documentEditorDefinition,
} from "@local/template-document-editor";
import { createDifferAdapter } from "./adapters/differ-adapter.js";
const officeAdapter = createOfficeAgent({
outputDir: env("OFFICE_OUTPUT_DIR", "/tmp/office-workflow"),
command: env("OFFICE_AGENT_COMMAND", "") || null,
timeout: Number(env("OFFICE_AGENT_TIMEOUT", "0")) || null,
});
const differAdapter = createDifferAdapter({
command: env("DOCX_DIFF_COMMAND", "") || null,
timeout: Number(env("DOCX_DIFF_TIMEOUT", "0")) || null,
});
export const run = createWorkflow(documentEditorDefinition, {
adapter: officeAdapter,
overrides: { differ: differAdapter },
});
export const descriptor = buildDocumentEditorDescriptor();