Commit graph

7107 commits

Author SHA1 Message Date
Rohan Verma
2148053569
Merge pull request #1544 from AnishSarkar22/fix/login-button
feat: update authentication defaults to LOCAL
2026-06-26 11:06:22 -07:00
Anish Sarkar
e6fa9f177e
Merge pull request #1545 from AnishSarkar22/fix/auth-session
fix(auth): centralize session refresh retry handling
2026-06-26 22:43:59 +05:30
Anish Sarkar
f14c471a03 refactor(ZeroProvider): simplify route handling by removing desktop check for public routes 2026-06-26 22:15:48 +05:30
Anish Sarkar
3ce759f1d6 refactor(auth): streamline session handling with authenticatedFetch 2026-06-26 22:05:11 +05:30
Anish Sarkar
4b6bcaeb1b refactor(auth): reuse desktop token cache in API clients 2026-06-26 22:04:59 +05:30
Anish Sarkar
652a25be37 refactor(chat): use shared authenticated fetch for chat requests 2026-06-26 22:04:33 +05:30
Anish Sarkar
4c257e9122 refactor(auth): route session and zero context through shared fetch 2026-06-26 22:04:23 +05:30
Anish Sarkar
9fc93e5e82 fix(auth): centralize session refresh retry 2026-06-26 22:03:59 +05:30
Anish Sarkar
ef9b5b42a8 feat: update JWT token lifetime and enhance header management in chat page
- Increased ACCESS_TOKEN_LIFETIME_SECONDS from 30 minutes to 60 minutes for improved session duration.
- Introduced getRequestHeadersWithCurrentDesktopAuth function to streamline authorization header management across fetch requests in the chat page.
2026-06-26 21:25:27 +05:30
Anish Sarkar
013fae6eba feat: enhance session handling in useSession and auth-fetch
- Introduced fetchSession function to streamline session fetching logic.
- Updated useSession to handle 401 errors by refreshing the session when necessary.
- Modified getDesktopAccessToken to accept options for forced token refresh, improving desktop authentication flow.
2026-06-26 21:25:00 +05:30
Anish Sarkar
23c128dd0d feat: improve fetchZeroContext with enhanced session handling
- Refactored fetchZeroContext to include a buildHeaders function for better header management.
- Added a request function to handle 401 errors and refresh sessions as needed.
- Improved overall session management for desktop authentication.
2026-06-26 21:24:44 +05:30
Anish Sarkar
de4507f413 feat: enhance session management in chat page
- Implemented session refresh logic in the fetchWithTurnCancellingRetry function to handle 401 errors more gracefully.
- Added a new import for refreshSession utility to facilitate session renewal.
2026-06-26 21:00:55 +05:30
Anish Sarkar
a80cb8c060 feat: update authentication defaults to LOCAL
- Changed default AUTH_TYPE in backend configuration to "LOCAL".
- Updated frontend environment configuration to reflect the new default for packaged clients.
- Adjusted runtime authentication resolution to use "LOCAL" as the fallback value.
2026-06-26 18:52:42 +05:30
Rohan Verma
5b5e95971e
Merge pull request #1541 from MODSetter/dev
feat(version): session auth revamp, API keys, citation system overhaul, artifacts & chat references
2026-06-25 21:17:07 -07:00
DESKTOP-RTLN3BA\$punk
e1ffbfea27 feat: bumped version to 0.0.30 2026-06-25 21:05:04 -07:00
DESKTOP-RTLN3BA\$punk
c3f242a6b2 feat: fix desktop auth issues
- Added logging for JSON parsing failures in structured output to aid in debugging.
- Updated the TranscriptTurn model to ignore unknown keys, improving flexibility for future model variations.
2026-06-25 20:58:50 -07:00
DESKTOP-RTLN3BA\$punk
1bf7f116d6 chore: linting 2026-06-25 20:20:26 -07:00
DESKTOP-RTLN3BA\$punk
9642d7ced0 feat: antropic model added fix & kb tooling fixes
- Updated main-agent middleware to clarify that both filesystem reads/writes and knowledge-base retrieval are handled by the `knowledge_base` subagent.
- Introduced `_forward_mention_pins` function to carry `@`-mention pins into subagent state.
- Revised system prompts to reflect the new retrieval method and ensure proper citation handling.
- Removed the `search_knowledge_base` tool and its related tests, consolidating functionality under the `task` tool.
- Enhanced documentation to guide usage of the new retrieval approach and citation practices.
2026-06-25 20:19:44 -07:00
Rohan Verma
b4af67f77d
Merge pull request #1540 from DhruvTilva/fix/table-element-text-as-html-keyerror
fix: handle missing text_as_html metadata for Unstructured table elements
2026-06-25 13:35:41 -07:00
Rohan Verma
94fdb8a113
Merge pull request #1539 from CREDO23/improve-chat-agent-context-and-citations
[FEAT] Unified [n] citation registry for KB + web, pull-based retrieval
2026-06-25 13:34:52 -07:00
Rohan Verma
5a6ea29610
Merge pull request #1537 from DhruvTilva/test/validators-unit-tests
test: cover validation helpers with unit tests
2026-06-25 13:33:03 -07:00
Rohan Verma
96e42a1003
Merge pull request #1536 from CREDO23/feature-mention-chat-in-chat
[Feat] Chat : Reference past chats via @-mention as read-only context
2026-06-25 13:32:25 -07:00
Rohan Verma
efa9efc80b
Merge pull request #1532 from CREDO23/imporve-artifacts-accessibility
[Feat] Artifacts sidebar for chat deliverables
2026-06-25 13:31:45 -07:00
Rohan Verma
6950646bf1
Merge pull request #1535 from AnishSarkar22/feat/auth-revamp
feat(auth): complete session auth cutover with desktop oauth support
2026-06-25 13:31:02 -07:00
DhruvTilva
e16e4e2c5c fix: guard missing text_as_html in Table element markdown conversion
When the Unstructured API returns a Table element without text_as_html
in its metadata (e.g. local install or free-tier API), the lambda was
raising KeyError: 'text_as_html', crashing the entire document
indexing pipeline for any file containing tables.

