Types
All public TypeScript types exported by the SDK.
Import
typescript
import type {
UserProfile,
ConfigureClientOptions,
// ... etc
} from 'configure';Core Types
UserProfile
Returned by profile.get().
typescript
interface UserProfile {
identity: Record<string, unknown>;
preferences: string[];
summary?: string;
integrations: Record<string, IntegrationData>;
agents: Record<string, Record<string, unknown>>;
path?: string;
data?: unknown;
}IntegrationData
Tool integration data within a UserProfile.
typescript
interface IntegrationData {
connected: boolean;
ranked?: Record<string, unknown>[];
synthesis?: {
facts: { category: string; fact: string; confidence: number }[];
summary: string;
};
preferences?: string[];
events?: unknown[];
files?: unknown[];
pages?: unknown[];
}ProfileManifest
Lightweight profile shape/counts returned by profile.ls('/').
typescript
interface ProfileManifest {
identity: { fields: string[] };
preferences: { count: number };
integrations: Record<string, {
connected: boolean;
has_synthesis?: boolean;
ranked_count?: number;
event_count?: number;
file_count?: number;
page_count?: number;
}>;
agents: Record<string, {
memory_count: number;
has_preferences: boolean;
last_active?: string;
}>;
}AgentProfile
Returned by self.getProfile().
typescript
interface AgentProfile {
soul?: string;
config?: Record<string, unknown>;
skills?: { path: string; name: string }[];
memoryCount?: number;
notes?: { path: string; name: string }[];
}AgentMemoryEntry
Returned by self.getMemories().
typescript
interface AgentMemoryEntry {
date: string; // YYYY-MM-DD
content: string; // markdown
path: string; // Storage path
}ConversationMessage
Message format for conversation history.
typescript
interface ConversationMessage {
role: 'user' | 'assistant';
content: string;
}Memory Types
RememberResponse
Returned by profile.remember().
typescript
interface RememberResponse {
saved: boolean;
app: string;
fact: string;
}IngestResponse
Returned by profile.ingest() (single user mode).
typescript
interface IngestResponse {
status: 'processing' | 'completed';
}IngestBatchResponse
Returned by profile.ingest() (batch mode).
typescript
interface IngestBatchResponse {
status: 'processing' | 'completed';
totalUsers: number;
totalConversations: number;
totalFactsWritten: number;
users: IngestUserResult[];
}IngestUserResult
Per-user result from batch ingestion.
typescript
interface IngestUserResult {
userId: string;
configureId: string;
factsWritten: number;
conversationsProcessed: number;
error?: string;
}IngestUserEntry
A single user entry for batch ingestion.
typescript
interface IngestUserEntry {
userId: string;
conversations?: IngestConversation[];
messages?: ConversationMessage[];
text?: string;
}IngestOptions
Options for single-user ingestion.
typescript
interface IngestOptions {
memoryCriteria?: string;
sync?: boolean;
text?: string;
}IngestBatchOptions
Options for batch ingestion.
typescript
interface IngestBatchOptions {
memoryCriteria?: string;
sync?: boolean;
}Document Types
DocumentsResponse
Document response structure. Read documents via profile.read(token, userId, '/documents/user.md') etc.
typescript
interface DocumentsResponse {
documents: {
'user.md'?: DocumentEntry | null;
'soul.md'?: DocumentEntry | null;
'preferences.md'?: DocumentEntry | null;
'context.md'?: DocumentEntry | null;
};
}GenerateDocumentsResponse
Returned by profile.generateDocuments().
typescript
interface GenerateDocumentsResponse {
documents: {
'user.md'?: (DocumentEntry & { chars: number }) | null;
'soul.md'?: (DocumentEntry & { chars: number }) | null;
'preferences.md'?: (DocumentEntry & { chars: number }) | null;
'context.md'?: (DocumentEntry & { chars: number }) | null;
};
cached: boolean;
}DocumentEntry
A single document in the document suite.
typescript
interface DocumentEntry {
content: string;
generated_at: string;
}Tool Types
ToolType
typescript
type ToolType = 'gmail' | 'calendar' | 'drive' | 'notion';SearchEmailsResponse
typescript
interface SearchEmailsResponse {
query: string;
count: number;
emails: Array<{ subject: string; snippet: string; date?: string; from?: string }>;
}SearchCalendarResponse
typescript
interface SearchCalendarResponse {
range: string;
count: number;
events: Array<{ summary: string; start?: string; end?: string; location?: string; description?: string }>;
}SearchFilesResponse
typescript
interface SearchFilesResponse {
query: string;
count: number;
files: Array<{ name: string; mimeType?: string; modifiedTime?: string; webViewLink?: string }>;
}SearchNotesResponse
typescript
interface SearchNotesResponse {
query: string;
count: number;
notes: Array<{ title: string; url?: string; lastEdited?: string }>;
}SearchWebResponse
typescript
interface SearchWebResponse {
query: string;
count: number;
results: Array<{ title: string; url?: string; snippet: string; publishedDate?: string }>;
}CreateEventResponse
typescript
interface CreateEventResponse {
created: boolean;
event: { title: string; start: string; end: string; description?: string; location?: string };
message: string;
}SendEmailResponse
typescript
interface SendEmailResponse {
sent: boolean;
email: { to: string; subject: string; bodyPreview: string };
message: string;
}ListToolsResponse
typescript
interface ListToolsResponse {
tools: Array<{ id: ToolType; name: string; connected: boolean; description?: string }>;
}ConnectToolResponse
typescript
interface ConnectToolResponse {
success: boolean;
url?: string;
connectionRequestId: string;
alreadyConnected?: boolean;
}ConfirmToolResponse
typescript
interface ConfirmToolResponse {
success: boolean;
connected: boolean;
sync?: { itemsSynced?: number; [key: string]: unknown };
}SyncToolResponse
typescript
interface SyncToolResponse {
synced: boolean;
tool: ToolType;
threads_count?: number;
events_count?: number;
files_count?: number;
pages_count?: number;
}SearchOptions
typescript
interface SearchOptions {
maxResults?: number;
}Storage Types
CfsEntry
A single entry returned by ls().
typescript
interface CfsEntry {
path: string;
type: 'markdown' | 'json' | 'ref';
metadata: Record<string, unknown>;
updated_at: string;
}CfsLsResult
typescript
interface CfsLsResult {
entries: CfsEntry[];
count: number;
}CfsLsOptions
typescript
interface CfsLsOptions {
depth?: number; // Default: 1
limit?: number; // Default: 100
}CfsReadResult
typescript
interface CfsReadResult {
path: string;
content: string;
type: 'markdown' | 'json' | 'ref';
metadata: Record<string, unknown>;
tokens: number;
is_directory: boolean;
}CfsWriteOptions
typescript
interface CfsWriteOptions {
type?: 'markdown' | 'json'; // Default: 'markdown'
mode?: 'overwrite' | 'append' | 'merge'; // Default: 'overwrite'
}CfsWriteResult
typescript
interface CfsWriteResult {
path: string;
created: boolean;
tokens: number;
}CfsSearchHit
typescript
interface CfsSearchHit {
path: string;
type: 'markdown' | 'json' | 'ref';
snippet?: string; // Omitted when filesOnly is true
score: number;
}CfsSearchResult
typescript
interface CfsSearchResult {
results: CfsSearchHit[];
count: number;
}CfsSearchOptions
typescript
interface CfsSearchOptions {
scope?: string; // Default: '/'
limit?: number; // Default: 10
filesOnly?: boolean; // Default: false
}CfsRmResult
typescript
interface CfsRmResult {
deleted: number;
}UI Types
UIComponentType
typescript
type UIComponentType =
| 'phone_input'
| 'otp_input'
| 'memory_card'
| 'connection_list'
| 'single_connector'
| 'confirmation'
| 'memory_import'
| 'status_indicator'
| 'searching_indicator'
| 'memory_badge'
| 'tool_confirmation';ToolApprovalDecision
typescript
type ToolApprovalDecision = 'approved' | 'denied' | 'always_allow';ToolConfirmationData
typescript
interface ToolConfirmationData {
actionId: string;
tool: string;
params: Record<string, unknown>;
}Config Types
ConfigureClientOptions
typescript
interface ConfigureClientOptions {
baseUrl?: string;
timeout?: number;
fetch?: typeof fetch;
}