memory-journal-mcp 9.0.0 → 9.1.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 +165 -124
- package/dist/audit/interceptor.d.ts.map +1 -1
- package/dist/auth/authorization-server-discovery.d.ts.map +1 -1
- package/dist/auth/middleware.d.ts +11 -22
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/scope-map.d.ts.map +1 -1
- package/dist/auth/scopes.d.ts.map +1 -1
- package/dist/auth/token-validator.d.ts.map +1 -1
- package/dist/auth/transport-agnostic.d.ts +4 -0
- package/dist/auth/transport-agnostic.d.ts.map +1 -1
- package/dist/auth/validation.d.ts +1 -0
- package/dist/auth/validation.d.ts.map +1 -1
- package/dist/{chunk-6RCZ4IYV.js → chunk-4FZCHFB5.js} +28 -5
- package/dist/{chunk-AIWHVEOW.js → chunk-D2FY6XS5.js} +99 -7
- package/dist/chunk-FZLB6NAV.js +746 -0
- package/dist/{chunk-NVXCRDCO.js → chunk-LE6ZWUPK.js} +216 -138
- package/dist/chunk-SGJU2DHU.js +2102 -0
- package/dist/{chunk-2UIMA6JF.js → chunk-T7SROBBV.js} +32375 -29351
- package/dist/{chunk-IYZWMAA4.js → chunk-Y6MMKR2Z.js} +957 -1333
- package/dist/cli/commands/admin.d.ts +1 -1
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/entry-payload.d.ts +38 -0
- package/dist/cli/commands/entry-payload.d.ts.map +1 -0
- package/dist/cli/commands/entry.d.ts +10 -0
- package/dist/cli/commands/entry.d.ts.map +1 -1
- package/dist/cli/commands/exec.d.ts.map +1 -1
- package/dist/cli/commands/io.d.ts +1 -0
- package/dist/cli/commands/io.d.ts.map +1 -1
- package/dist/cli/commands/visualize.d.ts.map +1 -1
- package/dist/cli/index.js +7 -10
- package/dist/cli/schemas.d.ts +14 -1
- package/dist/cli/schemas.d.ts.map +1 -1
- package/dist/cli/server-options-builder.d.ts.map +1 -1
- package/dist/cli.js +7 -10
- package/dist/codemode/api/journal-api.d.ts +5 -23
- package/dist/codemode/api/journal-api.d.ts.map +1 -1
- package/dist/codemode/api/key-normalizer.d.ts +8 -0
- package/dist/codemode/api/key-normalizer.d.ts.map +1 -0
- package/dist/codemode/api/param-normalizer.d.ts +2 -4
- package/dist/codemode/api/param-normalizer.d.ts.map +1 -1
- package/dist/codemode/api/project-registry-ops.d.ts +26 -0
- package/dist/codemode/api/project-registry-ops.d.ts.map +1 -0
- package/dist/codemode/api/sandbox-bindings.d.ts +25 -0
- package/dist/codemode/api/sandbox-bindings.d.ts.map +1 -0
- package/dist/codemode/api/types.d.ts.map +1 -1
- package/dist/codemode/api-constants.d.ts +3 -39
- package/dist/codemode/api-constants.d.ts.map +1 -1
- package/dist/codemode/constants/examples-and-params.d.ts +31 -0
- package/dist/codemode/constants/examples-and-params.d.ts.map +1 -0
- package/dist/codemode/constants/method-aliases.d.ts +8 -0
- package/dist/codemode/constants/method-aliases.d.ts.map +1 -0
- package/dist/codemode/normalizers/domain-tool-interceptions.d.ts +6 -0
- package/dist/codemode/normalizers/domain-tool-interceptions.d.ts.map +1 -0
- package/dist/codemode/normalizers/entry-and-search-interceptions.d.ts +6 -0
- package/dist/codemode/normalizers/entry-and-search-interceptions.d.ts.map +1 -0
- package/dist/codemode/normalizers/generic-interceptions.d.ts +6 -0
- package/dist/codemode/normalizers/generic-interceptions.d.ts.map +1 -0
- package/dist/codemode/normalizers/github-and-backup-interceptions.d.ts +6 -0
- package/dist/codemode/normalizers/github-and-backup-interceptions.d.ts.map +1 -0
- package/dist/codemode/normalizers/shared-utils.d.ts +31 -0
- package/dist/codemode/normalizers/shared-utils.d.ts.map +1 -0
- package/dist/codemode/param-normalizer.d.ts +5 -1
- package/dist/codemode/param-normalizer.d.ts.map +1 -1
- package/dist/codemode/proxy-helpers.d.ts +34 -0
- package/dist/codemode/proxy-helpers.d.ts.map +1 -0
- package/dist/codemode/proxy-namespaces.d.ts +30 -0
- package/dist/codemode/proxy-namespaces.d.ts.map +1 -0
- package/dist/codemode/security.d.ts +11 -0
- package/dist/codemode/security.d.ts.map +1 -1
- package/dist/codemode/type-generator.d.ts.map +1 -1
- package/dist/codemode/types.d.ts.map +1 -1
- package/dist/codemode/worker/mj-shim-domains.d.ts +15 -0
- package/dist/codemode/worker/mj-shim-domains.d.ts.map +1 -0
- package/dist/codemode/worker/mj-shim-proxy.d.ts +18 -0
- package/dist/codemode/worker/mj-shim-proxy.d.ts.map +1 -0
- package/dist/codemode/worker/namespace-shims.d.ts +32 -0
- package/dist/codemode/worker/namespace-shims.d.ts.map +1 -0
- package/dist/codemode/worker/node-shims.d.ts +65 -0
- package/dist/codemode/worker/node-shims.d.ts.map +1 -0
- package/dist/codemode/worker/prototype-hardening.d.ts +18 -0
- package/dist/codemode/worker/prototype-hardening.d.ts.map +1 -0
- package/dist/codemode/worker/result-compactor.d.ts +20 -0
- package/dist/codemode/worker/result-compactor.d.ts.map +1 -0
- package/dist/codemode/worker/sandbox-globals.d.ts +19 -0
- package/dist/codemode/worker/sandbox-globals.d.ts.map +1 -0
- package/dist/codemode/worker-api-proxy.d.ts +1 -6
- package/dist/codemode/worker-api-proxy.d.ts.map +1 -1
- package/dist/codemode/worker-result-proxy.d.ts.map +1 -1
- package/dist/codemode/worker-sandbox.d.ts.map +1 -1
- package/dist/constants/instructions/admin.d.ts +1 -1
- package/dist/constants/instructions/admin.d.ts.map +1 -1
- package/dist/constants/instructions/base.d.ts +2 -2
- package/dist/constants/instructions/base.d.ts.map +1 -1
- package/dist/constants/instructions/codemode.d.ts +1 -1
- package/dist/constants/instructions/codemode.d.ts.map +1 -1
- package/dist/constants/instructions/core.d.ts +1 -1
- package/dist/constants/instructions/core.d.ts.map +1 -1
- package/dist/constants/instructions/github.d.ts +1 -1
- package/dist/constants/instructions/github.d.ts.map +1 -1
- package/dist/constants/instructions/gotchas.d.ts +1 -1
- package/dist/constants/instructions/gotchas.d.ts.map +1 -1
- package/dist/constants/instructions/io.d.ts +1 -1
- package/dist/constants/instructions/io.d.ts.map +1 -1
- package/dist/constants/instructions/templates.d.ts +1 -1
- package/dist/constants/instructions/templates.d.ts.map +1 -1
- package/dist/constants/server-instructions.d.ts +2 -2
- package/dist/constants/server-instructions.d.ts.map +1 -1
- package/dist/database/core/interfaces.d.ts +6 -6
- package/dist/database/core/interfaces.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/adapter-delegates.d.ts +161 -0
- package/dist/database/sqlite-adapter/adapter-delegates.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/backup.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/database-adapter.d.ts +17 -147
- package/dist/database/sqlite-adapter/database-adapter.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/crud-read.d.ts +16 -0
- package/dist/database/sqlite-adapter/entries/crud-read.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/crud-write.d.ts +62 -0
- package/dist/database/sqlite-adapter/entries/crud-write.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/crud.d.ts +3 -92
- package/dist/database/sqlite-adapter/entries/crud.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/importance.d.ts +7 -0
- package/dist/database/sqlite-adapter/entries/importance.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/index.d.ts +9 -4
- package/dist/database/sqlite-adapter/entries/index.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/revisions.d.ts +16 -0
- package/dist/database/sqlite-adapter/entries/revisions.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/search/date-and-pagination.d.ts +37 -0
- package/dist/database/sqlite-adapter/entries/search/date-and-pagination.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/search/entity-lookups.d.ts +31 -0
- package/dist/database/sqlite-adapter/entries/search/entity-lookups.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/search/fts-and-hybrid.d.ts +44 -0
- package/dist/database/sqlite-adapter/entries/search/fts-and-hybrid.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/entries/search/index.d.ts +1 -1
- package/dist/database/sqlite-adapter/entries/search/index.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/search/query.d.ts +3 -82
- package/dist/database/sqlite-adapter/entries/search/query.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/entries/statistics.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/insights/cross-project.d.ts +42 -0
- package/dist/database/sqlite-adapter/insights/cross-project.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/insights/entry-digest-queries.d.ts +17 -0
- package/dist/database/sqlite-adapter/insights/entry-digest-queries.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/insights/team-collaboration.d.ts +29 -0
- package/dist/database/sqlite-adapter/insights/team-collaboration.d.ts.map +1 -0
- package/dist/database/sqlite-adapter/insights-operations.d.ts +11 -50
- package/dist/database/sqlite-adapter/insights-operations.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/lifecycle-operations.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/members.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/native-connection.d.ts +5 -0
- package/dist/database/sqlite-adapter/native-connection.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/relationships.d.ts +1 -2
- package/dist/database/sqlite-adapter/relationships.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/tags.d.ts.map +1 -1
- package/dist/database/sqlite-adapter/vector-operations.d.ts.map +1 -1
- package/dist/filtering/tool-constants.d.ts +1 -1
- package/dist/{fts-T466O2JP.js → fts-YHUVPPYF.js} +2 -2
- package/dist/github/commit-references/enricher.d.ts.map +1 -1
- package/dist/github/github-integration/projects.d.ts.map +1 -1
- package/dist/handlers/prompts/adversarial-helpers.d.ts +75 -0
- package/dist/handlers/prompts/adversarial-helpers.d.ts.map +1 -0
- package/dist/handlers/prompts/adversarial.d.ts +3 -5
- package/dist/handlers/prompts/adversarial.d.ts.map +1 -1
- package/dist/handlers/prompts/cms-supervisor.d.ts +8 -0
- package/dist/handlers/prompts/cms-supervisor.d.ts.map +1 -0
- package/dist/handlers/prompts/index.d.ts.map +1 -1
- package/dist/handlers/prompts/optimizer.d.ts.map +1 -1
- package/dist/handlers/prompts/workflow.d.ts.map +1 -1
- package/dist/handlers/resources/core/briefing/context-section.d.ts.map +1 -1
- package/dist/handlers/resources/core/briefing/github-repo-and-kanban.d.ts +57 -0
- package/dist/handlers/resources/core/briefing/github-repo-and-kanban.d.ts.map +1 -0
- package/dist/handlers/resources/core/briefing/github-section.d.ts +23 -20
- package/dist/handlers/resources/core/briefing/github-section.d.ts.map +1 -1
- package/dist/handlers/resources/core/briefing/system-section.d.ts.map +1 -1
- package/dist/handlers/resources/core/briefing/user-message.d.ts.map +1 -1
- package/dist/handlers/resources/help.d.ts.map +1 -1
- package/dist/handlers/resources/index.d.ts.map +1 -1
- package/dist/handlers/resources/shared.d.ts +1 -0
- package/dist/handlers/resources/shared.d.ts.map +1 -1
- package/dist/handlers/resources/staleness.d.ts.map +1 -1
- package/dist/handlers/tools/admin/batch-tools.d.ts.map +1 -1
- package/dist/handlers/tools/admin/core-tools.d.ts.map +1 -1
- package/dist/handlers/tools/admin/index.d.ts.map +1 -1
- package/dist/handlers/tools/admin/lifecycle-tools.d.ts.map +1 -1
- package/dist/handlers/tools/admin/project-tools.d.ts +1 -1
- package/dist/handlers/tools/admin/project-tools.d.ts.map +1 -1
- package/dist/handlers/tools/admin/schemas/crud-batch-schemas.d.ts +609 -0
- package/dist/handlers/tools/admin/schemas/crud-batch-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/admin/schemas/project-and-ops-schemas.d.ts +136 -0
- package/dist/handlers/tools/admin/schemas/project-and-ops-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/admin/schemas.d.ts +2 -733
- package/dist/handlers/tools/admin/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/admin/update_configuration.d.ts +14 -0
- package/dist/handlers/tools/admin/update_configuration.d.ts.map +1 -1
- package/dist/handlers/tools/admin/vector-tools.d.ts.map +1 -1
- package/dist/handlers/tools/analytics.d.ts.map +1 -1
- package/dist/handlers/tools/arg-interceptions.d.ts +51 -0
- package/dist/handlers/tools/arg-interceptions.d.ts.map +1 -0
- package/dist/handlers/tools/codemode/code-healer.d.ts +11 -0
- package/dist/handlers/tools/codemode/code-healer.d.ts.map +1 -0
- package/dist/handlers/tools/codemode/handler.d.ts +4 -23
- package/dist/handlers/tools/codemode/handler.d.ts.map +1 -1
- package/dist/handlers/tools/codemode/json-entry-recovery.d.ts +13 -0
- package/dist/handlers/tools/codemode/json-entry-recovery.d.ts.map +1 -0
- package/dist/handlers/tools/codemode/payload-synthesizer.d.ts +17 -0
- package/dist/handlers/tools/codemode/payload-synthesizer.d.ts.map +1 -0
- package/dist/handlers/tools/codemode/secure-dispatcher.d.ts +25 -0
- package/dist/handlers/tools/codemode/secure-dispatcher.d.ts.map +1 -0
- package/dist/handlers/tools/codemode/sql-recovery.d.ts +14 -0
- package/dist/handlers/tools/codemode/sql-recovery.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing/alias-catalog.d.ts +21 -0
- package/dist/handlers/tools/core/dummy-healing/alias-catalog.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing/entry-fallbacks.d.ts +4 -0
- package/dist/handlers/tools/core/dummy-healing/entry-fallbacks.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing/fs-fallbacks.d.ts +19 -0
- package/dist/handlers/tools/core/dummy-healing/fs-fallbacks.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing/index.d.ts +7 -0
- package/dist/handlers/tools/core/dummy-healing/index.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing/mcp-fallbacks.d.ts +12 -0
- package/dist/handlers/tools/core/dummy-healing/mcp-fallbacks.d.ts.map +1 -0
- package/dist/handlers/tools/core/dummy-healing.d.ts +1 -29
- package/dist/handlers/tools/core/dummy-healing.d.ts.map +1 -1
- package/dist/handlers/tools/core/index.d.ts +1 -1
- package/dist/handlers/tools/core/index.d.ts.map +1 -1
- package/dist/handlers/tools/core/schemas.d.ts +33 -9
- package/dist/handlers/tools/core/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/core/staleness-tools.d.ts +17 -0
- package/dist/handlers/tools/core/staleness-tools.d.ts.map +1 -1
- package/dist/handlers/tools/core/tools.d.ts.map +1 -1
- package/dist/handlers/tools/git.d.ts +5 -11
- package/dist/handlers/tools/git.d.ts.map +1 -1
- package/dist/handlers/tools/github/close-issue-tool.d.ts +6 -0
- package/dist/handlers/tools/github/close-issue-tool.d.ts.map +1 -0
- package/dist/handlers/tools/github/create-issue-tool.d.ts +6 -0
- package/dist/handlers/tools/github/create-issue-tool.d.ts.map +1 -0
- package/dist/handlers/tools/github/issue-tools.d.ts +3 -0
- package/dist/handlers/tools/github/issue-tools.d.ts.map +1 -1
- package/dist/handlers/tools/github/kanban-tools.d.ts.map +1 -1
- package/dist/handlers/tools/github/milestone-tools.d.ts.map +1 -1
- package/dist/handlers/tools/index.d.ts +2 -2
- package/dist/handlers/tools/index.d.ts.map +1 -1
- package/dist/handlers/tools/io/schemas.d.ts +5 -2
- package/dist/handlers/tools/io/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/relationships.d.ts.map +1 -1
- package/dist/handlers/tools/schemas/constants-and-primitives.d.ts +53 -0
- package/dist/handlers/tools/schemas/constants-and-primitives.d.ts.map +1 -0
- package/dist/handlers/tools/schemas/hallucination-healer.d.ts +8 -0
- package/dist/handlers/tools/schemas/hallucination-healer.d.ts.map +1 -0
- package/dist/handlers/tools/schemas/output-schemas.d.ts +247 -0
- package/dist/handlers/tools/schemas/output-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/schemas.d.ts +4 -306
- package/dist/handlers/tools/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/search/cross-team.d.ts +14 -0
- package/dist/handlers/tools/search/cross-team.d.ts.map +1 -1
- package/dist/handlers/tools/search/helpers.d.ts.map +1 -1
- package/dist/handlers/tools/search/hybrid.d.ts.map +1 -1
- package/dist/handlers/tools/search/misc-tools.d.ts.map +1 -1
- package/dist/handlers/tools/search/schemas.d.ts +6 -3
- package/dist/handlers/tools/search/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/search/search-entries.d.ts.map +1 -1
- package/dist/handlers/tools/search/semantic-search.d.ts.map +1 -1
- package/dist/handlers/tools/team/admin-tools/batch.d.ts.map +1 -1
- package/dist/handlers/tools/team/admin-tools/crud.d.ts.map +1 -1
- package/dist/handlers/tools/team/backup-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/core-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/helpers.d.ts.map +1 -1
- package/dist/handlers/tools/team/io-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/member-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/rbac.d.ts.map +1 -1
- package/dist/handlers/tools/team/relationship-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/schemas/admin-batch-schemas.d.ts +618 -0
- package/dist/handlers/tools/team/schemas/admin-batch-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/team/schemas/analytics-vector-schemas.d.ts +464 -0
- package/dist/handlers/tools/team/schemas/analytics-vector-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/team/schemas/core-search-schemas.d.ts +525 -0
- package/dist/handlers/tools/team/schemas/core-search-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/team/schemas/io-backup-schemas.d.ts +419 -0
- package/dist/handlers/tools/team/schemas/io-backup-schemas.d.ts.map +1 -0
- package/dist/handlers/tools/team/schemas.d.ts +5 -2002
- package/dist/handlers/tools/team/schemas.d.ts.map +1 -1
- package/dist/handlers/tools/team/search-tools.d.ts.map +1 -1
- package/dist/handlers/tools/team/vector-tools.d.ts.map +1 -1
- package/dist/index.js +6 -9
- package/dist/markdown/exporter.d.ts.map +1 -1
- package/dist/markdown/importer.d.ts.map +1 -1
- package/dist/observability/latency-tracker.d.ts.map +1 -1
- package/dist/observability/metrics-server.d.ts +1 -1
- package/dist/observability/metrics-server.d.ts.map +1 -1
- package/dist/observability/token-estimator.d.ts.map +1 -1
- package/dist/{security-utils-HNTROJAG.js → security-utils-P4P6A2DG.js} +1 -1
- package/dist/server/digest-reporter.d.ts +1 -0
- package/dist/server/digest-reporter.d.ts.map +1 -1
- package/dist/server/mcp-server/core.d.ts.map +1 -1
- package/dist/server/mcp-server/tool-registration/call-interceptor.d.ts +6 -0
- package/dist/server/mcp-server/tool-registration/call-interceptor.d.ts.map +1 -0
- package/dist/server/mcp-server/tool-registration/index.d.ts +4 -0
- package/dist/server/mcp-server/tool-registration/index.d.ts.map +1 -0
- package/dist/server/mcp-server/tool-registration/list-interceptor.d.ts +4 -0
- package/dist/server/mcp-server/tool-registration/list-interceptor.d.ts.map +1 -0
- package/dist/server/mcp-server/tool-registration/register-tools.d.ts +18 -0
- package/dist/server/mcp-server/tool-registration/register-tools.d.ts.map +1 -0
- package/dist/server/mcp-server/tool-registration.d.ts +1 -17
- package/dist/server/mcp-server/tool-registration.d.ts.map +1 -1
- package/dist/server/registration.d.ts +2 -0
- package/dist/server/registration.d.ts.map +1 -1
- package/dist/server/scheduler.d.ts +1 -0
- package/dist/server/scheduler.d.ts.map +1 -1
- package/dist/server/subscription-manager.d.ts +2 -0
- package/dist/server/subscription-manager.d.ts.map +1 -1
- package/dist/tools-BOQV7QD3.js +6 -0
- package/dist/transports/http/security.d.ts.map +1 -1
- package/dist/transports/http/server/http-transport.d.ts +25 -0
- package/dist/transports/http/server/http-transport.d.ts.map +1 -0
- package/dist/transports/http/server/index.d.ts +3 -30
- package/dist/transports/http/server/index.d.ts.map +1 -1
- package/dist/transports/http/server/legacy-sse.d.ts.map +1 -1
- package/dist/transports/http/server/protocol-handlers.d.ts +9 -0
- package/dist/transports/http/server/protocol-handlers.d.ts.map +1 -0
- package/dist/types/entities.d.ts +41 -1
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/index.d.ts +11 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/config-manager.d.ts +2 -0
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/error-helpers.d.ts.map +1 -1
- package/dist/utils/issue-logger.d.ts.map +1 -1
- package/dist/utils/mcp-logger.d.ts +14 -2
- package/dist/utils/mcp-logger.d.ts.map +1 -1
- package/dist/utils/security-utils.d.ts.map +1 -1
- package/dist/utils/vector-index-helpers.d.ts +1 -1
- package/dist/utils/vector-index-helpers.d.ts.map +1 -1
- package/dist/utils/workspace-resolver.d.ts.map +1 -1
- package/dist/vector/vector-search-manager/manager.d.ts +2 -2
- package/dist/vector/vector-search-manager/manager.d.ts.map +1 -1
- package/dist/vector/vector-search-manager/rebuild.d.ts.map +1 -1
- package/dist/vendor/lib-agent-exec/interceptors/git-interceptor.d.ts.map +1 -1
- package/dist/vendor/lib-agent-exec/schema.d.ts +18 -18
- package/dist/vendor/lib-agent-exec/schema.d.ts.map +1 -1
- package/dist/vendor/lib-agent-exec/stream-manager.d.ts.map +1 -1
- package/dist/worker-script.js +2662 -2645
- package/package.json +3 -4
- package/skills/memory-journal-mcp/SKILL.md +8 -8
- package/dist/auth/context.d.ts +0 -7
- package/dist/auth/context.d.ts.map +0 -1
- package/dist/chunk-ELMJYRTT.js +0 -29
- package/dist/chunk-F6WSLZVN.js +0 -675
- package/dist/chunk-JVGY2GHK.js +0 -776
- package/dist/chunk-KWSBCSFM.js +0 -411
- package/dist/chunk-SP5D3XYY.js +0 -1550
- package/dist/chunk-XJMEPP36.js +0 -57
- package/dist/database/core/entry-columns.d.ts +0 -8
- package/dist/database/core/entry-columns.d.ts.map +0 -1
- package/dist/database/core/schema.d.ts +0 -69
- package/dist/database/core/schema.d.ts.map +0 -1
- package/dist/error-helpers-STR7IPUR.js +0 -2
- package/dist/git-runner-6OE7PVKA.js +0 -1
- package/dist/journal-api-UG43ZD7Y.js +0 -1289
- package/dist/tools-RBNFDWIE.js +0 -9
package/dist/chunk-JVGY2GHK.js
DELETED
|
@@ -1,776 +0,0 @@
|
|
|
1
|
-
import { resolveProjectContext } from './chunk-AIWHVEOW.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import * as crypto from 'crypto';
|
|
4
|
-
import { Buffer } from 'buffer';
|
|
5
|
-
|
|
6
|
-
var ErrorFieldsMixin = z.object({
|
|
7
|
-
error: z.string().optional().describe("Human-readable error message"),
|
|
8
|
-
code: z.string().optional().describe("Error code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)"),
|
|
9
|
-
category: z.string().optional().describe("Error category (validation, query, connection, internal)"),
|
|
10
|
-
recoverable: z.boolean().optional().describe("Whether the error is recoverable"),
|
|
11
|
-
suggestion: z.string().optional().describe("Suggested fix for the error"),
|
|
12
|
-
aggregated_errors: z.array(z.object({ message: z.string() }).catchall(z.unknown())).optional().describe("Details of individual errors in a multi-step operation"),
|
|
13
|
-
details: z.record(z.string(), z.unknown()).optional().describe("Additional error context")
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// src/handlers/tools/schemas.ts
|
|
17
|
-
var ENTRY_TYPES = [
|
|
18
|
-
"personal_reflection",
|
|
19
|
-
"project_decision",
|
|
20
|
-
"technical_achievement",
|
|
21
|
-
"bug_fix",
|
|
22
|
-
"feature_implementation",
|
|
23
|
-
"code_review",
|
|
24
|
-
"meeting_notes",
|
|
25
|
-
"learning",
|
|
26
|
-
"research",
|
|
27
|
-
"planning",
|
|
28
|
-
"retrospective",
|
|
29
|
-
"standup",
|
|
30
|
-
"technical_note",
|
|
31
|
-
"development_note",
|
|
32
|
-
"enhancement",
|
|
33
|
-
"milestone",
|
|
34
|
-
"system_integration_test",
|
|
35
|
-
"test_entry",
|
|
36
|
-
"plan_draft",
|
|
37
|
-
"adversarial_review",
|
|
38
|
-
"plan_refinement",
|
|
39
|
-
"plan_finalized",
|
|
40
|
-
"copilot_validation",
|
|
41
|
-
"other"
|
|
42
|
-
];
|
|
43
|
-
var SOURCE_FORMATS = ["notion", "obsidian", "logseq"];
|
|
44
|
-
var SIGNIFICANCE_TYPES = [
|
|
45
|
-
"milestone",
|
|
46
|
-
"breakthrough",
|
|
47
|
-
"decision",
|
|
48
|
-
"architecture",
|
|
49
|
-
"lesson_learned",
|
|
50
|
-
"blocker_resolved",
|
|
51
|
-
"release",
|
|
52
|
-
"security"
|
|
53
|
-
];
|
|
54
|
-
function coerceSignificanceAlias(params) {
|
|
55
|
-
if (params !== null && params !== void 0 && typeof params === "object") {
|
|
56
|
-
const obj = params;
|
|
57
|
-
if (typeof obj["significance_type"] === "string") {
|
|
58
|
-
const lower = obj["significance_type"].toLowerCase();
|
|
59
|
-
if (lower === "important") obj["significance_type"] = "milestone";
|
|
60
|
-
else if (lower === "major") obj["significance_type"] = "breakthrough";
|
|
61
|
-
else if (lower === "critical") obj["significance_type"] = "security";
|
|
62
|
-
else if (lower === "learning") obj["significance_type"] = "lesson_learned";
|
|
63
|
-
else if (lower === "key_decision") obj["significance_type"] = "decision";
|
|
64
|
-
else if (lower === "resolved") obj["significance_type"] = "blocker_resolved";
|
|
65
|
-
else if (lower === "maintenance" || lower === "minor") delete obj["significance_type"];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function safeString(val) {
|
|
70
|
-
if (typeof val === "string") return val;
|
|
71
|
-
if (typeof val === "number" || typeof val === "boolean" || typeof val === "bigint") return String(val);
|
|
72
|
-
if (typeof val === "object" && val !== null) {
|
|
73
|
-
try {
|
|
74
|
-
return JSON.stringify(val);
|
|
75
|
-
} catch {
|
|
76
|
-
return "";
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return "";
|
|
80
|
-
}
|
|
81
|
-
function healAgentHallucinations(val) {
|
|
82
|
-
if (typeof val === "object" && val !== null) {
|
|
83
|
-
const obj = { ...val };
|
|
84
|
-
let modified = false;
|
|
85
|
-
const keyMap = {
|
|
86
|
-
id: "entry_id",
|
|
87
|
-
ids: "entry_ids",
|
|
88
|
-
project_id: "project_number",
|
|
89
|
-
projectId: "project_number",
|
|
90
|
-
projectNumber: "project_number",
|
|
91
|
-
project: "project_number",
|
|
92
|
-
workspaceId: "workspace_id",
|
|
93
|
-
workspace: "workspace_id",
|
|
94
|
-
repo: "workspace_id",
|
|
95
|
-
repository: "workspace_id",
|
|
96
|
-
repo_name: "workspace_id",
|
|
97
|
-
isPersonal: "is_personal",
|
|
98
|
-
personal: "is_personal",
|
|
99
|
-
entryType: "entry_type",
|
|
100
|
-
significanceType: "significance_type",
|
|
101
|
-
significance: "significance_type",
|
|
102
|
-
autoContext: "auto_context",
|
|
103
|
-
impactScore: "impact_score",
|
|
104
|
-
impact: "impact_score",
|
|
105
|
-
trustScore: "trust_score",
|
|
106
|
-
trust: "trust_score",
|
|
107
|
-
confidence: "trust_score",
|
|
108
|
-
validationStatus: "validation_status",
|
|
109
|
-
validation: "validation_status",
|
|
110
|
-
workflowRunId: "workflow_run_id",
|
|
111
|
-
workflowName: "workflow_name",
|
|
112
|
-
workflowStatus: "workflow_status",
|
|
113
|
-
prNumber: "pr_number",
|
|
114
|
-
prUrl: "pr_url",
|
|
115
|
-
prStatus: "pr_status",
|
|
116
|
-
issueNumber: "issue_number",
|
|
117
|
-
issueUrl: "issue_url",
|
|
118
|
-
projectOwner: "project_owner",
|
|
119
|
-
shareWithTeam: "share_with_team",
|
|
120
|
-
share_team: "share_with_team",
|
|
121
|
-
team: "share_with_team",
|
|
122
|
-
anchorPath: "anchor_path",
|
|
123
|
-
anchorType: "anchor_type",
|
|
124
|
-
session: "session_id",
|
|
125
|
-
sessionId: "session_id",
|
|
126
|
-
conversation_id: "session_id",
|
|
127
|
-
conversationId: "session_id",
|
|
128
|
-
thread_id: "session_id",
|
|
129
|
-
threadId: "session_id"
|
|
130
|
-
};
|
|
131
|
-
for (const [badKey, goodKey] of Object.entries(keyMap)) {
|
|
132
|
-
if (badKey in obj) {
|
|
133
|
-
if (!(goodKey in obj) && obj[badKey] !== void 0) {
|
|
134
|
-
obj[goodKey] = obj[badKey];
|
|
135
|
-
}
|
|
136
|
-
Reflect.deleteProperty(obj, badKey);
|
|
137
|
-
modified = true;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const rawProjName = obj["project_name"] ?? obj["projectName"];
|
|
141
|
-
if (rawProjName !== void 0) {
|
|
142
|
-
if (!("project_number" in obj) || obj["project_number"] === void 0) {
|
|
143
|
-
const num = Number(rawProjName);
|
|
144
|
-
const strVal = typeof rawProjName === "string" || typeof rawProjName === "number" ? String(rawProjName) : "";
|
|
145
|
-
if (!Number.isNaN(num) && strVal.trim() !== "") {
|
|
146
|
-
obj["project_number"] = num;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
delete obj["project_name"];
|
|
150
|
-
delete obj["projectName"];
|
|
151
|
-
modified = true;
|
|
152
|
-
}
|
|
153
|
-
if ("trust_score" in obj && obj["trust_score"] !== void 0 && obj["trust_score"] !== null) {
|
|
154
|
-
if (typeof obj["trust_score"] === "string") {
|
|
155
|
-
const n = Number(obj["trust_score"]);
|
|
156
|
-
if (!Number.isNaN(n)) {
|
|
157
|
-
obj["trust_score"] = n;
|
|
158
|
-
modified = true;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if ("impact_score" in obj && obj["impact_score"] !== void 0 && obj["impact_score"] !== null) {
|
|
163
|
-
if (typeof obj["impact_score"] === "string") {
|
|
164
|
-
const n = Number(obj["impact_score"]);
|
|
165
|
-
if (!Number.isNaN(n)) {
|
|
166
|
-
obj["impact_score"] = n;
|
|
167
|
-
modified = true;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if ("validation_status" in obj && obj["validation_status"] !== void 0 && obj["validation_status"] !== null) {
|
|
172
|
-
const vs = typeof obj["validation_status"] === "string" ? obj["validation_status"].trim().toLowerCase() : obj["validation_status"];
|
|
173
|
-
if (vs === true || vs === "pass" || vs === "success" || vs === "ok" || vs === "passed" || vs === "validated" || vs === "valid" || vs === "verified" || vs === "true" || vs === "1") {
|
|
174
|
-
obj["validation_status"] = "passed";
|
|
175
|
-
modified = true;
|
|
176
|
-
} else if (vs === false || vs === "fail" || vs === "failed" || vs === "error" || vs === "failing" || vs === "false" || vs === "0") {
|
|
177
|
-
obj["validation_status"] = "failed";
|
|
178
|
-
modified = true;
|
|
179
|
-
} else if (vs === "none" || vs === "null" || vs === "undefined" || vs === "skip" || vs === "skipped" || vs === "unknown" || vs === "pending") {
|
|
180
|
-
obj["validation_status"] = "none";
|
|
181
|
-
} else if (typeof vs === "string" && !["passed", "none", "failed"].includes(vs)) {
|
|
182
|
-
obj["validation_status"] = "none";
|
|
183
|
-
modified = true;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
if ("project_number" in obj && obj["project_number"] !== void 0 && obj["project_number"] !== null) {
|
|
187
|
-
if (typeof obj["project_number"] === "string") {
|
|
188
|
-
const cleaned = obj["project_number"].trim();
|
|
189
|
-
let num = Number(cleaned);
|
|
190
|
-
if (Number.isNaN(num) && /^p-?\d+$/i.test(cleaned)) {
|
|
191
|
-
num = Number(cleaned.replace(/^p-?/i, ""));
|
|
192
|
-
}
|
|
193
|
-
if (!Number.isNaN(num) && cleaned !== "") {
|
|
194
|
-
obj["project_number"] = num;
|
|
195
|
-
modified = true;
|
|
196
|
-
} else {
|
|
197
|
-
if (obj["workspace_id"] === void 0 || obj["workspace_id"] === null || obj["workspace_id"] === "default") {
|
|
198
|
-
obj["workspace_id"] = cleaned;
|
|
199
|
-
}
|
|
200
|
-
delete obj["project_number"];
|
|
201
|
-
modified = true;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
const wsId = typeof obj["workspace_id"] === "string" ? obj["workspace_id"] : void 0;
|
|
206
|
-
const projNum = typeof obj["project_number"] === "number" && !Number.isNaN(obj["project_number"]) ? obj["project_number"] : void 0;
|
|
207
|
-
const contentStr = typeof obj["content"] === "string" ? obj["content"] : void 0;
|
|
208
|
-
const tagsArr = Array.isArray(obj["tags"]) ? obj["tags"].filter((t) => typeof t === "string") : void 0;
|
|
209
|
-
if (wsId === void 0 || wsId === "" || wsId === "default" || projNum === void 0) {
|
|
210
|
-
const resolved = resolveProjectContext({
|
|
211
|
-
workspace_id: wsId,
|
|
212
|
-
project_number: projNum,
|
|
213
|
-
content: contentStr,
|
|
214
|
-
tags: tagsArr
|
|
215
|
-
});
|
|
216
|
-
if (resolved.workspaceId !== void 0 && resolved.workspaceId !== "default" && (wsId === void 0 || wsId === "default")) {
|
|
217
|
-
obj["workspace_id"] = resolved.workspaceId;
|
|
218
|
-
modified = true;
|
|
219
|
-
} else if (process.env["MCP_WORKSPACE_ID"] !== void 0 && (wsId === void 0 || wsId === "default")) {
|
|
220
|
-
obj["workspace_id"] = process.env["MCP_WORKSPACE_ID"];
|
|
221
|
-
modified = true;
|
|
222
|
-
} else if (wsId === void 0) {
|
|
223
|
-
obj["workspace_id"] = "default";
|
|
224
|
-
modified = true;
|
|
225
|
-
}
|
|
226
|
-
if (obj["project_number"] === void 0 && resolved.projectNumber !== void 0) {
|
|
227
|
-
obj["project_number"] = resolved.projectNumber;
|
|
228
|
-
modified = true;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if ("entry" in obj && typeof obj["entry"] === "object" && obj["entry"] !== null && !Array.isArray(obj["entry"])) {
|
|
232
|
-
const nested = obj["entry"];
|
|
233
|
-
Reflect.deleteProperty(obj, "entry");
|
|
234
|
-
for (const [k, v] of Object.entries(nested)) {
|
|
235
|
-
if (!(k in obj) && v !== void 0) {
|
|
236
|
-
obj[k] = v;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
modified = true;
|
|
240
|
-
}
|
|
241
|
-
if ("entry" in obj) {
|
|
242
|
-
const entryVal = obj["entry"];
|
|
243
|
-
if (typeof entryVal === "number" || typeof entryVal === "string" && /^\d+$/.test(entryVal.trim()) && !("tags" in obj) && !("entry_type" in obj) && !("title" in obj)) {
|
|
244
|
-
if (!("entry_id" in obj)) {
|
|
245
|
-
obj["entry_id"] = typeof entryVal === "number" ? entryVal : Number(entryVal.trim());
|
|
246
|
-
modified = true;
|
|
247
|
-
}
|
|
248
|
-
Reflect.deleteProperty(obj, "entry");
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
for (const key of ["entry", "text", "message", "description", "summary", "notes", "body", "instructions", "details", "markdown", "post", "journal_entry", "journalEntry", "entry_text", "entryText"]) {
|
|
252
|
-
if (key in obj && !("content" in obj)) {
|
|
253
|
-
obj["content"] = obj[key];
|
|
254
|
-
Reflect.deleteProperty(obj, key);
|
|
255
|
-
modified = true;
|
|
256
|
-
break;
|
|
257
|
-
} else if (key in obj) {
|
|
258
|
-
Reflect.deleteProperty(obj, key);
|
|
259
|
-
modified = true;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if ("title" in obj || "heading" in obj || "subject" in obj || "name" in obj) {
|
|
263
|
-
const rawTitle = obj["title"] ?? obj["heading"] ?? obj["subject"] ?? obj["name"];
|
|
264
|
-
if (rawTitle !== void 0 && rawTitle !== null) {
|
|
265
|
-
const titleStr = safeString(rawTitle).trim();
|
|
266
|
-
if (titleStr !== "") {
|
|
267
|
-
const cleanTitle = titleStr.replace(/^#+\s*/, "");
|
|
268
|
-
const currentContent = safeString(obj["content"]).trim();
|
|
269
|
-
if (!("content" in obj) || obj["content"] === void 0 || obj["content"] === null || currentContent === "") {
|
|
270
|
-
if (!("query" in obj)) {
|
|
271
|
-
obj["content"] = `# ${cleanTitle}`;
|
|
272
|
-
}
|
|
273
|
-
} else if (!currentContent.startsWith(`# ${cleanTitle}`)) {
|
|
274
|
-
obj["content"] = `# ${cleanTitle}
|
|
275
|
-
|
|
276
|
-
${currentContent}`;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
delete obj["title"];
|
|
281
|
-
delete obj["heading"];
|
|
282
|
-
delete obj["subject"];
|
|
283
|
-
delete obj["name"];
|
|
284
|
-
modified = true;
|
|
285
|
-
}
|
|
286
|
-
if ("entry_id" in obj && obj["entry_id"] !== void 0 && obj["entry_id"] !== null) {
|
|
287
|
-
if (typeof obj["entry_id"] === "string") {
|
|
288
|
-
const cleaned = obj["entry_id"].replace(/^[^0-9]+/, "");
|
|
289
|
-
const num = Number(cleaned);
|
|
290
|
-
if (!Number.isNaN(num) && cleaned.trim() !== "") {
|
|
291
|
-
obj["entry_id"] = num;
|
|
292
|
-
modified = true;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if ("entry_ids" in obj && Array.isArray(obj["entry_ids"])) {
|
|
297
|
-
const healedIds = obj["entry_ids"].map((id) => {
|
|
298
|
-
if (typeof id === "string") {
|
|
299
|
-
const cleaned = id.replace(/^[^0-9]+/, "");
|
|
300
|
-
const num = Number(cleaned);
|
|
301
|
-
return !Number.isNaN(num) && cleaned.trim() !== "" ? num : id;
|
|
302
|
-
}
|
|
303
|
-
return id;
|
|
304
|
-
});
|
|
305
|
-
if (JSON.stringify(obj["entry_ids"]) !== JSON.stringify(healedIds)) {
|
|
306
|
-
obj["entry_ids"] = healedIds;
|
|
307
|
-
modified = true;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
for (const extraKey of ["date", "created_at", "updated_at", "type", "status"]) {
|
|
311
|
-
if (extraKey in obj && extraKey !== "entry_type") {
|
|
312
|
-
if (extraKey === "type" && !("entry_type" in obj)) {
|
|
313
|
-
obj["entry_type"] = obj["type"];
|
|
314
|
-
}
|
|
315
|
-
Reflect.deleteProperty(obj, extraKey);
|
|
316
|
-
modified = true;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
const toStr = (v) => {
|
|
320
|
-
if (typeof v === "string") return v;
|
|
321
|
-
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
322
|
-
if (v !== null && v !== void 0) {
|
|
323
|
-
try {
|
|
324
|
-
return JSON.stringify(v);
|
|
325
|
-
} catch {
|
|
326
|
-
return "";
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
return "";
|
|
330
|
-
};
|
|
331
|
-
if ("context" in obj) {
|
|
332
|
-
const ctxVal = typeof obj["context"] === "object" && obj["context"] !== null ? JSON.stringify(obj["context"], null, 2) : toStr(obj["context"]);
|
|
333
|
-
if (ctxVal !== "") {
|
|
334
|
-
const existingContent = toStr(obj["content"]);
|
|
335
|
-
obj["content"] = existingContent !== "" ? `${existingContent}
|
|
336
|
-
|
|
337
|
-
**Context:** ${ctxVal}` : ctxVal;
|
|
338
|
-
}
|
|
339
|
-
Reflect.deleteProperty(obj, "context");
|
|
340
|
-
modified = true;
|
|
341
|
-
}
|
|
342
|
-
if ("focus" in obj) {
|
|
343
|
-
const focusVal = toStr(obj["focus"]);
|
|
344
|
-
if (focusVal !== "") {
|
|
345
|
-
const existingContent = toStr(obj["content"]);
|
|
346
|
-
obj["content"] = existingContent !== "" ? `${existingContent}
|
|
347
|
-
|
|
348
|
-
**Focus:** ${focusVal}` : focusVal;
|
|
349
|
-
}
|
|
350
|
-
Reflect.deleteProperty(obj, "focus");
|
|
351
|
-
modified = true;
|
|
352
|
-
}
|
|
353
|
-
if ("resolution" in obj) {
|
|
354
|
-
const resVal = toStr(obj["resolution"]);
|
|
355
|
-
if (resVal !== "") {
|
|
356
|
-
const existingContent = toStr(obj["content"]);
|
|
357
|
-
obj["content"] = existingContent !== "" ? `${existingContent}
|
|
358
|
-
|
|
359
|
-
**Resolution:** ${resVal}` : resVal;
|
|
360
|
-
}
|
|
361
|
-
Reflect.deleteProperty(obj, "resolution");
|
|
362
|
-
modified = true;
|
|
363
|
-
}
|
|
364
|
-
if ("artifacts" in obj) {
|
|
365
|
-
if (Array.isArray(obj["artifacts"]) && obj["artifacts"].length > 0) {
|
|
366
|
-
const artStr = obj["artifacts"].map((a) => typeof a === "string" ? a : JSON.stringify(a)).join(", ");
|
|
367
|
-
const existingContent = toStr(obj["content"]);
|
|
368
|
-
obj["content"] = existingContent !== "" ? `${existingContent}
|
|
369
|
-
|
|
370
|
-
**Artifacts:** ${artStr}` : artStr;
|
|
371
|
-
}
|
|
372
|
-
Reflect.deleteProperty(obj, "artifacts");
|
|
373
|
-
modified = true;
|
|
374
|
-
}
|
|
375
|
-
if ("category" in obj) {
|
|
376
|
-
if (typeof obj["category"] === "string" && obj["category"].trim() !== "") {
|
|
377
|
-
const cat = obj["category"].trim();
|
|
378
|
-
obj["tags"] ??= [];
|
|
379
|
-
if (Array.isArray(obj["tags"]) && !obj["tags"].includes(cat)) {
|
|
380
|
-
obj["tags"].push(cat);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
Reflect.deleteProperty(obj, "category");
|
|
384
|
-
modified = true;
|
|
385
|
-
}
|
|
386
|
-
if ("auto_context" in obj) {
|
|
387
|
-
if (typeof obj["auto_context"] === "object" && obj["auto_context"] !== null) {
|
|
388
|
-
try {
|
|
389
|
-
obj["auto_context"] = JSON.stringify(obj["auto_context"]);
|
|
390
|
-
modified = true;
|
|
391
|
-
} catch {
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
if (typeof obj["auto_context"] === "string") {
|
|
395
|
-
const ac = obj["auto_context"].trim().toLowerCase();
|
|
396
|
-
if (ac === "none" || ac === "{}" || ac === '{"commits":[]}') {
|
|
397
|
-
delete obj["auto_context"];
|
|
398
|
-
modified = true;
|
|
399
|
-
} else if (ac.startsWith("{") && ac.includes("'")) {
|
|
400
|
-
try {
|
|
401
|
-
JSON.parse(obj["auto_context"]);
|
|
402
|
-
} catch {
|
|
403
|
-
try {
|
|
404
|
-
const fixed = obj["auto_context"].replace(/'/g, '"');
|
|
405
|
-
const parsed = JSON.parse(fixed);
|
|
406
|
-
obj["auto_context"] = JSON.stringify(parsed);
|
|
407
|
-
modified = true;
|
|
408
|
-
} catch {
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
if ("tag" in obj && !("tags" in obj)) {
|
|
415
|
-
obj["tags"] = obj["tag"];
|
|
416
|
-
delete obj["tag"];
|
|
417
|
-
modified = true;
|
|
418
|
-
}
|
|
419
|
-
if ("tags" in obj && typeof obj["tags"] === "string") {
|
|
420
|
-
obj["tags"] = obj["tags"].split(",").map((t) => t.trim()).filter(Boolean);
|
|
421
|
-
modified = true;
|
|
422
|
-
}
|
|
423
|
-
if ("tags" in obj && Array.isArray(obj["tags"])) {
|
|
424
|
-
const healedTags = obj["tags"].map((t) => {
|
|
425
|
-
if (typeof t === "string") {
|
|
426
|
-
const lower = t.toLowerCase().trim();
|
|
427
|
-
if (lower === "session summary" || lower === "session_summary" || lower === "team-session-summary" || lower === "team_session_summary" || lower === "team session summary") return "session-summary";
|
|
428
|
-
if (lower === "commit narrative" || lower === "commit_narrative") return "commit-narrative";
|
|
429
|
-
}
|
|
430
|
-
return t;
|
|
431
|
-
});
|
|
432
|
-
if (JSON.stringify(obj["tags"]) !== JSON.stringify(healedTags)) {
|
|
433
|
-
obj["tags"] = healedTags;
|
|
434
|
-
modified = true;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
if ("entry_type" in obj && typeof obj["entry_type"] === "string") {
|
|
438
|
-
const et = obj["entry_type"];
|
|
439
|
-
const etLower = et.toLowerCase();
|
|
440
|
-
if (etLower === "session-summary" || etLower === "session_summary" || etLower === "team-session-summary" || etLower === "team_session_summary" || etLower === "team session summary") {
|
|
441
|
-
obj["entry_type"] = "retrospective";
|
|
442
|
-
obj["tags"] ??= [];
|
|
443
|
-
if (Array.isArray(obj["tags"]) && !obj["tags"].includes("session-summary")) {
|
|
444
|
-
obj["tags"].push("session-summary");
|
|
445
|
-
}
|
|
446
|
-
modified = true;
|
|
447
|
-
} else if (["progress", "status", "development"].includes(etLower)) {
|
|
448
|
-
obj["entry_type"] = "development_note";
|
|
449
|
-
modified = true;
|
|
450
|
-
} else if (["task", "chore", "refactor", "fix", "update", "technical", "note", "documentation", "code", "coding"].includes(etLower)) {
|
|
451
|
-
obj["entry_type"] = "technical_note";
|
|
452
|
-
obj["tags"] ??= [];
|
|
453
|
-
if (Array.isArray(obj["tags"]) && !obj["tags"].includes(etLower)) {
|
|
454
|
-
obj["tags"].push(etLower);
|
|
455
|
-
}
|
|
456
|
-
modified = true;
|
|
457
|
-
} else if (["bug", "bugfix", "bug_fix", "bug-fix", "hotfix", "defect"].includes(etLower)) {
|
|
458
|
-
obj["entry_type"] = "bug_fix";
|
|
459
|
-
modified = true;
|
|
460
|
-
} else if (etLower === "feature") {
|
|
461
|
-
obj["entry_type"] = "feature_implementation";
|
|
462
|
-
modified = true;
|
|
463
|
-
} else if (etLower === "meeting") {
|
|
464
|
-
obj["entry_type"] = "meeting_notes";
|
|
465
|
-
modified = true;
|
|
466
|
-
} else if (!ENTRY_TYPES.some((t) => t === obj["entry_type"])) {
|
|
467
|
-
obj["tags"] ??= [];
|
|
468
|
-
const cleanedTag = etLower.replace(/^[^a-z0-9]+/, "").replace(/_/g, "-");
|
|
469
|
-
if (Array.isArray(obj["tags"]) && cleanedTag.length > 0 && !obj["tags"].includes(cleanedTag)) {
|
|
470
|
-
obj["tags"].push(cleanedTag);
|
|
471
|
-
}
|
|
472
|
-
obj["entry_type"] = "other";
|
|
473
|
-
modified = true;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
if ("significance_type" in obj) {
|
|
477
|
-
const originalSigType = obj["significance_type"];
|
|
478
|
-
coerceSignificanceAlias(obj);
|
|
479
|
-
if (obj["significance_type"] !== void 0 && obj["significance_type"] !== null && typeof obj["significance_type"] === "string") {
|
|
480
|
-
if (!SIGNIFICANCE_TYPES.some((t) => t === obj["significance_type"])) {
|
|
481
|
-
const badSig = obj["significance_type"].toLowerCase().trim();
|
|
482
|
-
obj["tags"] ??= [];
|
|
483
|
-
if (Array.isArray(obj["tags"])) {
|
|
484
|
-
obj["tags"].push(`significance:${badSig}`);
|
|
485
|
-
}
|
|
486
|
-
delete obj["significance_type"];
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
if (originalSigType !== obj["significance_type"]) {
|
|
490
|
-
modified = true;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
return modified ? obj : val;
|
|
494
|
-
}
|
|
495
|
-
return val;
|
|
496
|
-
}
|
|
497
|
-
var MAX_CONTENT_LENGTH = 5e4;
|
|
498
|
-
var MAX_QUERY_LIMIT = 500;
|
|
499
|
-
var MAX_BATCH_SIZE = 50;
|
|
500
|
-
var DATE_MIN_SENTINEL = "1970-01-01";
|
|
501
|
-
var DATE_MAX_SENTINEL = "2999-12-31";
|
|
502
|
-
var DATE_FORMAT_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
503
|
-
var DATE_FORMAT_MESSAGE = "Date must be YYYY-MM-DD format";
|
|
504
|
-
var relaxedNumber = () => z.union([z.number(), z.string()]);
|
|
505
|
-
var StrictProjectNumberSchema = z.number({
|
|
506
|
-
message: "Missing project_number. You MUST provide a valid project_number (e.g., 1) to associate this action with a specific project context."
|
|
507
|
-
}).optional();
|
|
508
|
-
var BatchResultOutputSchema = z.object({
|
|
509
|
-
success: z.boolean().optional(),
|
|
510
|
-
count: z.number().optional(),
|
|
511
|
-
error: z.string().optional()
|
|
512
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
513
|
-
var EntryOutputSchema = z.object({
|
|
514
|
-
id: z.number(),
|
|
515
|
-
content: z.string().max(MAX_CONTENT_LENGTH),
|
|
516
|
-
entryType: z.string(),
|
|
517
|
-
isPersonal: z.boolean(),
|
|
518
|
-
timestamp: z.string(),
|
|
519
|
-
tags: z.array(z.string()).optional(),
|
|
520
|
-
significanceType: z.string().nullable().optional(),
|
|
521
|
-
autoContext: z.string().nullable().optional().describe("@deprecated Use author and flagMetadata instead"),
|
|
522
|
-
author: z.string().nullable().optional(),
|
|
523
|
-
flagMetadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
524
|
-
deletedAt: z.string().nullable().optional(),
|
|
525
|
-
isArchived: z.boolean().optional(),
|
|
526
|
-
projectNumber: z.number().nullable().optional(),
|
|
527
|
-
projectName: z.string().optional().describe("Injected repository or project name resolved from projectRegistry"),
|
|
528
|
-
projectOwner: z.string().nullable().optional(),
|
|
529
|
-
issueNumber: z.number().nullable().optional(),
|
|
530
|
-
issueUrl: z.string().nullable().optional(),
|
|
531
|
-
prNumber: z.number().nullable().optional(),
|
|
532
|
-
prUrl: z.string().nullable().optional(),
|
|
533
|
-
prStatus: z.string().nullable().optional(),
|
|
534
|
-
workflowRunId: z.number().nullable().optional(),
|
|
535
|
-
workflowName: z.string().nullable().optional(),
|
|
536
|
-
workflowStatus: z.string().nullable().optional(),
|
|
537
|
-
workspaceId: z.string().optional().describe("Workspace isolation identifier"),
|
|
538
|
-
source: z.enum(["personal", "team"]).optional(),
|
|
539
|
-
importanceScore: z.number().optional().describe("Importance score (0.0-1.0), present when sort_by=importance"),
|
|
540
|
-
trustScore: z.number().optional(),
|
|
541
|
-
impactScore: z.number().optional(),
|
|
542
|
-
validationStatus: z.string().optional(),
|
|
543
|
-
version: z.number().optional(),
|
|
544
|
-
sessionId: z.string().nullable().optional()
|
|
545
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
546
|
-
var EntriesListOutputSchema = z.object({
|
|
547
|
-
entries: z.array(EntryOutputSchema).optional(),
|
|
548
|
-
count: z.number().optional(),
|
|
549
|
-
searchMode: z.string().optional(),
|
|
550
|
-
degraded: z.boolean().optional().describe(
|
|
551
|
-
"True if the search degraded to a slower fallback method due to infrastructure failure"
|
|
552
|
-
),
|
|
553
|
-
next_cursor: z.string().optional().describe("Cursor for the next page of results"),
|
|
554
|
-
highlights: z.array(z.object({ id: z.number(), snippet: z.string() })).optional().describe("FTS5 search snippets when include_highlights is true"),
|
|
555
|
-
facets: z.object({
|
|
556
|
-
tags: z.array(z.object({ name: z.string(), count: z.number() })),
|
|
557
|
-
entryTypes: z.array(z.object({ name: z.string(), count: z.number() }))
|
|
558
|
-
}).optional().describe("Distribution counts when include_facets is true"),
|
|
559
|
-
suggestions: z.array(z.string()).optional().describe("Fuzzy matches when fuzzy_match=true and no exact results were found"),
|
|
560
|
-
correctedQuery: z.string().optional().describe("The corrected query when auto_correct=true and a confident match was found"),
|
|
561
|
-
success: z.boolean().optional(),
|
|
562
|
-
error: z.string().optional()
|
|
563
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
564
|
-
var EntryRevisionOutputSchema = z.object({
|
|
565
|
-
id: z.number(),
|
|
566
|
-
entryId: z.number(),
|
|
567
|
-
revisionNumber: z.number(),
|
|
568
|
-
contentSnapshot: z.string(),
|
|
569
|
-
changedAt: z.string(),
|
|
570
|
-
changedBy: z.string().nullable().optional()
|
|
571
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
572
|
-
z.object({
|
|
573
|
-
revisions: z.array(EntryRevisionOutputSchema).optional(),
|
|
574
|
-
count: z.number().optional(),
|
|
575
|
-
success: z.boolean().optional(),
|
|
576
|
-
error: z.string().optional()
|
|
577
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
578
|
-
var RelationshipOutputSchema = z.object({
|
|
579
|
-
id: z.number(),
|
|
580
|
-
fromEntryId: z.number(),
|
|
581
|
-
toEntryId: z.number(),
|
|
582
|
-
relationshipType: z.string(),
|
|
583
|
-
description: z.string().nullable().optional(),
|
|
584
|
-
createdAt: z.string()
|
|
585
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
586
|
-
z.object({
|
|
587
|
-
significance: z.number(),
|
|
588
|
-
relationships: z.number(),
|
|
589
|
-
causal: z.number(),
|
|
590
|
-
recency: z.number()
|
|
591
|
-
});
|
|
592
|
-
var TagOutputSchema = z.object({
|
|
593
|
-
name: z.string(),
|
|
594
|
-
count: z.number().nullable()
|
|
595
|
-
}).extend(ErrorFieldsMixin.shape);
|
|
596
|
-
function calcPerDbLimit(limit, hasTeamDb) {
|
|
597
|
-
return hasTeamDb ? Math.min(limit * 2, MAX_QUERY_LIMIT) : limit;
|
|
598
|
-
}
|
|
599
|
-
function mergeMultipleSources(sources, limit, sortBy = "timestamp") {
|
|
600
|
-
const seen = /* @__PURE__ */ new Set();
|
|
601
|
-
const merged = [];
|
|
602
|
-
const all = sources.flat().sort((a, b) => {
|
|
603
|
-
if (sortBy === "importance") {
|
|
604
|
-
const scoreA = Number(a["importanceScore"]) || 0;
|
|
605
|
-
const scoreB = Number(b["importanceScore"]) || 0;
|
|
606
|
-
if (scoreA !== scoreB) {
|
|
607
|
-
return scoreB - scoreA;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
return b.timestamp.localeCompare(a.timestamp);
|
|
611
|
-
});
|
|
612
|
-
for (const entry of all) {
|
|
613
|
-
const entryId = typeof entry["id"] === "number" || typeof entry["id"] === "string" ? String(entry["id"]) : "";
|
|
614
|
-
const sourceKey = entry.team_db ? `${entry.source}:${entry.team_db}` : entry.source;
|
|
615
|
-
const key = entryId ? `${sourceKey}:${entryId}` : crypto.createHash("sha256").update(`${sourceKey}:${entry.content}`).digest("hex");
|
|
616
|
-
if (!seen.has(key)) {
|
|
617
|
-
seen.add(key);
|
|
618
|
-
merged.push(entry);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
return limit !== void 0 ? merged.slice(0, limit) : merged;
|
|
622
|
-
}
|
|
623
|
-
function mergeAndDedup(personal, team, limit, sortBy = "timestamp") {
|
|
624
|
-
return mergeMultipleSources([personal, team], limit, sortBy);
|
|
625
|
-
}
|
|
626
|
-
function passMetadataFilters(entry, options, db) {
|
|
627
|
-
if (options.isPersonal !== void 0 && entry.isPersonal !== options.isPersonal) return false;
|
|
628
|
-
if (options.projectNumber !== void 0 && entry.projectNumber !== options.projectNumber)
|
|
629
|
-
return false;
|
|
630
|
-
if (options.issueNumber !== void 0 && entry.issueNumber !== options.issueNumber) return false;
|
|
631
|
-
if (options.prNumber !== void 0 && entry.prNumber !== options.prNumber) return false;
|
|
632
|
-
if (options.prStatus !== void 0 && entry.prStatus !== options.prStatus) return false;
|
|
633
|
-
if (options.workflowRunId !== void 0 && entry.workflowRunId !== options.workflowRunId)
|
|
634
|
-
return false;
|
|
635
|
-
if (options.entryType && entry.entryType !== options.entryType) return false;
|
|
636
|
-
if (options.startDate) {
|
|
637
|
-
const entryDate = entry.timestamp.split("T")[0] ?? "";
|
|
638
|
-
if (entryDate < options.startDate) return false;
|
|
639
|
-
}
|
|
640
|
-
if (options.endDate) {
|
|
641
|
-
const entryDate = entry.timestamp.split("T")[0] ?? "";
|
|
642
|
-
if (entryDate > options.endDate) return false;
|
|
643
|
-
}
|
|
644
|
-
if (options.tags && options.tags.length > 0) {
|
|
645
|
-
const entryTags = Array.isArray(entry.tags) ? entry.tags : db.getTagsForEntry(entry.id);
|
|
646
|
-
if (!options.tags.some((t) => entryTags.includes(t))) return false;
|
|
647
|
-
}
|
|
648
|
-
if (!options.includeArchived && entry.isArchived) return false;
|
|
649
|
-
return true;
|
|
650
|
-
}
|
|
651
|
-
function encodeCompoundCursor(personalCursor, teamCursor) {
|
|
652
|
-
return Buffer.from(JSON.stringify({ p: personalCursor, t: teamCursor })).toString("base64");
|
|
653
|
-
}
|
|
654
|
-
function decodeCompoundCursor(cursor) {
|
|
655
|
-
try {
|
|
656
|
-
const decoded = Buffer.from(cursor, "base64").toString("utf8");
|
|
657
|
-
return JSON.parse(decoded);
|
|
658
|
-
} catch {
|
|
659
|
-
return null;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
function ftsSearch(query, db, teamDb, options) {
|
|
663
|
-
const hasFilters = options.projectNumber !== void 0 || options.issueNumber !== void 0 || options.prNumber !== void 0 || options.prStatus !== void 0 || options.workflowRunId !== void 0 || options.isPersonal !== void 0 || options.tags !== void 0 || options.entryType !== void 0 || options.startDate !== void 0 || options.endDate !== void 0;
|
|
664
|
-
let personalCursor;
|
|
665
|
-
let teamCursor;
|
|
666
|
-
if (options.cursor) {
|
|
667
|
-
if (teamDb && options.includeTeam === true && options.isPersonal !== true) {
|
|
668
|
-
const compound = decodeCompoundCursor(options.cursor);
|
|
669
|
-
if (compound) {
|
|
670
|
-
personalCursor = compound.p;
|
|
671
|
-
teamCursor = compound.t;
|
|
672
|
-
} else {
|
|
673
|
-
personalCursor = options.cursor;
|
|
674
|
-
}
|
|
675
|
-
} else {
|
|
676
|
-
personalCursor = options.cursor;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
const perDbLimit = calcPerDbLimit(options.limit, !!teamDb);
|
|
680
|
-
let personalResult;
|
|
681
|
-
if (!query && !hasFilters) {
|
|
682
|
-
personalResult = db.getRecentEntries(perDbLimit, options.isPersonal, options.sortBy, personalCursor, options.includeArchived, options.workspaceId);
|
|
683
|
-
} else {
|
|
684
|
-
personalResult = db.searchEntries(query || "", {
|
|
685
|
-
limit: perDbLimit,
|
|
686
|
-
cursor: personalCursor,
|
|
687
|
-
isPersonal: options.isPersonal,
|
|
688
|
-
projectNumber: options.projectNumber,
|
|
689
|
-
issueNumber: options.issueNumber,
|
|
690
|
-
prNumber: options.prNumber,
|
|
691
|
-
prStatus: options.prStatus,
|
|
692
|
-
workflowRunId: options.workflowRunId,
|
|
693
|
-
tags: options.tags,
|
|
694
|
-
entryType: options.entryType,
|
|
695
|
-
startDate: options.startDate,
|
|
696
|
-
endDate: options.endDate,
|
|
697
|
-
sortBy: options.sortBy,
|
|
698
|
-
includeHighlights: options.includeHighlights,
|
|
699
|
-
fuzzy_match: options.fuzzy_match,
|
|
700
|
-
auto_correct: options.auto_correct,
|
|
701
|
-
includeArchived: options.includeArchived,
|
|
702
|
-
workspaceId: options.workspaceId
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
const personalEntries = personalResult.entries;
|
|
706
|
-
const personalNextCursor = personalResult.nextCursor;
|
|
707
|
-
if (teamDb && options.includeTeam === true && options.isPersonal !== true) {
|
|
708
|
-
let teamResult;
|
|
709
|
-
if (!query && !hasFilters) {
|
|
710
|
-
teamResult = teamDb.getRecentEntries(perDbLimit, void 0, options.sortBy, teamCursor, options.includeArchived, options.workspaceId);
|
|
711
|
-
} else {
|
|
712
|
-
teamResult = teamDb.searchEntries(query || "", {
|
|
713
|
-
limit: perDbLimit,
|
|
714
|
-
cursor: teamCursor,
|
|
715
|
-
projectNumber: options.projectNumber,
|
|
716
|
-
issueNumber: options.issueNumber,
|
|
717
|
-
prNumber: options.prNumber,
|
|
718
|
-
prStatus: options.prStatus,
|
|
719
|
-
workflowRunId: options.workflowRunId,
|
|
720
|
-
tags: options.tags,
|
|
721
|
-
entryType: options.entryType,
|
|
722
|
-
startDate: options.startDate,
|
|
723
|
-
endDate: options.endDate,
|
|
724
|
-
sortBy: options.sortBy,
|
|
725
|
-
includeHighlights: options.includeHighlights,
|
|
726
|
-
fuzzy_match: options.fuzzy_match,
|
|
727
|
-
auto_correct: options.auto_correct,
|
|
728
|
-
includeArchived: options.includeArchived,
|
|
729
|
-
workspaceId: options.workspaceId
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
const teamEntries = teamResult.entries;
|
|
733
|
-
const teamNextCursor = teamResult.nextCursor;
|
|
734
|
-
const merged = mergeAndDedup(
|
|
735
|
-
personalEntries.map((e) => ({ ...e, source: "personal" })),
|
|
736
|
-
teamEntries.map((e) => ({ ...e, source: "team" })),
|
|
737
|
-
options.limit,
|
|
738
|
-
options.sortBy
|
|
739
|
-
);
|
|
740
|
-
let compoundNextCursor;
|
|
741
|
-
if (personalNextCursor || teamNextCursor) {
|
|
742
|
-
compoundNextCursor = encodeCompoundCursor(personalNextCursor, teamNextCursor);
|
|
743
|
-
}
|
|
744
|
-
const isTeamDegraded = "degraded" in teamResult && teamResult.degraded === true;
|
|
745
|
-
const isPersonalDegraded2 = "degraded" in personalResult && personalResult.degraded === true;
|
|
746
|
-
let mergedHighlights;
|
|
747
|
-
if (options.includeHighlights) {
|
|
748
|
-
const pHighlights = personalResult.highlights ?? [];
|
|
749
|
-
const tHighlights = teamResult.highlights ?? [];
|
|
750
|
-
if (pHighlights.length > 0 || tHighlights.length > 0) {
|
|
751
|
-
mergedHighlights = [...pHighlights, ...tHighlights];
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
return {
|
|
755
|
-
entries: merged,
|
|
756
|
-
count: merged.length,
|
|
757
|
-
degraded: isPersonalDegraded2 || isTeamDegraded,
|
|
758
|
-
nextCursor: compoundNextCursor,
|
|
759
|
-
highlights: mergedHighlights,
|
|
760
|
-
suggestions: personalResult.suggestions ?? teamResult.suggestions,
|
|
761
|
-
correctedQuery: personalResult.correctedQuery ?? teamResult.correctedQuery
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
const isPersonalDegraded = "degraded" in personalResult && personalResult.degraded === true;
|
|
765
|
-
return {
|
|
766
|
-
entries: personalEntries.map((e) => ({ ...e, source: "personal" })),
|
|
767
|
-
count: personalEntries.length,
|
|
768
|
-
degraded: isPersonalDegraded,
|
|
769
|
-
nextCursor: personalNextCursor,
|
|
770
|
-
highlights: personalResult.highlights,
|
|
771
|
-
suggestions: personalResult.suggestions,
|
|
772
|
-
correctedQuery: personalResult.correctedQuery
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
export { BatchResultOutputSchema, DATE_FORMAT_MESSAGE, DATE_FORMAT_REGEX, DATE_MAX_SENTINEL, DATE_MIN_SENTINEL, ENTRY_TYPES, EntriesListOutputSchema, EntryOutputSchema, ErrorFieldsMixin, MAX_BATCH_SIZE, MAX_CONTENT_LENGTH, MAX_QUERY_LIMIT, RelationshipOutputSchema, SIGNIFICANCE_TYPES, SOURCE_FORMATS, StrictProjectNumberSchema, TagOutputSchema, calcPerDbLimit, coerceSignificanceAlias, decodeCompoundCursor, encodeCompoundCursor, ftsSearch, healAgentHallucinations, mergeAndDedup, mergeMultipleSources, passMetadataFilters, relaxedNumber, safeString };
|