Guard the key access with .get() and fall back to the plain extracted
text content (x) so the pipeline continues and the table content is
still indexed, just without HTML formatting.
2026-06-25 23:52:15 +05:30
Anish Sarkar
d5e2540e51 refactor(api): rename personal access tokens to API keys and update related UI components for consistency 2026-06-25 23:22:11 +05:30
CREDO23
232cc937c5 docs: remove ADR 0001 (RAG/citation architecture shipped)
The RAG/citation/context redesign in ADR 0001 is implemented and validated
(KB + web on the unified [n] citation spine, pull-based retrieval, eager path
retired). Drop the ADR and the one stale docstring reference to it.
2026-06-25 18:50:58 +02:00
CREDO23
2beafbdec8 agent: retire eager KB priority/planner path and its dead flags
The pull-based KB design (on-demand search_knowledge_base tool + pre-injected
workspace tree) fully replaced the old eager retrieval path. Remove its last
remnants:

- Delete KnowledgePriorityMiddleware (knowledge_search.py) and its tests.
- Drop the kb_priority state field + reducer default; trim
  KbContextProjectionMiddleware to project only workspace_tree_text.
- Remove the now-dead feature flags enable_kb_priority_preinjection and
  enable_kb_planner_runnable across backend (flags, route schema, tests,
  env examples) and frontend (settings toggle, zod schema).
- Scrub <priority_documents> and stale KnowledgePriorityMiddleware references
  from prompts, docstrings, and the ADR.

