services

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextService

type ContextService struct {
	pb.UnimplementedContextServiceServer
	// contains filtered or unexported fields
}

ContextService provides S3-backed file storage for workspace context.

func NewContextService

func NewContextService(cfg types.S3Config) (*ContextService, error)

NewContextService creates a new context service with retry and timeout configuration

func (*ContextService) Create

Create creates a new empty file

func (*ContextService) Delete

Delete removes a file or directory

func (*ContextService) ListTree

ListTree returns flat listing of subtree (for future prefetching)

func (*ContextService) Mkdir

Mkdir creates a directory

func (*ContextService) Read

Read reads file content with size limits to prevent OOM

func (*ContextService) ReadDir

ReadDir lists directory contents with full metadata

Readlink reads a symbolic link target

func (*ContextService) Rename

Rename moves/renames a file or directory (copy then delete)

func (*ContextService) Stat

Stat returns file/directory attributes

Symlink creates a symbolic link

func (*ContextService) Truncate

Truncate changes file size

func (*ContextService) Write

Write writes file content with size limits

type FilesystemService

type FilesystemService struct {
	pb.UnimplementedFilesystemServiceServer
	// contains filtered or unexported fields
}

FilesystemService provides gRPC filesystem metadata operations. This service is used by the FUSE client for caching metadata.

func NewFilesystemService

func NewFilesystemService(store repository.FilesystemStore) *FilesystemService

NewFilesystemService creates a new FilesystemService.

func (*FilesystemService) Chmod

Chmod changes file permissions.

func (*FilesystemService) Create

Create creates a file.

func (*FilesystemService) Mkdir

Mkdir creates a directory.

func (*FilesystemService) ReadDir

ReadDir returns directory entries.

func (*FilesystemService) Remove

Remove removes a file or directory.

func (*FilesystemService) Rename

Rename renames a file or directory.

func (*FilesystemService) Stat

Stat returns metadata for a path.

type GatewayService

type GatewayService struct {
	pb.UnimplementedGatewayServiceServer
	// contains filtered or unexported fields
}

func NewGatewayService

func NewGatewayService(backend repository.BackendRepository, s2Client *common.S2Client) *GatewayService

func (*GatewayService) AddConnection

func (*GatewayService) AddMember

func (*GatewayService) CreateToken

func (*GatewayService) CreateWorkerToken

func (*GatewayService) CreateWorkspace

func (*GatewayService) DeleteWorkspace

func (s *GatewayService) DeleteWorkspace(ctx context.Context, req *pb.DeleteWorkspaceRequest) (*pb.DeleteResponse, error)

func (*GatewayService) GetTask

func (s *GatewayService) GetTask(ctx context.Context, req *pb.GetTaskRequest) (*pb.TaskResponse, error)

func (*GatewayService) GetTaskLogs

func (*GatewayService) GetWorkspace

func (*GatewayService) ListConnections

func (*GatewayService) ListMembers

func (*GatewayService) ListTasks

func (*GatewayService) ListTokens

func (*GatewayService) ListWorkerTokens

func (*GatewayService) ListWorkspaces

func (*GatewayService) RemoveConnection

func (s *GatewayService) RemoveConnection(ctx context.Context, req *pb.RemoveConnectionRequest) (*pb.DeleteResponse, error)

func (*GatewayService) RemoveMember

func (s *GatewayService) RemoveMember(ctx context.Context, req *pb.RemoveMemberRequest) (*pb.DeleteResponse, error)

func (*GatewayService) RevokeToken

func (s *GatewayService) RevokeToken(ctx context.Context, req *pb.RevokeTokenRequest) (*pb.DeleteResponse, error)

type SourceService

type SourceService struct {
	pb.UnimplementedSourceServiceServer
	// contains filtered or unexported fields
}

SourceService implements the gRPC SourceService for integration access.

func NewSourceService

func NewSourceService(registry *sources.Registry, backend repository.BackendRepository, fsStore repository.FilesystemStore) *SourceService

NewSourceService creates a new SourceService.

func NewSourceServiceWithOAuth

func NewSourceServiceWithOAuth(registry *sources.Registry, backend repository.BackendRepository, fsStore repository.FilesystemStore, oauthRegistry *oauth.Registry) *SourceService

NewSourceServiceWithOAuth creates a SourceService with OAuth refresh support.

func (*SourceService) CreateSmartQuery

CreateSmartQuery creates a new smart query via LLM inference

