Skip to main content

RectilinearEngine

Struct RectilinearEngine 

Source
pub struct RectilinearEngine { /* private fields */ }

Implementations§

Source§

impl RectilinearEngine

Source

pub fn new( db_path: String, gemini_api_key: Option<String>, ) -> Result<Self, RectilinearError>

Create a new engine with an explicit database path and optional Gemini API key. Linear API keys are resolved per-workspace from config.

Source

pub fn linear_api_key_for_workspace( &self, workspace_id: &str, ) -> Result<String, RectilinearError>

Resolve the Linear API key for a given workspace from config.

Source

pub fn list_workspaces(&self) -> Result<Vec<String>, RectilinearError>

List all configured workspace names.

Source

pub fn get_active_workspace(&self) -> Result<String, RectilinearError>

Get the active workspace name.

Source

pub fn get_issue( &self, id_or_identifier: String, ) -> Result<Option<RtIssue>, RectilinearError>

Look up an issue by UUID or identifier (e.g. “CUT-123”).

Source

pub fn get_triage_queue( &self, team: Option<String>, include_completed: bool, workspace_id: String, ) -> Result<Vec<RtIssue>, RectilinearError>

Get unprioritized issues for triage.

Source

pub fn search_fts( &self, query: String, limit: u32, workspace_id: String, ) -> Result<Vec<RtSearchResult>, RectilinearError>

Full-text search (FTS5, BM25 ranking). Synchronous — hits local SQLite only.

Source

pub fn count_issues( &self, team: Option<String>, workspace_id: String, ) -> Result<u64, RectilinearError>

Count issues in the local database.

Source

pub fn count_embedded_issues( &self, team: Option<String>, workspace_id: String, ) -> Result<u64, RectilinearError>

Count issues that have at least one embedding chunk.

Source

pub fn get_sync_progress(&self) -> Option<RtSyncProgress>

Return the current sync progress, if a sync or embedding pass is active.

Source

pub fn get_field_completeness( &self, team: Option<String>, workspace_id: String, ) -> Result<RtFieldCompleteness, RectilinearError>

Get field completeness counts in a single query.

Source

pub fn list_all_issues( &self, team: Option<String>, filter: Option<String>, limit: u32, offset: u32, workspace_id: String, ) -> Result<Vec<RtIssueSummary>, RectilinearError>

List all issues with lightweight summary data. Supports pagination and filtering.

Source

pub fn list_synced_teams( &self, workspace_id: String, ) -> Result<Vec<RtTeamSummary>, RectilinearError>

List teams with synced issues and their embedding coverage. Local-only, no network.

Source

pub fn get_relations( &self, issue_id: String, ) -> Result<Vec<RtRelation>, RectilinearError>

Get enriched relations for an issue.

Source

pub fn get_active_issues( &self, team: String, state_types: Vec<String>, workspace_id: String, ) -> Result<Vec<RtIssueEnriched>, RectilinearError>

Get issues filtered by team and state types, enriched with blocker info.

Source

pub async fn list_teams( &self, workspace_id: String, ) -> Result<Vec<RtTeam>, RectilinearError>

List all teams from Linear.

Source

pub async fn test_gemini_api_key(&self) -> Result<(), RectilinearError>

Validate the configured Gemini API key without generating embeddings.

Source

pub async fn sync_team( &self, team_key: String, full: bool, workspace_id: String, ) -> Result<u64, RectilinearError>

Sync issues from Linear for a team. Returns the number of issues synced.

Source

pub async fn search_hybrid( &self, query: String, team: Option<String>, limit: u32, workspace_id: String, ) -> Result<Vec<RtSearchResult>, RectilinearError>

Hybrid search (FTS + vector via RRF). Requires embedder for vector component.

Source

pub async fn find_duplicates( &self, text: String, team: Option<String>, threshold: f32, workspace_id: String, ) -> Result<Vec<RtSearchResult>, RectilinearError>

Find potential duplicate issues by semantic similarity.

Source

pub async fn save_issue( &self, issue_id: String, title: Option<String>, description: Option<String>, priority: Option<i32>, state: Option<String>, labels: Option<Vec<String>>, workspace_id: String, ) -> Result<(), RectilinearError>

Update an issue in Linear (title, description, priority, state, labels).

Source

pub async fn add_comment( &self, issue_id: String, body: String, workspace_id: String, ) -> Result<(), RectilinearError>

Add a comment to a Linear issue.

Source

pub async fn refresh_issue( &self, id_or_identifier: String, workspace_id: String, ) -> Result<Option<RtIssue>, RectilinearError>

Fetch a single issue live from Linear and upsert into local DB. Accepts either a UUID or identifier (e.g. “CUT-123”).

Source

pub async fn embed_issues( &self, team: Option<String>, limit: u32, workspace_id: String, ) -> Result<u64, RectilinearError>

Generate embeddings for issues that don’t have them yet. Returns the number of issues embedded.

Trait Implementations§

Source§

impl<UT> LiftRef<UT> for RectilinearEngine

Source§

impl<UT> LowerError<UT> for RectilinearEngine

Source§

fn lower_error(obj: Self) -> RustBuffer

Lower this value for scaffolding function return Read more
Source§

impl<UT> LowerReturn<UT> for RectilinearEngine

Source§

type ReturnType = <Arc<RectilinearEngine> as LowerReturn<UniFfiTag>>::ReturnType

The type that should be returned by scaffolding functions for this type. Read more
Source§

fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>

Lower the return value from an scaffolding call Read more
Source§

fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>

Lower the return value for failed argument lifts Read more
Source§

impl<UT> TypeId<UT> for RectilinearEngine

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CompatExt for T

Source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
Source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
Source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

Source§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
Source§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
Source§

unsafe fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<> Read more
Source§

unsafe fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more