No functional change: nothing wrote kb_priority and neither flag gated live
behavior after the cutover. Full backend suite green (pre-existing unrelated
failures aside).
2026-06-25 18:37:14 +02:00
CREDO23
0148647b98 prompts: remove orphaned system_prompt_composer surface
The legacy system_prompt_composer fragments and its default_system_instructions
wrapper were no longer referenced by any live code path (the main-agent prompt
builder owns composition now). Delete the whole orphaned tree and its test.
2026-06-25 18:37:04 +02:00
CREDO23
5bda944321 citations: normalize word-glued [n] markers
The model frequently writes citations glued to the preceding word
(docs[17]); the (?<!\w) lookbehind (added to dodge arr[1] array indexing)
silently skipped these, leaving raw [n] that fails to render and reads
like array access. Drop the lookbehind so glued citations resolve; genuine
code/array syntax stays protected by the existing code-region carve-out and
unresolved ordinals still drop harmlessly.
2026-06-25 16:28:31 +02:00
CREDO23
ce15016533 citations: consolidate prompts, retire eager path, refresh ADR
Rewrite the main-agent citation contract to a single [n] channel and sync
the orphaned system_prompt_composer surface to match; drop stale
[citation:chunk_id] / <chunk_index> references from dynamic_context and
provider hints. Reuse the shared hybrid search in the deliverables report
(citations omitted for now) and delete the orphaned report KB helper.
Remove the dead eager KnowledgePriorityMiddleware wiring (knowledge_priority
+ stack) and its legacy browse test. Update ADR 0001 to reflect the cutover.
2026-06-25 15:27:09 +02:00
CREDO23
49d675c065 web-search: register results on the citation registry (Channel B -> A)
web_search now registers each result as a WEB_RESULT (locator {url}) and
renders a <web_results> block of <document view="excerpt"> [n] passages,
returning Command(update={messages, citation_registry}) like
search_knowledge_base. Collapse the duplicate research-subagent web_search
into the shared tool and teach the prompts to cite web hits with [n].
2026-06-25 15:26:51 +02:00
CREDO23
c98bdea5cf search-kb: on-demand KB tool on the [n] spine; drop kb_matched_chunk_ids
The main agent's search_knowledge_base tool runs the hybrid spine, renders
a <retrieved_context> of numbered [n] passages, and persists the registry.
KB subagent prompts teach citing [n] from <document view="full"> reads
(evidence.chunk_ids -> evidence.citations). Delete the now-unused
search->read highlighting hand-off: the kb_matched_chunk_ids state field,
its reducer default, the tool's _matched_chunk_ids writer, and the dead
KnowledgePriorityMiddleware writes.
2026-06-25 15:26:39 +02:00
CREDO23
04a76b163b citations: conversation-scoped registry with finalize-time [n] resolution
Add the checkpointed CitationRegistry (load/merge helpers + state field)
and a lightweight CitationStateMiddleware so subagents can register into
the same conversation registry. Resolve [n] -> [citation:<payload>] at
stream finalize from the registry, polymorphically by source type.
2026-06-25 15:26:25 +02:00
CREDO23
265888d21c document-render: unify KB/web rendering on numbered [n] passages
Add a shared document_render package that renders sources as
<document view="excerpt|full"> blocks with server-assigned [n] passage
labels (KB locator {document_id, chunk_id}, web locator {url}). Wire the
KB read backend (kb_postgres) and read_file to the new renderer and drop
the legacy per-document XML renderer (document_xml, retrieved_context) and
the old chunk_index / matched="true" / <chunk id> read format.
2026-06-25 15:26:16 +02:00
CREDO23
852ab3a576 retrieval: add hybrid search behavior tests 2026-06-25 09:15:59 +02:00
CREDO23
e72b17fbed retrieval: instrument hybrid search; note deferred citation markers 2026-06-25 09:00:23 +02:00
CREDO23
e12afa7c8f adr: note citation prompt cutover 2026-06-25 08:35:59 +02:00
CREDO23
e16a2af44e prompts: add ordinal citation contract 2026-06-25 08:35:59 +02:00
CREDO23
915ad80e19 retrieval: add unit tests for pure components 2026-06-25 08:23:30 +02:00
CREDO23
4fe208557a retrieval: add reranking wrapper and context service 2026-06-25 08:23:29 +02:00
CREDO23
407bfcd94f retrieval: add source label and retrieved-document adapter 2026-06-25 08:23:29 +02:00
CREDO23
608192057f retrieval: add search scope models and hybrid chunk search 2026-06-25 08:23:29 +02:00
CREDO23
26a1431e87 retrieved_context: drop document completeness concept 2026-06-25 08:23:29 +02:00
CREDO23
6bb20df510 citations: rewrite model [n] ordinals to frontend [citation:] markers 2026-06-25 06:48:25 +02:00
Anish Sarkar
96b64166b1 refactor(ipc): remove showDashboardAfterAuth function and its invocation after OAuth token retrieval 2026-06-25 04:37:03 +05:30
Anish Sarkar
2e33ba7723 chore: fix linting 2026-06-25 04:31:36 +05:30
Anish Sarkar
d6bffa6f07 chore: fix linting 2026-06-25 04:31:22 +05:30
Anish Sarkar
7d4c994900 refactor(blocknote): enhance inline content rendering by incorporating inherited styles 2026-06-25 04:19:21 +05:30
Anish Sarkar
f3a4437acd feat(oauth): add checks for oauth_account table existence before migration 2026-06-25 03:55:49 +05:30