func (*SourceService) DeleteSmartQuery

DeleteSmartQuery removes a smart query by external_id

func (*SourceService) ExecuteSmartQuery

ExecuteSmartQuery runs a query and returns materialized results

func (*SourceService) GetSmartQuery

GetSmartQuery retrieves a smart query by path

func (*SourceService) InvalidateQueryCache

func (s *SourceService) InvalidateQueryCache(ctx context.Context, workspaceId uint, queryPath string) error

InvalidateQueryCache invalidates cached results for a query path. Call this before ReadDir when refresh=true to force re-execution.

func (*SourceService) ListSmartQueries

ListSmartQueries lists queries under a parent path

func (*SourceService) Read

Read reads file content

func (*SourceService) ReadDir

ReadDir lists directory contents

Readlink reads a symbolic link target

func (*SourceService) RefreshSmartQuery

func (s *SourceService) RefreshSmartQuery(ctx context.Context, queryPath string) ([]repository.QueryResult, error)

RefreshSmartQuery forces re-execution of a smart query, bypassing all caches. Returns the fresh results from the provider (e.g., Gmail API).

func (*SourceService) Stat

Stat returns file/directory attributes for a source path

func (*SourceService) UpdateSmartQuery

UpdateSmartQuery updates an existing query's name and/or guidance

type StorageService

type StorageService struct {
	pb.UnimplementedContextServiceServer
	// contains filtered or unexported fields
}

StorageService provides S3-backed file storage with per-workspace buckets

func NewStorageService

func NewStorageService(client *clients.StorageClient, eventBus *common.EventBus) (*StorageService, error)

func (*StorageService) Create

Create creates an empty file

func (*StorageService) Delete

Delete removes a file or directory

func (*StorageService) GetDownloadURL

func (s *StorageService) GetDownloadURL(ctx context.Context, path string) (string, error)

GetDownloadURL generates a presigned GET URL for downloading a file

func (*StorageService) GetUploadURL

func (s *StorageService) GetUploadURL(ctx context.Context, path, contentType string) (string, string, error)

GetUploadURL generates a presigned PUT URL for uploading a file

func (*StorageService) InvalidateCache added in v0.1.14

func (s *StorageService) InvalidateCache(ctx context.Context, path string)

InvalidateCache clears the cache for a path (used when client requests fresh data)

func (*StorageService) ListTree

ListTree returns flat listing of subtree for prefetching

func (*StorageService) Mkdir

Mkdir creates a directory

func (*StorageService) NotifyUploadComplete

func (s *StorageService) NotifyUploadComplete(ctx context.Context, path string) error

NotifyUploadComplete invalidates caches after a file upload

func (*StorageService) Read

Read reads file content

func (*StorageService) ReadDir

ReadDir lists directory contents

Readlink reads symbolic link target

func (*StorageService) Rename

Rename moves/renames a file or directory

func (*StorageService) Stat

Stat returns file/directory attributes

Symlink creates a symbolic link

func (*StorageService) Truncate

Truncate changes file size

func (*StorageService) Write

Write writes file content

type ToolService

type ToolService struct {
	pb.UnimplementedToolServiceServer
	// contains filtered or unexported fields
}

func NewToolService

func NewToolService(registry *tools.Registry) *ToolService

func NewToolServiceWithBackend

func NewToolServiceWithBackend(registry *tools.Registry, backend repository.BackendRepository) *ToolService

func NewToolServiceWithOAuth

func NewToolServiceWithOAuth(registry *tools.Registry, backend repository.BackendRepository, oauthRegistry *oauth.Registry) *ToolService

func (*ToolService) ExecuteTool

func (*ToolService) GetToolHelp

func (*ToolService) ListTools

func (*ToolService) Resolver

func (s *ToolService) Resolver() *tools.WorkspaceToolResolver

Resolver returns the workspace tool resolver for use by other components

type WorkerService

type WorkerService struct {
	pb.UnimplementedWorkerServiceServer
	// contains filtered or unexported fields
}

func NewWorkerService

func NewWorkerService(sched *scheduler.Scheduler, backend *repository.PostgresBackend) *WorkerService

func (*WorkerService) Deregister

func (*WorkerService) GetWorker

func (*WorkerService) Heartbeat

func (*WorkerService) RegisterWorker

func (*WorkerService) SetTaskResult

func (*WorkerService) UpdateStatus

Jump to

Keyboard shortcuts

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