@unbrained/pm-cli 2026.11.22 → 2026.11.24
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/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/after-command-context-usage.js +1 -1
- package/dist/cli/argv-utils.js +1 -1
- package/dist/cli/bootstrap-args.js +1 -1
- package/dist/cli/bundle-integrity.js +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/commander-usage.js +11 -11
- package/dist/cli/commands/annotations/comments.js +1 -1
- package/dist/cli/commands/annotations/docs.js +1 -1
- package/dist/cli/commands/annotations/files.js +1 -1
- package/dist/cli/commands/annotations/learnings.js +1 -1
- package/dist/cli/commands/annotations/notes.js +1 -1
- package/dist/cli/commands/extension/describe.js +1 -1
- package/dist/cli/commands/extension/extension.js +1 -1
- package/dist/cli/commands/extension/scaffold.js +1 -1
- package/dist/cli/commands/extension/shared.js +1 -1
- package/dist/cli/commands/governance/gc.js +1 -1
- package/dist/cli/commands/governance/health.js +1 -1
- package/dist/cli/commands/governance/telemetry.js +1 -1
- package/dist/cli/commands/governance/validate.js +1 -1
- package/dist/cli/commands/history/activity.js +1 -1
- package/dist/cli/commands/history/history-compact.js +1 -1
- package/dist/cli/commands/history/history-redact.js +1 -1
- package/dist/cli/commands/history/history-repair.js +1 -1
- package/dist/cli/commands/history/history.js +1 -1
- package/dist/cli/commands/history/restore.js +1 -1
- package/dist/cli/commands/lifecycle/append.js +1 -1
- package/dist/cli/commands/lifecycle/claim.js +1 -1
- package/dist/cli/commands/lifecycle/close-many.js +1 -1
- package/dist/cli/commands/lifecycle/close.js +1 -1
- package/dist/cli/commands/lifecycle/copy.js +1 -1
- package/dist/cli/commands/lifecycle/create.js +1 -1
- package/dist/cli/commands/lifecycle/delete.js +1 -1
- package/dist/cli/commands/lifecycle/focus.js +1 -1
- package/dist/cli/commands/lifecycle/plan.js +1 -1
- package/dist/cli/commands/lifecycle/update-many.js +1 -1
- package/dist/cli/commands/lifecycle/update.js +1 -1
- package/dist/cli/commands/query/aggregate.js +1 -1
- package/dist/cli/commands/query/context.js +1 -1
- package/dist/cli/commands/query/deps.js +1 -1
- package/dist/cli/commands/query/duplicates.js +1 -1
- package/dist/cli/commands/query/eval.js +1 -1
- package/dist/cli/commands/query/get.js +1 -1
- package/dist/cli/commands/query/graph.js +1 -1
- package/dist/cli/commands/query/list.js +1 -1
- package/dist/cli/commands/query/next.js +1 -1
- package/dist/cli/commands/query/search.js +1 -1
- package/dist/cli/commands/query/stats.js +1 -1
- package/dist/cli/commands/test/test-all.js +1 -1
- package/dist/cli/commands/test/test-runs.js +1 -1
- package/dist/cli/commands/test/test.js +1 -1
- package/dist/cli/commands/workspace/config.js +1 -1
- package/dist/cli/commands/workspace/contracts.js +1 -1
- package/dist/cli/commands/workspace/init.js +1 -1
- package/dist/cli/commands/workspace/merge.js +1 -1
- package/dist/cli/commands/workspace/profile.js +1 -1
- package/dist/cli/commands/workspace/schema.js +1 -1
- package/dist/cli/commands/workspace/upgrade.js +1 -1
- package/dist/cli/context-intent-invocation.js +1 -1
- package/dist/cli/description-stdin.js +1 -1
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/extension-command-help.js +6 -6
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -5
- package/dist/cli/help-json-payload.js +7 -7
- package/dist/cli/invocation-profile.js +2 -2
- package/dist/cli/main.js +5 -5
- package/dist/cli/migration-gates.js +1 -1
- package/dist/cli/option-values.js +1 -1
- package/dist/cli/preflight-warnings.js +3 -3
- package/dist/cli/public.js +1 -1
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/register-assurance.js +1 -1
- package/dist/cli/register-files-lookup.js +1 -1
- package/dist/cli/register-history-activity.js +1 -1
- package/dist/cli/register-history-author.js +1 -1
- package/dist/cli/register-history-maintenance.js +2 -2
- package/dist/cli/register-list-query.js +10 -10
- package/dist/cli/register-mutation-options.js +0 -1
- package/dist/cli/register-mutation.js +6 -6
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-structured-mutation.js +1 -1
- package/dist/cli/registration-helpers.js +1 -1
- package/dist/cli/runtime/activation.js +1 -1
- package/dist/cli/runtime/annotation-option-retry.js +1 -1
- package/dist/cli/runtime/close-fields-retry.js +1 -1
- package/dist/cli/runtime/field-route-retry.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli/runtime/invocation-rewrites.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +1 -1
- package/dist/cli/runtime/refusal-credential-redaction.js +1 -1
- package/dist/cli/runtime/selection.js +1 -1
- package/dist/cli/runtime/telemetry-outcome.js +1 -1
- package/dist/cli/runtime-compatibility-boundary.js +4 -4
- package/dist/cli/schema/registration.js +15 -15
- package/dist/cli/schema-registration-helpers.js +1 -1
- package/dist/cli/search-refresh.js +1 -1
- package/dist/cli/stats-analytics-json.js +1 -1
- package/dist/cli/telemetry-flush.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-23K6DQQY.js +9 -0
- package/dist/cli-bundle/chunks/chunk-37UDIJ2K.js +3 -0
- package/dist/cli-bundle/chunks/chunk-5DUP4AZA.js +2 -0
- package/dist/cli-bundle/chunks/chunk-6H36ZHMI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-7IROAPWI.js +3 -0
- package/dist/cli-bundle/chunks/chunk-7VRFEURZ.js +33 -0
- package/dist/cli-bundle/chunks/chunk-7X253M6Z.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AA52P34H.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AWB5KBJS.js +2 -0
- package/dist/cli-bundle/chunks/chunk-D6PDUKUG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-DQDRA3SW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FXJYZBWV.js +113 -0
- package/dist/cli-bundle/chunks/chunk-HNKK2UG6.js +8 -0
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I2OJ5B4A.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I3BFCKZR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-MXUSC5RS.js +31 -0
- package/dist/cli-bundle/chunks/chunk-PLIUU37C.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PQUBVRV5.js +2 -0
- package/dist/cli-bundle/chunks/chunk-PW7U7WCE.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PZA7QECY.js +1 -0
- package/dist/cli-bundle/chunks/chunk-SLFRSZK6.js +1 -0
- package/dist/cli-bundle/chunks/chunk-SSALO4DB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-STOOTHZZ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TKRY22SO.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-B76TFRO2.js → chunk-TVIJ2VCU.js} +93 -93
- package/dist/cli-bundle/chunks/chunk-VJSGUXGU.js +3 -0
- package/dist/cli-bundle/chunks/chunk-WWTPNIC2.js +6 -0
- package/dist/cli-bundle/chunks/chunk-XFADNMGD.js +2 -0
- package/dist/cli-bundle/chunks/chunk-YOPTAIBD.js +125 -0
- package/dist/cli-bundle/chunks/chunk-YW2HBHRO.js +70 -0
- package/dist/cli-bundle/chunks/chunk-YYT3MIRF.js +3 -0
- package/dist/cli-bundle/chunks/chunk-Z7MFVRDV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZOX4SWRL.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ZYCOM4MS.js +9 -0
- package/dist/cli-bundle/chunks/context-budget-recovery-M5RFUEFG.js +2 -0
- package/dist/cli-bundle/chunks/field-option-collisions-W66HSWMK.js +2 -0
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-BPYKN5Q7.js +4 -0
- package/dist/cli-bundle/{focused-chunks/item-revision-2O6MLPEX.js → chunks/item-revision-D3LSBNIR.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-M6NTBYH3.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-OKL3CQVX.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-EKPEOZMF.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-RR5KACJ3.js → register-list-query-3LBV6CS2.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-72AGTMNE.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-XERFG2SH.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-W22L34Z4.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-JP2KBHBY.js +2 -0
- package/dist/cli-bundle/chunks/settlement-hook-6MR32OOC.js +7 -0
- package/dist/cli-bundle/chunks/stage-T2LKWN7C.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-24VRBNKE.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-3ELVASVA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3GT4A3ZN.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-3OCDKITJ.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-3Z7MCUJM.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-46MP7IZN.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-5LDBS6MS.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-A6VEMCRR.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-AIDL2ZNT.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-B6BNHKUW.js +78 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPUUW5O.js +1 -0
- package/dist/cli-bundle/focused-chunks/chunk-BWOVFE5B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-C7WHWI7K.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-EUQGZPGO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FDZPRJXJ.js +27 -0
- package/dist/cli-bundle/focused-chunks/chunk-GXP7Q4XM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HL47UQZJ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-IIP6LZ5E.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-K53OIT5J.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMFIAQ2V.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMU7DDOA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OZOCEB2Q.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-Q2HY44LV.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-REFMQY47.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIE3SJSE.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIQUIHYU.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-RLO2HCZT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SMMOZ3H3.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-UVTUX54T.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-X6CXWWNB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XDBHD4CY.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-YD66IRSL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z7W2RQIB.js +2 -0
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-CSJV3TY3.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-UODPSV6W.js +2 -0
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-EGEJMG3G.js +4 -0
- package/dist/cli-bundle/focused-chunks/item-revision-QH7RNBX4.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-ZO72OINF.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-PHVLKG4I.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-ZSG5OECH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-6RQMIDTN.js +2 -0
- package/dist/cli-bundle/focused-chunks/settlement-hook-FMLGKG7J.js +7 -0
- package/dist/cli-bundle/focused-chunks/stage-AQMKRVX4.js +2 -0
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +5 -5
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +66 -66
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +13 -13
- package/dist/cli.js +1 -1
- package/dist/core/checkpoint/checkpoint-gc.js +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
- package/dist/core/checkpoint/mutation-context.js +1 -1
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/config/positional-value.js +1 -1
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +2 -2
- package/dist/core/extensions/activation-summary.js +1 -1
- package/dist/core/extensions/activation-transaction.js +1 -1
- package/dist/core/extensions/capability-usage.js +1 -1
- package/dist/core/extensions/command-hook-context.js +1 -1
- package/dist/core/extensions/command-metadata-contract.js +1 -1
- package/dist/core/extensions/command-visibility-tier.js +1 -1
- package/dist/core/extensions/contribution-inventory.js +1 -1
- package/dist/core/extensions/exporter-output-contract.js +1 -1
- package/dist/core/extensions/extension-candidate.js +1 -1
- package/dist/core/extensions/extension-capability-aliases.js +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-policy.js +1 -1
- package/dist/core/extensions/extension-registries.js +1 -1
- package/dist/core/extensions/extension-runtime-helpers.js +1 -1
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/flag-definition-validation.js +1 -1
- package/dist/core/extensions/flag-value-types.js +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/item-field-types.js +1 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/manifest-parser.js +1 -1
- package/dist/core/extensions/manifest-schema.js +1 -1
- package/dist/core/extensions/module-graph-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor.js +1 -1
- package/dist/core/extensions/preflight-ownership.js +1 -1
- package/dist/core/extensions/read-output-contract.js +1 -1
- package/dist/core/extensions/registration-contracts.js +1 -1
- package/dist/core/extensions/registration-validation.js +1 -1
- package/dist/core/extensions/registration-values.js +1 -1
- package/dist/core/extensions/reserved-host-flags.js +1 -1
- package/dist/core/extensions/runtime-registrations.js +1 -1
- package/dist/core/extensions/service-ownership.js +1 -1
- package/dist/core/extensions/version-compat.js +1 -1
- package/dist/core/extensions/version-diagnostics.js +1 -1
- package/dist/core/fs/atomic-create.js +1 -1
- package/dist/core/fs/file-glob.js +1 -1
- package/dist/core/fs/fs-utils.js +2 -2
- package/dist/core/fs/host-environment-errors.js +1 -1
- package/dist/core/fs/index.js +1 -1
- package/dist/core/fs/path-utils.js +1 -1
- package/dist/core/governance/content-fields.js +1 -1
- package/dist/core/governance/issue-codes.js +1 -1
- package/dist/core/governance/metadata-coverage.js +1 -1
- package/dist/core/history/bridge.js +1 -1
- package/dist/core/history/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- package/dist/core/history/drift-scan.js +1 -1
- package/dist/core/history/event-classification.js +1 -1
- package/dist/core/history/event-index.js +11 -11
- package/dist/core/history/history-compact-bulk.js +1 -1
- package/dist/core/history/history-diff.js +1 -1
- package/dist/core/history/history-rewrite.js +1 -1
- package/dist/core/history/history-storage-stats.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/identity.js +1 -1
- package/dist/core/history/index.js +1 -1
- package/dist/core/history/operation-contract.js +1 -1
- package/dist/core/history/projection.js +1 -1
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.js +2 -2
- package/dist/core/history/stream-summary.js +2 -2
- package/dist/core/history/tombstone.js +1 -1
- package/dist/core/history/version-address.js +1 -1
- package/dist/core/history/workspace-history.js +2 -2
- package/dist/core/io/body-file.js +1 -1
- package/dist/core/io/bulk-ids-input.js +2 -2
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/item/deferred-fields.js +1 -1
- package/dist/core/item/dependency-reference.js +1 -1
- package/dist/core/item/id.js +1 -1
- package/dist/core/item/index.js +1 -1
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +7 -7
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/literal-mutation-input.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -8
- package/dist/core/item/plan-lifecycle.js +1 -1
- package/dist/core/item/priority.js +1 -1
- package/dist/core/item/sprint-release-format.js +1 -1
- package/dist/core/item/status-filter.js +1 -1
- package/dist/core/item/status.js +1 -1
- package/dist/core/item/toon-decode.js +1 -1
- package/dist/core/item/type-registry.js +1 -1
- package/dist/core/item/type-synonyms.js +1 -1
- package/dist/core/lock/index.js +1 -1
- package/dist/core/lock/lock-confinement.js +1 -1
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock-owner.js +1 -1
- package/dist/core/lock/lock.js +4 -4
- package/dist/core/output/linked-test-projection.js +5 -5
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +19 -19
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -3
- package/dist/core/packages/manifest.js +1 -1
- package/dist/core/packages/root.js +1 -1
- package/dist/core/policy/workflow-policy-schema.js +1 -1
- package/dist/core/policy/workflow-policy-store.js +1 -1
- package/dist/core/policy/workflow-policy.js +1 -1
- package/dist/core/profile/profile-describe.js +1 -1
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/profile/profile-plan.js +1 -1
- package/dist/core/profile/profile-presets.js +4 -4
- package/dist/core/reproducibility/context.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/item-types-file.js +2 -2
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +2 -0
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/schema/status-defs-file.js +2 -2
- package/dist/core/schema/status-token.js +1 -1
- package/dist/core/schema/type-inference.js +1 -1
- package/dist/core/schema/type-presets.js +1 -1
- package/dist/core/schema/type-workflows.js +1 -1
- package/dist/core/search/background-refresh.js +2 -2
- package/dist/core/search/bm25.js +1 -1
- package/dist/core/search/cache.js +2 -2
- package/dist/core/search/corpus.js +1 -1
- package/dist/core/search/embedding-batches.js +1 -1
- package/dist/core/search/eval-thresholds.js +1 -1
- package/dist/core/search/eval.js +1 -1
- package/dist/core/search/http-client.js +1 -1
- package/dist/core/search/providers.js +1 -1
- package/dist/core/search/relevance.js +1 -1
- package/dist/core/search/semantic-defaults.js +1 -1
- package/dist/core/search/staleness.js +1 -1
- package/dist/core/search/vector-stores.js +2 -2
- package/dist/core/search/vectorization-metadata.js +1 -1
- package/dist/core/sentry/helpers.js +1 -1
- package/dist/core/sentry/instrument.js +1 -1
- package/dist/core/sentry/sensitive-assignments.js +1 -1
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/agent-session-context.js +1 -1
- package/dist/core/shared/author.js +5 -5
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +0 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/error-details.js +1 -1
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/html-entity-decode.js +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/item-metadata-contract.js +1 -1
- package/dist/core/shared/lazy-module.js +1 -1
- package/dist/core/shared/levenshtein.js +1 -1
- package/dist/core/shared/memo.js +1 -1
- package/dist/core/shared/numeric-parsers.js +1 -1
- package/dist/core/shared/option-alias-visibility.js +1 -1
- package/dist/core/shared/output-unicode.js +1 -1
- package/dist/core/shared/primitives.js +1 -1
- package/dist/core/shared/process-tree.js +2 -2
- package/dist/core/shared/secret-rules.js +5 -5
- package/dist/core/shared/serial-queue.js +1 -1
- package/dist/core/shared/serialization.js +1 -1
- package/dist/core/shared/split-comma-list.js +1 -1
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/time.js +2 -2
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/index.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-metadata-cache.js +1 -1
- package/dist/core/store/item-metadata-query-index.js +11 -11
- package/dist/core/store/item-metadata-read-work.js +1 -1
- package/dist/core/store/item-mutation-precondition.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/settings-concurrency.js +1 -1
- package/dist/core/store/settings-read-cache.js +1 -1
- package/dist/core/store/settings-sections.js +2 -2
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +3 -1
- package/dist/core/store/settings.js +6 -6
- package/dist/core/store/sqlite-runtime.js +1 -1
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/store/transaction-coordinator-scope.js +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/observability.js +1 -1
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/core/telemetry/read-sampling.js +2 -2
- package/dist/core/telemetry/runtime.js +9 -9
- package/dist/core/test/background-runs.js +4 -4
- package/dist/core/test/item-test-run-tracking.js +1 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/core/validate/estimate-defaults.js +1 -1
- package/dist/core/validate/fix-planning.js +1 -1
- package/dist/core/validate/linked-artifact-reference.js +1 -1
- package/dist/core/validate/missing-by-type.js +1 -1
- package/dist/core/validate/missing-link-owners.js +1 -1
- package/dist/core/validate/stale-file-classification.js +1 -1
- package/dist/mcp/http-server.js +5 -5
- package/dist/mcp/legacy-adapter.js +1 -1
- package/dist/mcp/runtime-capabilities.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/actionability.js +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +1 -1
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/command-suggestions.js +1 -1
- package/dist/sdk/agent/create-option-policy.js +1 -1
- package/dist/sdk/agent/identity-config.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/linked-resource-recovery.js +1 -1
- package/dist/sdk/agent/refusal-closure-census.js +2 -2
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -3
- package/dist/sdk/agent-session-context.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/author-attribution.js +1 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -5
- package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +2 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +7 -7
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -1
- package/dist/sdk/cli-contracts/string-lists.js +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.js +0 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/cli-program.js +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/comments.js +1 -1
- package/dist/sdk/compile-cache.js +1 -1
- package/dist/sdk/completion/bash.js +2 -2
- package/dist/sdk/completion/fish.js +72 -72
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +75 -75
- package/dist/sdk/completion.js +1 -1
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/context/recency.js +1 -1
- package/dist/sdk/context/semantic-session-attribution.js +1 -1
- package/dist/sdk/context/usage-egress.js +1 -1
- package/dist/sdk/context/usage-ledger.js +6 -6
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/context-intent-runtime.js +1 -1
- package/dist/sdk/context-packing.js +1 -1
- package/dist/sdk/context-relevance.js +1 -1
- package/dist/sdk/context-signal-store.js +2 -2
- package/dist/sdk/context-usage.js +1 -1
- package/dist/sdk/dependencies/context-budget-recovery.js +1 -1
- package/dist/sdk/dependencies.js +1 -1
- package/dist/sdk/dependency-flag-validation.js +1 -1
- package/dist/sdk/dependency-provenance.js +1 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/duplicates.js +1 -1
- package/dist/sdk/environment/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- package/dist/sdk/environment/source-context.js +1 -1
- package/dist/sdk/environment/tracker-preflight.js +1 -1
- package/dist/sdk/error-code-catalog.js +1 -1
- package/dist/sdk/error-runtime.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/eval.js +1 -1
- package/dist/sdk/extension/author-manifest.js +1 -1
- package/dist/sdk/extension/bundled-catalog.js +1 -1
- package/dist/sdk/extension/command-options.d.ts +26 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension/concurrency.js +1 -1
- package/dist/sdk/extension/copy-scope.js +1 -1
- package/dist/sdk/extension/custom-field-collisions.js +1 -1
- package/dist/sdk/extension/describe.js +3 -3
- package/dist/sdk/extension/doctor.js +1 -1
- package/dist/sdk/extension/install-plan.js +1 -1
- package/dist/sdk/extension/install-receipts.js +1 -1
- package/dist/sdk/extension/install-runtime.js +3 -3
- package/dist/sdk/extension/install-snapshot.js +1 -1
- package/dist/sdk/extension/install-sources.js +5 -5
- package/dist/sdk/extension/managed-state.js +2 -2
- package/dist/sdk/extension/managed-update-status.js +1 -1
- package/dist/sdk/extension/migrations.js +2 -2
- package/dist/sdk/extension/native-command-options.js +1 -1
- package/dist/sdk/extension/output-ownership.js +1 -1
- package/dist/sdk/extension/runtime-summary.js +1 -1
- package/dist/sdk/extension/scaffold.js +11 -11
- package/dist/sdk/extension/shared.js +1 -1
- package/dist/sdk/extension/source-resolution.js +1 -1
- package/dist/sdk/extension/static-inventory.js +1 -1
- package/dist/sdk/extension/update-check.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/extension-contracts.js +1 -1
- package/dist/sdk/extension.js +1 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/flag-invocation-contracts.js +1 -1
- package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/generated-error-code-catalog.js +1 -1
- package/dist/sdk/governance/assurance-action-contracts.js +0 -1
- package/dist/sdk/governance/assurance-action.js +1 -1
- package/dist/sdk/governance/assurance-limits.js +1 -1
- package/dist/sdk/governance/assurance-mutation-error.js +1 -1
- package/dist/sdk/governance/assurance-presets.js +1 -1
- package/dist/sdk/governance/assurance-runtime.js +1 -1
- package/dist/sdk/governance/assurance.js +4 -4
- package/dist/sdk/governance/boundary-fixtures.js +1 -1
- package/dist/sdk/governance/closure-timestamps.js +1 -1
- package/dist/sdk/governance/defect-recurrence-coverage.js +1 -1
- package/dist/sdk/governance/defect-recurrence-graph.js +1 -1
- package/dist/sdk/governance/defect-recurrence-signals.js +1 -1
- package/dist/sdk/governance/defect-recurrence.js +2 -2
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health/history-drift-remedies.js +1 -1
- package/dist/sdk/governance/health/projection.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/governance/hierarchy-validation.js +1 -1
- package/dist/sdk/governance/in-progress-work-health.js +1 -1
- package/dist/sdk/governance/lifecycle-dependency-cycles.js +1 -1
- package/dist/sdk/governance/linked-file-report.js +1 -1
- package/dist/sdk/governance/merge-receipt-history.js +1 -1
- package/dist/sdk/governance/provenance-health.js +4 -4
- package/dist/sdk/governance/reindex.js +5 -5
- package/dist/sdk/governance/stale-work.js +1 -1
- package/dist/sdk/governance/status-role-diagnostics.js +1 -1
- package/dist/sdk/governance/storage-integrity.js +1 -1
- package/dist/sdk/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/governance/upgrade.js +2 -2
- package/dist/sdk/governance/validate-deferred-fields.js +1 -1
- package/dist/sdk/governance/validate-history-drift.js +1 -1
- package/dist/sdk/governance/validate-item-reader.js +1 -1
- package/dist/sdk/governance/validate-normalization.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance/workflow-completeness.js +1 -1
- package/dist/sdk/governance/workflow-policy.js +3 -3
- package/dist/sdk/governance/workspace-position.js +2 -2
- package/dist/sdk/graph/analytics.js +1 -1
- package/dist/sdk/graph/assembly.js +1 -1
- package/dist/sdk/graph/cache.js +1 -1
- package/dist/sdk/graph/cardinality-integrity.js +1 -1
- package/dist/sdk/graph/centrality.js +1 -1
- package/dist/sdk/graph/deadline-scheduling.js +1 -1
- package/dist/sdk/graph/durable-cache.js +1 -1
- package/dist/sdk/graph/governance-contracts.js +1 -1
- package/dist/sdk/graph/governance.js +1 -1
- package/dist/sdk/graph/hierarchy-integrity.js +1 -1
- package/dist/sdk/graph/lifecycle-coverage.js +1 -1
- package/dist/sdk/graph/mutation-advisory.js +1 -1
- package/dist/sdk/graph/query-contracts.js +1 -1
- package/dist/sdk/graph/remediation.js +1 -1
- package/dist/sdk/graph/run.js +1 -1
- package/dist/sdk/graph/scheduling.js +1 -1
- package/dist/sdk/graph/traversal.js +1 -1
- package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/guide.js +7 -7
- package/dist/sdk/history/append-only-repair.js +4 -4
- package/dist/sdk/history/attestation-command.js +2 -2
- package/dist/sdk/history/attestation-contract.js +1 -1
- package/dist/sdk/history/attestation-scan.js +1 -1
- package/dist/sdk/history/attestation.js +1 -1
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/reanchor-refusal.js +1 -1
- package/dist/sdk/history/reseed.js +1 -1
- package/dist/sdk/history/salvage.js +5 -5
- package/dist/sdk/history/subject.js +1 -1
- package/dist/sdk/history-analytics.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-mcp.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/improvement-ledger-validation.js +1 -1
- package/dist/sdk/improvement-ledger.js +2 -2
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/init-agent-guidance.js +10 -10
- package/dist/sdk/init.js +14 -14
- package/dist/sdk/invocation-author.js +1 -1
- package/dist/sdk/item-children.js +1 -1
- package/dist/sdk/item-metadata-index.js +1 -1
- package/dist/sdk/item-schedule.js +1 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +3 -3
- package/dist/sdk/lifecycle/checkpoint-rollback.js +1 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/cli-input.js +1 -1
- package/dist/sdk/lifecycle/close-many.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/copy.js +1 -1
- package/dist/sdk/lifecycle/core-field-recovery.js +1 -1
- package/dist/sdk/lifecycle/core-item-fields.js +1 -1
- package/dist/sdk/lifecycle/create-deferrals.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/delete.js +1 -1
- package/dist/sdk/lifecycle/dependency-removal.js +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
- package/dist/sdk/lifecycle/focus.js +1 -1
- package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -1
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -1
- package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -1
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/metadata-normalizers.js +1 -1
- package/dist/sdk/lifecycle/mutation-command-options.js +0 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/mutation-option-validation.js +1 -1
- package/dist/sdk/lifecycle/plan-mutation-receipt.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/lifecycle/recurrence-parsers.js +1 -1
- package/dist/sdk/lifecycle/release-handoff.js +1 -1
- package/dist/sdk/lifecycle/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -2
- package/dist/sdk/lifecycle/repeated-terminal-state.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/start-blockers.js +1 -1
- package/dist/sdk/lifecycle/structured-mutation-plan.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -2
- package/dist/sdk/lifecycle/workflow-transition.js +1 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/mcp/apps.js +5 -5
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/executable.js +4 -4
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -3
- package/dist/sdk/mcp/subscriptions.js +1 -1
- package/dist/sdk/mcp/tasks.js +2 -2
- package/dist/sdk/mcp/transport.js +1 -1
- package/dist/sdk/merge/abandoned-receipts.js +1 -1
- package/dist/sdk/merge/driver.js +7 -7
- package/dist/sdk/merge/history-scalar-rebase.js +1 -1
- package/dist/sdk/merge/ignored-artifacts.js +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/indexed-receipt-blobs.js +2 -2
- package/dist/sdk/merge/install.js +6 -6
- package/dist/sdk/merge/receipt-file-boundary.js +1 -1
- package/dist/sdk/merge/receipt-operation.js +1 -1
- package/dist/sdk/merge/receipt-schema.js +1 -1
- package/dist/sdk/merge/receipts.js +4 -4
- package/dist/sdk/merge/reconcile.js +1 -1
- package/dist/sdk/merge/settlement-hook.js +4 -4
- package/dist/sdk/merge/stage.js +1 -1
- package/dist/sdk/merge/three-way.js +9 -9
- package/dist/sdk/merge/worktree-config.js +2 -2
- package/dist/sdk/merge.js +1 -1
- package/dist/sdk/mutation-events.js +1 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/notes.js +1 -1
- package/dist/sdk/output/fit-envelope.js +1 -1
- package/dist/sdk/output/list-envelope.js +1 -1
- package/dist/sdk/output/table-rows.js +1 -1
- package/dist/sdk/output-contracts.js +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/output-token-accounting.js +1 -1
- package/dist/sdk/output.js +2 -2
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/package-migrations.js +1 -1
- package/dist/sdk/package-runtime-options.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/profile.js +5 -5
- package/dist/sdk/provenance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.js +1 -1
- package/dist/sdk/query/aggregate.js +1 -1
- package/dist/sdk/query/calendar.js +4 -4
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query/declared-blockers.js +1 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get-facet-roots.js +1 -1
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +0 -1
- package/dist/sdk/query/light-metadata.js +1 -1
- package/dist/sdk/query/list-filter-shared.js +1 -1
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/multi-value-filters.js +1 -1
- package/dist/sdk/query/next-ranking-policy.js +1 -1
- package/dist/sdk/query/next-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -2
- package/dist/sdk/query/parsers.js +1 -1
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/query/search/corpus.js +2 -2
- package/dist/sdk/query/search/filters.js +1 -1
- package/dist/sdk/query/search/input.js +1 -1
- package/dist/sdk/query/search/lexical.js +1 -1
- package/dist/sdk/query/search/response.js +1 -1
- package/dist/sdk/query/search/semantic.js +3 -3
- package/dist/sdk/query/search/types.js +0 -1
- package/dist/sdk/query/search-contracts.js +1 -1
- package/dist/sdk/query/search-pagination.js +1 -1
- package/dist/sdk/query/search-rendering.js +1 -1
- package/dist/sdk/query/search.js +1 -1
- package/dist/sdk/query/window-pagination.js +1 -1
- package/dist/sdk/query/workspace-contracts.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/extension.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +1 -1
- package/dist/sdk/read-output/provenance.js +1 -1
- package/dist/sdk/read-output/session-result.js +0 -1
- package/dist/sdk/read-output/surfaces.js +1 -1
- package/dist/sdk/read-output/tail-retention.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.d.ts +11 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.js +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/relationship-analytics.js +1 -1
- package/dist/sdk/relationship-context.js +1 -1
- package/dist/sdk/relationship-history.js +6 -6
- package/dist/sdk/relationship-kinds/contract.js +1 -1
- package/dist/sdk/relationships.js +1 -1
- package/dist/sdk/reproducibility/process.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime/context.js +1 -1
- package/dist/sdk/runtime/mutation-admission.js +1 -1
- package/dist/sdk/runtime/mutation-value-validation.js +1 -1
- package/dist/sdk/runtime/schema-preview.js +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-action-aliases.js +1 -1
- package/dist/sdk/runtime-extended-actions.js +1 -1
- package/dist/sdk/runtime-input.d.ts +2 -0
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +0 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.d.ts +5 -3
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema/field-flag-spelling.d.ts +22 -0
- package/dist/sdk/schema/field-flag-spelling.js +2 -0
- package/dist/sdk/schema/field-option-collisions.js +2 -0
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/schema.js +7 -7
- package/dist/sdk/search-refresh-worker.js +1 -1
- package/dist/sdk/similarity-scoring.js +1 -1
- package/dist/sdk/similarity.js +1 -1
- package/dist/sdk/start-task-status.js +1 -1
- package/dist/sdk/stats.js +1 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -4
- package/dist/sdk/templates.js +3 -3
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/command-resolution.js +2 -2
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution-receipts.js +2 -2
- package/dist/sdk/test/execution.js +5 -5
- package/dist/sdk/test/json-path.js +1 -1
- package/dist/sdk/test/linked-command-detection.js +1 -1
- package/dist/sdk/test/measurements.js +1 -1
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/prerequisites.js +1 -1
- package/dist/sdk/test/receipt-index-snapshot.js +1 -1
- package/dist/sdk/test/run-phases.js +1 -1
- package/dist/sdk/test/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/update.js +1 -1
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -2
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/transactions/item-finalization.js +1 -1
- package/dist/sdk/workspace-contracts-cache.js +1 -1
- package/dist/sdk/workspace-contracts.js +1 -1
- package/dist/sdk/workspace-memory.js +2 -2
- package/dist/sdk/workspace-snapshot.js +5 -5
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +6 -6
- package/dist/types/index.js +1 -1
- package/dist/types.js +1 -1
- package/docs/COMMANDS.md +1 -1
- package/docs/EXTENSIONS.md +2 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +94 -5
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- package/marketplace.json +1 -1
- package/package.json +2 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/scripts/finalize-build.mjs +63 -24
- package/scripts/prepare-build-cache.mjs +28 -1
- package/dist/cli-bundle/chunks/chunk-3W47ZZ5T.js +0 -9
- package/dist/cli-bundle/chunks/chunk-4TB5D6HL.js +0 -125
- package/dist/cli-bundle/chunks/chunk-5ZMVLWE3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6BBDEIKC.js +0 -33
- package/dist/cli-bundle/chunks/chunk-AR4NP5HI.js +0 -3
- package/dist/cli-bundle/chunks/chunk-B4PPFOPY.js +0 -3
- package/dist/cli-bundle/chunks/chunk-CAR2L5NW.js +0 -8
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EIGUKEV6.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GTPCAJMZ.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GYP24M7W.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HC2OPETM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HKUV74K3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HXHYDO2R.js +0 -115
- package/dist/cli-bundle/chunks/chunk-IB7UB5TE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J2LABXBL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J52BEBSS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +0 -3
- package/dist/cli-bundle/chunks/chunk-OJTMGDON.js +0 -31
- package/dist/cli-bundle/chunks/chunk-SPPHDVZE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TC6XLIYO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-U7EL3AYA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-VQFWW4EF.js +0 -6
- package/dist/cli-bundle/chunks/chunk-X6MIWTTT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XC5Q2ZV7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XFHPKXAE.js +0 -71
- package/dist/cli-bundle/chunks/chunk-YHVLVSEZ.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YMUSRWV4.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YR2KEBHP.js +0 -2
- package/dist/cli-bundle/chunks/context-budget-recovery-L2WP5S26.js +0 -2
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-ITTXIN4K.js +0 -4
- package/dist/cli-bundle/chunks/item-revision-4QBMZXKX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-QY3PUHEI.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-FWLYWJ37.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-7ZDCK3G2.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-57AJQWFV.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-RKWST7CU.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-CMI23PC5.js +0 -2
- package/dist/cli-bundle/chunks/settlement-hook-BXN5LEQD.js +0 -7
- package/dist/cli-bundle/chunks/stage-4KDVXC5Z.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZD7275J.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-324AHXJO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3IRCYJI5.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-3V53UBHN.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-3XSWH6QC.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-4JZITIJB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4KTFKSS3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5C5TK3ET.js +0 -78
- package/dist/cli-bundle/focused-chunks/chunk-AKJYOZZP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BRZV7BFV.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-C3O6JJPO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-EGN2HFRU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHQVM6K6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HDEKFSOK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IWOXAUDU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ML3JHCC6.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-OPGOOP25.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RE7ZWT7D.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-RKQNVYGF.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-RQ252B6V.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-SVOOGGAK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-URGHTTT3.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-USPYKWQG.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-UWS3FC4D.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-UXQGFGAT.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-WZWXGDYY.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-YKSLZPLT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZWJTY4ID.js +0 -2
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-5MKOCGY5.js +0 -2
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-AF4U3F3D.js +0 -4
- package/dist/cli-bundle/focused-chunks/item-transaction-GLACUTPL.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-TCYDPUGG.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-LY73EJWM.js +0 -2
- package/dist/cli-bundle/focused-chunks/settlement-hook-ARYCZQY4.js +0 -7
- package/dist/cli-bundle/focused-chunks/stage-DQ7RQQ52.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
`;await writeFileAtomic(ledgerPath,serialized)}function buildVectorPayload(item){return{id:item.id,type:item.type,status:item.status,priority:item.priority,updated_at:item.updated_at}}function buildVectorizationIdentityForProvider(provider){const identity=buildVectorizationEmbeddingIdentity(provider.name,provider.model);if(!identity)throw new Error("Embedding provider must include a provider name and model");return identity}function buildSkippedSemanticRefreshResult(itemIds,warning){return{refreshed:[],skipped:itemIds,warnings:[warning]}}async function resolveSemanticRefreshRuntimeContext(pmRoot,normalizedItemIds,options){if(!options.settings&&!await pathExists(getSettingsPath(pmRoot)))return buildSkippedSemanticRefreshResult(normalizedItemIds,"search_semantic_refresh_skipped:settings_not_initialized");let settings;try{if(options.settings)settings=options.settings;else{const settingsRead=await readSettingsWithMetadata(pmRoot),readFailure=settingsRead.warnings.find(warning=>warning.startsWith("settings_read_"));if(readFailure)return buildSkippedSemanticRefreshResult(normalizedItemIds,`search_semantic_refresh_skipped:settings_read_failed:${readFailure}`);settings=settingsRead.settings}}catch(error){return buildSkippedSemanticRefreshResult(normalizedItemIds,`search_semantic_refresh_skipped:settings_read_failed:${toErrorMessage(error)}`)}const effectiveSettings=options.apply_runtime_defaults?resolveSettingsWithSemanticRuntimeDefaults(settings).settings:settings,provider=resolveEmbeddingProviders(effectiveSettings).active;if(!provider)return buildSkippedSemanticRefreshResult(normalizedItemIds,"search_semantic_refresh_skipped:provider_unconfigured");const vectorStore=resolveVectorStores(effectiveSettings,pmRoot).active;return vectorStore?{settings:effectiveSettings,provider,vectorStore}:buildSkippedSemanticRefreshResult(normalizedItemIds,"search_semantic_refresh_skipped:vector_store_unconfigured")}async function collectSemanticRefreshWorkload(pmRoot,idPrefix,preferredFormat,normalizedItemIds,typeToFolder,schema){const warnings=[],skipped=new Set,missing=new Set,documents=[];for(const itemId of normalizedItemIds){const located=await locateItem(pmRoot,itemId,idPrefix,preferredFormat,typeToFolder);if(!located){missing.add(itemId);continue}try{const loaded=await readLocatedItem(located,{schema});documents.push({id:loaded.document.metadata.id,document:loaded.document})}catch(error){skipped.add(located.id),warnings.push(`search_semantic_refresh_item_read_failed:${located.id}:${toErrorMessage(error)}`)}}return documents.sort((left,right)=>left.id.localeCompare(right.id)),{documents,missingIds:toUniqueSorted(missing),skippedIds:toUniqueSorted(skipped),warnings}}async function embedLocatedSemanticVectors(settings,provider,documents){const corpusCharacterLimit=resolveSemanticCorpusCharacterLimit(provider.name,settings.search.embedding_corpus_max_characters).maxCharacters,corpusFields=resolveSearchCorpusFields(settings),corpusInputs=documents.map(entry=>buildSemanticCorpusInput(entry.document,{providerName:provider.name,maxCharacters:corpusCharacterLimit,fields:corpusFields})),embeddingResult=await executeEmbeddingBatchesWithRetry(provider,settings,corpusInputs);return{vectors:embeddingResult.vectors,vector_dimension:inferConsistentVectorDimension(embeddingResult.vectors,"Semantic refresh embedding"),warnings:embeddingResult.warnings}}async function upsertLocatedSemanticVectors(vectorStore,documents,vectors){return await executeVectorUpsert(vectorStore,documents.map((entry,index)=>({id:entry.id,vector:vectors[index],payload:buildVectorPayload(entry.document.metadata)}))),{refreshed:documents.map(entry=>entry.id),skipped:[],warnings:[]}}async function resetSemanticVectorStore(vectorStore,ledgerEntries){try{return await executeVectorReset(vectorStore,Object.keys(ledgerEntries)),{refreshed:[],skipped:[],warnings:[]}}catch(error){return{refreshed:[],skipped:[],warnings:[`search_semantic_refresh_reset_failed:${toErrorMessage(error)}`]}}}async function pruneMissingSemanticVectors(vectorStore,missingIds){if(missingIds.length===0)return{refreshed:[],skipped:[],warnings:[]};try{return await executeVectorDelete(vectorStore,missingIds),{refreshed:[],skipped:[],warnings:[]}}catch(error){return{refreshed:[],skipped:missingIds,warnings:[`search_semantic_refresh_delete_failed:${toErrorMessage(error)}`]}}}async function invalidateSearchCacheArtifacts(pmRoot){const invalidated=[],warnings=[];for(const relativePath of SEARCH_CACHE_ARTIFACT_PATHS){const artifactPath=path.join(pmRoot,relativePath);try{if(!await pathExists(artifactPath))continue;await removeFileIfExists(artifactPath),invalidated.push(relativePath)}catch(error){warnings.push(formatInvalidationWarning(relativePath,error))}}return{invalidated,warnings}}async function refreshSemanticEmbeddingsForMutatedItems(pmRoot,itemIds,options={}){const normalizedItemIds=toUniqueSorted(itemIds);if(normalizedItemIds.length===0)return{refreshed:[],skipped:[],warnings:[]};const runtimeContext=await resolveSemanticRefreshRuntimeContext(pmRoot,normalizedItemIds,options);if(!("settings"in runtimeContext))return runtimeContext;const typeRegistry=resolveItemTypeRegistry(runtimeContext.settings,getActiveExtensionRegistrations()),workload=await collectSemanticRefreshWorkload(pmRoot,runtimeContext.settings.id_prefix,runtimeContext.settings.item_format,normalizedItemIds,typeRegistry.type_to_folder,runtimeContext.settings.schema),ledgerRead=workload.documents.length>0||workload.missingIds.length>0?await readVectorizationStatusLedger(pmRoot):{entries:{},embedding:null,warnings:[]},embeddingIdentity=buildVectorizationIdentityForProvider(runtimeContext.provider),nextLedgerBaseEntries=ledgerRead.entries;let refreshedResult={refreshed:[],skipped:[],warnings:[]},nextEmbeddingMetadata=ledgerRead.embedding;if(workload.documents.length>0)if(ledgerRead.embedding&&hasVectorizationEmbeddingIdentityChanged(ledgerRead.embedding,embeddingIdentity))refreshedResult={refreshed:[],skipped:workload.documents.map(entry=>entry.id),warnings:["search_semantic_refresh_requires_reindex:embedding_identity_changed"]};else try{const embedded=await embedLocatedSemanticVectors(runtimeContext.settings,runtimeContext.provider,workload.documents);if(hasVectorizationVectorDimensionChanged(ledgerRead.embedding,embedded.vector_dimension))refreshedResult={refreshed:[],skipped:workload.documents.map(entry=>entry.id),warnings:[...embedded.warnings,"search_semantic_refresh_requires_reindex:vector_dimension_changed"]};else{nextEmbeddingMetadata=buildVectorizationEmbeddingMetadata(embeddingIdentity,embedded.vector_dimension);const upserted=await upsertLocatedSemanticVectors(runtimeContext.vectorStore,workload.documents,embedded.vectors);refreshedResult={refreshed:upserted.refreshed,skipped:upserted.skipped,warnings:[...embedded.warnings,...upserted.warnings]}}}catch(error){refreshedResult={refreshed:[],skipped:workload.documents.map(entry=>entry.id),warnings:[`search_semantic_refresh_failed:${toErrorMessage(error)}`]}}const pruneResult=await pruneMissingSemanticVectors(runtimeContext.vectorStore,workload.missingIds),refreshedIdSet=new Set(refreshedResult.refreshed),refreshedEntries=Object.fromEntries(workload.documents.filter(entry=>refreshedIdSet.has(entry.id)).map(entry=>[entry.id,entry.document.metadata.updated_at])),ledgerWarnings=[];if(Object.keys(refreshedEntries).length>0||workload.missingIds.length>0){const nextEntries={...nextLedgerBaseEntries,...normalizeVectorizationLedgerEntries(refreshedEntries)};for(const missingId of workload.missingIds)delete nextEntries[missingId];try{await writeVectorizationStatusLedger(pmRoot,nextEntries,nextEmbeddingMetadata)}catch(error){ledgerWarnings.push(`search_vectorization_status_ledger_write_failed:${toErrorMessage(error)}`)}ledgerWarnings.push(...ledgerRead.warnings)}return{refreshed:toUniqueSorted([...refreshedResult.refreshed,...pruneResult.refreshed]),skipped:toUniqueSorted([...workload.skippedIds,...refreshedResult.skipped,...pruneResult.skipped]),warnings:[...workload.warnings,...refreshedResult.warnings,...pruneResult.warnings,...ledgerWarnings]}}function isSemanticRefreshActive(settings,applyRuntimeDefaults){const effectiveSettings=applyRuntimeDefaults?resolveSettingsWithSemanticRuntimeDefaults(settings).settings:settings;return!!(resolveEmbeddingProviders(effectiveSettings).active&&resolveVectorStores(effectiveSettings).active)}async function refreshSearchArtifactsForMutation(pmRoot,itemIds,options={}){const invalidation=await invalidateSearchCacheArtifacts(pmRoot),normalizedItemIds=toUniqueSorted(itemIds);if(normalizedItemIds.length===0)return{invalidated:invalidation.invalidated,refreshed:[],skipped:[],warnings:invalidation.warnings};if(!await pathExists(getSettingsPath(pmRoot))){const semanticRefresh2=await refreshSemanticEmbeddingsForMutatedItems(pmRoot,normalizedItemIds);return{invalidated:invalidation.invalidated,refreshed:semanticRefresh2.refreshed,skipped:semanticRefresh2.skipped,warnings:[...invalidation.warnings,...semanticRefresh2.warnings]}}let settings;try{const settingsRead=await readSettingsWithMetadata(pmRoot),readFailure=settingsRead.warnings.find(warning=>warning.startsWith("settings_read_"));if(readFailure)return{invalidated:invalidation.invalidated,refreshed:[],skipped:normalizedItemIds,warnings:[...invalidation.warnings,`search_semantic_refresh_skipped:settings_read_failed:${readFailure}`]};settings=settingsRead.settings}catch(error){return{invalidated:invalidation.invalidated,refreshed:[],skipped:normalizedItemIds,warnings:[...invalidation.warnings,`search_semantic_refresh_skipped:settings_read_failed:${toErrorMessage(error)}`]}}if(settings.search.mutation_refresh_policy==="cache_only")return{invalidated:invalidation.invalidated,refreshed:[],skipped:normalizedItemIds,warnings:invalidation.warnings};const applyRuntimeDefaults=settings.search.mutation_refresh_policy==="semantic_auto";if(options.background&&isSemanticRefreshActive(settings,applyRuntimeDefaults))return await scheduleBackgroundSemanticRefresh(pmRoot,normalizedItemIds),{invalidated:invalidation.invalidated,refreshed:[],skipped:[],warnings:[...invalidation.warnings,"search_semantic_refresh_scheduled_background"],scheduled:!0};const semanticRefresh=await refreshSemanticEmbeddingsForMutatedItems(pmRoot,normalizedItemIds,{settings,apply_runtime_defaults:applyRuntimeDefaults});return{invalidated:invalidation.invalidated,refreshed:semanticRefresh.refreshed,skipped:semanticRefresh.skipped,warnings:[...invalidation.warnings,...semanticRefresh.warnings]}}const _testOnly={buildSkippedSemanticRefreshResult,buildVectorizationIdentityForProvider,normalizeVectorizationLedgerEntries,resetSemanticVectorStore};export{SEARCH_CACHE_ARTIFACT_PATHS,VECTORIZATION_STATUS_LEDGER_PATH,_testOnly,invalidateSearchCacheArtifacts,isSemanticRefreshActive,readVectorizationStatusLedger,refreshSearchArtifactsForMutation,refreshSemanticEmbeddingsForMutatedItems,writeVectorizationStatusLedger};
|
|
1
|
+
import v from"node:path";import{getActiveExtensionRegistrations as $}from"../extensions/index.js";import{pathExists as y,readFileIfExists as F,removeFileIfExists as O,writeFileAtomic as L}from"../fs/fs-utils.js";import{resolveItemTypeRegistry as M}from"../item/type-registry.js";import{toErrorMessage as p}from"../shared/primitives.js";import{locateItem as P,readLocatedItem as T}from"../store/item-store.js";import{getSettingsPath as S}from"../store/paths.js";import{readSettingsWithMetadata as x}from"../store/settings.js";import{executeEmbeddingBatchesWithRetry as W}from"./embedding-batches.js";import{buildSemanticCorpusInput as D,resolveSearchCorpusFields as N,resolveSemanticCorpusCharacterLimit as U}from"./corpus.js";import{resolveEmbeddingProviders as E}from"./providers.js";import{resolveSettingsWithSemanticRuntimeDefaults as C}from"./semantic-defaults.js";import{scheduleBackgroundSemanticRefresh as B}from"./background-refresh.js";import{executeVectorDelete as H,executeVectorReset as q,executeVectorUpsert as J,resolveVectorStores as I}from"./vector-stores.js";import{buildVectorizationEmbeddingIdentity as G,buildVectorizationEmbeddingMetadata as Z,hasVectorizationEmbeddingIdentityChanged as K,hasVectorizationVectorDimensionChanged as Q,inferConsistentVectorDimension as X,normalizeVectorizationEmbeddingMetadata as Y}from"./vectorization-metadata.js";import{nowIso as ee}from"../shared/time.js";const te=["index/manifest.json","search/embeddings.jsonl"],V="search/vectorization-status.json";function re(e,r){return`search_cache_invalidation_failed:${e}:${String(r)}`}function h(e){return[...new Set([...e].map(r=>r.trim()).filter(r=>r.length>0))].sort((r,i)=>r.localeCompare(i))}function z(e){return typeof e=="string"&&e.trim().length>0&&Number.isFinite(Date.parse(e))}function b(e){const r=new Map;for(const[i,t]of Object.entries(e)){const n=i.trim();n.length===0||!z(t)||r.set(n,t)}return Object.fromEntries([...r.entries()].sort((i,t)=>i[0].localeCompare(t[0])))}async function ne(e){const r=v.join(e,V),i=await F(r);if(i===null||i.trim().length===0)return{entries:{},embedding:null,warnings:[]};let t;try{t=JSON.parse(i)}catch{return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]}}if(typeof t!="object"||t===null||t.version!==1||!Array.isArray(t.items))return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};const n=new Map;for(const s of t.items){if(typeof s!="object"||s===null)return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};const a=s.id,o=s.updated_at;if(typeof a!="string"||a.trim().length===0||!z(o))return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]};n.set(a.trim(),o)}let d=null;try{d=Y(t.embedding)}catch{return{entries:{},embedding:null,warnings:["search_vectorization_status_ledger_invalid"]}}return{entries:Object.fromEntries([...n.entries()].sort((s,a)=>s[0].localeCompare(a[0]))),embedding:d,warnings:[]}}async function ie(e,r,i){const t=b(r),n=v.join(e,V),d=`${JSON.stringify({version:1,generated_at:ee(),...i?{embedding:i}:{},items:Object.entries(t).map(([s,a])=>({id:s,updated_at:a}))},null,2)}
|
|
2
|
+
`;await L(n,d)}function se(e){return{id:e.id,type:e.type,status:e.status,priority:e.priority,updated_at:e.updated_at}}function A(e){const r=G(e.name,e.model);if(!r)throw new Error("Embedding provider must include a provider name and model");return r}function _(e,r){return{refreshed:[],skipped:e,warnings:[r]}}async function ae(e,r,i){if(!i.settings&&!await y(S(e)))return _(r,"search_semantic_refresh_skipped:settings_not_initialized");let t;try{if(i.settings)t=i.settings;else{const a=await x(e),o=a.warnings.find(m=>m.startsWith("settings_read_"));if(o)return _(r,`search_semantic_refresh_skipped:settings_read_failed:${o}`);t=a.settings}}catch(a){return _(r,`search_semantic_refresh_skipped:settings_read_failed:${p(a)}`)}const n=i.apply_runtime_defaults?C(t).settings:t,d=E(n).active;if(!d)return _(r,"search_semantic_refresh_skipped:provider_unconfigured");const s=I(n,e).active;return s?{settings:n,provider:d,vectorStore:s}:_(r,"search_semantic_refresh_skipped:vector_store_unconfigured")}async function de(e,r,i,t,n,d){const s=[],a=new Set,o=new Set,m=[];for(const f of t){const l=await P(e,f,r,i,n);if(!l){o.add(f);continue}try{const g=await T(l,{schema:d});m.push({id:g.document.metadata.id,document:g.document})}catch(g){a.add(l.id),s.push(`search_semantic_refresh_item_read_failed:${l.id}:${p(g)}`)}}return m.sort((f,l)=>f.id.localeCompare(l.id)),{documents:m,missingIds:h(o),skippedIds:h(a),warnings:s}}async function oe(e,r,i){const t=U(r.name,e.search.embedding_corpus_max_characters).maxCharacters,n=N(e),d=i.map(a=>D(a.document,{providerName:r.name,maxCharacters:t,fields:n})),s=await W(r,e,d);return{vectors:s.vectors,vector_dimension:X(s.vectors,"Semantic refresh embedding"),warnings:s.warnings}}async function ce(e,r,i){return await J(e,r.map((t,n)=>({id:t.id,vector:i[n],payload:se(t.document.metadata)}))),{refreshed:r.map(t=>t.id),skipped:[],warnings:[]}}async function fe(e,r){try{return await q(e,Object.keys(r)),{refreshed:[],skipped:[],warnings:[]}}catch(i){return{refreshed:[],skipped:[],warnings:[`search_semantic_refresh_reset_failed:${p(i)}`]}}}async function ue(e,r){if(r.length===0)return{refreshed:[],skipped:[],warnings:[]};try{return await H(e,r),{refreshed:[],skipped:[],warnings:[]}}catch(i){return{refreshed:[],skipped:r,warnings:[`search_semantic_refresh_delete_failed:${p(i)}`]}}}async function me(e){const r=[],i=[];for(const t of te){const n=v.join(e,t);try{if(!await y(n))continue;await O(n),r.push(t)}catch(d){i.push(re(t,d))}}return{invalidated:r,warnings:i}}async function R(e,r,i={}){const t=h(r);if(t.length===0)return{refreshed:[],skipped:[],warnings:[]};const n=await ae(e,t,i);if(!("settings"in n))return n;const d=M(n.settings,$()),s=await de(e,n.settings.id_prefix,n.settings.item_format,t,d.type_to_folder,n.settings.schema),a=s.documents.length>0||s.missingIds.length>0?await ne(e):{entries:{},embedding:null,warnings:[]},o=A(n.provider),m=a.entries;let f={refreshed:[],skipped:[],warnings:[]},l=a.embedding;if(s.documents.length>0)if(a.embedding&&K(a.embedding,o))f={refreshed:[],skipped:s.documents.map(c=>c.id),warnings:["search_semantic_refresh_requires_reindex:embedding_identity_changed"]};else try{const c=await oe(n.settings,n.provider,s.documents);if(Q(a.embedding,c.vector_dimension))f={refreshed:[],skipped:s.documents.map(u=>u.id),warnings:[...c.warnings,"search_semantic_refresh_requires_reindex:vector_dimension_changed"]};else{l=Z(o,c.vector_dimension);const u=await ce(n.vectorStore,s.documents,c.vectors);f={refreshed:u.refreshed,skipped:u.skipped,warnings:[...c.warnings,...u.warnings]}}}catch(c){f={refreshed:[],skipped:s.documents.map(u=>u.id),warnings:[`search_semantic_refresh_failed:${p(c)}`]}}const g=await ue(n.vectorStore,s.missingIds),j=new Set(f.refreshed),k=Object.fromEntries(s.documents.filter(c=>j.has(c.id)).map(c=>[c.id,c.document.metadata.updated_at])),w=[];if(Object.keys(k).length>0||s.missingIds.length>0){const c={...m,...b(k)};for(const u of s.missingIds)delete c[u];try{await ie(e,c,l)}catch(u){w.push(`search_vectorization_status_ledger_write_failed:${p(u)}`)}w.push(...a.warnings)}return{refreshed:h([...f.refreshed,...g.refreshed]),skipped:h([...s.skippedIds,...f.skipped,...g.skipped]),warnings:[...s.warnings,...f.warnings,...g.warnings,...w]}}function le(e,r){const i=r?C(e).settings:e;return!!(E(i).active&&I(i).active)}async function Ae(e,r,i={}){const t=await me(e),n=h(r);if(n.length===0)return{invalidated:t.invalidated,refreshed:[],skipped:[],warnings:t.warnings};if(!await y(S(e))){const o=await R(e,n);return{invalidated:t.invalidated,refreshed:o.refreshed,skipped:o.skipped,warnings:[...t.warnings,...o.warnings]}}let d;try{const o=await x(e),m=o.warnings.find(f=>f.startsWith("settings_read_"));if(m)return{invalidated:t.invalidated,refreshed:[],skipped:n,warnings:[...t.warnings,`search_semantic_refresh_skipped:settings_read_failed:${m}`]};d=o.settings}catch(o){return{invalidated:t.invalidated,refreshed:[],skipped:n,warnings:[...t.warnings,`search_semantic_refresh_skipped:settings_read_failed:${p(o)}`]}}if(d.search.mutation_refresh_policy==="cache_only")return{invalidated:t.invalidated,refreshed:[],skipped:n,warnings:t.warnings};const s=d.search.mutation_refresh_policy==="semantic_auto";if(i.background&&le(d,s))return await B(e,n),{invalidated:t.invalidated,refreshed:[],skipped:[],warnings:[...t.warnings,"search_semantic_refresh_scheduled_background"],scheduled:!0};const a=await R(e,n,{settings:d,apply_runtime_defaults:s});return{invalidated:t.invalidated,refreshed:a.refreshed,skipped:a.skipped,warnings:[...t.warnings,...a.warnings]}}const Re={buildSkippedSemanticRefreshResult:_,buildVectorizationIdentityForProvider:A,normalizeVectorizationLedgerEntries:b,resetSemanticVectorStore:fe};export{te as SEARCH_CACHE_ARTIFACT_PATHS,V as VECTORIZATION_STATUS_LEDGER_PATH,Re as _testOnly,me as invalidateSearchCacheArtifacts,le as isSemanticRefreshActive,ne as readVectorizationStatusLedger,Ae as refreshSearchArtifactsForMutation,R as refreshSemanticEmbeddingsForMutatedItems,ie as writeVectorizationStatusLedger};
|
|
3
3
|
//# sourceMappingURL=cache.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{coercePositiveInteger as _}from"../shared/primitives.js";const c=["title","description","tags","status","type","priority","assignee","parent","goal","value","why_now","risk","confidence","estimated_minutes","acceptance_criteria","resolution","expected_result","actual_result","body","comments","notes","learnings","reminders","events","dependencies","plan"];function I(e){const t=e?.search?.corpus_fields;if(!Array.isArray(t))return[...c];const a=new Set(c),r=Array.from(new Set(t.filter(o=>typeof o=="string").map(o=>o.trim()).filter(o=>o.length>0&&a.has(o))));return r.length>0?r:[...c]}const f=8e3,m=3200,l="...[semantic corpus truncated]",h="search_embedding_corpus_max_characters_invalid:using_provider_default";function s(e){return e.map(t=>t==null?"":String(t).trim()).filter(t=>t.length>0).join(" ")}function x(e){return(e.reminders??[]).map(t=>s([t.at,t.text]))}function C(e){return(e.events??[]).map(t=>s([t.start_at,t.end_at,t.title,t.description,t.location,t.all_day===!0?"all day":void 0,t.timezone,t.recurrence?.freq,t.recurrence?.interval,t.recurrence?.count,t.recurrence?.until,t.recurrence?.by_weekday?.join(" "),t.recurrence?.by_month_day?.join(" "),t.recurrence?.exdates?.join(" ")]))}function g(e,t){e.push(t.title,t.body,t.status,t.owner,t.evidence,t.blocked_reason,t.superseded_by);for(const a of t.linked_items??[])e.push(`${a.kind} ${a.id}`,a.note);for(const a of t.files??[])e.push(a.path,a.note);for(const a of t.tests??[])e.push(a.command,a.path,a.note);for(const a of t.docs??[])e.push(a.path,a.note)}function S(e,t){for(const a of t.plan_decisions??[])e.push(a.decision,a.rationale,a.evidence);for(const a of t.plan_discoveries??[])e.push(a.text);for(const a of t.plan_validation??[])e.push(a.text,a.command,a.expected)}function P(e){const t=[];t.push(e.plan_mode,e.plan_scope,e.plan_harness,e.plan_resume_context);for(const a of e.plan_steps??[])g(t,a);return S(t,e),t.filter(a=>typeof a=="string"&&a.length>0).join(" ")}function y(e){const t=(e.plan_steps??[]).map(n=>s([n.order,n.id,n.title,n.body,n.status,n.owner,n.evidence,n.blocked_reason,n.superseded_by,(n.linked_items??[]).map(i=>s([i.kind,i.id,i.note])).join(" "),(n.files??[]).map(i=>s([i.path,i.note])).join(" "),(n.tests??[]).map(i=>s([i.command,i.path,i.note])).join(" "),(n.docs??[]).map(i=>s([i.path,i.note])).join(" ")])),a=(e.plan_decisions??[]).map(n=>s([n.decision,n.rationale,n.evidence,n.step_id])),r=(e.plan_discoveries??[]).map(n=>s([n.text,n.step_id])),o=(e.plan_validation??[]).map(n=>s([n.text,n.command,n.expected]));if([e.plan_mode,e.plan_scope,e.plan_harness,e.plan_resume_context,...t,...a,...r,...o].some(n=>n!==void 0))return{mode:e.plan_mode,scope:e.plan_scope,harness:e.plan_harness,resume_context:e.plan_resume_context,steps:t,decisions:a,discoveries:r,validation:o}}function p(e){return(e??[]).flatMap(t=>Object.prototype.toString.call(t)==="[object Object]"&&typeof t.text=="string"?[t.text]:[])}function d(e){return typeof e=="string"&&e.trim().length>0}const b={title:e=>e.metadata.title,description:e=>e.metadata.description,tags:e=>e.metadata.tags,status:e=>e.metadata.status,type:e=>e.metadata.type,priority:e=>typeof e.metadata.priority=="number"?e.metadata.priority:void 0,assignee:e=>d(e.metadata.assignee)?e.metadata.assignee:void 0,parent:e=>d(e.metadata.parent)?e.metadata.parent:void 0,goal:e=>d(e.metadata.goal)?e.metadata.goal:void 0,value:e=>d(e.metadata.value)?e.metadata.value:void 0,why_now:e=>d(e.metadata.why_now)?e.metadata.why_now:void 0,risk:e=>d(e.metadata.risk)?e.metadata.risk:void 0,confidence:e=>e.metadata.confidence!==void 0&&e.metadata.confidence!==null?e.metadata.confidence:void 0,estimated_minutes:e=>typeof e.metadata.estimated_minutes=="number"?e.metadata.estimated_minutes:void 0,acceptance_criteria:e=>d(e.metadata.acceptance_criteria)?e.metadata.acceptance_criteria:void 0,resolution:e=>d(e.metadata.resolution)?e.metadata.resolution:void 0,expected_result:e=>d(e.metadata.expected_result)?e.metadata.expected_result:void 0,actual_result:e=>d(e.metadata.actual_result)?e.metadata.actual_result:void 0,body:e=>e.body,comments:e=>p(e.metadata.comments),notes:e=>p(e.metadata.notes),learnings:e=>p(e.metadata.learnings),reminders:e=>x(e.metadata),events:e=>C(e.metadata),dependencies:e=>(e.metadata.dependencies??[]).map(t=>({id:t.id,kind:t.kind})),plan:e=>y(e.metadata)};function A(e,t={}){const a=t.fields??c,r={};for(const o of a){const u=b[o];if(!u)continue;const n=u(e);n!==void 0&&(r[o]=n)}return r}function R(e){return e?.trim().toLowerCase()==="ollama"?m:f}function w(e,t){const a=R(e),r=_(t);return r!==null?{maxCharacters:r,warning:null}:{maxCharacters:a,warning:t==null?null:h}}function k(e,t={}){const a=JSON.stringify(A(e,{fields:t.fields})),r=w(t.providerName,t.maxCharacters).maxCharacters;if(a.length<=r)return a;if(r<=l.length)return l.slice(0,r);const o=Math.max(0,r-l.length);return`${a.slice(0,o)}${l}`}export{c as DEFAULT_SEARCH_CORPUS_FIELDS,f as DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS,m as OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS,h as SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING,l as SEMANTIC_CORPUS_TRUNCATION_SUFFIX,C as buildEventCorpus,y as buildPlanCorpus,P as buildPlanFlatCorpus,x as buildReminderCorpus,A as buildSearchCorpus,k as buildSemanticCorpusInput,I as resolveSearchCorpusFields,w as resolveSemanticCorpusCharacterLimit,R as resolveSemanticCorpusInputCharacterLimit};
|
|
2
2
|
//# sourceMappingURL=corpus.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{executeEmbeddingRequest as w}from"./providers.js";import{SearchHttpError as x}from"./http-client.js";import{toErrorMessage as b}from"../shared/primitives.js";import{SEMANTIC_CORPUS_TRUNCATION_SUFFIX as $,resolveSemanticCorpusCharacterLimit as E}from"./corpus.js";function z(e,t,a){const r=e.search.embedding_batch_size,i=e.search.embedding_timeout_ms,n=e.search.scanner_max_batch_retries,s=Number.isFinite(r)&&r>0?Math.max(1,Math.floor(r)):1,o=Number.isFinite(i)&&i>0?Math.max(1,Math.floor(i)):3e4,c=Number.isFinite(n)&&n>=0?Math.floor(n):0;return{batchSize:s,timeoutMs:o,maxRetries:c,maxRequestBytes:a,maxInputCharacters:t}}function B(e,t,a,r){const i=[];let n=[];const s=Buffer.byteLength(JSON.stringify({model:e.model,input:[]}));let o=s;for(const c of t){const h=Buffer.byteLength(JSON.stringify(c.trim()));if(s+h>r)throw new RangeError(`Embedding input exceeds request byte ceiling ${r}; lower search.embedding_corpus_max_characters or raise maxRequestBytes`);const m=n.length>0?1:0;(n.length>=a||o+m+h>r)&&(i.push(n),n=[],o=s),o+=h+(n.length>0?1:0),n.push(c)}return i.push(n),i}function R(e,t){if(!Number.isFinite(t)||t<=0||e.length<=t)return e;const a=Math.max(0,t-$.length);return`${e.slice(0,a)}${$}`.slice(0,t)}function y(e){const t=b(e).toLowerCase();return t.includes("timed out")||t.includes("timeout")}function S(e,t,a,r,i,n){const s=`Embedding batch ${t} failed after ${i} attempt(s): ${b(n)}`,o=`provider=${e.name} model=${e.model} batch_size=${a} timeout_ms=${r}`;return y(n)?`${s} (${o}; guidance=check provider availability or lower search.embedding_batch_size, raise search.embedding_timeout_ms, or run keyword search while semantic indexing catches up)`:`${s} (${o})`}function M(e){return e instanceof x?e.status===413?"payload_too_large":null:y(e)?"timeout":null}async function p(e,t,a,r,i,n,s){let o=null;for(let c=0;c<=i;c+=1)try{s.requests+=1;const h=await w(e,t,{timeout_ms:r});return c>0&&n.push(`search_embedding_batch_retry_succeeded:batch=${a}:attempt=${c+1}:size=${t.length}`),s.successful_batches+=1,s.batch_size_histogram[t.length]=(s.batch_size_histogram[t.length]??0)+1,h}catch(h){o=h;const m=M(h);if(m!==null&&t.length>1){s.split_batches+=1;const d=Math.ceil(t.length/2),u=t.slice(0,d),g=t.slice(d);return n.push(`search_embedding_batch_split_after_${m}:batch=${a}:size=${t.length}:parts=${u.length}|${g.length}`),[...await p(e,u,`${a}.1`,r,i,n,s),...await p(e,g,`${a}.2`,r,i,n,s)]}if(c<i){s.retries+=1;const d=Math.min(1e3*2**c,8e3);await new Promise(u=>setTimeout(u,d))}}throw new Error(S(e,a,t.length,r,i+1,o))}async function I(e,t,a,r={}){if(a.length===0)return{vectors:[],warnings:[]};const i=performance.now(),n=r.maxRequestBytes??262144;if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("maxRequestBytes must be a positive safe integer");const s={provider:e.name,model:e.model,max_request_bytes:n,limit_source:r.maxRequestBytes===void 0?"default":"caller",planned_batches:0,requests:0,successful_batches:0,split_batches:0,retries:0,batch_size_histogram:{},elapsed_ms:0,inputs_per_second:0},o=[],c=E(e.name,t.search.embedding_corpus_max_characters);c.warning&&o.push(c.warning);const h=z(t,c.maxCharacters,n);let m=0;const d=a.map(l=>{if(l.trim().length===0)throw new TypeError("Embedding inputs must be non-empty strings");const _=R(l,h.maxInputCharacters);return _.length<l.length&&(m+=1),_});m>0&&o.push(`search_embedding_input_truncated:count=${m}:max_characters=${h.maxInputCharacters}`);const u=B(e,d,h.batchSize,h.maxRequestBytes);s.planned_batches=u.length;const g=[];let f=0;for(let l=0;l<u.length;l+=1){const _=u[l];r.onProgress?.({batch_index:l+1,batch_total:u.length,batch_size:_.length,completed_inputs:f,total_inputs:d.length,phase:"start"}),g.push(...await p(e,_,String(l+1),h.timeoutMs,h.maxRetries,o,s)),f+=_.length,r.onProgress?.({batch_index:l+1,batch_total:u.length,batch_size:_.length,completed_inputs:f,total_inputs:d.length,phase:"complete"})}return s.elapsed_ms=Math.max(1,performance.now()-i),s.inputs_per_second=a.length*1e3/s.elapsed_ms,{vectors:g,warnings:o,receipt:s}}export{I as executeEmbeddingBatchesWithRetry};
|
|
2
2
|
//# sourceMappingURL=embedding-batches.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const c=["ndcg","mrr","precision","recall"];function m(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Eval minimum must be an object of metric floors");const t={};for(const[o,r]of Object.entries(e)){if(!c.some(i=>i===o))throw new TypeError(`Unknown eval minimum metric: ${o}`);if(typeof r!="number"||!Number.isFinite(r)||r<0||r>1)throw new TypeError(`Eval minimum.${o} must be a finite number in [0, 1]`);t[o]=r}return t}function f(e,t){const o=m(t),r=[];for(const i of c){const s=o[i];if(s===void 0)continue;const n=e[i];!Number.isFinite(n)||n<0||n>1?r.push(`${i}:invalid`):n<s&&r.push(`${i}:${n}<${s}`)}return r}export{c as EVAL_METRIC_NAMES,f as evaluateMetricFloors,m as parseEvalMetricFloors};
|
|
2
2
|
//# sourceMappingURL=eval-thresholds.js.map
|
package/dist/core/search/eval.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{parseEvalMetricFloors as y}from"./eval-thresholds.js";const v=10,a="https://schema.unbrained.dev/pm/eval-query-set/v1",q={schema:a,accepted_top_level:["array","object"],required_query_fields:["query","relevant_ids"],optional_fields:["mode","description","minimum"],modes:["keyword","semantic","hybrid"]},A={schema:a,queries:[{query:"offline search",relevant_ids:["pm-75k9"],mode:"keyword"}]};class s extends Error{constructor(r){super(r),this.name="EvalQuerySetError"}}const d=new Set(["keyword","semantic","hybrid"]);function l(t,r){let e=0;const i=Math.min(r,t.length);for(let n=0;n<i;n+=1)e+=t[n]/Math.log2(n+2);return e}function p(t,r,e){if(r.size===0)return 0;const i=t.map(m=>r.has(m)?1:0),n=l(i,e),o=Array.from({length:r.size},()=>1),u=l(o,e);return u===0?0:n/u}function f(t,r,e){const i=Math.min(e,t.length);for(let n=0;n<i;n+=1)if(r.has(t[n]))return 1/(n+1);return 0}function c(t,r,e){const i=Math.min(e,t.length);let n=0;for(let o=0;o<i;o+=1)r.has(t[o])&&(n+=1);return n}function h(t,r,e){return e<=0?0:c(t,r,e)/e}function g(t,r,e){return r.size===0?0:c(t,r,e)/r.size}function x(t,r,e){return{ndcg:p(t,r,e),mrr:f(t,r,e),precision:h(t,r,e),recall:g(t,r,e),relevant_total:r.size,retrieved_relevant:c(t,r,e)}}function w(t){const r=t.length;if(r===0)return{ndcg:0,mrr:0,precision:0,recall:0,query_count:0};const e=t.reduce((i,n)=>({ndcg:i.ndcg+n.ndcg,mrr:i.mrr+n.mrr,precision:i.precision+n.precision,recall:i.recall+n.recall}),{ndcg:0,mrr:0,precision:0,recall:0});return{ndcg:e.ndcg/r,mrr:e.mrr/r,precision:e.precision/r,recall:e.recall/r,query_count:r}}function E(t,r){if(typeof t!="object"||t===null)throw new s(`Eval query at index ${r} must be an object`);const e=t,i=typeof e.query=="string"?e.query.trim():"";if(i.length===0)throw new s(`Eval query at index ${r} must have a non-empty "query" string`);if(!Array.isArray(e.relevant_ids))throw new s(`Eval query at index ${r} must have a "relevant_ids" array`);if(e.relevant_ids.some(o=>typeof o!="string"))throw new s(`Eval query at index ${r} must have a "relevant_ids" array of strings`);const n=[...new Set(e.relevant_ids.map(o=>o.trim()).filter(o=>o.length>0))];if(n.length===0)throw new s(`Eval query at index ${r} must list at least one relevant id`);if(e.mode!==void 0&&(typeof e.mode!="string"||!d.has(e.mode)))throw new s(`Eval query at index ${r} has an invalid mode (expected keyword|semantic|hybrid)`);return{query:i,relevant_ids:n,...e.minimum===void 0?{}:{minimum:y(e.minimum)},...e.mode!==void 0?{mode:e.mode}:{},...typeof e.description=="string"&&e.description.trim().length>0?{description:e.description.trim()}:{}}}function b(t){const r=typeof t=="object"&&t!==null&&!Array.isArray(t)?t.schema:void 0;if(r!==void 0&&r!==a)throw new s(`Unsupported eval query set schema; expected "${a}"`);const e=Array.isArray(t)?t:typeof t=="object"&&t!==null?t.queries:void 0;if(!Array.isArray(e))throw new s('Eval query set must be an array of queries or an object with a "queries" array');if(e.length===0)throw new s("Eval query set must contain at least one query");return{schema:a,queries:e.map((i,n)=>E(i,n))}}export{v as DEFAULT_EVAL_K,q as EVAL_QUERY_SET_CONTRACT,A as EVAL_QUERY_SET_EXAMPLE,a as EVAL_QUERY_SET_SCHEMA_ID,s as EvalQuerySetError,w as aggregateEvalMetrics,l as dcgAtK,x as evaluateRanking,p as ndcgAtK,b as parseEvalQuerySet,h as precisionAtK,g as recallAtK,f as reciprocalRankAtK};
|
|
2
2
|
//# sourceMappingURL=eval.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{toErrorMessage as s}from"../shared/primitives.js";const i=3e4;class c extends Error{status;constructor(t,a){super(t),this.name="SearchHttpError",this.status=a}}function h(e,t,a=i){const r=e??a;if(!Number.isFinite(r)||r<=0)throw new Error(`${t} timeout must be a positive finite number`);return Math.floor(r)}function f(e,t){if(e)return e;if(typeof globalThis.fetch=="function")return globalThis.fetch.bind(globalThis);throw new Error(`${t} execution requires a fetch implementation`)}async function u(e){try{return(await e.text()).replaceAll(/\s+/g," ").trim()}catch(t){return`(failed to read response body: ${s(t)})`}}async function d(e){const t=new AbortController,a=setTimeout(()=>{t.abort()},e.timeoutMs);try{let r;try{r=await e.fetcher(e.endpoint,{method:e.method,headers:e.headers,body:JSON.stringify(e.body),signal:t.signal})}catch(o){throw o instanceof Error&&o.name==="AbortError"?new Error(`${e.requestLabel} timed out after ${e.timeoutMs}ms`):new Error(`${e.requestLabel} execution failed: ${s(o)}`)}if(!r.ok){const o=await u(r),n=o.length>0?`: ${o}`:"";throw new c(`${e.requestLabel} failed with status ${r.status} ${r.statusText}${n}`,r.status)}try{return await r.json()}catch(o){throw new Error(`${e.responseLabel} JSON parse failed: ${s(o)}`)}}finally{clearTimeout(a)}}export{c as SearchHttpError,d as executeSearchJsonRequest,h as normalizeSearchHttpTimeoutMs,u as readFailedSearchHttpResponseBody,f as resolveSearchHttpFetcher};
|
|
2
2
|
//# sourceMappingURL=http-client.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{executeSearchJsonRequest as h,normalizeSearchHttpTimeoutMs as y,resolveSearchHttpFetcher as E}from"./http-client.js";import{isFiniteNumberArray as l,toNonEmptyString as a,trimTrailingSlashes as c}from"../shared/primitives.js";function S(e,n){const r=a(e);if(!r)return"unconfigured";const t=a(n);return t&&t.toLowerCase()===r.toLowerCase()?"configured":"auto-detected"}function x(e){const n=c(e),r=n.toLowerCase();return r.endsWith("/embeddings")?n:r.endsWith("/v1")?`${n}/embeddings`:`${n}/v1/embeddings`}function p(e){const n=e.search?.embedding_model;return a(n)||null}function v(e){const n=a(e.providers?.openai?.base_url),r=a(e.providers?.openai?.model);if(!n||!r)return null;const t=p(e),o=a(e.providers?.openai?.api_key);return{name:"openai",base_url:n,model:t??r,...o?{api_key:o}:{}}}function I(e){const n=a(e.providers?.ollama?.base_url),r=a(e.providers?.ollama?.model);if(!n||!r)return null;const t=p(e);return{name:"ollama",base_url:n,model:t??r}}function g(e){const n=(Array.isArray(e)?e:[e]).map(r=>r.trim()).filter(r=>r.length>0);if(n.length===0)throw new Error("Embedding input must include at least one non-empty string");return n}function w(e){const n=[],r=[],t=new Map;for(const o of e){const i=t.get(o);if(i===void 0){const d=n.length;n.push(o),t.set(o,d),r.push(d);continue}r.push(i)}return{uniqueInputs:n,originalToUniqueIndex:r}}function q(e){const n=e.map((t,o)=>({embedding:t.embedding,index:t.index,position:o}));if(n.some(t=>t.index!==void 0)){for(const t of n)if(!Number.isInteger(t.index))throw new TypeError(`OpenAI embedding response entry at position ${t.position} is missing a valid integer index`);return[...n].sort((t,o)=>{const i=t.index-o.index;return i!==0?i:t.position-o.position})}return n}function $(e){const n=v(e),r=I(e),t=[n,r].filter(s=>s!==null),o=a(e.search?.provider),i=o?o.toLowerCase():null;return{active:(i?t.find(s=>s.name===i):void 0)??t[0]??null,available:t}}function b(e){const n=c(e.base_url);return e.name==="openai"?{provider:"openai",endpoint:x(n),model:e.model}:{provider:"ollama",endpoint:`${n}/api/embed`,model:e.model}}function A(e,n){const r=g(n);return e.name==="openai"?{target:b(e),method:"POST",headers:{"content-type":"application/json",...e.api_key?{authorization:`Bearer ${e.api_key}`}:{}},body:{model:e.model,input:r.length===1?r[0]:r}}:{target:b(e),method:"POST",headers:{"content-type":"application/json"},body:{model:e.model,input:r}}}function O(e,n){if(e.name==="openai"){const o=n.data;if(!Array.isArray(o)||o.length===0)throw new Error("OpenAI embedding response must include a non-empty data array");return q(o).map((d,s)=>{const u=d.embedding;if(!l(u))throw new Error(`OpenAI embedding response entry at index ${s} is missing a numeric embedding vector`);return[...u]})}const r=n.embedding;if(l(r))return[[...r]];const t=n.embeddings;if(Array.isArray(t)&&t.length>0)return t.map((o,i)=>{if(!l(o))throw new Error(`Ollama embedding response entry at index ${i} is missing a numeric embedding vector`);return[...o]});throw new Error("Ollama embedding response must include embedding or embeddings vectors")}async function P(e,n,r={}){const t=y(r.timeout_ms,"Embedding request"),o=E(r.fetcher,"Embedding request"),i=g(n),d=w(i),s=A(e,d.uniqueInputs),u=await h({endpoint:s.target.endpoint,method:s.method,headers:s.headers,body:s.body,timeoutMs:t,fetcher:o,requestLabel:"Embedding request",responseLabel:"Embedding response"}),m=O(e,u);if(m.length!==d.uniqueInputs.length)throw new Error(`Embedding response cardinality mismatch: expected ${d.uniqueInputs.length} vector(s), received ${m.length}`);return d.originalToUniqueIndex.map(f=>[...m[f]])}export{A as buildEmbeddingRequestPlan,P as executeEmbeddingRequest,O as normalizeEmbeddingResponse,$ as resolveEmbeddingProviders,b as resolveEmbeddingRequestTarget,S as resolveProviderConfigSource};
|
|
2
2
|
//# sourceMappingURL=providers.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{coercePositiveInteger as A,toNonEmptyString as a}from"../shared/primitives.js";import{tokenizeAlphaNumeric as E}from"../shared/text-normalization.js";import{executeEmbeddingRequest as _}from"./providers.js";const l=4,b=20,z=200,N=new Set(["a","an","and","for","from","in","into","of","on","or","the","to","with"]);function m(n,e){const t=[],o=new Set;for(const r of n){const i=r.trim().replaceAll(/\s+/g," ");if(i.length===0)continue;const s=i.toLowerCase();if(!o.has(s)&&(o.add(s),t.push(i),t.length>=e))break}return t}function M(n){const e=n.toLowerCase();return e.length>4&&e.endsWith("ies")?`${e.slice(0,-3)}y`:e.length>4&&(e.endsWith("ches")||e.endsWith("shes")||e.endsWith("xes")||e.endsWith("zes")||e.endsWith("sses"))?e.slice(0,-2):e.length>3&&e.endsWith("s")&&!e.endsWith("ss")&&!e.endsWith("us")&&!e.endsWith("is")&&!e.endsWith("as")?e.slice(0,-1):e}function k(n){const e=n.toLowerCase();return e.length>2&&(!e.endsWith("s")||e.endsWith("ss"))?e.endsWith("y")&&!/[aeiou]y$/u.test(e)?`${e.slice(0,-1)}ies`:e.endsWith("ch")||e.endsWith("sh")||e.endsWith("x")||e.endsWith("z")||e.endsWith("ss")?`${e}es`:`${e}s`:e}function q(n,e=l){const t=n.trim().replaceAll(/\s+/g," ");if(t.length===0)return[];const o=E(t);if(o.length===0)return[t];const r=o.filter(c=>!N.has(c.toLowerCase())),i=o.map(c=>M(c)),s=r.map(c=>k(c));return m([t,o.join(" "),r.join(" "),i.join(" "),s.join(" ")],Math.max(1,e))}function K(n){const e=Array.isArray(n)?n:n?.queries;return Array.isArray(e)?m(e.filter(t=>typeof t=="string"),l):[]}function P(n,e,t){return m([...n,...e],Math.max(1,t))}function C(n,e){const o=n.search?.query_expansion,r=a(o?.provider);return{enabled:o?.enabled===!0,provider:r??e,max_queries:l}}function O(n,e){const o=n.search?.rerank,r=a(o?.model),s=A(o?.top_k)??b;return{enabled:o?.enabled===!0,model:r??e,top_k:Math.min(z,s)}}function F(n){const e=Array.isArray(n)?n:n?.hits;if(!Array.isArray(e))return[];const t=new Map;for(const r of e){if(typeof r!="object"||r===null)continue;const i=a(r.id),s=r.score;if(!i||typeof s!="number"||!Number.isFinite(s))continue;const c=t.get(i);(c===void 0||s>c)&&t.set(i,s)}const o=[...t.entries()].map(([r,i])=>({id:r,score:i}));return o.sort((r,i)=>r.score!==i.score?i.score-r.score:r.id.localeCompare(i.id)),o}function S(n,e){const t=n.length;let o=0;for(let r=0;r<t;r+=1)o+=n[r]*e[r];return o}function y(n){let e=0;for(let t=0;t<n.length;t+=1)e+=n[t]*n[t];return Math.sqrt(e)}function w(n,e,t){if(!n||!e||n.length===0||e.length===0||n.length!==e.length)return 0;const o=S(n,e),r=y(e),i=t*r;return!Number.isFinite(o)||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(i)||i===0?0:Math.max(-1,Math.min(1,o/i))}async function L(n,e,t,o,r){if(o.length===0)return new Map;const i=a(e)??n.model,s=i===n.model?n:{...n,model:i},c=[t.trim(),...o.map(u=>u.text)],h=await _(s,c,r?{timeout_ms:r}:{}),d=h[0];if(!d)return new Map;const g=y(d),f=new Map;for(let u=0;u<o.length;u+=1){const x=o[u],p=h[u+1];if(!p)continue;const W=w(d,p,g);f.set(x.id,Math.max(0,Math.min(1,(W+1)/2)))}return f}export{l as DEFAULT_QUERY_EXPANSION_MAX_QUERIES,b as DEFAULT_RERANK_TOP_K,q as buildDeterministicQueryExpansions,P as mergeQueryExpansions,K as normalizeQueryExpansionOutput,F as normalizeRerankOutput,L as rerankCandidatesWithEmbeddings,C as resolveQueryExpansionConfig,O as resolveRerankConfig};
|
|
2
2
|
//# sourceMappingURL=relevance.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{spawnSync as i}from"node:child_process";import{toNonEmptyString as s}from"../shared/primitives.js";const u="PM_DISABLE_OLLAMA_AUTO_DEFAULTS",c="PM_OLLAMA_MODEL",m="http://localhost:11434",f="qwen3-embedding:0.6b",_=".agents/pm/search/lancedb/",p=1500,M=2500,b=/qwen.*(?:embed|embedding)|(?:embed|embedding).*qwen/i,E=/embed|embedding/i,a=s;function A(){const e=a(process.env[u]);if(!e)return!1;const o=e.toLowerCase();return o==="1"||o==="true"||o==="yes"}function d(e){return e.some(o=>a(o)!==null)}function L(e){const o=a(e);return!!(o&&o.toLowerCase()!=="ollama")}function D(e){const o=a(e);return!!(o&&o.toLowerCase()!=="lancedb")}function v(e){return L(e.search?.provider)||D(e.vector_store?.adapter)||d([e.providers?.openai?.base_url,e.providers?.openai?.model,e.providers?.openai?.api_key])?!0:d([e.vector_store?.qdrant?.url,e.vector_store?.qdrant?.api_key])}function g(){const e=i("ollama",["--version"],{encoding:"utf8",timeout:p});return e.error?!1:e.status===0}function h(e){const o=e.split(/\r?\n/).map(r=>r.trim()).filter(r=>r.length>0);if(o.length===0)return null;const n=o.map(r=>r.split(/\s+/)[0]?.trim()).filter(r=>!!(r&&r.length>0)).filter(r=>r.toUpperCase()!=="NAME");if(n.length===0)return null;const t=n.find(r=>b.test(r));return t||(n.find(r=>E.test(r))??null)}function O(e){const o=a(e.providers?.ollama?.model);if(o)return o;const n=a(process.env[c]);if(n)return n;const t=i("ollama",["list"],{encoding:"utf8",timeout:M});if(!t.error&&t.status===0){const l=h(typeof t.stdout=="string"?t.stdout:"");if(l)return l}return null}function S(e){return{baseUrl:a(e.providers?.ollama?.base_url)===null,model:a(e.providers?.ollama?.model)===null,lancedbPath:a(e.vector_store?.lancedb?.path)===null,embeddingModel:a(e.search?.embedding_model)===null}}function T(e){return e.baseUrl||e.model||e.lancedbPath||e.embeddingModel}function N(e,o,n){if(!o.baseUrl&&!o.model)return;const t=e.providers??={},l=t.ollama??={};o.baseUrl&&(l.base_url=m),o.model&&(l.model=n)}function U(e,o){if(!o.lancedbPath)return;const n=e.vector_store??={},t=n.lancedb??={};t.path=_}function y(e,o,n){if(!o.embeddingModel)return;const t=e.search??={};t.embedding_model=n}function I(e){const o={settings:e,auto_ollama_defaults_applied:!1};if(A()||v(e))return o;const n=S(e);if(!T(n)||n.model&&!g())return o;const t=structuredClone(e),l=O(t);return l?(N(t,n,l),U(t,n),y(t,n,l),{settings:t,auto_ollama_defaults_applied:!0}):{...o,auto_ollama_defaults_skipped_reason:"no_installed_embedding_model",auto_ollama_defaults_remediation:`Run ollama pull ${f} or configure providers.ollama.model explicitly (and search.embedding_model if you need an override).`}}export{I as resolveSettingsWithSemanticRuntimeDefaults};
|
|
2
2
|
//# sourceMappingURL=semantic-defaults.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function o(r,a){const d=a??{};return r.filter(t=>d[t.id]!==t.updated_at).map(t=>t.id).sort((t,e)=>t.localeCompare(e))}export{o as collectStaleVectorizationIds};
|
|
2
2
|
//# sourceMappingURL=staleness.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4f917418-051d-5458-9080-fa23cd36c4d1")}catch{}})();import{mkdir,readFile,stat,unlink}from"node:fs/promises";import{basename,dirname,isAbsolute,join,resolve}from"node:path";import{executeSearchJsonRequest,normalizeSearchHttpTimeoutMs,resolveSearchHttpFetcher}from"./http-client.js";import{isFiniteNumberArray,toErrorMessage,toNonEmptyString,trimTrailingSlashes}from"../shared/primitives.js";import{isFileMissingError,writeFileAtomic}from"../fs/fs-utils.js";const DEFAULT_COLLECTION="pm_items",COLLECTION_SANITIZE_PATTERN=/[^a-zA-Z0-9_-]/g,MAX_COLLECTION_NAME_LENGTH=128,LANCE_DB_LOCAL_SNAPSHOT_DIR=".pm-cli-local-vectors",LANCE_DB_LOCAL_SNAPSHOT_VERSION=1,lanceDbLocalTables=new Map;function resolveStoreCollectionName(store){return(toNonEmptyString(store.collection_name)??DEFAULT_COLLECTION).replaceAll(COLLECTION_SANITIZE_PATTERN,"_").slice(0,MAX_COLLECTION_NAME_LENGTH)}function normalizeVector(value){if(!isFiniteNumberArray(value)||value.length===0)throw new Error("Vector values must be a non-empty numeric array");return[...value]}function normalizeLimit(value){if(!Number.isFinite(value)||value<=0)throw new Error("Vector query limit must be a positive number");return Math.floor(value)}function normalizeQdrantQueryResponse(payload){const result=payload.result;if(!Array.isArray(result))throw new TypeError("Qdrant query response must include a result array");const hits=result.map((entry,index)=>{const idValue=entry.id,idCandidate=typeof idValue=="number"?String(idValue):idValue,id=toNonEmptyString(idCandidate);if(!id)throw new Error(`Qdrant query response entry at index ${index} is missing a non-empty id`);const score=entry.score;if(typeof score!="number"||!Number.isFinite(score))throw new TypeError(`Qdrant query response entry at index ${index} is missing a finite numeric score`);const payloadValue=entry.payload;if(payloadValue!==void 0&&(typeof payloadValue!="object"||payloadValue===null||Array.isArray(payloadValue)))throw new Error(`Qdrant query response entry at index ${index} must provide payload as an object when set`);return{id,score,...payloadValue?{payload:payloadValue}:{}}});return hits.sort((left,right)=>left.score!==right.score?right.score-left.score:left.id.localeCompare(right.id)),hits}function normalizeQdrantUpsertResponse(payload){const nestedStatus=toNonEmptyString(payload.result?.status);if(nestedStatus)return{status:nestedStatus};const topLevelStatus=toNonEmptyString(payload.status);if(topLevelStatus)return{status:topLevelStatus};throw new Error("Qdrant upsert response must include status metadata")}async function executeRemoteVectorPlan(endpoint,plan,timeoutMs,fetcher,requestKind){return await executeSearchJsonRequest({endpoint,method:plan.method,headers:plan.headers,body:plan.body,timeoutMs,fetcher,requestLabel:`Vector ${requestKind} request`,responseLabel:`Vector ${requestKind} response`})}function resolveQdrantStore(settings){const url=toNonEmptyString(settings.vector_store?.qdrant?.url);if(!url)return null;const collectionName=toNonEmptyString(settings.vector_store?.collection_name),apiKey=toNonEmptyString(settings.vector_store?.qdrant?.api_key);return{name:"qdrant",url,...collectionName&&collectionName!==DEFAULT_COLLECTION?{collection_name:collectionName}:{},...apiKey?{api_key:apiKey}:{}}}function resolveWorkspaceRootFromPmRoot(pmRoot){const resolved=resolve(pmRoot),parent=dirname(resolved);return basename(resolved)==="pm"&&basename(parent)===".agents"?dirname(parent):resolved}function anchorLanceDbStorePath(storePath,pmRoot){return!pmRoot||isAbsolute(storePath)?storePath:resolve(resolveWorkspaceRootFromPmRoot(pmRoot),storePath)}function resolveLanceDbStore(settings,pmRoot){const lancedbPath=toNonEmptyString(settings.vector_store?.lancedb?.path);if(!lancedbPath)return null;const collectionName=toNonEmptyString(settings.vector_store?.collection_name);return{name:"lancedb",path:anchorLanceDbStorePath(lancedbPath,pmRoot),...collectionName&&collectionName!==DEFAULT_COLLECTION?{collection_name:collectionName}:{}}}function normalizeVectorRecords(records){if(!Array.isArray(records)||records.length===0)throw new Error("Vector upsert records must include at least one entry");return records.map((record,index)=>{const id=toNonEmptyString(record.id);if(!id)throw new Error(`Vector upsert record at index ${index} is missing a non-empty id`);const vector=normalizeVector(record.vector),payload=record.payload;if(payload!==void 0&&(typeof payload!="object"||payload===null||Array.isArray(payload)))throw new Error(`Vector upsert record at index ${index} must provide payload as an object when set`);return{id,vector,...payload?{payload}:{}}})}function normalizeVectorDeleteIds(ids){if(!Array.isArray(ids)||ids.length===0)throw new Error("Vector delete ids must include at least one entry");const normalizedIds=ids.map((id,index)=>{const normalized=toNonEmptyString(id);if(!normalized)throw new Error(`Vector delete id at index ${index} is missing a non-empty value`);return normalized}).sort((left,right)=>left.localeCompare(right)),uniqueIds=[];for(const id of normalizedIds)uniqueIds.at(-1)!==id&&uniqueIds.push(id);return uniqueIds}function resolveQdrantDeleteTarget(upsertTarget){return upsertTarget.replace(/\/points\?wait=true$/,"/points/delete?wait=true")}function resolveQdrantCollectionTarget(upsertTarget){return upsertTarget.replace(/\/points\?wait=true$/,"")}function buildQdrantJsonHeaders(store){return{"content-type":"application/json",...store.api_key?{"api-key":store.api_key}:{}}}function getLanceDbLocalTableKey(storePath,table){return getLanceDbSnapshotPath(storePath,table)}function getLanceDbSnapshotPath(storePath,table){return join(resolve(storePath),LANCE_DB_LOCAL_SNAPSHOT_DIR,`${table}.json`)}function normalizeSnapshotRecord(entry,index,snapshotPath){const id=toNonEmptyString(entry.id);if(!id)throw new Error(`LanceDB local snapshot '${snapshotPath}' record at index ${index} is missing a non-empty id`);const vector=normalizeVector(entry.vector),payload=entry.payload;if(payload!==void 0&&(typeof payload!="object"||payload===null||Array.isArray(payload)))throw new Error(`LanceDB local snapshot '${snapshotPath}' record '${id}' must provide payload as an object when set`);return{id,vector,...payload?{payload}:{}}}function parseLanceDbSnapshot(snapshotPath,expectedTable,raw){let parsed;try{parsed=JSON.parse(raw)}catch(error){throw new Error(`LanceDB local snapshot at '${snapshotPath}' is not valid JSON: ${toErrorMessage(error)}`)}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(`LanceDB local snapshot at '${snapshotPath}' must be a JSON object`);if(parsed.version!==LANCE_DB_LOCAL_SNAPSHOT_VERSION)throw new Error(`LanceDB local snapshot at '${snapshotPath}' must include version=${LANCE_DB_LOCAL_SNAPSHOT_VERSION}`);const table=toNonEmptyString(parsed.table);if(!table)throw new Error(`LanceDB local snapshot at '${snapshotPath}' must include a non-empty table value`);if(table!==expectedTable)throw new Error(`LanceDB local snapshot at '${snapshotPath}' table mismatch: expected '${expectedTable}', received '${table}'`);const recordsValue=parsed.records;if(!Array.isArray(recordsValue))throw new TypeError(`LanceDB local snapshot at '${snapshotPath}' must include a records array`);const tableRecords=new Map;for(let index=0;index<recordsValue.length;index+=1){const record=normalizeSnapshotRecord(recordsValue[index],index,snapshotPath);tableRecords.set(record.id,record)}return tableRecords}async function readLanceDbSnapshotStats(snapshotPath){try{const stats=await stat(snapshotPath);return{mtimeMs:stats.mtimeMs,size:stats.size}}catch(error){if(!isFileMissingError(error))throw error;return null}}function resolveMissingLanceDbSnapshotCache(key,cached){if(!cached)return null;if(cached.mtimeMs===null&&cached.size===null&&cached.records.size===0)return cached.records;const loaded=new Map;return lanceDbLocalTables.set(key,{records:loaded,mtimeMs:null,size:null}),loaded}function cachedLanceDbSnapshotMatches(cached,snapshotStats){return cached!==void 0&&snapshotStats!==null&&cached.mtimeMs===snapshotStats.mtimeMs&&cached.size===snapshotStats.size}async function loadLanceDbLocalTable(storePath,table){const key=getLanceDbLocalTableKey(storePath,table),snapshotPath=getLanceDbSnapshotPath(storePath,table),snapshotStats=await readLanceDbSnapshotStats(snapshotPath),cached=lanceDbLocalTables.get(key);if(!snapshotStats){const resolved=resolveMissingLanceDbSnapshotCache(key,cached);if(resolved)return resolved}if(cachedLanceDbSnapshotMatches(cached,snapshotStats))return cached.records;let loaded=new Map;try{const raw=await readFile(snapshotPath,"utf8");loaded=parseLanceDbSnapshot(snapshotPath,table,raw)}catch(error){if(!isFileMissingError(error))throw error}return lanceDbLocalTables.set(key,{records:loaded,mtimeMs:snapshotStats?.mtimeMs??null,size:snapshotStats?.size??null}),loaded}function buildSnapshotRecords(table){const records=[...table.values()];return records.sort((left,right)=>left.id.localeCompare(right.id)),records.map(record=>({id:record.id,vector:[...record.vector],...record.payload?{payload:record.payload}:{}}))}async function removeSnapshotFile(snapshotPath){try{await unlink(snapshotPath)}catch(error){if(!isFileMissingError(error))throw new Error(`LanceDB local snapshot delete failed at '${snapshotPath}': ${toErrorMessage(error)}`)}}async function persistLanceDbLocalTable(storePath,tableName,table){const snapshotPath=getLanceDbSnapshotPath(storePath,tableName);if(table.size===0){await removeSnapshotFile(snapshotPath);return}const snapshotDir=dirname(snapshotPath);try{await mkdir(snapshotDir,{recursive:!0})}catch(error){throw new Error(`LanceDB local snapshot directory create failed at '${snapshotDir}': ${toErrorMessage(error)}`)}const serialized=`${JSON.stringify({version:LANCE_DB_LOCAL_SNAPSHOT_VERSION,table:tableName,records:buildSnapshotRecords(table)})}
|
|
2
|
-
`;try{await
|
|
1
|
+
import{mkdir as P,readFile as j,stat as z,unlink as F}from"node:fs/promises";import{basename as k,dirname as D,isAbsolute as U,join as H,resolve as C}from"node:path";import{executeSearchJsonRequest as J,normalizeSearchHttpTimeoutMs as _,resolveSearchHttpFetcher as S}from"./http-client.js";import{isFiniteNumberArray as K,toErrorMessage as b,toNonEmptyString as d,trimTrailingSlashes as Z}from"../shared/primitives.js";import{isFileMissingError as T,writeFileAtomic as G}from"../fs/fs-utils.js";const M="pm_items",W=/[^a-zA-Z0-9_-]/g,X=128,Y=".pm-cli-local-vectors",N=1,h=new Map;function L(e){return(d(e.collection_name)??M).replaceAll(W,"_").slice(0,X)}function g(e){if(!K(e)||e.length===0)throw new Error("Vector values must be a non-empty numeric array");return[...e]}function R(e){if(!Number.isFinite(e)||e<=0)throw new Error("Vector query limit must be a positive number");return Math.floor(e)}function ee(e){const t=e.result;if(!Array.isArray(t))throw new TypeError("Qdrant query response must include a result array");const o=t.map((r,a)=>{const n=r.id,i=typeof n=="number"?String(n):n,c=d(i);if(!c)throw new Error(`Qdrant query response entry at index ${a} is missing a non-empty id`);const s=r.score;if(typeof s!="number"||!Number.isFinite(s))throw new TypeError(`Qdrant query response entry at index ${a} is missing a finite numeric score`);const l=r.payload;if(l!==void 0&&(typeof l!="object"||l===null||Array.isArray(l)))throw new Error(`Qdrant query response entry at index ${a} must provide payload as an object when set`);return{id:c,score:s,...l?{payload:l}:{}}});return o.sort((r,a)=>r.score!==a.score?a.score-r.score:r.id.localeCompare(a.id)),o}function O(e){const t=d(e.result?.status);if(t)return{status:t};const o=d(e.status);if(o)return{status:o};throw new Error("Qdrant upsert response must include status metadata")}async function v(e,t,o,r,a){return await J({endpoint:e,method:t.method,headers:t.headers,body:t.body,timeoutMs:o,fetcher:r,requestLabel:`Vector ${a} request`,responseLabel:`Vector ${a} response`})}function te(e){const t=d(e.vector_store?.qdrant?.url);if(!t)return null;const o=d(e.vector_store?.collection_name),r=d(e.vector_store?.qdrant?.api_key);return{name:"qdrant",url:t,...o&&o!==M?{collection_name:o}:{},...r?{api_key:r}:{}}}function re(e){const t=C(e),o=D(t);return k(t)==="pm"&&k(o)===".agents"?D(o):t}function oe(e,t){return!t||U(e)?e:C(re(t),e)}function ne(e,t){const o=d(e.vector_store?.lancedb?.path);if(!o)return null;const r=d(e.vector_store?.collection_name);return{name:"lancedb",path:oe(o,t),...r&&r!==M?{collection_name:r}:{}}}function ae(e){if(!Array.isArray(e)||e.length===0)throw new Error("Vector upsert records must include at least one entry");return e.map((t,o)=>{const r=d(t.id);if(!r)throw new Error(`Vector upsert record at index ${o} is missing a non-empty id`);const a=g(t.vector),n=t.payload;if(n!==void 0&&(typeof n!="object"||n===null||Array.isArray(n)))throw new Error(`Vector upsert record at index ${o} must provide payload as an object when set`);return{id:r,vector:a,...n?{payload:n}:{}}})}function se(e){if(!Array.isArray(e)||e.length===0)throw new Error("Vector delete ids must include at least one entry");const t=e.map((r,a)=>{const n=d(r);if(!n)throw new Error(`Vector delete id at index ${a} is missing a non-empty value`);return n}).sort((r,a)=>r.localeCompare(a)),o=[];for(const r of t)o.at(-1)!==r&&o.push(r);return o}function ce(e){return e.replace(/\/points\?wait=true$/,"/points/delete?wait=true")}function ie(e){return e.replace(/\/points\?wait=true$/,"")}function $(e){return{"content-type":"application/json",...e.api_key?{"api-key":e.api_key}:{}}}function E(e,t){return w(e,t)}function w(e,t){return H(C(e),Y,`${t}.json`)}function le(e,t,o){const r=d(e.id);if(!r)throw new Error(`LanceDB local snapshot '${o}' record at index ${t} is missing a non-empty id`);const a=g(e.vector),n=e.payload;if(n!==void 0&&(typeof n!="object"||n===null||Array.isArray(n)))throw new Error(`LanceDB local snapshot '${o}' record '${r}' must provide payload as an object when set`);return{id:r,vector:a,...n?{payload:n}:{}}}function ue(e,t,o){let r;try{r=JSON.parse(o)}catch(s){throw new Error(`LanceDB local snapshot at '${e}' is not valid JSON: ${b(s)}`)}if(typeof r!="object"||r===null||Array.isArray(r))throw new Error(`LanceDB local snapshot at '${e}' must be a JSON object`);if(r.version!==N)throw new Error(`LanceDB local snapshot at '${e}' must include version=${N}`);const n=d(r.table);if(!n)throw new Error(`LanceDB local snapshot at '${e}' must include a non-empty table value`);if(n!==t)throw new Error(`LanceDB local snapshot at '${e}' table mismatch: expected '${t}', received '${n}'`);const i=r.records;if(!Array.isArray(i))throw new TypeError(`LanceDB local snapshot at '${e}' must include a records array`);const c=new Map;for(let s=0;s<i.length;s+=1){const l=le(i[s],s,e);c.set(l.id,l)}return c}async function de(e){try{const t=await z(e);return{mtimeMs:t.mtimeMs,size:t.size}}catch(t){if(!T(t))throw t;return null}}function me(e,t){if(!t)return null;if(t.mtimeMs===null&&t.size===null&&t.records.size===0)return t.records;const o=new Map;return h.set(e,{records:o,mtimeMs:null,size:null}),o}function pe(e,t){return e!==void 0&&t!==null&&e.mtimeMs===t.mtimeMs&&e.size===t.size}async function x(e,t){const o=E(e,t),r=w(e,t),a=await de(r),n=h.get(o);if(!a){const c=me(o,n);if(c)return c}if(pe(n,a))return n.records;let i=new Map;try{const c=await j(r,"utf8");i=ue(r,t,c)}catch(c){if(!T(c))throw c}return h.set(o,{records:i,mtimeMs:a?.mtimeMs??null,size:a?.size??null}),i}function fe(e){const t=[...e.values()];return t.sort((o,r)=>o.id.localeCompare(r.id)),t.map(o=>({id:o.id,vector:[...o.vector],...o.payload?{payload:o.payload}:{}}))}async function B(e){try{await F(e)}catch(t){if(!T(t))throw new Error(`LanceDB local snapshot delete failed at '${e}': ${b(t)}`)}}async function I(e,t,o){const r=w(e,t);if(o.size===0){await B(r);return}const a=D(r);try{await P(a,{recursive:!0})}catch(i){throw new Error(`LanceDB local snapshot directory create failed at '${a}': ${b(i)}`)}const n=`${JSON.stringify({version:N,table:t,records:fe(o)})}
|
|
2
|
+
`;try{await G(r,n)}catch(i){throw new Error(`LanceDB local snapshot write failed at '${r}': ${b(i)}`)}}async function he(e,t){const o=E(e,t),r=w(e,t);await B(r),h.delete(o)}function Q(e){let t=0;for(let o=0;o<e.length;o+=1)t+=e[o]*e[o];return Math.sqrt(t)}function ye(e,t){let o=0;for(let n=0;n<e.length;n+=1)o+=e[n]*t[n];const r=Q(e),a=Q(t);return r===0||a===0?0:o/(r*a)}function Ae(e,t){const o=te(e),r=ne(e,t),a=[o,r].filter(s=>s!==null),n=d(e.vector_store?.adapter),i=n?n.toLowerCase():null;return{active:(i?a.find(s=>s.name===i):void 0)??a[0]??null,available:a}}function A(e){const t=L(e);if(e.name==="qdrant"){const a=Z(e.url),n=encodeURIComponent(t);return{store:"qdrant",query_target:`${a}/collections/${n}/points/search`,upsert_target:`${a}/collections/${n}/points?wait=true`}}const o=encodeURIComponent(e.path),r=encodeURIComponent(t);return{store:"lancedb",query_target:`lancedb://${o}#${r}`,upsert_target:`lancedb://${o}#${r}`}}function we(e,t,o){const r=A(e),a=g(t),n=R(o);return e.name==="qdrant"?{target:r,method:"POST",headers:$(e),body:{vector:a,limit:n,with_payload:!0}}:{target:r,method:"LOCAL",headers:{},body:{table:L(e),vector:a,limit:n}}}function be(e,t){const o=A(e),r=ae(t);return e.name==="qdrant"?{target:o,method:"POST",headers:$(e),body:{points:r}}:{target:o,method:"LOCAL",headers:{},body:{table:L(e),records:r}}}function Le(e,t){const o=A(e),r=se(t);return e.name==="qdrant"?{target:o,method:"POST",headers:$(e),body:{points:r}}:{target:o,method:"LOCAL",headers:{},body:{table:L(e),ids:r}}}async function Ve(e,t,o,r={}){const a=we(e,t,o);if(a.method==="LOCAL"){const s=e,l=a.body,u=await x(s.path,l.table);if(u.size===0)return[];const m=g(l.vector),f=R(l.limit),y=[];let V=0;for(const p of u.values()){if(p.vector.length!==m.length){V++;continue}y.push({id:p.id,score:ye(m,p.vector),...p.payload?{payload:p.payload}:{}})}return V>0&&r.warnings&&r.warnings.push(`vector_dimension_mismatch:${V} records skipped (expected ${m.length} dimensions)`),y.sort((p,q)=>p.score!==q.score?q.score-p.score:p.id.localeCompare(q.id)),y.slice(0,f)}const n=_(r.timeout_ms,"Vector request"),i=S(r.fetcher,"Vector request"),c=await v(a.target.query_target,{method:"POST",headers:a.headers,body:a.body},n,i,"query");return ee(c)}async function qe(e,t,o={}){const r=be(e,t);if(r.method==="LOCAL"){const c=e,s=r.body,l=E(c.path,s.table),u=await x(c.path,s.table);for(const y of s.records)u.set(y.id,y);await I(c.path,s.table,u);const m=w(c.path,s.table),f=await z(m);return h.set(l,{records:u,mtimeMs:f.mtimeMs,size:f.size}),{status:"ok"}}const a=_(o.timeout_ms,"Vector request"),n=S(o.fetcher,"Vector request"),i=await v(r.target.upsert_target,{method:"POST",headers:r.headers,body:r.body},a,n,"upsert");return O(i)}async function ve(e,t,o={}){const r=Le(e,t);if(r.method==="LOCAL"){const c=e,s=r.body,l=E(c.path,s.table),u=await x(c.path,s.table);if(u.size===0)return{status:"ok"};for(const m of s.ids)u.delete(m);if(await I(c.path,s.table,u),u.size===0)h.delete(l);else{const m=w(c.path,s.table),f=await z(m);h.set(l,{records:u,mtimeMs:f.mtimeMs,size:f.size})}return{status:"ok"}}const a=_(o.timeout_ms,"Vector request"),n=S(o.fetcher,"Vector request"),i=await v(ce(r.target.upsert_target),{method:"POST",headers:r.headers,body:r.body},a,n,"delete");return O(i)}async function ze(e,t=[],o={},r){if(e.name==="lancedb")return await he(e.path,L(e)),{status:"ok"};if(r!==void 0){if(!Number.isInteger(r)||r<=0)throw new Error("Vector reset dimension must be a positive integer when provided");const n=A(e),i=ie(n.upsert_target),c=_(o.timeout_ms,"Vector request"),s=S(o.fetcher,"Vector request"),l=$(e);try{await v(i,{method:"DELETE",headers:l,body:{}},c,s,"delete")}catch(m){if(!b(m).includes("failed with status 404"))throw m}const u=await v(i,{method:"PUT",headers:l,body:{vectors:{size:r,distance:"Cosine"}}},c,s,"upsert");return O(u)}const a=t.map(n=>n.trim()).filter(n=>n.length>0);return a.length===0?{status:"ok"}:await ve(e,a,o)}export{Le as buildVectorDeletePlan,we as buildVectorQueryPlan,be as buildVectorUpsertPlan,ve as executeVectorDelete,Ve as executeVectorQuery,ze as executeVectorReset,qe as executeVectorUpsert,A as resolveVectorStoreRequestTarget,Ae as resolveVectorStores};
|
|
3
3
|
//# sourceMappingURL=vector-stores.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{toNonEmptyString as i}from"../shared/primitives.js";function d(e,r){const n=i(e),o=i(r);return!n||!o?null:{provider:n,model:o}}function c(e){if(e==null)return null;if(typeof e!="object"||Array.isArray(e))throw new Error("Vectorization embedding metadata must be an object when set");const r=d(e.provider,e.model),n=e.vector_dimension;if(!r||typeof n!="number"||!Number.isInteger(n)||n<=0)throw new Error("Vectorization embedding metadata must include provider, model, and positive vector_dimension");return{...r,vector_dimension:n}}function s(e,r){if(!Number.isInteger(r)||r<=0)throw new Error("Vectorization embedding metadata requires a positive vector dimension");return{provider:e.provider,model:e.model,vector_dimension:r}}function u(e,r){return!e||e.provider!==r.provider||e.model!==r.model}function a(e,r){return!!(e&&e.vector_dimension!==r)}function f(e,r){if(e.length===0)throw new Error(`${r} returned no vectors`);const o=e[0].length;if(!Number.isInteger(o)||o<=0)throw new Error(`${r} returned an empty vector`);for(let t=1;t<e.length;t+=1)if(e[t]?.length!==o)throw new Error(`${r} returned mixed vector dimensions`);return o}export{d as buildVectorizationEmbeddingIdentity,s as buildVectorizationEmbeddingMetadata,u as hasVectorizationEmbeddingIdentityChanged,a as hasVectorizationVectorDimensionChanged,f as inferConsistentVectorDimension,c as normalizeVectorizationEmbeddingMetadata};
|
|
2
2
|
//# sourceMappingURL=vectorization-metadata.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{getSentry as m}from"./instrument.js";import{PmCliError as p}from"../shared/errors.js";import{crashReportErrorContext as x}from"../shared/error-details.js";import{isPmCliExpectedError as a}from"../../sdk/errors.js";import{ExtensionCommandError as g}from"../../sdk/error-runtime.js";import{EXIT_CODE as _}from"../shared/constants.js";import{deriveTelemetryCommandResolution as l,deriveTelemetryCommandTaxonomy as f}from"../telemetry/observability.js";let s;function i(e,o,t){if(t===void 0)return;const n=e;typeof n.setAttribute=="function"&&n.setAttribute(o,t)}function u(e,o,t){typeof t=="string"&&t.trim().length>0&&e.setTag(o,t)}function y(e,o,t){e.setTag("pm.ok",o),e.setTag("pm.command_ok",o),typeof t?.exit_code=="number"&&(e.setTag("pm.exit_code",String(t.exit_code)),e.setTag("pm.command_exit_code",String(t.exit_code))),u(e,"pm.error_code",t?.error_code),u(e,"pm.error_category",t?.error_category),u(e,"pm.command_resolution",t?.command_resolution),u(e,"pm.resolution_stage",t?.resolution_stage)}function C(e,o,t,n){i(e,"pm.ok",o),i(e,"pm.command_ok",o),i(e,"pm.exit_code",t),i(e,"pm.command_exit_code",t),i(e,"pm.error_code",n?.error_code),i(e,"pm.error_category",n?.error_category),i(e,"pm.command_resolution",n?.command_resolution),i(e,"pm.resolution_stage",n?.resolution_stage)}function I(e,o,t,n){const r=m();if(!r)return;const c=f(e);r.setTag("pm.command",e),r.setTag("pm.command_root",c.command_root),r.setTag("pm.command_family",c.command_family),u(r,"pm.version",n?.pm_version),u(r,"pm.source_context_source",n?.source_context_source),r.setTag("pm.extension.name",n?.extension?.name),r.setTag("pm.extension.version",n?.extension?.version),r.setTag("pm.extension.layer",n?.extension?.layer),typeof n?.source_context=="string"&&n.source_context.trim().length>0&&(r.setTag("pm.source_context",n.source_context),r.setAttribute("pm.source_context",n.source_context));const d=o.map(()=>"[redacted]");r.setContext("pm.command",{name:e,root:c.command_root,leaf:c.command_leaf,family:c.command_family,args:d,option_keys:Object.keys(t).sort(),source_context:n?.source_context,source_context_source:n?.source_context_source}),r.addBreadcrumb({category:"pm.command",message:`pm ${e}`,level:"info",data:{args:d,command_root:c.command_root,command_family:c.command_family,source_context:n?.source_context}})}function k(e){const o=m();if(!o)return;const t=f(e);s=o.startInactiveSpan({op:"pm.command",name:`pm ${e}`,forceTransaction:!0,attributes:{"pm.command":e,"pm.command_root":t.command_root,"pm.command_family":t.command_family}})}function U(){s=void 0}function O(e,o,t){if(!s)return;const n=e?"true":"false",r=typeof t?.exit_code=="number"?String(t.exit_code):void 0,c=m();c&&y(c,n,t),C(s,n,r,t),s.setStatus(e?{code:1}:{code:2,message:o??"command_failed"}),s.end(),s=void 0}const E="unclassified_runtime_error";function S(e){const o=typeof e=="object"&&e!==null?e:void 0,t=typeof o?.exitCode=="number",n=t?Math.trunc(o?.exitCode):_.GENERIC_FAILURE;return{error_code:typeof o?.code=="string"&&o.code.length>0&&t?o?.code:E,exit_code:n}}function T(e){const o=S(e);return{"pm.error_code":o.error_code,"pm.exit_code":String(o.exit_code)}}function N(e){if(!b(e))return;const o=m();if(!o)return;const t=T(e);if(e instanceof Error){const n={};"exitCode"in e&&typeof e.exitCode=="number"&&(n.exit_code=e.exitCode),"context"in e&&typeof e.context=="object"&&(n.error_context=x(e.context)),o.captureException(e,{extra:n,tags:t})}else o.captureException(new Error(String(e)),{tags:t})}function j(e){const o=m();if(!o)return;const t=e.command_resolution??l({ok:!1,errorCode:e.error_code,errorCategory:e.error_category}),n=e.resolution_stage??"unknown",r={"pm.command":e.command,"pm.error_code":e.error_code,"pm.error_category":e.error_category,"pm.exit_code":e.exit_code,"pm.error_message":e.error_message,"pm.command_resolution":t,"pm.resolution_stage":n,"pm.source_context":e.source_context??""},c=o.logger;if(c&&typeof c.warn=="function"){c.warn("pm_cli_usage_error",r);return}o.captureMessage(`pm_cli_usage_error:${e.error_code}`,{level:"warning",tags:{"pm.command":e.command,"pm.error_code":e.error_code,"pm.error_category":e.error_category,"pm.exit_code":String(e.exit_code),"pm.command_resolution":t,"pm.resolution_stage":n,"pm.source_context":e.source_context??"unknown"},extra:r})}function b(e){if(e instanceof g)return!0;if(e instanceof p||a(e)||e instanceof Error&&e.name==="AbortError"&&/(?:ctrl\+[cd]|sigint|user[- ]initiated)/i.test(e.message))return!1;if(typeof e=="object"&&e!==null&&"exitCode"in e&&typeof e.exitCode=="number"){if(e instanceof Error&&e.name==="CommandError")return!1;const o=Math.trunc(e.exitCode);return!new Set([_.SUCCESS,_.USAGE,_.NOT_FOUND,_.CONFLICT]).has(o)}return!0}async function L(e=3e3){const o=m();if(o)try{await o.flush(e)}catch{}}export{E as UNCLASSIFIED_CAPTURED_ERROR_CODE,N as sentryCaptureCliError,U as sentryDiscardCommandSpan,O as sentryFinishCommandSpan,L as sentryFlush,j as sentryLogCliUsageError,I as sentrySetCommandContext,k as sentryStartCommandSpan,b as shouldCaptureCliError};
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|