Commit graph

5 commits

Author SHA1 Message Date
Naeem Dosh
01be9421df Upgrade to Onyx v4.8.2; drop dead badge fix; refresh connector docs
- Pin upstream to v4.8.2 (better official translations). Branding overlay
  re-verified: logos, favicon, Onyx->AIDO codemod (incl. the official
  next-intl catalogs, now 9 locales with Arabic), notification-hide, and
  de/en language limiting all apply clean and type-check.
- Re-sync smb-ui.patch onto v4.8.2 and remove the "Initial Indexing"
  badge hunk: connectors now ingest as the File source, which reports
  status correctly on its own, so the hunk was dead. The patch is now two
  files (chat citation + licensed Search), keyed on metadata.smb_source.
- Refresh the SMB connector docs to the current design: File-source
  ingestion (chat-searchable), the full extension set, the per-source
  index document and per-connector group access, and the UI overlay that
  copies the full path. Fix stale ingestion_api / v4.5.2 references and a
  trailing-whitespace nit in the connector payload.

DHI is a no-op on v4.8.2 (Dockerfile defaults to public node images).
2026-09-30 17:44:57 +05:00
d4cb8dcb99 fix(smb): ingest as File source so docs appear in default chat; update UI patch
The Ingestion API docs require creating a connector with source=file and
pushing documents with from_ingestion_api=true so they are indexed under a
recognizable DocumentSource that Onyx's chat UI can filter and search.

Previously we used source=ingestion_api / input_type=poll. Documents were
indexed (visible in the admin panel) but were not searchable in Onyx's
default chat because ingestion_api is absent from the chat filter UI.

Connector changes:
- onyx_client.py: create connector as source=file, input_type=load_state,
  connector_specific_config.file_locations=[] (avoids LocalFileConnector
  health-check errors since we push via API, not disk crawl)
- sync.py: set source=file and from_ingestion_api=true on every document
  and index payload so Onyx treats them as API-ingested File docs

UI overlay changes (branding/smb/smb-ui.patch):
- Replace document.source_type === ValidSources.IngestionApi with
  document.metadata?.smb_source
- This keeps the broken-preview suppression and logical-path clipboard
  copy working for SMB docs, while leaving normal File uploads untouched

Result: SMB documents now surface in default chat under the File filter,
the connector stays "Up to Date" without dummy-file errors, and the
Phase 2 click-to-copy behavior continues to work.
2026-09-24 20:34:31 +02:00
Naeem Dosh
26d3262cfb SMB connector: per-connector group access + standalone Docker mode
1. Optional Onyx group per connector. Set SMB_SOURCE_<N>_GROUPS (or
   "groups" in SMB_SOURCES JSON, or SMB_DEFAULT_GROUP_IDS as a fallback)
   to a list of Onyx user-group ids. The connector is then created
   PRIVATE and restricted to those groups; empty stays PUBLIC. Applied
   only at connector creation, as requested. Needs the Business licence.

2. Standalone deployment. New docker-compose.standalone.yml runs the
   connector as its own Compose project next to Onyx (no -f injection),
   joining Onyx's network (onyx_default, override via ONYX_NETWORK) to
   reach the API by service name. Suits Compose management tools that
   cannot handle multiple injected compose files. The legacy injected
   compose still works.

Verified: group-id parsing across all three source styles, the
private+groups vs public payload, standalone compose config, and the
full index/sync simulation (still green).
2026-09-24 14:20:39 +05:00
Naeem Dosh
f3ab7f4cee SMB connector: fix stuck 'Initial Indexing', configurable name prefix + timeout
Four items from client feedback:

1. Stuck 'Initial Indexing' status. Root cause (by design in Onyx):
   docprocessing/utils.py never runs a classic index attempt for INGESTION_API
   connectors — documents are pushed via the API, not polled — so
   last_finished_status stays null and the badge is stuck even though the docs
   are indexed and searchable (also why it's safe: no risk of re-index deleting
   the pushed docs). Two-part fix:
   - Connector now sets each cc_pair ACTIVE after provisioning (set_cc_pair_active),
     which fixes the connector detail page + 'Active Connectors' count.
   - Frontend overlay (branding/smb/smb-ui.patch): the Ingestion table shows the
     real cc_pair_status for ingestion_api connectors instead of forcing
     'Initial Indexing'. Verified live: new cc_pair comes up ACTIVE.

2. Connector name now configurable: ONYX_CONNECTOR_NAME_PREFIX (default 'AIDO SMB').
3. HTTP timeout now configurable: ONYX_HTTP_TIMEOUT (default 60), for large embeds.
4. (Phase 2 already delivered in ab64692 — the preview/path overlay.)

Verified live against running Onyx: provisioning sets ACTIVE, custom prefix
'Livtec Docs - Sales' applied, timeout honoured, ä-filename still indexed. Full
overlay apply green, no conflict markers, connector modules parse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-10 23:14:28 +05:00
NaeemDosh
909a541c6b SMB connector Phase 1: sync + self-provisioning + multi-source (E2E-verified)
Production SMB->Onyx sync sidecar (public ingestion + admin APIs only; no Onyx
source changes; upgrade-safe). Verified end-to-end against a live Onyx v4.5.2.

Core (app/sync.py): per-cycle reconcile — upsert new/changed (stable url-safe
document ids so updates replace in place), delete files removed from the share,
plus manifest-independent reconcile against Onyx's own doc list. Content-hash change
detection; per-source + per-file failure isolation.

Self-provisioning (app/onyx_client.py): create/cache API key (admin bootstrap) and
one connector/cc_pair per source via connector-with-mock-credential; idempotent
reuse via the grouped indexing-status lookup.

Multi-source (app/config.py): JSON SMB_SOURCES or indexed SMB_SOURCE_N_*; logical
path mapping (mount -> \\company\share) shown in citations.

Extraction (app/extract.py): pdf/docx/xlsx/csv/txt/md/html, light deps. State manifest
(atomic), entrypoint loop w/ graceful shutdown + retry/backoff. Dockerfile, compose
snippet, .env.example, README.

Bugs caught + fixed during live E2E (missed by code review + stub tests):
- Onyx URL-encodes document ids -> switched to url-safe ids + store Onyx's returned
  canonical id, so delete/reconcile match.
- connector listing endpoint + provision-response parsing corrected (indexing-status
  is grouped by source; StatusResponse.data = cc_pair_id).
- Documented: auto API-key creation needs LICENSE_ENFORCEMENT_ENABLED=false (the
  /admin/api-key endpoint is EE-tier-gated); ingestion + connector creation are not.

E2E results (live Onyx): ingest 2 docs w/ logical paths; change->update-in-place with
stable ids; remove->delete synced; auto-provision create + idempotent reuse; multi-
source config both styles.
2026-09-01 23:18:33 +05:00