42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
namespace Nexus.Api.Services;
|
|
|
|
public sealed record MemoryFileInfo(
|
|
string Name,
|
|
string Path,
|
|
long Size,
|
|
DateTime ModifiedAt,
|
|
string SourceAgentId,
|
|
string WorkspacePath);
|
|
|
|
public sealed record MemoryFileContent(
|
|
string Name,
|
|
string Path,
|
|
string Content,
|
|
long Size,
|
|
DateTime ModifiedAt,
|
|
string SourceAgentId,
|
|
string WorkspacePath);
|
|
|
|
public sealed record MemorySearchResult(
|
|
string Name,
|
|
string Path,
|
|
string Excerpt,
|
|
long Size,
|
|
string SourceAgentId,
|
|
string WorkspacePath);
|
|
|
|
public interface IMemoryService
|
|
{
|
|
Task<IReadOnlyList<MemoryFileInfo>> GetAllAsync(
|
|
string agentId = "iris",
|
|
CancellationToken cancellationToken = default);
|
|
Task<IReadOnlyList<MemorySearchResult>> SearchAsync(
|
|
string query,
|
|
string agentId = "iris",
|
|
CancellationToken cancellationToken = default);
|
|
Task<MemoryFileContent?> GetFileAsync(
|
|
string name,
|
|
string agentId = "iris",
|
|
CancellationToken cancellationToken = default);
|
|
}
|