feat: add document-editor workflow entry — run + descriptor exports
This commit is contained in:
Vendored
+4522
File diff suppressed because it is too large
Load Diff
@@ -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();
|
||||
Reference in New Issue
Block a user