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-KWSBCSFM.js
DELETED
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import { execFileSync, spawn } from 'child_process';
|
|
2
|
-
import { randomUUID } from 'crypto';
|
|
3
|
-
|
|
4
|
-
// src/vendor/lib-git-history/git-runner.ts
|
|
5
|
-
|
|
6
|
-
// src/vendor/lib-git-history/constants.ts
|
|
7
|
-
var GIT_TIMEOUT_MS = 1e4;
|
|
8
|
-
var GIT_CMD_MAX_BUFFER = 10 * 1024 * 1024;
|
|
9
|
-
var GIT_STREAM_BUFFER_DEFAULT = 100 * 1024 * 1024;
|
|
10
|
-
var GIT_IDLE_TIMEOUT_MS = 3e5;
|
|
11
|
-
var GIT_ABSOLUTE_TIMEOUT_MS = 9e5;
|
|
12
|
-
var MAX_TRAILER_LENGTH = 5e3;
|
|
13
|
-
var MAX_SUBJECT_LENGTH = 5e3;
|
|
14
|
-
var MAX_BODY_LENGTH = 1e5;
|
|
15
|
-
var SIGPIPE_EXIT_CODE = 141;
|
|
16
|
-
var MAX_STDERR_LENGTH = 1e5;
|
|
17
|
-
var EXPECTED_RECORD_PARTS = 13;
|
|
18
|
-
var MAX_STATUS_ITERATIONS = 5e5;
|
|
19
|
-
var MAX_EMPTY_STATUS_COUNT = 10;
|
|
20
|
-
var MAX_PARSED_FILES = 500;
|
|
21
|
-
var MAX_ARRAY_LENGTH = 50;
|
|
22
|
-
var DEFAULT_MAX_BODY_LEN = 1e4;
|
|
23
|
-
var MAX_FILES_PER_COMMIT = 100;
|
|
24
|
-
var DEFAULT_MAX_PATCH_LEN = 2e4;
|
|
25
|
-
var MAX_ISSUE_TEXT_LENGTH = 5e3;
|
|
26
|
-
var RECORD_START_FIELDS = 9;
|
|
27
|
-
var RECORD_END_FIELDS = 3;
|
|
28
|
-
var CHAR_NEWLINE = 10;
|
|
29
|
-
var CHAR_NULL = 0;
|
|
30
|
-
var REGEX_FILE_STATUS = /^[A-Z][A-Z\d]*$/;
|
|
31
|
-
var REGEX_CONVENTIONAL_COMMIT = /^([a-zA-Z0-9_-]+)(?:\(([^)]+)\))?(!)?:\s*(.*)$/;
|
|
32
|
-
var REGEX_VALIDATION_TRAILER = /^(validation|history-validation|changelog-validation)(-status)?$/;
|
|
33
|
-
var REGEX_REFERENCE_TRAILER = /^(acked-by|bug|cc|closes|depends-on|fixes|refs|references|related-to|reported-by|resolves|see-also|signed-off-by|tested-by)$/;
|
|
34
|
-
var REGEX_BREAKING_CHANGE = /(?:^|\n)BREAKING[\s-]CHANGES?:?[ \t]*\n?([\s\S]*?)(?:\n\n|$)/i;
|
|
35
|
-
var REGEX_REVERT_COMMIT = /This reverts commit ([a-f0-9]{7,40})/;
|
|
36
|
-
var GIT_EXCLUDE_PATTERNS = [
|
|
37
|
-
":(exclude)*.lock",
|
|
38
|
-
":(exclude)*-lock.json",
|
|
39
|
-
":(exclude)*.min.js",
|
|
40
|
-
":(exclude)*.map",
|
|
41
|
-
":(exclude)pnpm-workspace.yaml",
|
|
42
|
-
":(exclude)pnpm-lock.yaml",
|
|
43
|
-
":(exclude)*.svg",
|
|
44
|
-
":(exclude)*.png",
|
|
45
|
-
":(exclude)*.jpg",
|
|
46
|
-
":(exclude)*.jpeg",
|
|
47
|
-
":(exclude)*.gif",
|
|
48
|
-
":(exclude)**/dist/*",
|
|
49
|
-
":(exclude)**/build/*",
|
|
50
|
-
":(exclude)**/coverage/*",
|
|
51
|
-
":(exclude)*.csv",
|
|
52
|
-
":(exclude)*.txt",
|
|
53
|
-
":(exclude)go.sum",
|
|
54
|
-
":(exclude)**/.pnp.*",
|
|
55
|
-
":(exclude)**/vendor/*"
|
|
56
|
-
];
|
|
57
|
-
var MS_PER_DAY = 1e3 * 60 * 60 * 24;
|
|
58
|
-
var IMPACT_HIGH = 0.8;
|
|
59
|
-
var IMPACT_MEDIUM = 0.5;
|
|
60
|
-
var IMPACT_LOW = 0.2;
|
|
61
|
-
|
|
62
|
-
// src/vendor/lib-git-history/git-runner.ts
|
|
63
|
-
function isErrnoException(err) {
|
|
64
|
-
return err instanceof Error && "code" in err;
|
|
65
|
-
}
|
|
66
|
-
var activeProcesses = /* @__PURE__ */ new Set();
|
|
67
|
-
function cleanupProcesses() {
|
|
68
|
-
for (const proc of activeProcesses) {
|
|
69
|
-
if (!proc.killed) {
|
|
70
|
-
try {
|
|
71
|
-
proc.kill("SIGKILL");
|
|
72
|
-
} catch {
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
var UNIQUE_ID = randomUUID();
|
|
78
|
-
var RECORD_SEPARATOR = `<GIT_RECORD_BOUNDARY_${UNIQUE_ID}>`;
|
|
79
|
-
var FIELD_SEPARATOR = `<GIT_FIELD_BOUNDARY_${UNIQUE_ID}>`;
|
|
80
|
-
var NUMSTAT_BOUNDARY_STR = `<GIT_NUMSTAT_BOUNDARY_${UNIQUE_ID}>`;
|
|
81
|
-
var PATCH_BOUNDARY_STR = `<GIT_PATCH_BOUNDARY_${UNIQUE_ID}>`;
|
|
82
|
-
function setupGitProcessLifecycle(proc, ac, functionName) {
|
|
83
|
-
let idleTimeout = setTimeout(() => ac.abort(), GIT_IDLE_TIMEOUT_MS);
|
|
84
|
-
idleTimeout.unref();
|
|
85
|
-
const absoluteTimeout = setTimeout(() => {
|
|
86
|
-
console.warn(`Warning: ${functionName} exceeded absolute timeout. Aborting.`);
|
|
87
|
-
ac.abort();
|
|
88
|
-
}, GIT_ABSOLUTE_TIMEOUT_MS);
|
|
89
|
-
absoluteTimeout.unref();
|
|
90
|
-
const clearTimeouts = () => {
|
|
91
|
-
clearTimeout(idleTimeout);
|
|
92
|
-
clearTimeout(absoluteTimeout);
|
|
93
|
-
};
|
|
94
|
-
const resetTimeout = () => {
|
|
95
|
-
clearTimeout(idleTimeout);
|
|
96
|
-
idleTimeout = setTimeout(() => ac.abort(), GIT_IDLE_TIMEOUT_MS);
|
|
97
|
-
idleTimeout.unref();
|
|
98
|
-
};
|
|
99
|
-
const errChunks = [];
|
|
100
|
-
let errLength = 0;
|
|
101
|
-
let hasTruncatedErr = false;
|
|
102
|
-
proc.stderr?.on("data", (d) => {
|
|
103
|
-
const s = Buffer.isBuffer(d) ? d.toString("utf-8") : String(d);
|
|
104
|
-
if (errLength < MAX_STDERR_LENGTH) {
|
|
105
|
-
errChunks.push(s);
|
|
106
|
-
errLength += s.length;
|
|
107
|
-
} else if (!hasTruncatedErr) {
|
|
108
|
-
errChunks.push("\n...[stderr truncated]");
|
|
109
|
-
hasTruncatedErr = true;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
let streamError = null;
|
|
113
|
-
const processComplete = new Promise((resolve, reject) => {
|
|
114
|
-
let resolved = false;
|
|
115
|
-
proc.on("close", (code, signal) => {
|
|
116
|
-
if (!resolved) {
|
|
117
|
-
resolved = true;
|
|
118
|
-
if (ac.signal.aborted) {
|
|
119
|
-
streamError = new Error(`Git process timed out and was aborted: ${errChunks.join("")}`);
|
|
120
|
-
reject(streamError);
|
|
121
|
-
} else if (signal === "SIGKILL" || signal === "SIGTERM") {
|
|
122
|
-
streamError = new Error(`Git process was killed with signal ${signal}`);
|
|
123
|
-
reject(streamError);
|
|
124
|
-
} else if (code !== 0 && code !== null && code !== SIGPIPE_EXIT_CODE || signal && signal !== "SIGPIPE") {
|
|
125
|
-
const errText = errChunks.join("");
|
|
126
|
-
if (errText.includes("ambiguous argument 'HEAD': unknown revision") || errText.includes("bad default revision 'HEAD'")) {
|
|
127
|
-
resolve();
|
|
128
|
-
} else {
|
|
129
|
-
streamError = new Error(`Git failed with code ${code} and signal ${signal}: ${errText}`);
|
|
130
|
-
reject(streamError);
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
resolve();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
proc.on("error", (err) => {
|
|
138
|
-
if (!resolved) {
|
|
139
|
-
resolved = true;
|
|
140
|
-
if (ac.signal.aborted || err instanceof Error && err.name === "AbortError") {
|
|
141
|
-
streamError = new Error(`Git process timed out after ${Math.round(GIT_IDLE_TIMEOUT_MS / 1e3)}s of inactivity and was aborted: ${errChunks.join("")}`);
|
|
142
|
-
} else if (isErrnoException(err) && err.code === "ENOENT") {
|
|
143
|
-
streamError = new Error(JSON.stringify({ error: "GitExecutableNotFound", message: "The git binary is missing from the environment PATH." }), { cause: err });
|
|
144
|
-
} else {
|
|
145
|
-
streamError = err;
|
|
146
|
-
}
|
|
147
|
-
reject(streamError);
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
processComplete.catch(() => {
|
|
152
|
-
});
|
|
153
|
-
const cleanup = () => {
|
|
154
|
-
clearTimeouts();
|
|
155
|
-
if (!proc.killed) {
|
|
156
|
-
try {
|
|
157
|
-
proc.kill("SIGKILL");
|
|
158
|
-
} catch {
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
activeProcesses.delete(proc);
|
|
162
|
-
};
|
|
163
|
-
return { resetTimeout, processComplete, getStreamError: () => streamError, clearTimeouts, cleanup };
|
|
164
|
-
}
|
|
165
|
-
function getGitTagRange(cwd = process.cwd()) {
|
|
166
|
-
let headSha = "HEAD";
|
|
167
|
-
const execOpts = { cwd, encoding: "utf-8", stdio: "pipe", timeout: GIT_TIMEOUT_MS, maxBuffer: GIT_CMD_MAX_BUFFER, windowsHide: true };
|
|
168
|
-
try {
|
|
169
|
-
headSha = execFileSync("git", ["--no-pager", "rev-parse", "HEAD"], execOpts).trim();
|
|
170
|
-
let tagName = execFileSync("git", ["--no-pager", "describe", "--tags", "--abbrev=0"], execOpts).trim();
|
|
171
|
-
if (tagName) {
|
|
172
|
-
let tagSha = execFileSync("git", ["--no-pager", "rev-parse", `${tagName}^{commit}`], execOpts).trim();
|
|
173
|
-
if (tagSha === headSha) {
|
|
174
|
-
try {
|
|
175
|
-
tagName = execFileSync("git", ["--no-pager", "describe", "--tags", "--abbrev=0", `${tagName}^`], execOpts).trim();
|
|
176
|
-
tagSha = execFileSync("git", ["--no-pager", "rev-parse", `${tagName}^{commit}`], execOpts).trim();
|
|
177
|
-
} catch {
|
|
178
|
-
return { range: "HEAD", isFallback: true, headSha };
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (tagName && tagSha !== headSha) {
|
|
182
|
-
return { range: `${tagName}..HEAD`, isFallback: false, headSha };
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
} catch {
|
|
186
|
-
}
|
|
187
|
-
return { range: "HEAD", isFallback: true, headSha };
|
|
188
|
-
}
|
|
189
|
-
function buildGitBaseArgs(args, targetRange) {
|
|
190
|
-
if (targetRange && targetRange.startsWith("-")) {
|
|
191
|
-
throw new Error(`Invalid target range: ${targetRange}. Range must not start with '-'.`);
|
|
192
|
-
}
|
|
193
|
-
const gitArgs = [];
|
|
194
|
-
gitArgs.push("-M");
|
|
195
|
-
if (args["include-merges"] || args["first-parent"]) gitArgs.push("-c");
|
|
196
|
-
else gitArgs.push("--no-merges");
|
|
197
|
-
if (args.author) gitArgs.push(`--author=${args.author}`);
|
|
198
|
-
if (args.search) {
|
|
199
|
-
gitArgs.push(`--grep=${args.search}`);
|
|
200
|
-
gitArgs.push("--fixed-strings");
|
|
201
|
-
}
|
|
202
|
-
if (args.grep) gitArgs.push(`--grep=${args.grep}`);
|
|
203
|
-
if (args.author || args.search || args.grep || args["patch-search"] || args.pickaxe) {
|
|
204
|
-
if (!gitArgs.includes("-i")) gitArgs.push("-i");
|
|
205
|
-
}
|
|
206
|
-
if (args.grep || args["patch-search"] || args.pickaxe) {
|
|
207
|
-
if (!gitArgs.includes("-E")) gitArgs.push("-E");
|
|
208
|
-
}
|
|
209
|
-
if (args.since) gitArgs.push(`--since=${args.since}`);
|
|
210
|
-
if (args.until) gitArgs.push(`--until=${args.until}`);
|
|
211
|
-
if (args["first-parent"]) gitArgs.push("--first-parent");
|
|
212
|
-
if (args["patch-search"]) {
|
|
213
|
-
gitArgs.push(`-G${args["patch-search"]}`);
|
|
214
|
-
if (!gitArgs.includes("--pickaxe-all")) gitArgs.push("--pickaxe-all");
|
|
215
|
-
}
|
|
216
|
-
if (args.pickaxe) {
|
|
217
|
-
gitArgs.push(`-S${args.pickaxe}`);
|
|
218
|
-
if (!gitArgs.includes("--pickaxe-all")) gitArgs.push("--pickaxe-all");
|
|
219
|
-
}
|
|
220
|
-
if (args["diff-filter"]) {
|
|
221
|
-
let df = args["diff-filter"];
|
|
222
|
-
if (!df.includes("*")) df += "*";
|
|
223
|
-
gitArgs.push(`--diff-filter=${df}`);
|
|
224
|
-
}
|
|
225
|
-
if (args.reverse) gitArgs.push("--reverse");
|
|
226
|
-
if (args["diff-context"] !== void 0) gitArgs.push(`-U${args["diff-context"]}`);
|
|
227
|
-
const hasTsFilters = args.category || args.type || args.breaking || args["changelog-only"] || args.impact || args.confidence;
|
|
228
|
-
const hasNativeFilters = args.author || args.search || args.grep || args["patch-search"] || args.pickaxe || args.path || args.since || args.until || args["diff-filter"];
|
|
229
|
-
if (args.all) {
|
|
230
|
-
gitArgs.push("--all");
|
|
231
|
-
} else if (!targetRange || targetRange === "HEAD") {
|
|
232
|
-
const format = args.format?.replace(/^["']|["']$/g, "");
|
|
233
|
-
if (!args.limit && !hasTsFilters && !hasNativeFilters && !args.reverse && (!format || format === "json")) gitArgs.push("-n", "100");
|
|
234
|
-
else if ((hasTsFilters || !args.limit && format && format !== "json") && !args.reverse) gitArgs.push("-n", "50000");
|
|
235
|
-
gitArgs.push("HEAD");
|
|
236
|
-
} else {
|
|
237
|
-
gitArgs.push(targetRange);
|
|
238
|
-
}
|
|
239
|
-
if (args.limit !== void 0 && !hasTsFilters && !args.reverse) {
|
|
240
|
-
if (!gitArgs.includes("-n")) gitArgs.push("-n", String(args.limit));
|
|
241
|
-
}
|
|
242
|
-
if (args.path) gitArgs.push("--full-diff", "--", args.path);
|
|
243
|
-
return gitArgs;
|
|
244
|
-
}
|
|
245
|
-
async function* streamGitRecords(args, cwd = process.cwd(), maxBufferLimit = GIT_STREAM_BUFFER_DEFAULT) {
|
|
246
|
-
const ac = new AbortController();
|
|
247
|
-
let proc;
|
|
248
|
-
try {
|
|
249
|
-
proc = spawn("git", ["--no-pager", ...args], { cwd, signal: ac.signal, windowsHide: true });
|
|
250
|
-
activeProcesses.add(proc);
|
|
251
|
-
} catch (err) {
|
|
252
|
-
if (isErrnoException(err) && err.code === "ENOENT") {
|
|
253
|
-
throw new Error(JSON.stringify({ error: "GitExecutableNotFound", message: "The git binary is missing from the environment PATH." }), { cause: err });
|
|
254
|
-
}
|
|
255
|
-
throw err;
|
|
256
|
-
}
|
|
257
|
-
if (!proc.stdout || !proc.stderr) {
|
|
258
|
-
activeProcesses.delete(proc);
|
|
259
|
-
try {
|
|
260
|
-
proc.kill("SIGKILL");
|
|
261
|
-
} catch {
|
|
262
|
-
}
|
|
263
|
-
throw new Error("Missing stdio");
|
|
264
|
-
}
|
|
265
|
-
proc.stdout.setEncoding("utf-8");
|
|
266
|
-
proc.stderr.setEncoding("utf-8");
|
|
267
|
-
const { resetTimeout, processComplete, getStreamError, cleanup } = setupGitProcessLifecycle(proc, ac, "streamGitRecords");
|
|
268
|
-
let buffer = "";
|
|
269
|
-
let searchOffset = 0;
|
|
270
|
-
let droppingMassiveCommit = false;
|
|
271
|
-
try {
|
|
272
|
-
try {
|
|
273
|
-
for await (const chunk of proc.stdout) {
|
|
274
|
-
const streamError = getStreamError();
|
|
275
|
-
if (streamError) throw streamError;
|
|
276
|
-
resetTimeout();
|
|
277
|
-
buffer += chunk;
|
|
278
|
-
let sepIdx;
|
|
279
|
-
let lastSlice = 0;
|
|
280
|
-
if (droppingMassiveCommit) {
|
|
281
|
-
const nextBoundary = buffer.indexOf(RECORD_SEPARATOR);
|
|
282
|
-
if (nextBoundary !== -1) {
|
|
283
|
-
droppingMassiveCommit = false;
|
|
284
|
-
buffer = (" " + buffer.slice(nextBoundary + RECORD_SEPARATOR.length)).slice(1);
|
|
285
|
-
searchOffset = 0;
|
|
286
|
-
} else {
|
|
287
|
-
buffer = buffer.length > RECORD_SEPARATOR.length ? (" " + buffer.slice(-(RECORD_SEPARATOR.length - 1))).slice(1) : buffer;
|
|
288
|
-
searchOffset = 0;
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
while ((sepIdx = buffer.indexOf(RECORD_SEPARATOR, searchOffset)) !== -1) {
|
|
293
|
-
const record = buffer.slice(lastSlice, sepIdx);
|
|
294
|
-
if (record.trim()) {
|
|
295
|
-
if (record.length >= maxBufferLimit) {
|
|
296
|
-
console.warn(`Warning: Git record exceeded ${Math.round(maxBufferLimit / 1024 / 1024)}MB. Dropping massive commit.`);
|
|
297
|
-
} else {
|
|
298
|
-
yield record;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
lastSlice = sepIdx + RECORD_SEPARATOR.length;
|
|
302
|
-
searchOffset = lastSlice;
|
|
303
|
-
}
|
|
304
|
-
if (lastSlice > 0) {
|
|
305
|
-
buffer = (" " + buffer.slice(lastSlice)).slice(1);
|
|
306
|
-
searchOffset = Math.max(0, searchOffset - lastSlice);
|
|
307
|
-
} else {
|
|
308
|
-
searchOffset = Math.max(0, buffer.length - chunk.length - RECORD_SEPARATOR.length);
|
|
309
|
-
}
|
|
310
|
-
if (buffer.length > maxBufferLimit) {
|
|
311
|
-
console.warn(`Warning: Git record buffer exceeded ${Math.round(maxBufferLimit / 1024 / 1024)}MB. Dropping massive commit to prevent memory exhaustion.`);
|
|
312
|
-
buffer = buffer.length > RECORD_SEPARATOR.length ? (" " + buffer.slice(-(RECORD_SEPARATOR.length - 1))).slice(1) : buffer;
|
|
313
|
-
searchOffset = 0;
|
|
314
|
-
droppingMassiveCommit = true;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
} catch (err) {
|
|
318
|
-
const streamError = getStreamError();
|
|
319
|
-
if (streamError) throw streamError;
|
|
320
|
-
if (err instanceof Error && err.message === "Premature close") {
|
|
321
|
-
await processComplete;
|
|
322
|
-
} else {
|
|
323
|
-
throw err;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
await processComplete;
|
|
327
|
-
if (!droppingMassiveCommit && buffer.trim() && buffer.length < maxBufferLimit) yield buffer;
|
|
328
|
-
} finally {
|
|
329
|
-
cleanup();
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
async function* spawnGitBinaryStream(args, boundaryStr, stdinShas, maxBufferLimit = GIT_STREAM_BUFFER_DEFAULT, cwd = process.cwd()) {
|
|
333
|
-
const ac = new AbortController();
|
|
334
|
-
const proc = spawn("git", args, { cwd, signal: ac.signal, windowsHide: true });
|
|
335
|
-
activeProcesses.add(proc);
|
|
336
|
-
if (!proc.stdout || !proc.stderr || !proc.stdin) {
|
|
337
|
-
activeProcesses.delete(proc);
|
|
338
|
-
try {
|
|
339
|
-
proc.kill("SIGKILL");
|
|
340
|
-
} catch {
|
|
341
|
-
}
|
|
342
|
-
throw new Error("Missing stdio");
|
|
343
|
-
}
|
|
344
|
-
if (stdinShas) {
|
|
345
|
-
proc.stdin.on("error", (err) => {
|
|
346
|
-
if (err instanceof Error) {
|
|
347
|
-
if (!("code" in err) || err.code !== "EPIPE" && err.code !== "EOF") {
|
|
348
|
-
console.error("stdin error:", err.message);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
try {
|
|
353
|
-
proc.stdin.write(stdinShas);
|
|
354
|
-
proc.stdin.end();
|
|
355
|
-
} catch {
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
const { resetTimeout, processComplete, cleanup } = setupGitProcessLifecycle(proc, ac, "spawnGitBinaryStream");
|
|
359
|
-
try {
|
|
360
|
-
let chunks = [];
|
|
361
|
-
let chunksLength = 0;
|
|
362
|
-
const BOUNDARY = Buffer.from(boundaryStr);
|
|
363
|
-
for await (const chunk of proc.stdout) {
|
|
364
|
-
resetTimeout();
|
|
365
|
-
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
366
|
-
chunks.push(buf);
|
|
367
|
-
chunksLength += buf.length;
|
|
368
|
-
let checkBuf = buf;
|
|
369
|
-
if (chunksLength > buf.length) {
|
|
370
|
-
const needed = BOUNDARY.length - 1;
|
|
371
|
-
let gathered = 0;
|
|
372
|
-
const gatherChunks = [buf];
|
|
373
|
-
for (let i = chunks.length - 2; i >= 0 && gathered < needed; i--) {
|
|
374
|
-
const c = chunks[i];
|
|
375
|
-
if (!c) continue;
|
|
376
|
-
const take = Math.min(c.length, needed - gathered);
|
|
377
|
-
gatherChunks.unshift(c.subarray(c.length - take));
|
|
378
|
-
gathered += take;
|
|
379
|
-
}
|
|
380
|
-
checkBuf = Buffer.concat(gatherChunks);
|
|
381
|
-
}
|
|
382
|
-
if (checkBuf.indexOf(BOUNDARY) !== -1 || chunksLength >= maxBufferLimit) {
|
|
383
|
-
let pendingBuffer = Buffer.concat(chunks, chunksLength);
|
|
384
|
-
let nextIdx = pendingBuffer.indexOf(BOUNDARY);
|
|
385
|
-
while (nextIdx !== -1) {
|
|
386
|
-
if (nextIdx > 0) {
|
|
387
|
-
yield pendingBuffer.subarray(0, nextIdx);
|
|
388
|
-
}
|
|
389
|
-
pendingBuffer = pendingBuffer.subarray(nextIdx + BOUNDARY.length);
|
|
390
|
-
nextIdx = pendingBuffer.indexOf(BOUNDARY);
|
|
391
|
-
}
|
|
392
|
-
if (pendingBuffer.length > maxBufferLimit) {
|
|
393
|
-
console.warn(`Warning: Git binary buffer exceeded ${Math.round(maxBufferLimit / 1024 / 1024)}MB. Dropping buffer to prevent memory exhaustion.`);
|
|
394
|
-
chunks = [];
|
|
395
|
-
chunksLength = 0;
|
|
396
|
-
} else {
|
|
397
|
-
chunks = pendingBuffer.length > 0 ? [pendingBuffer] : [];
|
|
398
|
-
chunksLength = pendingBuffer.length;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
await processComplete;
|
|
403
|
-
if (chunksLength > 0) {
|
|
404
|
-
yield Buffer.concat(chunks, chunksLength);
|
|
405
|
-
}
|
|
406
|
-
} finally {
|
|
407
|
-
cleanup();
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export { CHAR_NEWLINE, CHAR_NULL, DEFAULT_MAX_BODY_LEN, DEFAULT_MAX_PATCH_LEN, EXPECTED_RECORD_PARTS, FIELD_SEPARATOR, GIT_EXCLUDE_PATTERNS, GIT_STREAM_BUFFER_DEFAULT, IMPACT_HIGH, IMPACT_LOW, IMPACT_MEDIUM, MAX_ARRAY_LENGTH, MAX_BODY_LENGTH, MAX_EMPTY_STATUS_COUNT, MAX_FILES_PER_COMMIT, MAX_ISSUE_TEXT_LENGTH, MAX_PARSED_FILES, MAX_STATUS_ITERATIONS, MAX_SUBJECT_LENGTH, MAX_TRAILER_LENGTH, MS_PER_DAY, NUMSTAT_BOUNDARY_STR, PATCH_BOUNDARY_STR, RECORD_END_FIELDS, RECORD_SEPARATOR, RECORD_START_FIELDS, REGEX_BREAKING_CHANGE, REGEX_CONVENTIONAL_COMMIT, REGEX_FILE_STATUS, REGEX_REFERENCE_TRAILER, REGEX_REVERT_COMMIT, REGEX_VALIDATION_TRAILER, UNIQUE_ID, activeProcesses, buildGitBaseArgs, cleanupProcesses, getGitTagRange, setupGitProcessLifecycle, spawnGitBinaryStream, streamGitRecords };
|