@hasna/mementos 0.14.84 → 0.14.86
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/bun.lock +63 -4
- package/dist/cli/index.js +769 -261
- package/dist/diagnostics/historical-project-registration-receipt.js +1675 -0
- package/dist/index.js +343 -85
- package/dist/mcp/index.js +419 -99
- package/dist/pg-sync-worker.js +7 -5
- package/dist/project-registration.js +309 -68
- package/dist/sdk/index.js +123 -30
- package/dist/server/index.js +677 -317
- package/dist/storage.js +63 -26
- package/hasna.contract.json +5 -4
- package/package.json +6 -4
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +0 -2
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +0 -1
- package/dist/cli/brains.d.ts +0 -3
- package/dist/cli/brains.d.ts.map +0 -1
- package/dist/cli/commands/agent.d.ts +0 -3
- package/dist/cli/commands/agent.d.ts.map +0 -1
- package/dist/cli/commands/consolidation.d.ts +0 -3
- package/dist/cli/commands/consolidation.d.ts.map +0 -1
- package/dist/cli/commands/entity.d.ts +0 -3
- package/dist/cli/commands/entity.d.ts.map +0 -1
- package/dist/cli/commands/graph.d.ts +0 -3
- package/dist/cli/commands/graph.d.ts.map +0 -1
- package/dist/cli/commands/info-context.d.ts +0 -3
- package/dist/cli/commands/info-context.d.ts.map +0 -1
- package/dist/cli/commands/info-history.d.ts +0 -3
- package/dist/cli/commands/info-history.d.ts.map +0 -1
- package/dist/cli/commands/info-report.d.ts +0 -3
- package/dist/cli/commands/info-report.d.ts.map +0 -1
- package/dist/cli/commands/info-stale.d.ts +0 -3
- package/dist/cli/commands/info-stale.d.ts.map +0 -1
- package/dist/cli/commands/info-stats.d.ts +0 -3
- package/dist/cli/commands/info-stats.d.ts.map +0 -1
- package/dist/cli/commands/info.d.ts +0 -12
- package/dist/cli/commands/info.d.ts.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -3
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/io-backup.d.ts +0 -3
- package/dist/cli/commands/io-backup.d.ts.map +0 -1
- package/dist/cli/commands/io-clean.d.ts +0 -3
- package/dist/cli/commands/io-clean.d.ts.map +0 -1
- package/dist/cli/commands/io-export.d.ts +0 -3
- package/dist/cli/commands/io-export.d.ts.map +0 -1
- package/dist/cli/commands/io-import.d.ts +0 -3
- package/dist/cli/commands/io-import.d.ts.map +0 -1
- package/dist/cli/commands/io-restore.d.ts +0 -3
- package/dist/cli/commands/io-restore.d.ts.map +0 -1
- package/dist/cli/commands/io.d.ts +0 -12
- package/dist/cli/commands/io.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-bulk.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-bulk.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-chain.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-chain.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-crud.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-crud.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-diff.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-diff.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-list.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-list.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-recall-exit.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-recall.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-recall.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-remove.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-remove.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-search.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-search.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-tail.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-tail.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-util.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-util.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-view.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-view.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-watch.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-watch.d.ts.map +0 -1
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts +0 -3
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +0 -1
- package/dist/cli/commands/memory.d.ts +0 -3
- package/dist/cli/commands/memory.d.ts.map +0 -1
- package/dist/cli/commands/project-panel.d.ts +0 -3
- package/dist/cli/commands/project-panel.d.ts.map +0 -1
- package/dist/cli/commands/project.d.ts +0 -3
- package/dist/cli/commands/project.d.ts.map +0 -1
- package/dist/cli/commands/relation.d.ts +0 -3
- package/dist/cli/commands/relation.d.ts.map +0 -1
- package/dist/cli/commands/storage.d.ts +0 -3
- package/dist/cli/commands/storage.d.ts.map +0 -1
- package/dist/cli/commands/system-auto-memory.d.ts +0 -3
- package/dist/cli/commands/system-auto-memory.d.ts.map +0 -1
- package/dist/cli/commands/system-completions.d.ts +0 -13
- package/dist/cli/commands/system-completions.d.ts.map +0 -1
- package/dist/cli/commands/system-config.d.ts +0 -3
- package/dist/cli/commands/system-config.d.ts.map +0 -1
- package/dist/cli/commands/system-doctor.d.ts +0 -3
- package/dist/cli/commands/system-doctor.d.ts.map +0 -1
- package/dist/cli/commands/system-hooks.d.ts +0 -3
- package/dist/cli/commands/system-hooks.d.ts.map +0 -1
- package/dist/cli/commands/system-mcp.d.ts +0 -3
- package/dist/cli/commands/system-mcp.d.ts.map +0 -1
- package/dist/cli/commands/system-misc.d.ts +0 -3
- package/dist/cli/commands/system-misc.d.ts.map +0 -1
- package/dist/cli/commands/system-profile.d.ts +0 -3
- package/dist/cli/commands/system-profile.d.ts.map +0 -1
- package/dist/cli/commands/system-session.d.ts +0 -3
- package/dist/cli/commands/system-session.d.ts.map +0 -1
- package/dist/cli/commands/system-sessions.d.ts +0 -3
- package/dist/cli/commands/system-sessions.d.ts.map +0 -1
- package/dist/cli/commands/system-synthesis.d.ts +0 -3
- package/dist/cli/commands/system-synthesis.d.ts.map +0 -1
- package/dist/cli/commands/system-synthesized-profile.d.ts +0 -3
- package/dist/cli/commands/system-synthesized-profile.d.ts.map +0 -1
- package/dist/cli/commands/system-tools.d.ts +0 -3
- package/dist/cli/commands/system-tools.d.ts.map +0 -1
- package/dist/cli/commands/system-watch.d.ts +0 -3
- package/dist/cli/commands/system-watch.d.ts.map +0 -1
- package/dist/cli/commands/system.d.ts +0 -3
- package/dist/cli/commands/system.d.ts.map +0 -1
- package/dist/cli/exit-codes.d.ts +0 -13
- package/dist/cli/exit-codes.d.ts.map +0 -1
- package/dist/cli/global-options.d.ts +0 -27
- package/dist/cli/global-options.d.ts.map +0 -1
- package/dist/cli/helpers.d.ts +0 -119
- package/dist/cli/helpers.d.ts.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/register-all.d.ts +0 -17
- package/dist/cli/register-all.d.ts.map +0 -1
- package/dist/cli/startup-side-effects.d.ts +0 -9
- package/dist/cli/startup-side-effects.d.ts.map +0 -1
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +0 -2
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +0 -1
- package/dist/db/acl.d.ts +0 -34
- package/dist/db/acl.d.ts.map +0 -1
- package/dist/db/agents.d.ts +0 -21
- package/dist/db/agents.d.ts.map +0 -1
- package/dist/db/analytics.d.ts +0 -107
- package/dist/db/analytics.d.ts.map +0 -1
- package/dist/db/api-mode.d.ts +0 -127
- package/dist/db/api-mode.d.ts.map +0 -1
- package/dist/db/audit.d.ts +0 -53
- package/dist/db/audit.d.ts.map +0 -1
- package/dist/db/database.d.ts +0 -26
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/entities.d.ts +0 -62
- package/dist/db/entities.d.ts.map +0 -1
- package/dist/db/entity-memories.d.ts +0 -34
- package/dist/db/entity-memories.d.ts.map +0 -1
- package/dist/db/feedback.d.ts +0 -9
- package/dist/db/feedback.d.ts.map +0 -1
- package/dist/db/locks.d.ts +0 -63
- package/dist/db/locks.d.ts.map +0 -1
- package/dist/db/machines.d.ts +0 -23
- package/dist/db/machines.d.ts.map +0 -1
- package/dist/db/memories.d.ts +0 -137
- package/dist/db/memories.d.ts.map +0 -1
- package/dist/db/memory-links.d.ts +0 -21
- package/dist/db/memory-links.d.ts.map +0 -1
- package/dist/db/memory-project-link.d.ts +0 -13
- package/dist/db/memory-project-link.d.ts.map +0 -1
- package/dist/db/migrations.d.ts +0 -3
- package/dist/db/migrations.d.ts.map +0 -1
- package/dist/db/pg-migrate.d.ts +0 -27
- package/dist/db/pg-migrate.d.ts.map +0 -1
- package/dist/db/pg-migrations.d.ts +0 -2
- package/dist/db/pg-migrations.d.ts.map +0 -1
- package/dist/db/projects.d.ts +0 -27
- package/dist/db/projects.d.ts.map +0 -1
- package/dist/db/ratings.d.ts +0 -23
- package/dist/db/ratings.d.ts.map +0 -1
- package/dist/db/relations.d.ts +0 -49
- package/dist/db/relations.d.ts.map +0 -1
- package/dist/db/session-jobs.d.ts +0 -49
- package/dist/db/session-jobs.d.ts.map +0 -1
- package/dist/db/store-backend.d.ts +0 -42
- package/dist/db/store-backend.d.ts.map +0 -1
- package/dist/db/subscriptions.d.ts +0 -24
- package/dist/db/subscriptions.d.ts.map +0 -1
- package/dist/db/synthesis.d.ts +0 -101
- package/dist/db/synthesis.d.ts.map +0 -1
- package/dist/db/tasks.d.ts +0 -89
- package/dist/db/tasks.d.ts.map +0 -1
- package/dist/db/tool-events.d.ts +0 -27
- package/dist/db/tool-events.d.ts.map +0 -1
- package/dist/db/webhook_hooks.d.ts +0 -25
- package/dist/db/webhook_hooks.d.ts.map +0 -1
- package/dist/generated/storage-kit/backend.d.ts +0 -20
- package/dist/generated/storage-kit/backend.d.ts.map +0 -1
- package/dist/generated/storage-kit/health.d.ts +0 -20
- package/dist/generated/storage-kit/health.d.ts.map +0 -1
- package/dist/generated/storage-kit/index.d.ts +0 -8
- package/dist/generated/storage-kit/index.d.ts.map +0 -1
- package/dist/generated/storage-kit/migrations.d.ts +0 -48
- package/dist/generated/storage-kit/migrations.d.ts.map +0 -1
- package/dist/generated/storage-kit/own.d.ts +0 -11
- package/dist/generated/storage-kit/own.d.ts.map +0 -1
- package/dist/generated/storage-kit/pool.d.ts +0 -35
- package/dist/generated/storage-kit/pool.d.ts.map +0 -1
- package/dist/generated/storage-kit/query.d.ts +0 -36
- package/dist/generated/storage-kit/query.d.ts.map +0 -1
- package/dist/generated/storage-kit/tls.d.ts +0 -53
- package/dist/generated/storage-kit/tls.d.ts.map +0 -1
- package/dist/index.d.ts +0 -45
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/activation-matcher.d.ts +0 -17
- package/dist/lib/activation-matcher.d.ts.map +0 -1
- package/dist/lib/asmr/categorizer.d.ts +0 -31
- package/dist/lib/asmr/categorizer.d.ts.map +0 -1
- package/dist/lib/asmr/context-agent.d.ts +0 -4
- package/dist/lib/asmr/context-agent.d.ts.map +0 -1
- package/dist/lib/asmr/ensemble.d.ts +0 -23
- package/dist/lib/asmr/ensemble.d.ts.map +0 -1
- package/dist/lib/asmr/fact-agent.d.ts +0 -4
- package/dist/lib/asmr/fact-agent.d.ts.map +0 -1
- package/dist/lib/asmr/index.d.ts +0 -7
- package/dist/lib/asmr/index.d.ts.map +0 -1
- package/dist/lib/asmr/orchestrator.d.ts +0 -4
- package/dist/lib/asmr/orchestrator.d.ts.map +0 -1
- package/dist/lib/asmr/recall.d.ts +0 -3
- package/dist/lib/asmr/recall.d.ts.map +0 -1
- package/dist/lib/asmr/temporal-agent.d.ts +0 -4
- package/dist/lib/asmr/temporal-agent.d.ts.map +0 -1
- package/dist/lib/asmr/types.d.ts +0 -27
- package/dist/lib/asmr/types.d.ts.map +0 -1
- package/dist/lib/auto-inject-orchestrator.d.ts +0 -57
- package/dist/lib/auto-inject-orchestrator.d.ts.map +0 -1
- package/dist/lib/auto-memory-queue.d.ts +0 -48
- package/dist/lib/auto-memory-queue.d.ts.map +0 -1
- package/dist/lib/auto-memory.d.ts +0 -19
- package/dist/lib/auto-memory.d.ts.map +0 -1
- package/dist/lib/bench.d.ts +0 -20
- package/dist/lib/bench.d.ts.map +0 -1
- package/dist/lib/built-in-hooks.d.ts +0 -12
- package/dist/lib/built-in-hooks.d.ts.map +0 -1
- package/dist/lib/channel-pusher.d.ts +0 -39
- package/dist/lib/channel-pusher.d.ts.map +0 -1
- package/dist/lib/config.d.ts +0 -9
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/connectors/files.d.ts +0 -8
- package/dist/lib/connectors/files.d.ts.map +0 -1
- package/dist/lib/connectors/github.d.ts +0 -7
- package/dist/lib/connectors/github.d.ts.map +0 -1
- package/dist/lib/connectors/index.d.ts +0 -12
- package/dist/lib/connectors/index.d.ts.map +0 -1
- package/dist/lib/connectors/notion.d.ts +0 -7
- package/dist/lib/connectors/notion.d.ts.map +0 -1
- package/dist/lib/connectors/types.d.ts +0 -27
- package/dist/lib/connectors/types.d.ts.map +0 -1
- package/dist/lib/consolidation.d.ts +0 -52
- package/dist/lib/consolidation.d.ts.map +0 -1
- package/dist/lib/context-extractor.d.ts +0 -14
- package/dist/lib/context-extractor.d.ts.map +0 -1
- package/dist/lib/context.d.ts +0 -36
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/contradiction.d.ts +0 -50
- package/dist/lib/contradiction.d.ts.map +0 -1
- package/dist/lib/decay.d.ts +0 -35
- package/dist/lib/decay.d.ts.map +0 -1
- package/dist/lib/dedup.d.ts +0 -33
- package/dist/lib/dedup.d.ts.map +0 -1
- package/dist/lib/duration.d.ts +0 -28
- package/dist/lib/duration.d.ts.map +0 -1
- package/dist/lib/embeddings.d.ts +0 -20
- package/dist/lib/embeddings.d.ts.map +0 -1
- package/dist/lib/enum-validation.d.ts +0 -20
- package/dist/lib/enum-validation.d.ts.map +0 -1
- package/dist/lib/export-v1.d.ts +0 -30
- package/dist/lib/export-v1.d.ts.map +0 -1
- package/dist/lib/extractor.d.ts +0 -9
- package/dist/lib/extractor.d.ts.map +0 -1
- package/dist/lib/extractors/audio.d.ts +0 -8
- package/dist/lib/extractors/audio.d.ts.map +0 -1
- package/dist/lib/extractors/index.d.ts +0 -12
- package/dist/lib/extractors/index.d.ts.map +0 -1
- package/dist/lib/extractors/ocr.d.ts +0 -7
- package/dist/lib/extractors/ocr.d.ts.map +0 -1
- package/dist/lib/extractors/pdf.d.ts +0 -7
- package/dist/lib/extractors/pdf.d.ts.map +0 -1
- package/dist/lib/extractors/types.d.ts +0 -12
- package/dist/lib/extractors/types.d.ts.map +0 -1
- package/dist/lib/file-deps.d.ts +0 -27
- package/dist/lib/file-deps.d.ts.map +0 -1
- package/dist/lib/focus.d.ts +0 -58
- package/dist/lib/focus.d.ts.map +0 -1
- package/dist/lib/gatherer.d.ts +0 -16
- package/dist/lib/gatherer.d.ts.map +0 -1
- package/dist/lib/gdpr.d.ts +0 -39
- package/dist/lib/gdpr.d.ts.map +0 -1
- package/dist/lib/hooks.d.ts +0 -50
- package/dist/lib/hooks.d.ts.map +0 -1
- package/dist/lib/importers/index.d.ts +0 -38
- package/dist/lib/importers/index.d.ts.map +0 -1
- package/dist/lib/injector.d.ts +0 -89
- package/dist/lib/injector.d.ts.map +0 -1
- package/dist/lib/machine-visibility.d.ts +0 -6
- package/dist/lib/machine-visibility.d.ts.map +0 -1
- package/dist/lib/matryoshka.d.ts +0 -50
- package/dist/lib/matryoshka.d.ts.map +0 -1
- package/dist/lib/memory-lock.d.ts +0 -58
- package/dist/lib/memory-lock.d.ts.map +0 -1
- package/dist/lib/model-config.d.ts +0 -14
- package/dist/lib/model-config.d.ts.map +0 -1
- package/dist/lib/open-sessions-connector.d.ts +0 -60
- package/dist/lib/open-sessions-connector.d.ts.map +0 -1
- package/dist/lib/package-version.d.ts +0 -3
- package/dist/lib/package-version.d.ts.map +0 -1
- package/dist/lib/poisoning.d.ts +0 -19
- package/dist/lib/poisoning.d.ts.map +0 -1
- package/dist/lib/poll.d.ts +0 -17
- package/dist/lib/poll.d.ts.map +0 -1
- package/dist/lib/procedural-extractor.d.ts +0 -21
- package/dist/lib/procedural-extractor.d.ts.map +0 -1
- package/dist/lib/profile-sync.d.ts +0 -20
- package/dist/lib/profile-sync.d.ts.map +0 -1
- package/dist/lib/profile-synthesizer.d.ts +0 -20
- package/dist/lib/profile-synthesizer.d.ts.map +0 -1
- package/dist/lib/project-detect.d.ts +0 -18
- package/dist/lib/project-detect.d.ts.map +0 -1
- package/dist/lib/project-panel.d.ts +0 -7
- package/dist/lib/project-panel.d.ts.map +0 -1
- package/dist/lib/providers/anthropic.d.ts +0 -21
- package/dist/lib/providers/anthropic.d.ts.map +0 -1
- package/dist/lib/providers/base.d.ts +0 -96
- package/dist/lib/providers/base.d.ts.map +0 -1
- package/dist/lib/providers/cerebras.d.ts +0 -20
- package/dist/lib/providers/cerebras.d.ts.map +0 -1
- package/dist/lib/providers/grok.d.ts +0 -19
- package/dist/lib/providers/grok.d.ts.map +0 -1
- package/dist/lib/providers/index.d.ts +0 -7
- package/dist/lib/providers/index.d.ts.map +0 -1
- package/dist/lib/providers/openai-compat.d.ts +0 -18
- package/dist/lib/providers/openai-compat.d.ts.map +0 -1
- package/dist/lib/providers/openai.d.ts +0 -20
- package/dist/lib/providers/openai.d.ts.map +0 -1
- package/dist/lib/providers/registry.d.ts +0 -38
- package/dist/lib/providers/registry.d.ts.map +0 -1
- package/dist/lib/quality.d.ts +0 -16
- package/dist/lib/quality.d.ts.map +0 -1
- package/dist/lib/redact.d.ts +0 -10
- package/dist/lib/redact.d.ts.map +0 -1
- package/dist/lib/reflection.d.ts +0 -83
- package/dist/lib/reflection.d.ts.map +0 -1
- package/dist/lib/retention.d.ts +0 -17
- package/dist/lib/retention.d.ts.map +0 -1
- package/dist/lib/retired-storage-mode.d.ts +0 -11
- package/dist/lib/retired-storage-mode.d.ts.map +0 -1
- package/dist/lib/search.d.ts +0 -52
- package/dist/lib/search.d.ts.map +0 -1
- package/dist/lib/session-auto-resolve.d.ts +0 -28
- package/dist/lib/session-auto-resolve.d.ts.map +0 -1
- package/dist/lib/session-processor.d.ts +0 -38
- package/dist/lib/session-processor.d.ts.map +0 -1
- package/dist/lib/session-queue.d.ts +0 -28
- package/dist/lib/session-queue.d.ts.map +0 -1
- package/dist/lib/session-registry.d.ts +0 -47
- package/dist/lib/session-registry.d.ts.map +0 -1
- package/dist/lib/session-start-briefing.d.ts +0 -10
- package/dist/lib/session-start-briefing.d.ts.map +0 -1
- package/dist/lib/session-watcher.d.ts +0 -30
- package/dist/lib/session-watcher.d.ts.map +0 -1
- package/dist/lib/storage-sync.d.ts +0 -45
- package/dist/lib/storage-sync.d.ts.map +0 -1
- package/dist/lib/sync.d.ts +0 -10
- package/dist/lib/sync.d.ts.map +0 -1
- package/dist/lib/synthesis/corpus-builder.d.ts +0 -30
- package/dist/lib/synthesis/corpus-builder.d.ts.map +0 -1
- package/dist/lib/synthesis/executor.d.ts +0 -14
- package/dist/lib/synthesis/executor.d.ts.map +0 -1
- package/dist/lib/synthesis/index.d.ts +0 -37
- package/dist/lib/synthesis/index.d.ts.map +0 -1
- package/dist/lib/synthesis/llm-analyzer.d.ts +0 -18
- package/dist/lib/synthesis/llm-analyzer.d.ts.map +0 -1
- package/dist/lib/synthesis/metrics.d.ts +0 -13
- package/dist/lib/synthesis/metrics.d.ts.map +0 -1
- package/dist/lib/synthesis/scheduler.d.ts +0 -18
- package/dist/lib/synthesis/scheduler.d.ts.map +0 -1
- package/dist/lib/synthesis/validator.d.ts +0 -19
- package/dist/lib/synthesis/validator.d.ts.map +0 -1
- package/dist/lib/task-runner.d.ts +0 -37
- package/dist/lib/task-runner.d.ts.map +0 -1
- package/dist/lib/tool-lesson-extractor.d.ts +0 -24
- package/dist/lib/tool-lesson-extractor.d.ts.map +0 -1
- package/dist/lib/tool-memory-synthesizer.d.ts +0 -28
- package/dist/lib/tool-memory-synthesizer.d.ts.map +0 -1
- package/dist/lib/topic-clusterer.d.ts +0 -21
- package/dist/lib/topic-clusterer.d.ts.map +0 -1
- package/dist/lib/when-to-use-generator.d.ts +0 -22
- package/dist/lib/when-to-use-generator.d.ts.map +0 -1
- package/dist/mcp/http.d.ts +0 -17
- package/dist/mcp/http.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -6
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/memory-broadcast.d.ts +0 -12
- package/dist/mcp/memory-broadcast.d.ts.map +0 -1
- package/dist/mcp/tools/agent-tools.d.ts +0 -3
- package/dist/mcp/tools/agent-tools.d.ts.map +0 -1
- package/dist/mcp/tools/auto-memory-tools.d.ts +0 -5
- package/dist/mcp/tools/auto-memory-tools.d.ts.map +0 -1
- package/dist/mcp/tools/bulk-tools.d.ts +0 -3
- package/dist/mcp/tools/bulk-tools.d.ts.map +0 -1
- package/dist/mcp/tools/consolidation-tools.d.ts +0 -3
- package/dist/mcp/tools/consolidation-tools.d.ts.map +0 -1
- package/dist/mcp/tools/focus-tools.d.ts +0 -3
- package/dist/mcp/tools/focus-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-entity-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-entity-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-query-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-query-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-relation-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-relation-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-tools.d.ts +0 -3
- package/dist/mcp/tools/graph-tools.d.ts.map +0 -1
- package/dist/mcp/tools/graph-utils.d.ts +0 -5
- package/dist/mcp/tools/graph-utils.d.ts.map +0 -1
- package/dist/mcp/tools/hook-tools.d.ts +0 -3
- package/dist/mcp/tools/hook-tools.d.ts.map +0 -1
- package/dist/mcp/tools/lock-tools.d.ts +0 -3
- package/dist/mcp/tools/lock-tools.d.ts.map +0 -1
- package/dist/mcp/tools/memory-audit.d.ts +0 -3
- package/dist/mcp/tools/memory-audit.d.ts.map +0 -1
- package/dist/mcp/tools/memory-crud.d.ts +0 -3
- package/dist/mcp/tools/memory-crud.d.ts.map +0 -1
- package/dist/mcp/tools/memory-health.d.ts +0 -3
- package/dist/mcp/tools/memory-health.d.ts.map +0 -1
- package/dist/mcp/tools/memory-history.d.ts +0 -3
- package/dist/mcp/tools/memory-history.d.ts.map +0 -1
- package/dist/mcp/tools/memory-inject.d.ts +0 -3
- package/dist/mcp/tools/memory-inject.d.ts.map +0 -1
- package/dist/mcp/tools/memory-io.d.ts +0 -3
- package/dist/mcp/tools/memory-io.d.ts.map +0 -1
- package/dist/mcp/tools/memory-lifecycle.d.ts +0 -3
- package/dist/mcp/tools/memory-lifecycle.d.ts.map +0 -1
- package/dist/mcp/tools/memory-search.d.ts +0 -3
- package/dist/mcp/tools/memory-search.d.ts.map +0 -1
- package/dist/mcp/tools/memory-stats.d.ts +0 -3
- package/dist/mcp/tools/memory-stats.d.ts.map +0 -1
- package/dist/mcp/tools/memory-tools.d.ts +0 -17
- package/dist/mcp/tools/memory-tools.d.ts.map +0 -1
- package/dist/mcp/tools/memory-utils.d.ts +0 -27
- package/dist/mcp/tools/memory-utils.d.ts.map +0 -1
- package/dist/mcp/tools/memory-validation.d.ts +0 -3
- package/dist/mcp/tools/memory-validation.d.ts.map +0 -1
- package/dist/mcp/tools/project-tools.d.ts +0 -3
- package/dist/mcp/tools/project-tools.d.ts.map +0 -1
- package/dist/mcp/tools/session-tools.d.ts +0 -3
- package/dist/mcp/tools/session-tools.d.ts.map +0 -1
- package/dist/mcp/tools/storage-tools.d.ts +0 -3
- package/dist/mcp/tools/storage-tools.d.ts.map +0 -1
- package/dist/mcp/tools/synthesis-tools.d.ts +0 -3
- package/dist/mcp/tools/synthesis-tools.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-events.d.ts +0 -3
- package/dist/mcp/tools/system-tools-events.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-memory-admin.d.ts +0 -3
- package/dist/mcp/tools/system-tools-memory-admin.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools-shared.d.ts +0 -23
- package/dist/mcp/tools/system-tools-shared.d.ts.map +0 -1
- package/dist/mcp/tools/system-tools.d.ts +0 -3
- package/dist/mcp/tools/system-tools.d.ts.map +0 -1
- package/dist/mcp/tools/tool-registry.d.ts +0 -30
- package/dist/mcp/tools/tool-registry.d.ts.map +0 -1
- package/dist/mcp/tools/utility-tools.d.ts +0 -3
- package/dist/mcp/tools/utility-tools.d.ts.map +0 -1
- package/dist/memory-project-link/index.d.ts +0 -2
- package/dist/memory-project-link/index.d.ts.map +0 -1
- package/dist/memory-project-link/schema.d.ts +0 -5
- package/dist/memory-project-link/schema.d.ts.map +0 -1
- package/dist/pg-sync-worker.d.ts +0 -2
- package/dist/pg-sync-worker.d.ts.map +0 -1
- package/dist/project-registration/authority.d.ts +0 -43
- package/dist/project-registration/authority.d.ts.map +0 -1
- package/dist/project-registration/http.d.ts +0 -32
- package/dist/project-registration/http.d.ts.map +0 -1
- package/dist/project-registration/identity.d.ts +0 -20
- package/dist/project-registration/identity.d.ts.map +0 -1
- package/dist/project-registration/index.d.ts +0 -11
- package/dist/project-registration/index.d.ts.map +0 -1
- package/dist/project-registration/project-references.d.ts +0 -71
- package/dist/project-registration/project-references.d.ts.map +0 -1
- package/dist/project-registration/project-resources.d.ts +0 -22
- package/dist/project-registration/project-resources.d.ts.map +0 -1
- package/dist/project-registration/schema.d.ts +0 -5
- package/dist/project-registration/schema.d.ts.map +0 -1
- package/dist/project-registration/types.d.ts +0 -293
- package/dist/project-registration/types.d.ts.map +0 -1
- package/dist/project-registration.d.ts +0 -2
- package/dist/project-registration.d.ts.map +0 -1
- package/dist/sdk/index.d.ts +0 -971
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/server/auth.d.ts +0 -11
- package/dist/server/auth.d.ts.map +0 -1
- package/dist/server/helpers.d.ts +0 -22
- package/dist/server/helpers.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -14
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/openapi.d.ts +0 -2
- package/dist/server/openapi.d.ts.map +0 -1
- package/dist/server/router.d.ts +0 -17
- package/dist/server/router.d.ts.map +0 -1
- package/dist/server/routes/agents.d.ts +0 -2
- package/dist/server/routes/agents.d.ts.map +0 -1
- package/dist/server/routes/entities.d.ts +0 -2
- package/dist/server/routes/entities.d.ts.map +0 -1
- package/dist/server/routes/memories-bulk.d.ts +0 -2
- package/dist/server/routes/memories-bulk.d.ts.map +0 -1
- package/dist/server/routes/memories-crud.d.ts +0 -2
- package/dist/server/routes/memories-crud.d.ts.map +0 -1
- package/dist/server/routes/memories-io.d.ts +0 -2
- package/dist/server/routes/memories-io.d.ts.map +0 -1
- package/dist/server/routes/memories-misc.d.ts +0 -2
- package/dist/server/routes/memories-misc.d.ts.map +0 -1
- package/dist/server/routes/memories-search.d.ts +0 -2
- package/dist/server/routes/memories-search.d.ts.map +0 -1
- package/dist/server/routes/memories-stats.d.ts +0 -2
- package/dist/server/routes/memories-stats.d.ts.map +0 -1
- package/dist/server/routes/memories.d.ts +0 -19
- package/dist/server/routes/memories.d.ts.map +0 -1
- package/dist/server/routes/memory-project-link.d.ts +0 -2
- package/dist/server/routes/memory-project-link.d.ts.map +0 -1
- package/dist/server/routes/project-registration.d.ts +0 -2
- package/dist/server/routes/project-registration.d.ts.map +0 -1
- package/dist/server/routes/projects.d.ts +0 -2
- package/dist/server/routes/projects.d.ts.map +0 -1
- package/dist/server/routes/system-auto-memory.d.ts +0 -2
- package/dist/server/routes/system-auto-memory.d.ts.map +0 -1
- package/dist/server/routes/system-chain.d.ts +0 -2
- package/dist/server/routes/system-chain.d.ts.map +0 -1
- package/dist/server/routes/system-consolidation.d.ts +0 -2
- package/dist/server/routes/system-consolidation.d.ts.map +0 -1
- package/dist/server/routes/system-hooks.d.ts +0 -2
- package/dist/server/routes/system-hooks.d.ts.map +0 -1
- package/dist/server/routes/system-sessions.d.ts +0 -2
- package/dist/server/routes/system-sessions.d.ts.map +0 -1
- package/dist/server/routes/system-subscriptions.d.ts +0 -2
- package/dist/server/routes/system-subscriptions.d.ts.map +0 -1
- package/dist/server/routes/system-synthesis.d.ts +0 -2
- package/dist/server/routes/system-synthesis.d.ts.map +0 -1
- package/dist/server/routes/system-tools.d.ts +0 -2
- package/dist/server/routes/system-tools.d.ts.map +0 -1
- package/dist/server/routes/system.d.ts +0 -2
- package/dist/server/routes/system.d.ts.map +0 -1
- package/dist/server/routes/tasks.d.ts +0 -2
- package/dist/server/routes/tasks.d.ts.map +0 -1
- package/dist/storage.d.ts +0 -266
- package/dist/storage.d.ts.map +0 -1
- package/dist/test-support/preload-local-store.d.ts +0 -2
- package/dist/test-support/preload-local-store.d.ts.map +0 -1
- package/dist/test-support/project-authority-identity.d.ts +0 -8
- package/dist/test-support/project-authority-identity.d.ts.map +0 -1
- package/dist/test-support/store-isolation.d.ts +0 -108
- package/dist/test-support/store-isolation.d.ts.map +0 -1
- package/dist/test-support/strip-ansi.d.ts +0 -3
- package/dist/test-support/strip-ansi.d.ts.map +0 -1
- package/dist/types/hooks.d.ts +0 -136
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -472
- package/dist/types/index.d.ts.map +0 -1
package/dist/lib/poll.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
-
import type { Memory, MemoryScope, MemoryCategory } from "../types/index.js";
|
|
3
|
-
export interface PollOptions {
|
|
4
|
-
interval_ms?: number;
|
|
5
|
-
scope?: MemoryScope;
|
|
6
|
-
category?: MemoryCategory;
|
|
7
|
-
agent_id?: string;
|
|
8
|
-
project_id?: string;
|
|
9
|
-
on_memories: (memories: Memory[]) => void;
|
|
10
|
-
on_error?: (error: Error) => void;
|
|
11
|
-
db?: Database;
|
|
12
|
-
}
|
|
13
|
-
export interface PollHandle {
|
|
14
|
-
stop: () => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function startPolling(opts: PollOptions): PollHandle;
|
|
17
|
-
//# sourceMappingURL=poll.d.ts.map
|
package/dist/lib/poll.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../src/lib/poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAS7E,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAMD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAsJ1D"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LLM-based procedural memory extractor from session transcripts.
|
|
3
|
-
* Extracts workflow patterns, step sequences, failure lessons, problem-solution pairs.
|
|
4
|
-
* Saves as chained procedural memories with when_to_use and sequence_group.
|
|
5
|
-
*/
|
|
6
|
-
interface ExtractedProcedure {
|
|
7
|
-
title: string;
|
|
8
|
-
steps: {
|
|
9
|
-
action: string;
|
|
10
|
-
when_to_use: string;
|
|
11
|
-
}[];
|
|
12
|
-
failure_patterns: string[];
|
|
13
|
-
when_to_use: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function extractProcedures(transcript: string, options?: {
|
|
16
|
-
agent_id?: string;
|
|
17
|
-
project_id?: string;
|
|
18
|
-
session_id?: string;
|
|
19
|
-
}): Promise<ExtractedProcedure[]>;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=procedural-extractor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"procedural-extractor.d.ts","sourceRoot":"","sources":["../../src/lib/procedural-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA2BH,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACA,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAyF/B"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-profile memory sync.
|
|
3
|
-
* Selectively copy memories between different mementos profiles/databases.
|
|
4
|
-
*/
|
|
5
|
-
import type { MemoryFilter } from "../types/index.js";
|
|
6
|
-
export interface ProfileSyncOptions {
|
|
7
|
-
filter?: MemoryFilter;
|
|
8
|
-
strategy?: "skip" | "merge" | "overwrite";
|
|
9
|
-
}
|
|
10
|
-
export interface ProfileSyncResult {
|
|
11
|
-
copied: number;
|
|
12
|
-
skipped: number;
|
|
13
|
-
source_profile: string;
|
|
14
|
-
target_profile: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Sync memories from one profile to another.
|
|
18
|
-
*/
|
|
19
|
-
export declare function syncProfiles(sourceProfile: string, targetProfile: string, options?: ProfileSyncOptions): ProfileSyncResult;
|
|
20
|
-
//# sourceMappingURL=profile-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-sync.d.ts","sourceRoot":"","sources":["../../src/lib/profile-sync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAUD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAmDnB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Profile Synthesizer — aggregates preference and fact memories into a coherent profile.
|
|
3
|
-
* Cached as a special pinned memory, auto-refreshed when preferences change.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getProfileKey(scope: string, id: string): string;
|
|
6
|
-
export declare function synthesizeProfile(options: {
|
|
7
|
-
project_id?: string;
|
|
8
|
-
agent_id?: string;
|
|
9
|
-
scope?: "agent" | "project" | "global";
|
|
10
|
-
force_refresh?: boolean;
|
|
11
|
-
}): Promise<{
|
|
12
|
-
profile: string;
|
|
13
|
-
memory_count: number;
|
|
14
|
-
from_cache: boolean;
|
|
15
|
-
} | null>;
|
|
16
|
-
/**
|
|
17
|
-
* Mark profile as stale. Called from PostMemorySave hook when a preference/fact is saved.
|
|
18
|
-
*/
|
|
19
|
-
export declare function markProfileStale(projectId?: string, _agentId?: string): void;
|
|
20
|
-
//# sourceMappingURL=profile-synthesizer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-synthesizer.d.ts","sourceRoot":"","sources":["../../src/lib/profile-synthesizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CA6EjF;AA2BD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAa5E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
-
import type { Project } from "../types/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* Auto-detect the current project from cwd's git root.
|
|
5
|
-
* - Finds the git root directory
|
|
6
|
-
* - Extracts the repo name from the directory basename
|
|
7
|
-
* - Checks if a project is already registered by path
|
|
8
|
-
* - If not, registers it automatically
|
|
9
|
-
* - Returns the Project object, or null if not in a git repo
|
|
10
|
-
*
|
|
11
|
-
* Results are cached for the lifetime of the process.
|
|
12
|
-
*/
|
|
13
|
-
export declare function detectProject(db?: Database): Project | null;
|
|
14
|
-
/**
|
|
15
|
-
* Reset the cached project (useful for tests).
|
|
16
|
-
*/
|
|
17
|
-
export declare function resetProjectCache(): void;
|
|
18
|
-
//# sourceMappingURL=project-detect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-detect.d.ts","sourceRoot":"","sources":["../../src/lib/project-detect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAkBjD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAgC3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ProjectPanel } from "@hasna/contracts";
|
|
2
|
-
export interface MementosProjectPanelOptions {
|
|
3
|
-
limit?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare function createMementosProjectPanel(projectRef: string, options?: MementosProjectPanelOptions): ProjectPanel;
|
|
6
|
-
export declare function formatMementosProjectPanel(panel: ProjectPanel): string;
|
|
7
|
-
//# sourceMappingURL=project-panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-panel.d.ts","sourceRoot":"","sources":["../../src/lib/project-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAK1B,MAAM,WAAW,2BAA2B;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwGD,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,2BAAgC,GAAG,YAAY,CAkGtH;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAgBtE"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Anthropic provider (DEFAULT).
|
|
3
|
-
* Default model: claude-haiku-4-5 — cheap, fast, good quality.
|
|
4
|
-
* Premium option: claude-sonnet-4-5.
|
|
5
|
-
* Never throws — returns [] / empty results on failure.
|
|
6
|
-
*/
|
|
7
|
-
import { BaseProvider, type ProviderConfig, type ProviderName, type MemoryExtractionContext, type ExtractedMemory, type EntityExtractionResult } from "./base.js";
|
|
8
|
-
export declare const ANTHROPIC_MODELS: {
|
|
9
|
-
readonly default: "claude-haiku-4-5";
|
|
10
|
-
readonly premium: "claude-sonnet-4-5";
|
|
11
|
-
};
|
|
12
|
-
export declare class AnthropicProvider extends BaseProvider {
|
|
13
|
-
readonly name: ProviderName;
|
|
14
|
-
private readonly baseUrl;
|
|
15
|
-
constructor(config?: Partial<ProviderConfig>);
|
|
16
|
-
extractMemories(text: string, context: MemoryExtractionContext): Promise<ExtractedMemory[]>;
|
|
17
|
-
extractEntities(text: string): Promise<EntityExtractionResult>;
|
|
18
|
-
scoreImportance(content: string, _context: MemoryExtractionContext): Promise<number>;
|
|
19
|
-
private callAPI;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=anthropic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/anthropic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAK5B,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkC;gBAE9C,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAWtC,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,eAAe,EAAE,CAAC;IAkBvB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAoB9D,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC;YAaJ,OAAO;CAsCtB"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LLM Provider abstraction for auto-memory formation.
|
|
3
|
-
* Any LLM (Anthropic, OpenAI, Cerebras, Grok) implements LLMProvider.
|
|
4
|
-
* All methods return structured data — providers must output valid JSON.
|
|
5
|
-
*/
|
|
6
|
-
import type { MemoryCategory, MemoryScope } from "../../types/index.js";
|
|
7
|
-
export interface ProviderConfig {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
model: string;
|
|
10
|
-
maxTokens?: number;
|
|
11
|
-
temperature?: number;
|
|
12
|
-
timeoutMs?: number;
|
|
13
|
-
}
|
|
14
|
-
export type ProviderName = "anthropic" | "openai" | "cerebras" | "grok";
|
|
15
|
-
export interface AutoMemoryConfig {
|
|
16
|
-
provider: ProviderName;
|
|
17
|
-
model?: string;
|
|
18
|
-
enabled: boolean;
|
|
19
|
-
minImportance: number;
|
|
20
|
-
autoEntityLink: boolean;
|
|
21
|
-
fallback?: ProviderName[];
|
|
22
|
-
}
|
|
23
|
-
export declare const DEFAULT_AUTO_MEMORY_CONFIG: AutoMemoryConfig;
|
|
24
|
-
export interface MemoryExtractionContext {
|
|
25
|
-
agentId?: string;
|
|
26
|
-
projectId?: string;
|
|
27
|
-
sessionId?: string;
|
|
28
|
-
/** Compact summary of existing memories to avoid duplicates */
|
|
29
|
-
existingMemoriesSummary?: string;
|
|
30
|
-
/** Working directory or project name for scope hints */
|
|
31
|
-
projectName?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface ExtractedMemory {
|
|
34
|
-
content: string;
|
|
35
|
-
category: MemoryCategory;
|
|
36
|
-
importance: number;
|
|
37
|
-
tags: string[];
|
|
38
|
-
suggestedScope: MemoryScope;
|
|
39
|
-
/** Why this is worth remembering — used for dedup decisions */
|
|
40
|
-
reasoning?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface ExtractedEntity {
|
|
43
|
-
name: string;
|
|
44
|
-
/** Maps to EntityType in knowledge graph */
|
|
45
|
-
type: "person" | "project" | "tool" | "concept" | "file" | "api" | "pattern" | "organization";
|
|
46
|
-
/** 0-1 confidence score */
|
|
47
|
-
confidence: number;
|
|
48
|
-
}
|
|
49
|
-
export interface ExtractedRelation {
|
|
50
|
-
from: string;
|
|
51
|
-
to: string;
|
|
52
|
-
type: "uses" | "knows" | "depends_on" | "created_by" | "related_to" | "contradicts" | "part_of" | "implements" | "happened_before" | "happened_after" | "caused_by" | "resulted_in" | "supersedes" | "version_of";
|
|
53
|
-
}
|
|
54
|
-
export interface EntityExtractionResult {
|
|
55
|
-
entities: ExtractedEntity[];
|
|
56
|
-
relations: ExtractedRelation[];
|
|
57
|
-
}
|
|
58
|
-
export interface LLMProvider {
|
|
59
|
-
readonly name: ProviderName;
|
|
60
|
-
readonly config: ProviderConfig;
|
|
61
|
-
/**
|
|
62
|
-
* Extract memories worth saving from a conversation turn or session chunk.
|
|
63
|
-
* Must return [] on failure — never throw.
|
|
64
|
-
*/
|
|
65
|
-
extractMemories(text: string, context: MemoryExtractionContext): Promise<ExtractedMemory[]>;
|
|
66
|
-
/**
|
|
67
|
-
* Extract entities and relations from text for knowledge graph linking.
|
|
68
|
-
* Must return empty arrays on failure — never throw.
|
|
69
|
-
*/
|
|
70
|
-
extractEntities(text: string): Promise<EntityExtractionResult>;
|
|
71
|
-
/**
|
|
72
|
-
* Score how important a memory is (0-10).
|
|
73
|
-
* Used when we already have the content but need a quality signal.
|
|
74
|
-
* Must return a number on failure — never throw.
|
|
75
|
-
*/
|
|
76
|
-
scoreImportance(content: string, context: MemoryExtractionContext): Promise<number>;
|
|
77
|
-
}
|
|
78
|
-
export declare abstract class BaseProvider implements LLMProvider {
|
|
79
|
-
abstract readonly name: ProviderName;
|
|
80
|
-
readonly config: ProviderConfig;
|
|
81
|
-
constructor(config: ProviderConfig);
|
|
82
|
-
abstract extractMemories(text: string, context: MemoryExtractionContext): Promise<ExtractedMemory[]>;
|
|
83
|
-
abstract extractEntities(text: string): Promise<EntityExtractionResult>;
|
|
84
|
-
abstract scoreImportance(content: string, context: MemoryExtractionContext): Promise<number>;
|
|
85
|
-
/** Parse JSON from LLM response, stripping markdown code fences if present */
|
|
86
|
-
protected parseJSON<T>(raw: string): T | null;
|
|
87
|
-
/** Clamp a number to 0-10 importance range */
|
|
88
|
-
protected clampImportance(value: unknown): number;
|
|
89
|
-
/** Validate and normalise a single extracted memory */
|
|
90
|
-
protected normaliseMemory(raw: unknown): ExtractedMemory | null;
|
|
91
|
-
}
|
|
92
|
-
export declare const MEMORY_EXTRACTION_SYSTEM_PROMPT = "You are a precise memory extraction engine for an AI agent.\nGiven text, extract facts worth remembering as structured JSON.\nFocus on: decisions made, preferences revealed, corrections, architectural choices, established facts, user preferences.\nIgnore: greetings, filler, questions without answers, temporary states.\nOutput ONLY a JSON array \u2014 no markdown, no explanation.";
|
|
93
|
-
export declare const MEMORY_EXTRACTION_USER_TEMPLATE: (text: string, context: MemoryExtractionContext) => string;
|
|
94
|
-
export declare const ENTITY_EXTRACTION_SYSTEM_PROMPT = "You are a knowledge graph entity extractor.\nGiven text, identify named entities and their relationships.\nOutput ONLY valid JSON \u2014 no markdown, no explanation.";
|
|
95
|
-
export declare const ENTITY_EXTRACTION_USER_TEMPLATE: (text: string) => string;
|
|
96
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","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eAAe,EAAE,CAAC;IAE7B,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAEvE,QAAQ,CAAC,eAAe,CACtB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC;IAElB,8EAA8E;IAC9E,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAa7C,8CAA8C;IAC9C,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAMjD,uDAAuD;IACvD,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI;CA+BhE;AAID,eAAO,MAAM,+BAA+B,kYAIY,CAAC;AAEzD,eAAO,MAAM,+BAA+B,GAC1C,MAAM,MAAM,EACZ,SAAS,uBAAuB,WAgBS,CAAC;AAE5C,eAAO,MAAM,+BAA+B,0KAEU,CAAC;AAEvD,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,WAY1D,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cerebras provider — ultra-fast inference (~2000 tok/sec).
|
|
3
|
-
* OpenAI-compatible API.
|
|
4
|
-
* Default model: llama-3.3-70b.
|
|
5
|
-
* Ideal for real-time non-blocking extraction.
|
|
6
|
-
* Env var: CEREBRAS_API_KEY.
|
|
7
|
-
*/
|
|
8
|
-
import { OpenAICompatProvider } from "./openai-compat.js";
|
|
9
|
-
import type { ProviderConfig, ProviderName } from "./base.js";
|
|
10
|
-
export declare const CEREBRAS_MODELS: {
|
|
11
|
-
readonly default: "llama-3.3-70b";
|
|
12
|
-
readonly fast: "llama3.1-8b";
|
|
13
|
-
};
|
|
14
|
-
export declare class CerebrasProvider extends OpenAICompatProvider {
|
|
15
|
-
readonly name: ProviderName;
|
|
16
|
-
protected readonly baseUrl = "https://api.cerebras.ai/v1";
|
|
17
|
-
protected readonly authHeader = "Authorization";
|
|
18
|
-
constructor(config?: Partial<ProviderConfig>);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=cerebras.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cerebras.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/cerebras.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9D,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,qBAAa,gBAAiB,SAAQ,oBAAoB;IACxD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAc;IACzC,SAAS,CAAC,QAAQ,CAAC,OAAO,gCAAgC;IAC1D,SAAS,CAAC,QAAQ,CAAC,UAAU,mBAAmB;gBAEpC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAS7C"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Grok/xAI provider.
|
|
3
|
-
* OpenAI-compatible API.
|
|
4
|
-
* Default model: grok-3-mini (cheap). Premium: grok-3.
|
|
5
|
-
* Env var: XAI_API_KEY.
|
|
6
|
-
*/
|
|
7
|
-
import { OpenAICompatProvider } from "./openai-compat.js";
|
|
8
|
-
import type { ProviderConfig, ProviderName } from "./base.js";
|
|
9
|
-
export declare const GROK_MODELS: {
|
|
10
|
-
readonly default: "grok-3-mini";
|
|
11
|
-
readonly premium: "grok-3";
|
|
12
|
-
};
|
|
13
|
-
export declare class GrokProvider extends OpenAICompatProvider {
|
|
14
|
-
readonly name: ProviderName;
|
|
15
|
-
protected readonly baseUrl = "https://api.x.ai/v1";
|
|
16
|
-
protected readonly authHeader = "Authorization";
|
|
17
|
-
constructor(config?: Partial<ProviderConfig>);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=grok.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grok.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/grok.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9D,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,qBAAa,YAAa,SAAQ,oBAAoB;IACpD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAU;IACrC,SAAS,CAAC,QAAQ,CAAC,OAAO,yBAAyB;IACnD,SAAS,CAAC,QAAQ,CAAC,UAAU,mBAAmB;gBAEpC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAS7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared base for all OpenAI-compatible providers.
|
|
3
|
-
* Used by: OpenAI, Cerebras, Grok/xAI.
|
|
4
|
-
* Handles: API calls, exponential backoff on 429, shared JSON parsing.
|
|
5
|
-
*/
|
|
6
|
-
import { BaseProvider, type ProviderConfig, type MemoryExtractionContext, type ExtractedMemory, type EntityExtractionResult } from "./base.js";
|
|
7
|
-
export declare abstract class OpenAICompatProvider extends BaseProvider {
|
|
8
|
-
protected abstract readonly baseUrl: string;
|
|
9
|
-
protected abstract readonly authHeader: string;
|
|
10
|
-
constructor(config: ProviderConfig);
|
|
11
|
-
extractMemories(text: string, context: MemoryExtractionContext): Promise<ExtractedMemory[]>;
|
|
12
|
-
extractEntities(text: string): Promise<EntityExtractionResult>;
|
|
13
|
-
scoreImportance(content: string, _context: MemoryExtractionContext): Promise<number>;
|
|
14
|
-
/** Call with exponential backoff on 429 (rate limit), max 3 retries */
|
|
15
|
-
private callWithRetry;
|
|
16
|
-
private callAPI;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=openai-compat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openai-compat.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/openai-compat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAK5B,MAAM,WAAW,CAAC;AAEnB,8BAAsB,oBAAqB,SAAQ,YAAY;IAC7D,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAC5C,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEnC,MAAM,EAAE,cAAc;IAI5B,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,eAAe,EAAE,CAAC;IAkBvB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAoB9D,eAAe,CACnB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC;IAalB,uEAAuE;YACzD,aAAa;YAsBb,OAAO;CA0CtB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenAI provider.
|
|
3
|
-
* Default model: gpt-4.1-nano (ultra cheap, fast).
|
|
4
|
-
* Premium: gpt-4.1-mini, gpt-4.1.
|
|
5
|
-
* Env var: OPENAI_API_KEY.
|
|
6
|
-
*/
|
|
7
|
-
import { OpenAICompatProvider } from "./openai-compat.js";
|
|
8
|
-
import type { ProviderConfig, ProviderName } from "./base.js";
|
|
9
|
-
export declare const OPENAI_MODELS: {
|
|
10
|
-
readonly default: "gpt-4.1-nano";
|
|
11
|
-
readonly mini: "gpt-4.1-mini";
|
|
12
|
-
readonly full: "gpt-4.1";
|
|
13
|
-
};
|
|
14
|
-
export declare class OpenAIProvider extends OpenAICompatProvider {
|
|
15
|
-
readonly name: ProviderName;
|
|
16
|
-
protected readonly baseUrl = "https://api.openai.com/v1";
|
|
17
|
-
protected readonly authHeader = "Authorization";
|
|
18
|
-
constructor(config?: Partial<ProviderConfig>);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/openai.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,qBAAa,cAAe,SAAQ,oBAAoB;IACtD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAY;IACvC,SAAS,CAAC,QAAQ,CAAC,OAAO,+BAA+B;IACzD,SAAS,CAAC,QAAQ,CAAC,UAAU,mBAAmB;gBAEpC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAS7C"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider registry — resolves API keys, manages fallback chain,
|
|
3
|
-
* health checks. Works with zero config (just needs one env var set).
|
|
4
|
-
* Default: Anthropic Haiku → Cerebras → OpenAI.
|
|
5
|
-
*/
|
|
6
|
-
import { type AutoMemoryConfig, type LLMProvider, type ProviderName } from "./base.js";
|
|
7
|
-
declare class ProviderRegistry {
|
|
8
|
-
private config;
|
|
9
|
-
private _instances;
|
|
10
|
-
/** Update runtime config without restart */
|
|
11
|
-
configure(partial: Partial<AutoMemoryConfig>): void;
|
|
12
|
-
getConfig(): Readonly<AutoMemoryConfig>;
|
|
13
|
-
/** Get primary provider, or null if no API key available */
|
|
14
|
-
getPrimary(): LLMProvider | null;
|
|
15
|
-
/** Get fallback chain — all available providers excluding primary */
|
|
16
|
-
getFallbacks(): LLMProvider[];
|
|
17
|
-
/**
|
|
18
|
-
* Get the best available provider.
|
|
19
|
-
* Returns primary if available, otherwise first available fallback.
|
|
20
|
-
* Returns null only if no providers have API keys configured.
|
|
21
|
-
*/
|
|
22
|
-
getAvailable(): LLMProvider | null;
|
|
23
|
-
/**
|
|
24
|
-
* Get a specific provider by name.
|
|
25
|
-
* Returns null if no API key is configured for that provider.
|
|
26
|
-
*/
|
|
27
|
-
getProvider(name: ProviderName): LLMProvider | null;
|
|
28
|
-
/** Check which providers have API keys configured */
|
|
29
|
-
health(): Record<ProviderName, {
|
|
30
|
-
available: boolean;
|
|
31
|
-
model: string;
|
|
32
|
-
}>;
|
|
33
|
-
private createProvider;
|
|
34
|
-
}
|
|
35
|
-
/** Singleton registry — shared across the whole process */
|
|
36
|
-
export declare const providerRegistry: ProviderRegistry;
|
|
37
|
-
export {};
|
|
38
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/providers/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,WAAW,CAAC;AAInB,cAAM,gBAAgB;IACpB,OAAO,CAAC,MAAM,CAAuD;IACrE,OAAO,CAAC,UAAU,CAAwC;IAE1D,4CAA4C;IAC5C,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAMnD,SAAS,IAAI,QAAQ,CAAC,gBAAgB,CAAC;IAIvC,4DAA4D;IAC5D,UAAU,IAAI,WAAW,GAAG,IAAI;IAIhC,qEAAqE;IACrE,YAAY,IAAI,WAAW,EAAE;IAQ7B;;;;OAIG;IACH,YAAY,IAAI,WAAW,GAAG,IAAI;IAOlC;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,IAAI;IAcnD,qDAAqD;IACrD,MAAM,IAAI,MAAM,CAAC,YAAY,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAarE,OAAO,CAAC,cAAc;CAiBvB;AAED,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
package/dist/lib/quality.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory quality auto-scoring.
|
|
3
|
-
* Heuristic scoring based on specificity, actionability, freshness, consistency.
|
|
4
|
-
*/
|
|
5
|
-
import type { Memory } from "../types/index.js";
|
|
6
|
-
export interface QualityScore {
|
|
7
|
-
total: number;
|
|
8
|
-
specificity: number;
|
|
9
|
-
actionability: number;
|
|
10
|
-
freshness: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Compute a quality score for a memory.
|
|
14
|
-
*/
|
|
15
|
-
export declare function computeQualityScore(memory: Memory): QualityScore;
|
|
16
|
-
//# sourceMappingURL=quality.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quality.d.ts","sourceRoot":"","sources":["../../src/lib/quality.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAQD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAwBhE"}
|
package/dist/lib/redact.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect and redact secrets from text.
|
|
3
|
-
* Returns the text with secrets replaced by [REDACTED].
|
|
4
|
-
*/
|
|
5
|
-
export declare function redactSecrets(text: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Check if text contains any detectable secrets.
|
|
8
|
-
*/
|
|
9
|
-
export declare function containsSecrets(text: string): boolean;
|
|
10
|
-
//# sourceMappingURL=redact.d.ts.map
|
package/dist/lib/redact.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/lib/redact.ts"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD"}
|
package/dist/lib/reflection.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
-
import type { Memory } from "../types/index.js";
|
|
3
|
-
export declare const DEFAULT_REFLECTION_PROVIDER = "anthropic";
|
|
4
|
-
export declare const DEFAULT_REFLECTION_MODEL = "claude-fable-5";
|
|
5
|
-
export type ReflectionTarget = "session" | "task" | "range";
|
|
6
|
-
export type ReflectionLessonKind = "worked" | "failed" | "do_differently";
|
|
7
|
-
export interface ReflectionLessonInput {
|
|
8
|
-
lesson: string;
|
|
9
|
-
evidence?: string[];
|
|
10
|
-
importance?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface ReflectionCriticResult {
|
|
13
|
-
summary: string;
|
|
14
|
-
whatWorked: ReflectionLessonInput[];
|
|
15
|
-
whatFailed: ReflectionLessonInput[];
|
|
16
|
-
doDifferently: ReflectionLessonInput[];
|
|
17
|
-
}
|
|
18
|
-
export interface ReflectionTrajectory {
|
|
19
|
-
on: ReflectionTarget;
|
|
20
|
-
source?: string;
|
|
21
|
-
since?: string;
|
|
22
|
-
until?: string;
|
|
23
|
-
memories: Memory[];
|
|
24
|
-
toolEvents: Array<Record<string, unknown>>;
|
|
25
|
-
text: string;
|
|
26
|
-
}
|
|
27
|
-
export type ReflectionCritic = (trajectory: ReflectionTrajectory) => Promise<ReflectionCriticResult>;
|
|
28
|
-
export interface ReflectionRun {
|
|
29
|
-
id: string;
|
|
30
|
-
on_type: ReflectionTarget;
|
|
31
|
-
source: string | null;
|
|
32
|
-
project_id: string | null;
|
|
33
|
-
agent_id: string | null;
|
|
34
|
-
dry_run: boolean;
|
|
35
|
-
provider: string | null;
|
|
36
|
-
model: string | null;
|
|
37
|
-
status: "pending" | "running" | "completed" | "failed";
|
|
38
|
-
trajectory_memory_ids: string[];
|
|
39
|
-
summary: string | null;
|
|
40
|
-
error: string | null;
|
|
41
|
-
started_at: string;
|
|
42
|
-
completed_at: string | null;
|
|
43
|
-
}
|
|
44
|
-
export interface ReflectionLesson {
|
|
45
|
-
kind: ReflectionLessonKind;
|
|
46
|
-
lesson: string;
|
|
47
|
-
evidence: string[];
|
|
48
|
-
importance: number;
|
|
49
|
-
memory_id: string | null;
|
|
50
|
-
}
|
|
51
|
-
export interface ReflectionOptions {
|
|
52
|
-
on: ReflectionTarget;
|
|
53
|
-
source?: string;
|
|
54
|
-
dryRun?: boolean;
|
|
55
|
-
projectId?: string;
|
|
56
|
-
agentId?: string;
|
|
57
|
-
since?: string;
|
|
58
|
-
until?: string;
|
|
59
|
-
provider?: string;
|
|
60
|
-
model?: string;
|
|
61
|
-
maxTokens?: number;
|
|
62
|
-
critic?: ReflectionCritic;
|
|
63
|
-
db?: Database;
|
|
64
|
-
}
|
|
65
|
-
export interface ReflectionResult {
|
|
66
|
-
run: ReflectionRun;
|
|
67
|
-
dryRun: boolean;
|
|
68
|
-
trajectory: {
|
|
69
|
-
memoryIds: string[];
|
|
70
|
-
toolEventCount: number;
|
|
71
|
-
text: string;
|
|
72
|
-
};
|
|
73
|
-
lessons: ReflectionLesson[];
|
|
74
|
-
createdMemories: Memory[];
|
|
75
|
-
}
|
|
76
|
-
export declare function heuristicReflectionCritic(trajectory: ReflectionTrajectory): ReflectionCriticResult;
|
|
77
|
-
export declare function createAISDKReflectionCritic(options?: {
|
|
78
|
-
provider?: string;
|
|
79
|
-
model?: string;
|
|
80
|
-
maxTokens?: number;
|
|
81
|
-
}): ReflectionCritic;
|
|
82
|
-
export declare function reflectOnTrajectory(options: ReflectionOptions): Promise<ReflectionResult>;
|
|
83
|
-
//# sourceMappingURL=reflection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reflection.d.ts","sourceRoot":"","sources":["../../src/lib/reflection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAQhD,eAAO,MAAM,2BAA2B,cAAc,CAAC;AACvD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,qBAAqB,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|
1
|
-
import type { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
-
import type { MementosConfig } from "../types/index.js";
|
|
3
|
-
export declare function enforceQuotas(config: MementosConfig, db?: Database): number;
|
|
4
|
-
export declare function archiveStale(staleDays: number, db?: Database): number;
|
|
5
|
-
export declare function archiveUnused(days: number, db?: Database): number;
|
|
6
|
-
export declare function deprioritizeStale(days: number, db?: Database): number;
|
|
7
|
-
export declare function runCleanup(config: MementosConfig, db?: Database): {
|
|
8
|
-
expired: number;
|
|
9
|
-
evicted: number;
|
|
10
|
-
archived: number;
|
|
11
|
-
unused_archived: number;
|
|
12
|
-
deprioritized: number;
|
|
13
|
-
};
|
|
14
|
-
export declare function enforceMemoryBounds(projectId?: string, db?: Database): {
|
|
15
|
-
archived: number;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=retention.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retention.d.ts","sourceRoot":"","sources":["../../src/lib/retention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAUrE,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CA0C3E;AAMD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAwBrE;AAMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAoBjE;AAMD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAgCrE;AAMD,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,EAAE,CAAC,EAAE,QAAQ,GACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAgBxG;AAOD,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAuEtB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare const LEGACY_STORAGE_MODE_KEYS: readonly ["HASNA_MEMENTOS_STORAGE_MODE", "HASNA_MEMENTOS_MODE", "MEMENTOS_STORAGE_MODE", "MEMENTOS_MODE"];
|
|
2
|
-
/** The retired storage-mode variable names, exported for tests and isolation harnesses. */
|
|
3
|
-
export { LEGACY_STORAGE_MODE_KEYS };
|
|
4
|
-
/**
|
|
5
|
-
* Throw when a retired storage-mode variable is set. Naming the retired var
|
|
6
|
-
* and the supported switches makes the error actionable without accepting the
|
|
7
|
-
* value. Safe to call from any entry (client store resolution, db guard,
|
|
8
|
-
* server backend resolution) — it is a no-op when no legacy key is set.
|
|
9
|
-
*/
|
|
10
|
-
export declare function assertNoLegacyStorageMode(env?: NodeJS.ProcessEnv): void;
|
|
11
|
-
//# sourceMappingURL=retired-storage-mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retired-storage-mode.d.ts","sourceRoot":"","sources":["../../src/lib/retired-storage-mode.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,wBAAwB,2GAKpB,CAAC;AAEX,2FAA2F;AAC3F,OAAO,EAAE,wBAAwB,EAAE,CAAC;AASpC;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAUpF"}
|