conversations

package
v0.1.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package conversations projects native harness session inventories into the existing workspace metadata protocol. It never owns or copies transcripts.

Index

Constants

View Source
const BrowserVersion = 1

Variables

This section is empty.

Functions

func Filter

func Filter(summaries []session.ChatSummary, snapshot registry.Snapshot, store *session.Store, q Query) []session.ChatSummary

Filter keeps the protocol's existing chat summaries, scoped to a registered project or exact directory. It never invents a project for an arbitrary path.

Types

type BrowseQuery

type BrowseQuery struct {
	AgentID string `json:"agentId,omitempty"`
	Search  string `json:"search,omitempty"`
	Cursor  string `json:"cursor,omitempty"`
	Limit   int    `json:"limit,omitempty"`
	Refresh bool   `json:"refresh,omitempty"`
}

BrowseQuery is an explicit, all-folder inventory. Ordinary /chats activity polling remains separate and never triggers a global harness scan.

type Conversation

type Conversation struct {
	ID          string `json:"id"`
	ChatID      string `json:"chatId,omitempty"`
	AgentID     string `json:"agentId,omitempty"`
	AgentType   string `json:"agentType"`
	AgentName   string `json:"agentName"`
	ProjectID   string `json:"projectId,omitempty"`
	ProjectName string `json:"projectName,omitempty"`
	CWD         string `json:"cwd"`
	Title       string `json:"title"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
	LastStatus  string `json:"lastStatus,omitempty"`
	LastRunID   string `json:"lastRunId,omitempty"`
	// contains filtered or unexported fields
}

Conversation is metadata, not a transcript. ChatID is present when a native reference has already been attached to this workspace's normal chat protocol.

type Index

type Index struct {
	// contains filtered or unexported fields
}

func New

func New(reg *registry.Store, store *session.Store, adapters []agent.Adapter, gate *sync.Mutex, busy func(string) bool) *Index

func (*Index) Browse

func (idx *Index) Browse(ctx context.Context, q BrowseQuery) (Page, error)

Browse uses a keyset cursor, so newly active chats cannot shift later pages and duplicate rows. Search runs over metadata only, across titles and folders.

func (*Index) Open

func (idx *Index) Open(ctx context.Context, request OpenRequest) (OpenResult, error)

Open resolves the stable browser identity using native metadata, never a client-supplied path/session pair. It adopts a reference and delegates history and resume to the existing chat protocol. Repeated opens reuse the same chat.

func (*Index) Refresh

func (idx *Index) Refresh(ctx context.Context, q Query) ([]registry.SessionDiscoveryIssue, error)

Refresh coalesces concurrent callers per project/harness. Healthy inventories are reused for a minute; an explicit refresh bypasses that cache. Errors keep the last successful links and briefly back off instead of pruning as empty.

type OpenRequest

type OpenRequest struct {
	ID      string `json:"id"`
	AgentID string `json:"agentId,omitempty"`
}

type OpenResult

type OpenResult struct {
	ChatID   string            `json:"chatId"`
	Snapshot registry.Snapshot `json:"snapshot"`
}

type Page

type Page struct {
	WorkspaceID string                           `json:"workspaceId"`
	Items       []Conversation                   `json:"items"`
	Total       int                              `json:"total"`
	NextCursor  string                           `json:"nextCursor,omitempty"`
	Issues      []registry.SessionDiscoveryIssue `json:"issues,omitempty"`
}

type Query

type Query struct {
	ProjectID string `json:"projectId,omitempty"`
	CWD       string `json:"cwd,omitempty"`
	Refresh   bool   `json:"refresh,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL