Skip to content

Wechuli/update to genkit - #24

Merged
v-wechuli merged 5 commits into
mainfrom
wechuli/update-to-genkit
Oct 15, 2026
Merged

v-wechuli merged 5 commits into
mainfrom
wechuli/update-to-genkit

Conversation

@v-wechuli

Copy link
Copy Markdown
Collaborator

This pull request removes all server-side and containerized document extraction functionality (PDF/XLSX/DOCX) and migrates all import file extraction to run entirely in the browser. The changes simplify deployment by eliminating the Node.js extraction worker, associated Docker targets, and related configuration, and update documentation and specifications to reflect the new browser-only extraction approach and the removal of custom AI endpoints.

Major changes include:

Removal of Extraction Worker and Server-Side Extraction

  • Deleted all Dockerfile stages and related code for the Node.js-based extraction-worker, including dependencies, test targets, and socket directory setup, so the application image no longer contains or references any extraction worker or Node.js runtime. (Dockerfile) [1] [2]
  • Removed extraction worker-related environment variables (AI_EXTRACTION_SOCKET, AI_EXTRACTION_SCRIPT, AI_ALLOWED_ENDPOINTS) from .env.example and updated the documentation to reflect their removal. (.env.example, README.md) [1] [2]
  • Eliminated the extraction worker image build and push steps from the GitHub Actions workflow and removed extraction worker tests and audits from the Makefile and CI configs. (.github/workflows/publish-container.yml, Makefile, .github/workflows/validation.yml) [1] [2] [3] [4] [5]

Documentation and Specification Updates

  • Updated all documentation (README.md, SPEC.md) to describe the new browser-based extraction flow: all supported file types (TXT, CSV, TSV, JSON, PDF, XLSX, DOCX) are parsed in a browser Web Worker, with no file or password sent to the server, and no server-side or sidecar parsing. [1] [2] [3] [4]
  • Clarified that PDF passwords are handled only in the browser and never sent to the server.

AI Provider and Endpoint Policy

  • Removed support for custom OpenAI-compatible endpoints; only fixed OpenAI, Anthropic, and DeepSeek endpoints are now used, and users provide their own API keys. Documentation and specs updated to reflect this. (README.md, SPEC.md) [1] [2]
  • Updated AI integration documentation to describe the use of Genkit for Go for all AI flows, with per-request user API keys and structured output validation. (README.md, SPEC.md) [1] [2] [3] [4]

Deployment and Compose Changes

  • Removed all references to extraction-worker images and sidecars from deployment documentation, Compose, and Kubernetes instructions, simplifying the deployment footprint. (README.md, SPEC.md) [1] [2] [3]

These changes significantly simplify the codebase and deployment, centralize all import file parsing in the browser, and clarify AI provider usage and security.

- Refactored AI settings form to support OpenAI, Anthropic, and DeepSeek providers.
- Removed support for custom endpoints in the database and updated migration scripts.
- Implemented new Genkit integration for AI workflows, including provider-specific configurations.
- Added tests for AI review and conversion flows to ensure proper functionality and usage tracking.
- Introduced a new module for managing AI provider options and validation.
- Deleted the extraction worker's package.json, which contained dependencies for document extraction.
- Removed the extraction.go file, which implemented the extraction logic for various document types.
- Eliminated the CLI script (extract-import-source-cli.mjs) that handled input and output for the extraction process.
- Removed the main extraction script (extract-import-source.mjs) that processed document extraction logic.
- Deleted the extraction worker daemon (extraction-worker-daemon.mjs) that managed socket connections for the extraction service.
- Removed the mock import provider used for testing the extraction process.
- Deleted tests related to the extraction worker protocol, ensuring no remnants of the extraction worker remain in the codebase.
…nctionality

- Add extractSourceFromBytes function to handle various file types including text, PDF, XLSX, and DOCX.
- Introduce a new SourceBuilder class to manage extracted content and warnings.
- Implement extraction logic for text files (TXT, CSV, TSV, JSON) and office documents (XLSX, DOCX) with error handling.
- Create a dedicated Web Worker for asynchronous extraction processes, ensuring document passwords and file sizes are validated.
- Add unit tests for the extraction process, covering various scenarios including worker responses, timeouts, and error handling.
- Implement ZIP file reading and validation for office documents, rejecting unsupported formats and encrypted files.
- Ensure compliance with size limits for extracted content and provide meaningful error messages for invalid inputs.
Comment thread tests/e2e-go/document-fixtures.ts Dismissed
@v-wechuli
v-wechuli merged commit 569a2b7 into main Oct 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants