Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

/app/conversations Bitcode Conversations

/conversations is the direct fullscreen conversation mode for Bitcode.

It exists so the chat-based interface remains a first-class product workspace-adjacent surface while conversation work stays aligned with /exchange.

Current owners:

  • page.tsx Direct route metadata for the fullscreen conversations surface.
  • ConversationsRouteClient.tsx Route-local shell that keeps conversations tied to product workspace continuity and returns closed routes to /exchange.
  • components/ConversationsOverlay.tsx The active fullscreen/floating/sidebar conversation owner used by both the direct route and product workspace entry points.
  • ../api/conversations/* App-owned JSON and mock-mode API carriers for list, branch, and stream behavior.
  • conversation-session-route-history.ts Route-facing ConversationSession contract helpers for route-local history, source-safe payload admission, and create/restore/branch/retry/redact/stream operation boundaries.
  • @bitcode/api/src/conversations/stream-events Route-facing ConversationStreamEvent helpers for source-safe SSE metadata, rich execution log rows, event ids, proof roots, redaction posture, prompt/result disclosure posture, and fail-closed states.
  • conversation-writing-workspace.ts Route-facing ConversationWritingWorkspace helpers for source-safe summary and handoff payloads from fullscreen drafting.
  • components/ConversationWritingWorkspace.tsx Fullscreen composer workspace for Read Request, Need feedback, AssetPack review note, and product workspace handoff summary drafts.
  • conversation-source-selector.ts Route-facing ConversationSourceSelector helpers for source-safe preview state, rights, settlement, disclosure, and policy posture.
  • components/ConversationSourceSelector.tsx Source selection panel for repository, branch, commit, deposit, BTD range, AssetPack preview, document, and prior conversation context.
  • conversation-product-handoff.ts Route-facing ConversationProductHandoff helpers for source-safe product workspace handoff envelopes, route params, proof roots, and authority boundaries.
  • components/ConversationProductHandoff.tsx product workspace handoff panel for Depositing, Reading, Finding Fits, Exchange, settlement, and delivery workflows.
  • conversation-persistence-privacy-redaction.ts Route-facing ConversationPersistencePrivacyRedaction helpers for visibility tier separation, source-safe preview redaction, retention, export, delete, replay, and incident repair posture.
  • components/ConversationPersistencePrivacyPanel.tsx Persistence privacy panel for inspecting source-safe storage posture from the conversation header.

This route should stay explicit about:

  • fullscreen terminal-mode continuity,
  • return flow back into the Bitcode activity ledger,
  • rich-input continuity for source attachments, asset-pack references, and output destinations,
  • retained conversation API boundaries,
  • and ownership of the chat-based interface rather than treating it as brochure or sidebar residue.

V37 Gate 2 route-history boundary

Conversation history is route-local projection state. It can restore a conversation, branch a conversation, retry a stream, and apply redaction checkpoints, but it does not become global ledger truth and does not own product workspace, settlement, wallet, Exchange, or BTD ownership authority.

The source-safe ConversationSession contract for this route is generated by buildConversationSessionRouteHistory into .proofs/v37/conversation-session-route-history.json and checked by pnpm run check:v37-gate2. The route must not expose protected source, raw protected prompts, protected model responses with source, provider tokens, wallet private material, secrets, settlement private payloads, or unpaid AssetPack source.

V37 Gate 3 stream event boundary

Conversation streams attach source-safe ConversationStreamEvent metadata to legacy-compatible SSE rows. Model deltas, tool calls, retrieval summaries, proof roots, retry states, completion decisions, and error rows can be shown in the shared rich execution log. Collapsed rows must be readable enough for a normal operator to follow the live stream; expanded rows may show event ids, proof roots, redaction posture, prompt/result disclosure posture, fail-closed states, and source-safe metadata only.

The source-safe ConversationStreamEvent contract is generated by buildConversationStreamEventContract into .proofs/v37/conversation-stream-event-contract.json and checked by pnpm run check:v37-gate3. The stream UI must not expose protected source, raw protected prompts, raw provider responses, provider tokens, wallet private material, secrets, settlement private payloads, unpaid AssetPack source, or global ledger authority claims.

V37 Gate 5 source selector boundary

The fullscreen ConversationSourceSelector lets conversation users select context without turning Conversations into a source-disclosure or settlement surface. Selectors cover repository, branch, commit, deposit, BTD range, AssetPack preview, document, and prior conversation references. Every selector preview is governed by account, organization, wallet, rights, settlement, disclosure, and policy posture and returns allowed, denied, or retry-required source-safe metadata.

The source-safe ConversationSourceSelector contract is generated by buildConversationSourceSelector into .proofs/v37/conversation-source-selector.json and checked by pnpm run check:v37-gate5. The selector UI may show source-safe references, proof roots, event ids, denial reasons, and retry actions. It must not expose protected source, raw protected prompts, protected model responses with source, provider tokens, wallet private material, secrets, settlement private payloads, unpaid AssetPack source, private BTD material, or global ledger authority claims.

V37 Gate 6 product workspace handoff boundary

The fullscreen ConversationProductHandoff panel lets conversation users prepare product workspace transaction intent without executing the transaction inside Conversations. Handoff envelopes cover Depositing, Reading, Finding Fits, Exchange, settlement, and delivery. They preserve conversation id, transaction id, repository anchor, source selector refs, source-safe summary, policy result, product workspace route, transaction detail, proof root, and event id.

The source-safe ConversationProductHandoff contract is generated by buildConversationProductHandoff into .proofs/v37/conversation-product-handoff.json and checked by pnpm run check:v37-gate6. The handoff UI may open /exchange with source-safe route context, but product workspace remains the ledger, wallet, settlement, Exchange, delivery, and BTD ownership cockpit. Handoff payloads must not expose protected source, raw protected prompts, protected model responses with source, provider tokens, wallet private material, settlement private payloads, unpaid AssetPack source, ledger write authority, wallet signing authority, or product workspace authority bypass.

V39 enterprise Reading stage handoff

V39 Gate 3 extends ConversationProductHandoff with source-safe readingStage intent for the five product workspace Reading stages. Conversations may suggest request Read, review synthesized Need, request Finding Fits, review source-safe AssetPack preview, or buy AssetPack/settle posture. The generated product workspace route and envelope metadata carry readingStage and productEnterpriseReadingStage; product workspace reads the values back as source-safe operator context and remains the authority for transaction execution, wallet, settlement, ledger, BTD rights, and delivery.

The stage handoff must not serialize protected source, raw protected prompts, raw provider responses, unpaid AssetPack source, wallet private material, private settlement payloads, or ledger write authority. Gate 3 is checked by pnpm run check:v39-gate3.

V37 Gate 7 persistence privacy boundary

The fullscreen ConversationPersistencePrivacyPanel lets conversation users inspect durable storage posture without exposing protected payloads. The source-safe ConversationPersistencePrivacyRedaction contract is generated by buildConversationPersistencePrivacyRedaction into .proofs/v37/conversation-persistence-privacy-redaction.json and checked by pnpm run check:v37-gate7.

Conversation persistence separates public, user-visible, organization-visible, buyer-visible, reviewer-visible, and operator-only visibility tier data. Persist message, restore history, export history, delete history, retain history, replay history, and incident repair each carry source-safe proof roots and event ids. Export can include only source-safe visible tiers. Delete keeps only a tombstone proof. Retention never escalates visibility. Replay uses prompt template ids and parsed result shapes rather than raw protected prompts or protected model responses. Incident repair operates over proof roots and redaction verdicts. Protected source, raw protected prompts, protected model responses with source, provider tokens, wallet private material, secrets, settlement private payloads, private payment credentials, operator private notes, unpaid AssetPack source, ledger write authority, and wallet signing authority are forbidden in persisted conversation payloads.

V37 Gate 8 telemetry proof boundary

The fullscreen ConversationTelemetryProofPanel lets conversation users and operators inspect the source-safe dashboard and runbook posture of conversation events. The source-safe ConversationTelemetryProofHooks contract is generated by buildConversationTelemetryProofHooks into .proofs/v37/conversation-telemetry-proof-hooks.json and checked by pnpm run check:v37-gate8.

Telemetry proof hooks cover session, message, stream, tool, source selector, product workspace handoff, retry, error, and completion families. Each hook binds event kind, conversation id, message id, run id, product workspace transaction id, correlation ids, proof roots, redaction posture, dashboard panel, runbook id, and visibility tier. UI previews and stream metadata may expose ids, states, counts, proof roots, dashboard ids, runbook ids, and redacted error classes only. Protected source, raw protected prompts, raw provider responses, provider tokens, wallet private material, settlement private payloads, private payment credentials, operator private notes, ledger write authority, wallet signing authority, and unpaid AssetPack source are forbidden.

V37 Gate 9 rehearsal proof boundary

The fullscreen ConversationRehearsalPanel lets users and operators inspect source-safe local and staging-testnet rehearsal posture before promotion readiness. The source-safe ConversationRehearsal contract is generated by buildConversationRehearsal into .proofs/v37/conversation-rehearsal.json with source-safe-conversation-rehearsal-metadata and checked by pnpm run check:v37-gate9.

Local and staging-testnet rehearsals exercise chat, streaming, writing, source selector, product workspace handoff, restore, retry, redaction, and error flows. Rehearsal logs/screenshots are source-safe. Route/UI checks, telemetry roots, and value-bearing mainnet blocking are visible. UI previews may expose lane, flow, proof root, route/UI root, telemetry root, screenshot/log root, and blocked mainnet posture only. Protected source, raw protected prompts, raw provider responses, provider tokens, wallet private material, settlement private payloads, private payment credentials, operator private notes, ledger write authority, wallet signing authority, and unpaid AssetPack source are forbidden.

Gate 9 exact rehearsal statement: local and staging-testnet rehearsals exercise chat, streaming, writing, source selector, product workspace handoff, restore, retry, redaction, and error flows. Rehearsal logs/screenshots are source-safe. Route/UI checks, telemetry roots, and value-bearing mainnet blocking are visible.

V37 Gate 4 writing workspace boundary

The fullscreen ConversationWritingWorkspace lets readers draft Read Requests, Need feedback, AssetPack review notes, and product workspace handoff summaries while staying inside route-local Conversations. Drafts can be saved and restored locally for recovery. Summaries and handoff messages crossing into the stream are redacted source-safe metadata only.

The source-safe ConversationWritingWorkspace contract is generated by buildConversationWritingWorkspace into .proofs/v37/conversation-writing-workspace.json and checked by pnpm run check:v37-gate4. The workspace UI must support save, restore, summarize, and handoff controls, keyboard behavior, responsive fullscreen layout, recovery status, and source-safe summary preview. It must not emit protected source, raw protected prompts, provider tokens, private wallet material, secrets, settlement private payloads, unpaid AssetPack source, or global ledger authority claims.