@remnic/core 9.3.641 → 9.3.642

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/dist/index.d.ts CHANGED
@@ -2257,6 +2257,133 @@ interface WearablesCliIo {
2257
2257
  */
2258
2258
  declare function runWearablesCliCommand(service: WearablesService, args: string[], io: WearablesCliIo): Promise<number>;
2259
2259
 
2260
+ type LocalSessionRole = "user" | "assistant" | "tool" | "system" | "other";
2261
+ interface LocalSessionTurn {
2262
+ role: LocalSessionRole;
2263
+ content: string;
2264
+ timestamp?: string;
2265
+ sessionKey?: string;
2266
+ sourceId?: string;
2267
+ metadata?: Record<string, unknown>;
2268
+ }
2269
+ interface LocalSessionParseWarning {
2270
+ code: string;
2271
+ message: string;
2272
+ fileRef?: string;
2273
+ line?: number;
2274
+ }
2275
+ interface LocalSessionParsedFile {
2276
+ turns: LocalSessionTurn[];
2277
+ warnings: LocalSessionParseWarning[];
2278
+ }
2279
+ interface LocalSessionAdapterInput {
2280
+ content: string;
2281
+ fileName: string;
2282
+ fileExtension: string;
2283
+ fileRef: string;
2284
+ }
2285
+ interface LocalSessionAdapterOptions {
2286
+ strict?: boolean;
2287
+ }
2288
+ interface LocalSessionSourceAdapter {
2289
+ id: string;
2290
+ parseFile(input: LocalSessionAdapterInput, options?: LocalSessionAdapterOptions): LocalSessionParsedFile | Promise<LocalSessionParsedFile>;
2291
+ }
2292
+ interface RedactionRuleConfig {
2293
+ name: string;
2294
+ pattern: string;
2295
+ flags?: string;
2296
+ replacement?: string;
2297
+ }
2298
+ interface RedactionConfig {
2299
+ disableDefaults?: boolean;
2300
+ rules?: RedactionRuleConfig[];
2301
+ }
2302
+ interface CompiledRedactionRule {
2303
+ name: string;
2304
+ pattern: RegExp;
2305
+ replacement: string;
2306
+ }
2307
+ interface RedactionReport {
2308
+ applied: number;
2309
+ ruleNames: string[];
2310
+ }
2311
+ interface SessionSummaryExcerpt {
2312
+ role: LocalSessionRole;
2313
+ text: string;
2314
+ timestamp?: string;
2315
+ }
2316
+ interface SessionSummaryDraft {
2317
+ schemaVersion: 1;
2318
+ draftId: string;
2319
+ generatedAt: string;
2320
+ sourceAdapter: string;
2321
+ sourceSessionRef: string;
2322
+ sourceFileCount: number;
2323
+ sourceFileRefs: Array<{
2324
+ hash: string;
2325
+ extension: string;
2326
+ }>;
2327
+ firstTimestamp?: string;
2328
+ lastTimestamp?: string;
2329
+ turnCount: number;
2330
+ roles: Record<LocalSessionRole, number>;
2331
+ summary: string;
2332
+ redaction: {
2333
+ enabled: boolean;
2334
+ applied: number;
2335
+ ruleNames: string[];
2336
+ };
2337
+ excerpts?: SessionSummaryExcerpt[];
2338
+ metadata: {
2339
+ storesRawTranscript: false;
2340
+ storesLocalPaths: false;
2341
+ storesSourceSessionKey: false;
2342
+ };
2343
+ }
2344
+ interface CollectLocalSessionSummariesOptions {
2345
+ inputDir: string;
2346
+ source?: string;
2347
+ strict?: boolean;
2348
+ redactionConfig?: RedactionConfig;
2349
+ includeRedactedExcerpts?: boolean;
2350
+ maxFiles?: number;
2351
+ maxSessions?: number;
2352
+ now?: Date;
2353
+ }
2354
+ interface LocalSessionSummaryReport {
2355
+ generatedAt: string;
2356
+ source: string;
2357
+ filesScanned: number;
2358
+ filesParsed: number;
2359
+ turnsParsed: number;
2360
+ sessionsSummarized: number;
2361
+ warnings: LocalSessionParseWarning[];
2362
+ drafts: SessionSummaryDraft[];
2363
+ wroteFiles: string[];
2364
+ }
2365
+ interface LocalSessionSummaryCliOptions extends CollectLocalSessionSummariesOptions {
2366
+ memoryDir?: string;
2367
+ output?: string;
2368
+ write?: boolean;
2369
+ redactionConfigPath?: string;
2370
+ stdout?: Pick<NodeJS.WritableStream, "write">;
2371
+ }
2372
+
2373
+ declare function registerLocalSessionSourceAdapter(adapter: LocalSessionSourceAdapter): void;
2374
+ declare function getLocalSessionSourceAdapter(id: string | undefined): LocalSessionSourceAdapter | undefined;
2375
+ declare function listLocalSessionSourceAdapters(): string[];
2376
+
2377
+ declare const DEFAULT_REDACTION_RULES: readonly CompiledRedactionRule[];
2378
+ declare function compileRedactionRules(config?: RedactionConfig): CompiledRedactionRule[];
2379
+ declare function redactSessionSummaryText(text: string, rules: readonly CompiledRedactionRule[]): {
2380
+ text: string;
2381
+ report: RedactionReport;
2382
+ };
2383
+
2384
+ declare function collectLocalSessionSummaries(options: CollectLocalSessionSummariesOptions): Promise<LocalSessionSummaryReport>;
2385
+ declare function runLocalSessionSummaryCliCommand(options: LocalSessionSummaryCliOptions): Promise<LocalSessionSummaryReport>;
2386
+
2260
2387
  /**
2261
2388
  * Training-data export types.
2262
2389
  *
@@ -2446,4 +2573,4 @@ declare function forkCapsule(opts: ForkCapsuleOptions): Promise<ForkCapsuleResul
2446
2573
  */
2447
2574
  declare function readForkLineage(targetRoot: string, forkId: string): Promise<ForkLineage | null>;
2448
2575
 
2449
- export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, ClaudeCodeMemoryExtensionPublisher, type CleanupResult, CodexMemoryExtensionPublisher, type CodingNamespaceOverlay, type CodingScopeDescription, type CompiledCorrectionRule, type ConflictEntry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DriveChange, type DriveChangesPage, type DriveFileMetadata, type DuplicatePair, type FileChange, FilesystemBackend, type ForkCapsuleOptions, type ForkCapsuleResult, type ForkLineage, GOOGLE_DRIVE_CONNECTOR_ID, GOOGLE_DRIVE_CURSOR_KIND, DEFAULT_POLL_INTERVAL_MS as GOOGLE_DRIVE_DEFAULT_POLL_INTERVAL_MS, type GenerateOptions, type GenerateResult, type GitContext, type GitInvoker, type GoogleDriveClient, type GoogleDriveClientFactory, type GoogleDriveConnectorConfig, type GoogleDriveSyncResult, HermesMemoryExtensionPublisher, type IngestionPlan, KNOWN_WEARABLE_SOURCE_IDS, type LanguageInfo, LiveConnector, LiveConnectorRegistry, LiveConnectorRegistryError, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, type MergeResult, NOTION_CONNECTOR_ID, NOTION_CURSOR_KIND, NOTION_DEFAULT_POLL_INTERVAL_MS, NoneBackend, type NotionConnectorConfig, type OnboardOptions, type OnboardResult, PUBLISHERS, type PipelineResult, PluginConfig, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REDACTION_PLACEHOLDER, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, ResolverDecision, type ReviewAction, type ReviewCandidate, type ReviewContext, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, SpeakerRegistry, type StatementProvenance, StorageManager, SyncIncrementalResult, type SyncOptions, type SyncResult, type SyncState, Taxonomy, TokenEntry, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, WEARABLES_DIR_NAME, WearableCleanupSettings, type WearableConnectorFactory, type WearableConnectorFactoryOptions, type WearableConnectorRegistration, WearableConversation, WearableCorrectionRule, WearableDayTranscript, WearableDayTranscriptMeta, WearableSourceConnector, WearableSourceSettings, type WearableSourceSyncState, type WearableSyncStateFile, type WearablesCliIo, WearablesConfig, WearablesInputError, WearablesService, applyCorrections, applyOffTheRecord, branchNamespaceName, buildProcedureMarkdownBody, buildProcedureRecallSection, cleanConversation, clearTrainingExportAdapters, clearWearableConnectors, collapseImmediateRepeats, compileCorrectionRule, compileCorrectionRules, compileRedactionPatterns, composeDayTranscriptBody, composeDayTranscriptMeta, convertMemoriesToRecords, correctionsFilePath, createBackend, createGoogleDriveConnector, createNotionConnector, createSpace, curate, defaultGoogleDriveClientFactory, defaultWearableCleanupSettings, defaultWearableSourceSettings, defaultWearablesConfig, deleteSpace, describeCodingScope, describeErrorForOperator, emptyManifest, emptySyncState, ensureBuiltInWearableConnectors, expandTildePath, findContradictions, findDuplicates, forkCapsule, generateContextTree, generateResolverDocument, getActiveSpace, getAuditLog, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, getWearableConnector, hashTranscriptBody, hostIdForConnector, isLowQualitySegment, isReviewPrompt, isValidTranscriptDate, listReviewItems, listSpaces, listTrainingExportAdapters, listWearableConnectors, loadCorrectionsFile, loadManifest, loadSyncState, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, normalizeOriginUrl, onboard, packReviewContext, parseDayTranscript, parseFlexibleIsoTimestamp, parseIsoOffsetTimestamp, parseIsoUtcTimestamp, parseProcedureStepsFromBody, parseTouchedFiles, parseWearablesConfig, performReview, projectNamespaceName, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, rankReviewCandidates, readForkLineage, readManifest, redactText, registerPublisher, registerTrainingExportAdapter, registerWearableConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolveCodingNamespaceOverlay, resolveGitContext, runBinaryLifecyclePipeline, runWearablesCliCommand, saveCorrectionsFile, saveManifest, saveSyncState, saveTaxonomy, scanForBinaries, serializeDayTranscript, shareSpace, stableHash, stripFillerTokens, switchSpace, syncChanges, syncStateFilePath, updateSourceSyncState, validateGoogleDriveConfig, validateNotionConfig, validateSlug, validateTaxonomy, watchForChanges, writeManifest };
2576
+ export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, ClaudeCodeMemoryExtensionPublisher, type CleanupResult, CodexMemoryExtensionPublisher, type CodingNamespaceOverlay, type CodingScopeDescription, type CollectLocalSessionSummariesOptions, type CompiledCorrectionRule, type CompiledRedactionRule, type ConflictEntry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_REDACTION_RULES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DriveChange, type DriveChangesPage, type DriveFileMetadata, type DuplicatePair, type FileChange, FilesystemBackend, type ForkCapsuleOptions, type ForkCapsuleResult, type ForkLineage, GOOGLE_DRIVE_CONNECTOR_ID, GOOGLE_DRIVE_CURSOR_KIND, DEFAULT_POLL_INTERVAL_MS as GOOGLE_DRIVE_DEFAULT_POLL_INTERVAL_MS, type GenerateOptions, type GenerateResult, type GitContext, type GitInvoker, type GoogleDriveClient, type GoogleDriveClientFactory, type GoogleDriveConnectorConfig, type GoogleDriveSyncResult, HermesMemoryExtensionPublisher, type IngestionPlan, KNOWN_WEARABLE_SOURCE_IDS, type LanguageInfo, LiveConnector, LiveConnectorRegistry, LiveConnectorRegistryError, type LocalSessionAdapterInput, type LocalSessionAdapterOptions, type LocalSessionParseWarning, type LocalSessionParsedFile, type LocalSessionRole, type LocalSessionSourceAdapter, type LocalSessionSummaryCliOptions, type LocalSessionSummaryReport, type LocalSessionTurn, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, type MergeResult, NOTION_CONNECTOR_ID, NOTION_CURSOR_KIND, NOTION_DEFAULT_POLL_INTERVAL_MS, NoneBackend, type NotionConnectorConfig, type OnboardOptions, type OnboardResult, PUBLISHERS, type PipelineResult, PluginConfig, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REDACTION_PLACEHOLDER, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RedactionConfig, type RedactionReport, type RedactionRuleConfig, ResolverDecision, type ReviewAction, type ReviewCandidate, type ReviewContext, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type SessionSummaryDraft, type SessionSummaryExcerpt, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, SpeakerRegistry, type StatementProvenance, StorageManager, SyncIncrementalResult, type SyncOptions, type SyncResult, type SyncState, Taxonomy, TokenEntry, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, WEARABLES_DIR_NAME, WearableCleanupSettings, type WearableConnectorFactory, type WearableConnectorFactoryOptions, type WearableConnectorRegistration, WearableConversation, WearableCorrectionRule, WearableDayTranscript, WearableDayTranscriptMeta, WearableSourceConnector, WearableSourceSettings, type WearableSourceSyncState, type WearableSyncStateFile, type WearablesCliIo, WearablesConfig, WearablesInputError, WearablesService, applyCorrections, applyOffTheRecord, branchNamespaceName, buildProcedureMarkdownBody, buildProcedureRecallSection, cleanConversation, clearTrainingExportAdapters, clearWearableConnectors, collapseImmediateRepeats, collectLocalSessionSummaries, compileCorrectionRule, compileCorrectionRules, compileRedactionPatterns, compileRedactionRules, composeDayTranscriptBody, composeDayTranscriptMeta, convertMemoriesToRecords, correctionsFilePath, createBackend, createGoogleDriveConnector, createNotionConnector, createSpace, curate, defaultGoogleDriveClientFactory, defaultWearableCleanupSettings, defaultWearableSourceSettings, defaultWearablesConfig, deleteSpace, describeCodingScope, describeErrorForOperator, emptyManifest, emptySyncState, ensureBuiltInWearableConnectors, expandTildePath, findContradictions, findDuplicates, forkCapsule, generateContextTree, generateResolverDocument, getActiveSpace, getAuditLog, getLocalSessionSourceAdapter, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, getWearableConnector, hashTranscriptBody, hostIdForConnector, isLowQualitySegment, isReviewPrompt, isValidTranscriptDate, listLocalSessionSourceAdapters, listReviewItems, listSpaces, listTrainingExportAdapters, listWearableConnectors, loadCorrectionsFile, loadManifest, loadSyncState, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, normalizeOriginUrl, onboard, packReviewContext, parseDayTranscript, parseFlexibleIsoTimestamp, parseIsoOffsetTimestamp, parseIsoUtcTimestamp, parseProcedureStepsFromBody, parseTouchedFiles, parseWearablesConfig, performReview, projectNamespaceName, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, rankReviewCandidates, readForkLineage, readManifest, redactSessionSummaryText, redactText, registerLocalSessionSourceAdapter, registerPublisher, registerTrainingExportAdapter, registerWearableConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolveCodingNamespaceOverlay, resolveGitContext, runBinaryLifecyclePipeline, runLocalSessionSummaryCliCommand, runWearablesCliCommand, saveCorrectionsFile, saveManifest, saveSyncState, saveTaxonomy, scanForBinaries, serializeDayTranscript, shareSpace, stableHash, stripFillerTokens, switchSpace, syncChanges, syncStateFilePath, updateSourceSyncState, validateGoogleDriveConfig, validateNotionConfig, validateSlug, validateTaxonomy, watchForChanges, writeManifest };