kagura-memory 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -141,10 +141,12 @@ working against `MIN_SERVER_VERSION`.
141
141
  ## Relationship to the Python SDK
142
142
 
143
143
  This package ports the Python SDK's core (client, auth, REST clients,
144
- models). Not yet ported: the `kagura` CLI, `KaguraAgent` (LLM-driven
145
- memory), the document-ingestion pipeline (`FileIngestor`), and the
146
- zero-knowledge secrets client. Use the Python SDK for those; both SDKs
147
- share the same credential files and server APIs. See
144
+ models). Not yet ported: the `kagura` CLI, the document-ingestion
145
+ pipeline (`FileIngestor`), and the zero-knowledge secrets client.
146
+ (`KaguraAgent` was removed from the Python SDK in v0.37.0 — the actor
147
+ role lives in the [kagura-agent](https://pypi.org/project/kagura-agent/)
148
+ package, so it will not be ported here.) Use the Python SDK for those;
149
+ both SDKs share the same credential files and server APIs. See
148
150
  [`docs/design/2026-07-05-typescript-port-design.md`](docs/design/2026-07-05-typescript-port-design.md)
149
151
  for the scope decisions.
150
152
 
package/dist/index.d.cts CHANGED
@@ -9,85 +9,6 @@
9
9
  * Fields that carry a default in the Python models (including `None`
10
10
  * defaults) are optional here — servers may omit them.
11
11
  */
12
- /** A message in a conversation session. */
13
- interface Message {
14
- role: "user" | "assistant" | "system";
15
- content: string;
16
- }
17
- /** An artifact attached to a session (code, document, etc.). */
18
- interface Artifact {
19
- type: "code" | "document" | "error" | "config";
20
- content: string;
21
- source?: string | null;
22
- language?: string | null;
23
- }
24
- /** A conversation session with messages and optional artifacts. */
25
- interface Session {
26
- messages: Message[];
27
- artifacts?: Artifact[];
28
- }
29
- /** Information about a remembered memory. */
30
- interface MemoryInfo {
31
- memory_id: string;
32
- summary: string;
33
- }
34
- /** A recalled memory with relevance score. */
35
- interface Memory {
36
- memory_id: string;
37
- summary: string;
38
- score: number;
39
- }
40
- /** LLM token usage statistics. */
41
- interface LLMUsage {
42
- prompt_tokens: number;
43
- completion_tokens: number;
44
- total_tokens: number;
45
- model: string;
46
- }
47
- /** A memory to be stored, as determined by LLM analysis. */
48
- interface MemoryToStore {
49
- /** 1-250 characters. */
50
- summary: string;
51
- content: string;
52
- /** @default "note" */
53
- type?: "code" | "note" | "decision" | "bug-fix" | "feature" | "learning";
54
- /** Range 0.0-1.0. @default 0.5 */
55
- importance?: number;
56
- tags?: string[];
57
- }
58
- /** A recall query, as determined by LLM analysis. */
59
- interface RecallQuery {
60
- query: string;
61
- /** @default "" */
62
- reason?: string;
63
- filters?: Record<string, unknown> | null;
64
- }
65
- /** Internal model for LLM analysis results. */
66
- interface AnalysisResult {
67
- should_remember: boolean;
68
- memories_to_store?: MemoryToStore[];
69
- should_recall: boolean;
70
- recall_queries?: RecallQuery[];
71
- llm_usage?: LLMUsage | null;
72
- }
73
- /** Memory discovered through explore operation. */
74
- interface ExploredMemory {
75
- memory_id: string;
76
- summary: string;
77
- /** @default 0.0 */
78
- activation?: number;
79
- /** @default 0 */
80
- hop?: number;
81
- }
82
- /** Result of processing a session. */
83
- interface ProcessResult {
84
- remembered?: MemoryInfo[];
85
- recalled?: Memory[];
86
- explored?: ExploredMemory[];
87
- context_used: string;
88
- actions?: string[];
89
- llm_usage?: LLMUsage | null;
90
- }
91
12
  /** An embedding model available on the server. */
92
13
  interface EmbeddingModel {
93
14
  name: string;
@@ -2667,4 +2588,4 @@ interface ResolveAuthOptions {
2667
2588
  */
2668
2589
  declare function resolveAuth(options?: ResolveAuthOptions): ResolvedAuth;
2669
2590
 
2670
- export { type Agent, type AgentBinding, type AgentBindingScopeOptions, type AgentBootstrapAgent, type AgentBootstrapBinding, type AgentBootstrapComponent, type AgentBootstrapComponentName, type AgentBootstrapCorrelation, type AgentBootstrapResponse, type AgentEnforcementMode, type AgentStatus, type AgentWritePolicy, AgentsClient, type AnalysisResult, type Artifact, type AuthProvider, type AuthSource, type BindAgentContextOptions, type ContextDetail, type ContextInfo, type ContextStats, type CostBreakdown, type CreateContextOptions, type CreateInvitationOptions, type CreateTokenOptions, DEFAULT_MCP_URL, DEFAULT_REST_BASE_URL, type DeliveryMode, type DuplicateMemoryInfo, type DuplicatePair, type DuplicatesResponse, type Edge, type EmbeddingModel, type EmbeddingModelsResponse, type EmbeddingStatus, type ExploredMemory, type FailedMemoryInfo, type FieldDefinition, type FileDownloadUrlResponse, type FileListResponse, type FileObject, type FileReserveResponse, FilesClient, type FilesClientOptions, type FromMcpUrlOptions, type GetAgentBootstrapOptions, type HttpMethod, type IndexerJobStatus, type IndexerSkippedReason, type IndexerState, type IndexerStateMetrics, type IndexerStatusResponse, type IngestErrorRecord, type IngestResult, KaguraAuthDeniedError, KaguraAuthError, KaguraAuthExpiredError, KaguraClient, type KaguraClientOptions, type KaguraConfig, KaguraConnectionError, KaguraContextError, KaguraError, KaguraFetchError, KaguraIngestError, KaguraIntegrityError, KaguraLLMError, KaguraNotFoundError, KaguraQuotaError, KaguraRateLimitError, KaguraRestClient, type KaguraRestClientOptions, type LLMUsage, type ListInvitationsOptions, type ListMemoriesOptions, type ListResourceEventsOptions, type ListTagsOptions, type ListTagsResponse, type ListTokensOptions, type LoadConfigOptions, MIN_SERVER_VERSION, type MemberAPIKey, type Memory, type MemoryInfo, type MemoryListItem, type MemoryListResponse, type MemoryStatItem, type MemoryStatsResponse, type MemoryToStore, type Message, type OAuthAuthResult, type PaginatedResourceTokensResponse, type ProcessResult, type RecallOptions, type RecallQuery, type RegisterAgentOptions, type RememberOptions, type ResolveAuthOptions, type ResolvedAuth, ResourceClient, type ResourceEventBatchRequest, type ResourceEventBatchResponse, type ResourceEventInput, type ResourceEventItem, type ResourceEventRecord, type ResourceEventRequest, type ResourceEventResponse, type ResourceEventsListResponse, type ResourceImpactResponse, type ResourceListItem, type ResourceListResponse, type ResourceSchemaResponse, type ResourceSetupOptions, type ResourceSetupResponse, type ResourceTokenCreate, type ResourceTokenCreateResponse, type ResourceTokenResponse, type ResourceTokenUpdate, type RollbackResult, type RollbackSummary, SDK_VERSION, SETUP_OAUTH_NOT_SUPPORTED_MSG, type SearchConfig, type SearchMode, type ServerFeatures, type ServerInfo, type Session, type SetupResourceOptions, type SleepAction, type SleepReport, type SleepReportDetail, type SleepRunStatus, type SourceType, type StaticAuthResult, type StaticSource, type TagInfo, type ToolResult, type UpdateAgentBindingOptions, type UpdateAgentOptions, type UpdateContextOptions, type UpdateMemoryOptions, type UpdateSearchConfigOptions, type UpdateTokenOptions, type UploadOptions, type UsageInfo, type UsageQuota, type UsageQuotaLimitOnly, VALID_ASSIGNABLE_ROLES, VALID_INVITE_EXPIRES, WorkspaceClient, type WorkspaceInfo, type WorkspaceInvitation, type WorkspaceMember, loadConfig, resolveAuth };
2591
+ export { type Agent, type AgentBinding, type AgentBindingScopeOptions, type AgentBootstrapAgent, type AgentBootstrapBinding, type AgentBootstrapComponent, type AgentBootstrapComponentName, type AgentBootstrapCorrelation, type AgentBootstrapResponse, type AgentEnforcementMode, type AgentStatus, type AgentWritePolicy, AgentsClient, type AuthProvider, type AuthSource, type BindAgentContextOptions, type ContextDetail, type ContextInfo, type ContextStats, type CostBreakdown, type CreateContextOptions, type CreateInvitationOptions, type CreateTokenOptions, DEFAULT_MCP_URL, DEFAULT_REST_BASE_URL, type DeliveryMode, type DuplicateMemoryInfo, type DuplicatePair, type DuplicatesResponse, type Edge, type EmbeddingModel, type EmbeddingModelsResponse, type EmbeddingStatus, type FailedMemoryInfo, type FieldDefinition, type FileDownloadUrlResponse, type FileListResponse, type FileObject, type FileReserveResponse, FilesClient, type FilesClientOptions, type FromMcpUrlOptions, type GetAgentBootstrapOptions, type HttpMethod, type IndexerJobStatus, type IndexerSkippedReason, type IndexerState, type IndexerStateMetrics, type IndexerStatusResponse, type IngestErrorRecord, type IngestResult, KaguraAuthDeniedError, KaguraAuthError, KaguraAuthExpiredError, KaguraClient, type KaguraClientOptions, type KaguraConfig, KaguraConnectionError, KaguraContextError, KaguraError, KaguraFetchError, KaguraIngestError, KaguraIntegrityError, KaguraLLMError, KaguraNotFoundError, KaguraQuotaError, KaguraRateLimitError, KaguraRestClient, type KaguraRestClientOptions, type ListInvitationsOptions, type ListMemoriesOptions, type ListResourceEventsOptions, type ListTagsOptions, type ListTagsResponse, type ListTokensOptions, type LoadConfigOptions, MIN_SERVER_VERSION, type MemberAPIKey, type MemoryListItem, type MemoryListResponse, type MemoryStatItem, type MemoryStatsResponse, type OAuthAuthResult, type PaginatedResourceTokensResponse, type RecallOptions, type RegisterAgentOptions, type RememberOptions, type ResolveAuthOptions, type ResolvedAuth, ResourceClient, type ResourceEventBatchRequest, type ResourceEventBatchResponse, type ResourceEventInput, type ResourceEventItem, type ResourceEventRecord, type ResourceEventRequest, type ResourceEventResponse, type ResourceEventsListResponse, type ResourceImpactResponse, type ResourceListItem, type ResourceListResponse, type ResourceSchemaResponse, type ResourceSetupOptions, type ResourceSetupResponse, type ResourceTokenCreate, type ResourceTokenCreateResponse, type ResourceTokenResponse, type ResourceTokenUpdate, type RollbackResult, type RollbackSummary, SDK_VERSION, SETUP_OAUTH_NOT_SUPPORTED_MSG, type SearchConfig, type SearchMode, type ServerFeatures, type ServerInfo, type SetupResourceOptions, type SleepAction, type SleepReport, type SleepReportDetail, type SleepRunStatus, type SourceType, type StaticAuthResult, type StaticSource, type TagInfo, type ToolResult, type UpdateAgentBindingOptions, type UpdateAgentOptions, type UpdateContextOptions, type UpdateMemoryOptions, type UpdateSearchConfigOptions, type UpdateTokenOptions, type UploadOptions, type UsageInfo, type UsageQuota, type UsageQuotaLimitOnly, VALID_ASSIGNABLE_ROLES, VALID_INVITE_EXPIRES, WorkspaceClient, type WorkspaceInfo, type WorkspaceInvitation, type WorkspaceMember, loadConfig, resolveAuth };
package/dist/index.d.ts CHANGED
@@ -9,85 +9,6 @@
9
9
  * Fields that carry a default in the Python models (including `None`
10
10
  * defaults) are optional here — servers may omit them.
11
11
  */
12
- /** A message in a conversation session. */
13
- interface Message {
14
- role: "user" | "assistant" | "system";
15
- content: string;
16
- }
17
- /** An artifact attached to a session (code, document, etc.). */
18
- interface Artifact {
19
- type: "code" | "document" | "error" | "config";
20
- content: string;
21
- source?: string | null;
22
- language?: string | null;
23
- }
24
- /** A conversation session with messages and optional artifacts. */
25
- interface Session {
26
- messages: Message[];
27
- artifacts?: Artifact[];
28
- }
29
- /** Information about a remembered memory. */
30
- interface MemoryInfo {
31
- memory_id: string;
32
- summary: string;
33
- }
34
- /** A recalled memory with relevance score. */
35
- interface Memory {
36
- memory_id: string;
37
- summary: string;
38
- score: number;
39
- }
40
- /** LLM token usage statistics. */
41
- interface LLMUsage {
42
- prompt_tokens: number;
43
- completion_tokens: number;
44
- total_tokens: number;
45
- model: string;
46
- }
47
- /** A memory to be stored, as determined by LLM analysis. */
48
- interface MemoryToStore {
49
- /** 1-250 characters. */
50
- summary: string;
51
- content: string;
52
- /** @default "note" */
53
- type?: "code" | "note" | "decision" | "bug-fix" | "feature" | "learning";
54
- /** Range 0.0-1.0. @default 0.5 */
55
- importance?: number;
56
- tags?: string[];
57
- }
58
- /** A recall query, as determined by LLM analysis. */
59
- interface RecallQuery {
60
- query: string;
61
- /** @default "" */
62
- reason?: string;
63
- filters?: Record<string, unknown> | null;
64
- }
65
- /** Internal model for LLM analysis results. */
66
- interface AnalysisResult {
67
- should_remember: boolean;
68
- memories_to_store?: MemoryToStore[];
69
- should_recall: boolean;
70
- recall_queries?: RecallQuery[];
71
- llm_usage?: LLMUsage | null;
72
- }
73
- /** Memory discovered through explore operation. */
74
- interface ExploredMemory {
75
- memory_id: string;
76
- summary: string;
77
- /** @default 0.0 */
78
- activation?: number;
79
- /** @default 0 */
80
- hop?: number;
81
- }
82
- /** Result of processing a session. */
83
- interface ProcessResult {
84
- remembered?: MemoryInfo[];
85
- recalled?: Memory[];
86
- explored?: ExploredMemory[];
87
- context_used: string;
88
- actions?: string[];
89
- llm_usage?: LLMUsage | null;
90
- }
91
12
  /** An embedding model available on the server. */
92
13
  interface EmbeddingModel {
93
14
  name: string;
@@ -2667,4 +2588,4 @@ interface ResolveAuthOptions {
2667
2588
  */
2668
2589
  declare function resolveAuth(options?: ResolveAuthOptions): ResolvedAuth;
2669
2590
 
2670
- export { type Agent, type AgentBinding, type AgentBindingScopeOptions, type AgentBootstrapAgent, type AgentBootstrapBinding, type AgentBootstrapComponent, type AgentBootstrapComponentName, type AgentBootstrapCorrelation, type AgentBootstrapResponse, type AgentEnforcementMode, type AgentStatus, type AgentWritePolicy, AgentsClient, type AnalysisResult, type Artifact, type AuthProvider, type AuthSource, type BindAgentContextOptions, type ContextDetail, type ContextInfo, type ContextStats, type CostBreakdown, type CreateContextOptions, type CreateInvitationOptions, type CreateTokenOptions, DEFAULT_MCP_URL, DEFAULT_REST_BASE_URL, type DeliveryMode, type DuplicateMemoryInfo, type DuplicatePair, type DuplicatesResponse, type Edge, type EmbeddingModel, type EmbeddingModelsResponse, type EmbeddingStatus, type ExploredMemory, type FailedMemoryInfo, type FieldDefinition, type FileDownloadUrlResponse, type FileListResponse, type FileObject, type FileReserveResponse, FilesClient, type FilesClientOptions, type FromMcpUrlOptions, type GetAgentBootstrapOptions, type HttpMethod, type IndexerJobStatus, type IndexerSkippedReason, type IndexerState, type IndexerStateMetrics, type IndexerStatusResponse, type IngestErrorRecord, type IngestResult, KaguraAuthDeniedError, KaguraAuthError, KaguraAuthExpiredError, KaguraClient, type KaguraClientOptions, type KaguraConfig, KaguraConnectionError, KaguraContextError, KaguraError, KaguraFetchError, KaguraIngestError, KaguraIntegrityError, KaguraLLMError, KaguraNotFoundError, KaguraQuotaError, KaguraRateLimitError, KaguraRestClient, type KaguraRestClientOptions, type LLMUsage, type ListInvitationsOptions, type ListMemoriesOptions, type ListResourceEventsOptions, type ListTagsOptions, type ListTagsResponse, type ListTokensOptions, type LoadConfigOptions, MIN_SERVER_VERSION, type MemberAPIKey, type Memory, type MemoryInfo, type MemoryListItem, type MemoryListResponse, type MemoryStatItem, type MemoryStatsResponse, type MemoryToStore, type Message, type OAuthAuthResult, type PaginatedResourceTokensResponse, type ProcessResult, type RecallOptions, type RecallQuery, type RegisterAgentOptions, type RememberOptions, type ResolveAuthOptions, type ResolvedAuth, ResourceClient, type ResourceEventBatchRequest, type ResourceEventBatchResponse, type ResourceEventInput, type ResourceEventItem, type ResourceEventRecord, type ResourceEventRequest, type ResourceEventResponse, type ResourceEventsListResponse, type ResourceImpactResponse, type ResourceListItem, type ResourceListResponse, type ResourceSchemaResponse, type ResourceSetupOptions, type ResourceSetupResponse, type ResourceTokenCreate, type ResourceTokenCreateResponse, type ResourceTokenResponse, type ResourceTokenUpdate, type RollbackResult, type RollbackSummary, SDK_VERSION, SETUP_OAUTH_NOT_SUPPORTED_MSG, type SearchConfig, type SearchMode, type ServerFeatures, type ServerInfo, type Session, type SetupResourceOptions, type SleepAction, type SleepReport, type SleepReportDetail, type SleepRunStatus, type SourceType, type StaticAuthResult, type StaticSource, type TagInfo, type ToolResult, type UpdateAgentBindingOptions, type UpdateAgentOptions, type UpdateContextOptions, type UpdateMemoryOptions, type UpdateSearchConfigOptions, type UpdateTokenOptions, type UploadOptions, type UsageInfo, type UsageQuota, type UsageQuotaLimitOnly, VALID_ASSIGNABLE_ROLES, VALID_INVITE_EXPIRES, WorkspaceClient, type WorkspaceInfo, type WorkspaceInvitation, type WorkspaceMember, loadConfig, resolveAuth };
2591
+ export { type Agent, type AgentBinding, type AgentBindingScopeOptions, type AgentBootstrapAgent, type AgentBootstrapBinding, type AgentBootstrapComponent, type AgentBootstrapComponentName, type AgentBootstrapCorrelation, type AgentBootstrapResponse, type AgentEnforcementMode, type AgentStatus, type AgentWritePolicy, AgentsClient, type AuthProvider, type AuthSource, type BindAgentContextOptions, type ContextDetail, type ContextInfo, type ContextStats, type CostBreakdown, type CreateContextOptions, type CreateInvitationOptions, type CreateTokenOptions, DEFAULT_MCP_URL, DEFAULT_REST_BASE_URL, type DeliveryMode, type DuplicateMemoryInfo, type DuplicatePair, type DuplicatesResponse, type Edge, type EmbeddingModel, type EmbeddingModelsResponse, type EmbeddingStatus, type FailedMemoryInfo, type FieldDefinition, type FileDownloadUrlResponse, type FileListResponse, type FileObject, type FileReserveResponse, FilesClient, type FilesClientOptions, type FromMcpUrlOptions, type GetAgentBootstrapOptions, type HttpMethod, type IndexerJobStatus, type IndexerSkippedReason, type IndexerState, type IndexerStateMetrics, type IndexerStatusResponse, type IngestErrorRecord, type IngestResult, KaguraAuthDeniedError, KaguraAuthError, KaguraAuthExpiredError, KaguraClient, type KaguraClientOptions, type KaguraConfig, KaguraConnectionError, KaguraContextError, KaguraError, KaguraFetchError, KaguraIngestError, KaguraIntegrityError, KaguraLLMError, KaguraNotFoundError, KaguraQuotaError, KaguraRateLimitError, KaguraRestClient, type KaguraRestClientOptions, type ListInvitationsOptions, type ListMemoriesOptions, type ListResourceEventsOptions, type ListTagsOptions, type ListTagsResponse, type ListTokensOptions, type LoadConfigOptions, MIN_SERVER_VERSION, type MemberAPIKey, type MemoryListItem, type MemoryListResponse, type MemoryStatItem, type MemoryStatsResponse, type OAuthAuthResult, type PaginatedResourceTokensResponse, type RecallOptions, type RegisterAgentOptions, type RememberOptions, type ResolveAuthOptions, type ResolvedAuth, ResourceClient, type ResourceEventBatchRequest, type ResourceEventBatchResponse, type ResourceEventInput, type ResourceEventItem, type ResourceEventRecord, type ResourceEventRequest, type ResourceEventResponse, type ResourceEventsListResponse, type ResourceImpactResponse, type ResourceListItem, type ResourceListResponse, type ResourceSchemaResponse, type ResourceSetupOptions, type ResourceSetupResponse, type ResourceTokenCreate, type ResourceTokenCreateResponse, type ResourceTokenResponse, type ResourceTokenUpdate, type RollbackResult, type RollbackSummary, SDK_VERSION, SETUP_OAUTH_NOT_SUPPORTED_MSG, type SearchConfig, type SearchMode, type ServerFeatures, type ServerInfo, type SetupResourceOptions, type SleepAction, type SleepReport, type SleepReportDetail, type SleepRunStatus, type SourceType, type StaticAuthResult, type StaticSource, type TagInfo, type ToolResult, type UpdateAgentBindingOptions, type UpdateAgentOptions, type UpdateContextOptions, type UpdateMemoryOptions, type UpdateSearchConfigOptions, type UpdateTokenOptions, type UploadOptions, type UsageInfo, type UsageQuota, type UsageQuotaLimitOnly, VALID_ASSIGNABLE_ROLES, VALID_INVITE_EXPIRES, WorkspaceClient, type WorkspaceInfo, type WorkspaceInvitation, type WorkspaceMember, loadConfig, resolveAuth };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kagura-memory",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "TypeScript SDK for Kagura Memory Cloud — memory management, graph exploration, and R2 file storage for AI agents",
5
5
  "keywords": [
6
6
  "ai",