@unbrained/pm-cli 2026.11.8 → 2026.11.10
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/CHANGELOG.md +31 -0
- package/dist/cli/error-guidance.js +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/public.d.ts +1 -1
- package/dist/cli/register-history-maintenance.js +2 -2
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-NKO42JMT.js → chunk-4AASUCHO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7GC6WIDR.js → chunk-4FLAKTZW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-5CAMQHEW.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-NH7QX2M2.js → chunk-7NAAW5EX.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BSJSGDA3.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-DOHZKPPC.js → chunk-CZETQYKO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YUTFMHSG.js → chunk-D727C4RO.js} +33 -33
- package/dist/cli-bundle/chunks/{chunk-XBUZENP4.js → chunk-EHDGHFMJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L5BU5FYN.js → chunk-F6FBGLR7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MKW5LGVQ.js → chunk-F7P2NZEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-7V6I6X4G.js → chunk-FYD6LSJA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-L4WWG2H6.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-S4IZIMAO.js → chunk-NNE63MSM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HESIRIVX.js → chunk-NZAFLDSH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z3LWNF7C.js → chunk-OJ2KEDUX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4BMPGUTG.js → chunk-T2MNRM3S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YGUUJHSR.js → chunk-TBBWPEF5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-C4MQFWCM.js → chunk-U7LILCUN.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-UFPLZ6LZ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-CP43BHX3.js → chunk-UL64P6MR.js} +29 -29
- package/dist/cli-bundle/chunks/chunk-WNEUWDUE.js +116 -0
- package/dist/cli-bundle/chunks/{chunk-RC6SSFOF.js → chunk-X7NM5HVQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LI2HP5OX.js → chunk-YSWD2NXB.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-M7KXLQXF.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-4N5P34GO.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-FJ3D66PV.js → mutation-admission-374UR7NI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-GXP77CX7.js → register-list-query-GSB7PP5P.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-XJ2DROUM.js → register-mutation-ZBF6ITYK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-O5LERXM7.js → register-operations-PWF6GOHE.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-4VOTYLL2.js → register-setup-QDZ2Y3CI.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-ZDJL3FGL.js → stage-67WGPKPH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Z2QWZRSL.js → chunk-2SQUWQP3.js} +18 -18
- package/dist/cli-bundle/focused-chunks/{chunk-P4EHEH4C.js → chunk-2Y4H4LIX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WPXMPGTY.js → chunk-3DWNH72D.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3K2MYE7R.js +26 -0
- package/dist/cli-bundle/focused-chunks/{chunk-LTPT5TE7.js → chunk-56MIAFEN.js} +20 -20
- package/dist/cli-bundle/focused-chunks/{chunk-3HFENALW.js → chunk-67M7E2Z3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6U5HP6L3.js → chunk-ALLOWZSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-I4YUZW3J.js → chunk-BE2GK2G7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNF2QTEZ.js → chunk-HTMQDNVC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UUVRYIKA.js → chunk-LWMPQRJT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-O7K3X4LH.js → chunk-LY3JXL25.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DIEBSC76.js → chunk-NZQYHPUN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5YPX3QKU.js → chunk-PAGW6A2X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QCHCEFTO.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4UOXVFJZ.js → chunk-QHGGO7SY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QK7FX4O5.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SZ2BKK3M.js → chunk-RFMKS7VD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-U7HWWEJ2.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-UIZVD36C.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ULTSMJYF.js → chunk-WJHDUON5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TSHRBPTI.js → chunk-WK773UVA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZBOCYFBE.js +82 -0
- package/dist/cli-bundle/focused-chunks/item-revision-XC4ZJ7MY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-Q2Z7DDCR.js → item-transaction-CVGK4RJP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-QWC6MLTZ.js → mutation-admission-N27D5H64.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-NKH5SKSZ.js → stage-KPK2UHVO.js} +2 -2
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- 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 +57 -57
- 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 +9 -9
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +12 -20
- package/dist/core/config/nested-settings.d.ts +14 -45
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/config/positional-value.d.ts +11 -14
- package/dist/core/config/positional-value.js +1 -1
- package/dist/core/extensions/activation-summary-markdown.d.ts +4 -5
- package/dist/core/extensions/activation-summary.d.ts +7 -15
- package/dist/core/extensions/capability-usage.d.ts +7 -23
- package/dist/core/extensions/command-hook-context.d.ts +4 -7
- package/dist/core/extensions/command-metadata-contract.d.ts +2 -2
- package/dist/core/extensions/contribution-inventory.d.ts +3 -25
- package/dist/core/extensions/extension-capability-aliases.d.ts +7 -10
- package/dist/core/extensions/extension-hook-runtime.d.ts +2 -2
- package/dist/core/extensions/extension-policy.d.ts +12 -47
- package/dist/core/extensions/extension-registries.d.ts +2 -2
- package/dist/core/extensions/extension-types.d.ts +332 -545
- package/dist/core/extensions/flag-definition-validation.d.ts +11 -13
- package/dist/core/extensions/flag-value-types.d.ts +11 -13
- package/dist/core/extensions/index.d.ts +15 -20
- package/dist/core/extensions/item-field-types.d.ts +5 -5
- package/dist/core/extensions/item-fields.d.ts +4 -7
- package/dist/core/extensions/loader.d.ts +5 -69
- package/dist/core/extensions/manifest-parser.d.ts +3 -3
- package/dist/core/extensions/manifest-schema.d.ts +10 -13
- package/dist/core/extensions/registration-contracts.d.ts +2 -4
- package/dist/core/extensions/registration-validation.d.ts +1 -1
- package/dist/core/extensions/registration-values.d.ts +5 -7
- package/dist/core/extensions/runtime-registrations.d.ts +6 -6
- package/dist/core/extensions/version-compat.d.ts +9 -10
- package/dist/core/fs/fs-utils.d.ts +4 -6
- package/dist/core/fs/host-environment-errors.d.ts +8 -10
- package/dist/core/governance/content-fields.d.ts +10 -14
- package/dist/core/governance/issue-codes.d.ts +12 -18
- package/dist/core/governance/metadata-coverage.d.ts +24 -34
- package/dist/core/history/digest.d.ts +3 -3
- package/dist/core/history/event-classification.d.ts +5 -5
- package/dist/core/history/event-index.d.ts +14 -35
- package/dist/core/history/history-compact-bulk.d.ts +10 -13
- package/dist/core/history/history-diff.d.ts +6 -11
- package/dist/core/history/history-rewrite.d.ts +24 -40
- package/dist/core/history/history-storage-stats.d.ts +9 -17
- package/dist/core/history/history-stream-policy.d.ts +8 -11
- package/dist/core/history/history.d.ts +10 -44
- package/dist/core/history/identity.d.ts +4 -5
- package/dist/core/history/operation-contract.d.ts +5 -15
- package/dist/core/history/projection.d.ts +10 -14
- package/dist/core/history/read.d.ts +6 -7
- package/dist/core/history/replay.d.ts +16 -37
- package/dist/core/history/workspace-history.d.ts +27 -60
- package/dist/core/io/body-file.d.ts +2 -2
- package/dist/core/io/bulk-ids-input.d.ts +7 -8
- package/dist/core/item/actionability.d.ts +16 -22
- package/dist/core/item/dependency-reference.d.ts +2 -2
- package/dist/core/item/id.d.ts +5 -9
- package/dist/core/item/item-format-version.d.ts +11 -13
- package/dist/core/item/item-format.d.ts +20 -60
- package/dist/core/item/item-format.js +1 -1
- package/dist/core/item/item-record.d.ts +2 -2
- package/dist/core/item/literal-mutation-input.d.ts +2 -2
- package/dist/core/item/parent-reference-policy.d.ts +4 -7
- package/dist/core/item/parse.d.ts +10 -26
- package/dist/core/item/plan-lifecycle.d.ts +3 -3
- package/dist/core/item/priority.d.ts +2 -2
- package/dist/core/item/sprint-release-format.d.ts +3 -7
- package/dist/core/item/status-filter.d.ts +5 -7
- package/dist/core/item/status.d.ts +3 -4
- package/dist/core/item/type-registry.d.ts +17 -24
- package/dist/core/item/type-synonyms.d.ts +1 -1
- package/dist/core/lock/lock-owner.d.ts +8 -10
- package/dist/core/lock/lock.d.ts +19 -67
- package/dist/core/output/output-control.d.ts +5 -6
- package/dist/core/output/output.d.ts +18 -20
- package/dist/core/output/output.js +4 -4
- package/dist/core/output/tabular.d.ts +2 -2
- package/dist/core/packages/manifest.d.ts +13 -17
- package/dist/core/packages/root.d.ts +3 -3
- package/dist/core/policy/workflow-policy-schema.d.ts +2 -310
- package/dist/core/policy/workflow-policy-store.d.ts +5 -14
- package/dist/core/policy/workflow-policy.d.ts +25 -52
- package/dist/core/profile/profile-describe.d.ts +8 -11
- package/dist/core/profile/profile-lint.d.ts +11 -13
- package/dist/core/profile/profile-plan.d.ts +30 -49
- package/dist/core/profile/profile-presets.d.ts +25 -36
- package/dist/core/reproducibility/context.d.ts +6 -7
- package/dist/core/schema/fields-file.d.ts +14 -21
- package/dist/core/schema/item-types-file.d.ts +16 -22
- package/dist/core/schema/runtime-field-filters.d.ts +2 -2
- package/dist/core/schema/runtime-field-values.d.ts +6 -13
- package/dist/core/schema/runtime-schema.d.ts +19 -31
- package/dist/core/schema/status-defs-file.d.ts +15 -25
- package/dist/core/schema/status-token.d.ts +1 -1
- package/dist/core/schema/type-inference.d.ts +6 -8
- package/dist/core/schema/type-presets.d.ts +5 -5
- package/dist/core/schema/type-workflows.d.ts +11 -16
- package/dist/core/search/background-refresh.d.ts +6 -12
- package/dist/core/search/bm25.d.ts +11 -19
- package/dist/core/search/cache.d.ts +19 -41
- package/dist/core/search/corpus.d.ts +16 -19
- package/dist/core/search/corpus.js +1 -1
- package/dist/core/search/embedding-batches.d.ts +12 -17
- package/dist/core/search/eval-thresholds.d.ts +3 -3
- package/dist/core/search/eval.d.ts +16 -34
- package/dist/core/search/http-client.d.ts +14 -18
- package/dist/core/search/providers.d.ts +22 -39
- package/dist/core/search/relevance.d.ts +14 -19
- package/dist/core/search/semantic-defaults.d.ts +4 -5
- package/dist/core/search/vector-stores.d.ts +35 -57
- package/dist/core/search/vectorization-metadata.d.ts +9 -11
- package/dist/core/sentry/helpers.d.ts +6 -31
- package/dist/core/sentry/instrument.d.ts +6 -59
- package/dist/core/session/session-state.d.ts +12 -32
- package/dist/core/shared/agent-session-context.d.ts +10 -17
- package/dist/core/shared/author.d.ts +48 -69
- package/dist/core/shared/command-line.d.ts +3 -3
- package/dist/core/shared/command-types.d.ts +3 -4
- package/dist/core/shared/constants.d.ts +14 -32
- package/dist/core/shared/error-details.d.ts +5 -18
- package/dist/core/shared/errors.d.ts +42 -83
- package/dist/core/shared/html-entity-decode.d.ts +1 -1
- package/dist/core/shared/item-metadata-contract.d.ts +2 -2
- package/dist/core/shared/lazy-module.d.ts +1 -1
- package/dist/core/shared/levenshtein.d.ts +1 -1
- package/dist/core/shared/numeric-parsers.d.ts +1 -1
- package/dist/core/shared/option-alias-visibility.d.ts +2 -2
- package/dist/core/shared/output-unicode.d.ts +1 -1
- package/dist/core/shared/primitives.d.ts +10 -10
- package/dist/core/shared/secret-rules.d.ts +7 -93
- package/dist/core/shared/serial-queue.d.ts +7 -9
- package/dist/core/shared/serialization.d.ts +1 -1
- package/dist/core/shared/split-comma-list.d.ts +4 -5
- package/dist/core/shared/text-normalization.d.ts +1 -1
- package/dist/core/shared/time.d.ts +6 -20
- package/dist/core/store/item-format-migration.d.ts +4 -5
- package/dist/core/store/item-metadata-cache.d.ts +22 -27
- package/dist/core/store/item-metadata-query-index.d.ts +20 -61
- package/dist/core/store/item-metadata-read-work.d.ts +3 -7
- package/dist/core/store/item-mutation-precondition.d.ts +19 -35
- package/dist/core/store/item-store.d.ts +18 -141
- package/dist/core/store/paths.d.ts +5 -10
- package/dist/core/store/settings-read-cache.d.ts +7 -9
- package/dist/core/store/settings-sections.d.ts +15 -19
- package/dist/core/store/settings-validator.d.ts +27 -143
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +19 -94
- package/dist/core/store/sqlite-runtime.d.ts +3 -3
- package/dist/core/store/tracker-preflight.d.ts +2 -2
- package/dist/core/telemetry/consent.d.ts +2 -2
- package/dist/core/telemetry/observability.d.ts +8 -19
- package/dist/core/telemetry/policy.d.ts +8 -23
- package/dist/core/telemetry/runtime.d.ts +44 -254
- package/dist/core/test/background-runs.d.ts +35 -79
- package/dist/core/test/run-selectors.d.ts +10 -12
- package/dist/core/validate/fix-planning.d.ts +19 -28
- package/dist/core/validate/missing-by-type.d.ts +3 -4
- package/dist/core/validate/missing-link-owners.d.ts +12 -16
- package/dist/core/validate/stale-file-classification.d.ts +5 -6
- package/dist/mcp/tool-definitions.d.ts +7 -30
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/actionability.d.ts +1 -1
- package/dist/sdk/agent/closed-domain-contracts.d.ts +4 -5
- package/dist/sdk/agent/command-recovery.d.ts +9 -13
- package/dist/sdk/agent/command-suggestions.d.ts +2 -2
- package/dist/sdk/agent/create-option-policy.d.ts +2 -2
- package/dist/sdk/agent/identity-config.d.ts +13 -18
- package/dist/sdk/agent/item-addressing.d.ts +4 -5
- package/dist/sdk/agent/linked-resource-recovery.d.ts +3 -4
- package/dist/sdk/agent/refusal-closure-census.d.ts +13 -25
- package/dist/sdk/agent/refusal-closure.d.ts +8 -11
- package/dist/sdk/agent/refusal-corpus-contracts.d.ts +15 -21
- package/dist/sdk/agent/refusal-reachability.d.ts +38 -52
- package/dist/sdk/agent/subcommand-recovery.d.ts +7 -15
- package/dist/sdk/agent/task-transcript-contracts.d.ts +12 -15
- package/dist/sdk/agent/tracker-preflight-contracts.d.ts +13 -17
- package/dist/sdk/agent-capability-contracts.d.ts +19 -32
- package/dist/sdk/agent-session-context.d.ts +1 -1
- package/dist/sdk/annotations.d.ts +32 -68
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/author-attribution.d.ts +22 -33
- package/dist/sdk/authoring.d.ts +1 -19
- package/dist/sdk/cli-bootstrap.d.ts +22 -59
- package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +31 -57
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -8
- package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +19 -65
- package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +2 -2
- package/dist/sdk/cli-contracts/commander-types.d.ts +6 -11
- package/dist/sdk/cli-contracts/completeness.d.ts +11 -15
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +25 -37
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +16 -20
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +14 -19
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +29 -47
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +44 -265
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +11 -564
- package/dist/sdk/cli-contracts/tool-schema.d.ts +18 -51
- package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +18 -37
- package/dist/sdk/cli-contracts.d.ts +1 -16
- package/dist/sdk/cli-program.d.ts +2 -2
- package/dist/sdk/command-line.d.ts +3 -4
- package/dist/sdk/comments.d.ts +6 -10
- package/dist/sdk/compile-cache.d.ts +4 -5
- package/dist/sdk/completion/bash.d.ts +2 -2
- package/dist/sdk/completion/fish.d.ts +2 -2
- package/dist/sdk/completion/shared.d.ts +10 -77
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.d.ts +2 -2
- package/dist/sdk/completion.d.ts +2 -6
- package/dist/sdk/compose.d.ts +49 -74
- package/dist/sdk/config.d.ts +18 -94
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/context/recency.d.ts +2 -2
- package/dist/sdk/context/semantic-session-attribution.d.ts +6 -25
- package/dist/sdk/context/usage-ledger.d.ts +9 -21
- package/dist/sdk/context-intent-contracts.d.ts +24 -35
- package/dist/sdk/context-intent-runtime.d.ts +7 -9
- package/dist/sdk/context-packing.d.ts +16 -34
- package/dist/sdk/context-relevance.d.ts +58 -93
- package/dist/sdk/context-signal-store.d.ts +29 -60
- package/dist/sdk/context-usage.d.ts +22 -69
- package/dist/sdk/contracts.d.ts +1 -24
- package/dist/sdk/core-governance.d.ts +1 -5
- package/dist/sdk/core.d.ts +1 -27
- package/dist/sdk/corpus-shape.d.ts +16 -28
- package/dist/sdk/define.d.ts +10 -14
- package/dist/sdk/dependencies.d.ts +32 -50
- package/dist/sdk/dependency-provenance.d.ts +19 -23
- package/dist/sdk/docs.d.ts +6 -10
- package/dist/sdk/duplicates.d.ts +8 -15
- package/dist/sdk/environment/agent-environment.d.ts +60 -101
- package/dist/sdk/environment/host-environment-errors.d.ts +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +15 -29
- package/dist/sdk/environment/source-context.d.ts +6 -7
- package/dist/sdk/environment/tracker-preflight.d.ts +1 -1
- package/dist/sdk/error-code-catalog.d.ts +9 -26
- package/dist/sdk/error-runtime.d.ts +6 -8
- package/dist/sdk/errors.d.ts +10 -17
- package/dist/sdk/eval.d.ts +11 -21
- package/dist/sdk/extension/command-options.d.ts +14 -26
- package/dist/sdk/extension/describe.d.ts +14 -19
- package/dist/sdk/extension/doctor.d.ts +8 -48
- package/dist/sdk/extension/install-plan.d.ts +12 -26
- package/dist/sdk/extension/install-runtime.d.ts +10 -11
- package/dist/sdk/extension/install-sources.d.ts +22 -104
- package/dist/sdk/extension/managed-state.d.ts +13 -18
- package/dist/sdk/extension/migrations.d.ts +22 -37
- package/dist/sdk/extension/output-ownership.d.ts +3 -30
- package/dist/sdk/extension/shared.d.ts +9 -15
- package/dist/sdk/extension/source-resolution.d.ts +13 -18
- package/dist/sdk/extension/static-inventory.d.ts +17 -21
- package/dist/sdk/extension/update-check.d.ts +7 -11
- package/dist/sdk/extension-command-context.d.ts +2 -3
- package/dist/sdk/extension-contracts.d.ts +11 -14
- package/dist/sdk/extension.d.ts +31 -192
- package/dist/sdk/files.d.ts +27 -68
- package/dist/sdk/flag-invocation-contracts.d.ts +13 -17
- 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.d.ts +1 -1
- package/dist/sdk/governance/artifact-ledgers.d.ts +9 -16
- package/dist/sdk/governance/assurance-action-contracts.d.ts +1 -1
- package/dist/sdk/governance/assurance-action.d.ts +13 -45
- package/dist/sdk/governance/assurance-mutation-error.d.ts +12 -17
- package/dist/sdk/governance/assurance-presets.d.ts +10 -21
- package/dist/sdk/governance/assurance-runtime.d.ts +5 -6
- package/dist/sdk/governance/assurance.d.ts +97 -154
- package/dist/sdk/governance/boundary-fixtures.d.ts +17 -23
- package/dist/sdk/governance/closure-timestamps.d.ts +5 -15
- package/dist/sdk/governance/coverage-assurance.d.ts +5 -6
- package/dist/sdk/governance/defect-recurrence-coverage.d.ts +13 -23
- package/dist/sdk/governance/defect-recurrence-graph.d.ts +9 -13
- package/dist/sdk/governance/defect-recurrence.d.ts +43 -67
- package/dist/sdk/governance/extension-host-version.d.ts +8 -10
- package/dist/sdk/governance/gc.d.ts +12 -20
- package/dist/sdk/governance/health/projection.d.ts +8 -23
- package/dist/sdk/governance/health.d.ts +23 -167
- package/dist/sdk/governance/hierarchy-validation.d.ts +2 -18
- package/dist/sdk/governance/linked-file-report.d.ts +6 -10
- package/dist/sdk/governance/merge-receipt-history.d.ts +12 -16
- package/dist/sdk/governance/provenance-health.d.ts +17 -23
- package/dist/sdk/governance/reindex.d.ts +13 -116
- package/dist/sdk/governance/reliability.d.ts +13 -17
- package/dist/sdk/governance/stale-work.d.ts +8 -11
- package/dist/sdk/governance/status-role-diagnostics.d.ts +4 -6
- package/dist/sdk/governance/storage-integrity.d.ts +16 -23
- package/dist/sdk/governance/upgrade.d.ts +17 -57
- package/dist/sdk/governance/validate-item-reader.d.ts +3 -11
- package/dist/sdk/governance/validate-normalization.d.ts +2 -2
- package/dist/sdk/governance/validate.d.ts +29 -175
- package/dist/sdk/governance/workflow-completeness.d.ts +5 -17
- package/dist/sdk/governance/workflow-policy.d.ts +8 -16
- package/dist/sdk/governance/workspace-position.d.ts +12 -43
- package/dist/sdk/governance.d.ts +1 -39
- package/dist/sdk/graph/adapter.d.ts +23 -41
- package/dist/sdk/graph/analytics.d.ts +20 -31
- package/dist/sdk/graph/assembly.d.ts +24 -35
- package/dist/sdk/graph/cache.d.ts +13 -25
- package/dist/sdk/graph/cardinality-integrity.d.ts +4 -6
- package/dist/sdk/graph/centrality.d.ts +14 -20
- package/dist/sdk/graph/conformance.d.ts +12 -19
- package/dist/sdk/graph/deadline-scheduling.d.ts +14 -20
- package/dist/sdk/graph/durable-cache.d.ts +11 -14
- package/dist/sdk/graph/governance-contracts.d.ts +2 -2
- package/dist/sdk/graph/governance.d.ts +22 -36
- package/dist/sdk/graph/hierarchy-integrity.d.ts +18 -26
- package/dist/sdk/graph/index.d.ts +1 -17
- package/dist/sdk/graph/lifecycle-coverage.d.ts +8 -12
- package/dist/sdk/graph/mutation-advisory.d.ts +5 -16
- package/dist/sdk/graph/query-contracts.d.ts +1 -2
- package/dist/sdk/graph/remediation.d.ts +11 -18
- package/dist/sdk/graph/run.d.ts +73 -115
- package/dist/sdk/graph/scheduling.d.ts +8 -15
- package/dist/sdk/graph/traversal.d.ts +9 -15
- package/dist/sdk/graph/workspace-relationship-kind-registry.d.ts +2 -2
- package/dist/sdk/graph.d.ts +1 -12
- package/dist/sdk/guide-topics.d.ts +7 -10
- package/dist/sdk/guide.d.ts +21 -43
- package/dist/sdk/history/attestation-command.d.ts +7 -10
- package/dist/sdk/history/attestation-contract.d.ts +19 -34
- package/dist/sdk/history/attestation.d.ts +2 -3
- package/dist/sdk/history/maintenance.d.ts +17 -27
- package/dist/sdk/history/salvage.d.ts +5 -22
- package/dist/sdk/history/subject.d.ts +5 -11
- package/dist/sdk/history-analytics.d.ts +28 -59
- package/dist/sdk/history-compact.d.ts +25 -66
- package/dist/sdk/history-provenance.d.ts +16 -33
- package/dist/sdk/history-read.d.ts +9 -16
- package/dist/sdk/history-redact.d.ts +19 -74
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.d.ts +26 -71
- package/dist/sdk/improvement-ledger-validation.d.ts +2 -2
- package/dist/sdk/improvement-ledger.d.ts +20 -39
- package/dist/sdk/index.d.ts +1 -268
- package/dist/sdk/init-agent-guidance.d.ts +13 -68
- package/dist/sdk/init.d.ts +24 -94
- package/dist/sdk/invocation-author.d.ts +1 -1
- package/dist/sdk/item-children.d.ts +10 -13
- package/dist/sdk/item-metadata-index.d.ts +1 -2
- package/dist/sdk/item-schedule.d.ts +8 -9
- package/dist/sdk/item-transaction.d.ts +46 -90
- package/dist/sdk/learnings.d.ts +6 -10
- package/dist/sdk/lifecycle/append.d.ts +7 -9
- package/dist/sdk/lifecycle/claim.d.ts +26 -42
- package/dist/sdk/lifecycle/cli-input.d.ts +1 -1
- package/dist/sdk/lifecycle/close-many.d.ts +14 -65
- package/dist/sdk/lifecycle/close.d.ts +10 -26
- package/dist/sdk/lifecycle/copy.d.ts +6 -10
- package/dist/sdk/lifecycle/create.d.ts +15 -83
- package/dist/sdk/lifecycle/delete.d.ts +7 -9
- package/dist/sdk/lifecycle/focus.d.ts +9 -11
- package/dist/sdk/lifecycle/item-revision.d.ts +31 -45
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/lifecycle/lifecycle-transitions.d.ts +4 -5
- package/dist/sdk/lifecycle/mutation-command-options.d.ts +6 -9
- package/dist/sdk/lifecycle/plan-mutation-receipt.d.ts +5 -13
- package/dist/sdk/lifecycle/plan.d.ts +34 -74
- package/dist/sdk/lifecycle/reopen.d.ts +8 -14
- package/dist/sdk/lifecycle/restore.d.ts +9 -38
- package/dist/sdk/lifecycle/shared-unset-fields.d.ts +23 -614
- package/dist/sdk/lifecycle/start-blockers.d.ts +7 -27
- package/dist/sdk/lifecycle/structured-mutation-plan.d.ts +8 -16
- package/dist/sdk/lifecycle/task-composition.d.ts +6 -14
- package/dist/sdk/lifecycle/update-many.d.ts +15 -65
- package/dist/sdk/lifecycle/update.d.ts +21 -104
- package/dist/sdk/lifecycle/workflow-transition.d.ts +2 -11
- package/dist/sdk/lifecycle-completion.d.ts +11 -14
- package/dist/sdk/lifecycle-policy.d.ts +23 -32
- package/dist/sdk/linked-artifacts.d.ts +31 -41
- package/dist/sdk/mcp/apps.d.ts +12 -27
- package/dist/sdk/mcp/authorization.d.ts +30 -63
- package/dist/sdk/mcp/discovery.d.ts +23 -52
- package/dist/sdk/mcp/executable.d.ts +3 -10
- package/dist/sdk/mcp/interactions.d.ts +25 -47
- package/dist/sdk/mcp/protocol.d.ts +32 -64
- package/dist/sdk/mcp/skills.d.ts +21 -71
- package/dist/sdk/mcp/subscriptions.d.ts +14 -28
- package/dist/sdk/mcp/tasks.d.ts +21 -55
- package/dist/sdk/mcp/transport.d.ts +7 -15
- package/dist/sdk/merge/driver.d.ts +13 -37
- package/dist/sdk/merge/index.d.ts +1 -6
- package/dist/sdk/merge/install.d.ts +27 -55
- package/dist/sdk/merge/receipt-operation.d.ts +5 -6
- package/dist/sdk/merge/receipt-schema.d.ts +6 -9
- package/dist/sdk/merge/receipts.d.ts +29 -79
- package/dist/sdk/merge/reconcile.d.ts +9 -18
- package/dist/sdk/merge/three-way.d.ts +21 -30
- package/dist/sdk/merge.d.ts +1 -5
- package/dist/sdk/mutation-events.d.ts +21 -53
- package/dist/sdk/mutation-guard.d.ts +15 -135
- package/dist/sdk/notes.d.ts +6 -10
- package/dist/sdk/output/fit-envelope.d.ts +21 -28
- package/dist/sdk/output/list-envelope.d.ts +1 -1
- package/dist/sdk/output/table-rows.d.ts +8 -12
- package/dist/sdk/output-contracts.d.ts +11 -14
- package/dist/sdk/output-projection.d.ts +18 -130
- package/dist/sdk/output-token-accounting.d.ts +8 -15
- package/dist/sdk/output.d.ts +10 -15
- package/dist/sdk/ownership-source.d.ts +4 -5
- package/dist/sdk/package-import-adapters.d.ts +27 -37
- package/dist/sdk/package-migrations.d.ts +2 -2
- package/dist/sdk/package-runtime-options.d.ts +3 -3
- package/dist/sdk/pagination.d.ts +12 -24
- package/dist/sdk/profile.d.ts +25 -42
- package/dist/sdk/provenance.d.ts +21 -32
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.d.ts +24 -77
- package/dist/sdk/query/aggregate.d.ts +20 -95
- package/dist/sdk/query/calendar.d.ts +26 -74
- package/dist/sdk/query/complete-list.d.ts +19 -35
- package/dist/sdk/query/context.d.ts +69 -240
- package/dist/sdk/query/declared-blockers.d.ts +2 -9
- package/dist/sdk/query/duplicate-candidates.d.ts +3 -5
- package/dist/sdk/query/get-facet-roots.js +2 -0
- package/dist/sdk/query/get.d.ts +13 -55
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.d.ts +18 -29
- package/dist/sdk/query/item-filter-options.d.ts +7 -12
- package/dist/sdk/query/list-filter-shared.d.ts +4 -8
- package/dist/sdk/query/list.d.ts +44 -168
- package/dist/sdk/query/multi-value-filters.d.ts +7 -9
- package/dist/sdk/query/next-ranking-policy.d.ts +4 -10
- package/dist/sdk/query/next-ready-budget.d.ts +4 -5
- package/dist/sdk/query/next.d.ts +27 -86
- package/dist/sdk/query/parsers.d.ts +4 -6
- package/dist/sdk/query/projection-contracts.d.ts +12 -21
- package/dist/sdk/query/search/corpus.d.ts +5 -20
- package/dist/sdk/query/search/filters.d.ts +5 -17
- package/dist/sdk/query/search/input.d.ts +4 -9
- package/dist/sdk/query/search/lexical.d.ts +5 -9
- package/dist/sdk/query/search/response.d.ts +5 -22
- package/dist/sdk/query/search/semantic.d.ts +24 -170
- package/dist/sdk/query/search/types.d.ts +19 -73
- package/dist/sdk/query/search-contracts.d.ts +24 -34
- package/dist/sdk/query/search-pagination.d.ts +5 -24
- package/dist/sdk/query/search-rendering.d.ts +8 -32
- package/dist/sdk/query/search.d.ts +3 -63
- package/dist/sdk/query/workspace-contracts.d.ts +2 -2
- package/dist/sdk/query.d.ts +1 -43
- package/dist/sdk/read-output/continuation.d.ts +5 -6
- package/dist/sdk/read-output/options.d.ts +3 -8
- package/dist/sdk/read-output/positional-rows.js +2 -0
- package/dist/sdk/read-output/session-result.d.ts +2 -33
- package/dist/sdk/read-output/tail-retention.d.ts +6 -8
- package/dist/sdk/read-output-budget.d.ts +14 -16
- package/dist/sdk/read-output-contracts.d.ts +62 -102
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.d.ts +5 -9
- package/dist/sdk/read-output-session.d.ts +11 -14
- package/dist/sdk/relationship-analytics.d.ts +17 -37
- package/dist/sdk/relationship-context.d.ts +15 -33
- package/dist/sdk/relationship-history.d.ts +29 -50
- package/dist/sdk/relationship-kinds/contract.d.ts +11 -12
- package/dist/sdk/relationship-migration.d.ts +6 -10
- package/dist/sdk/relationships.d.ts +22 -34
- package/dist/sdk/reproducibility/process.d.ts +7 -11
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime/context.d.ts +6 -22
- package/dist/sdk/runtime/schema-preview.d.ts +1 -1
- package/dist/sdk/runtime-input.d.ts +9 -20
- package/dist/sdk/runtime-primitives.d.ts +3 -82
- package/dist/sdk/runtime-public-contracts.d.ts +30 -50
- package/dist/sdk/runtime.d.ts +77 -302
- package/dist/sdk/scheduling-shortcuts.d.ts +8 -12
- package/dist/sdk/schema-migration.d.ts +18 -80
- package/dist/sdk/schema.d.ts +89 -192
- package/dist/sdk/search-refresh-worker.d.ts +1 -1
- package/dist/sdk/similarity-scoring.d.ts +6 -8
- package/dist/sdk/similarity.d.ts +33 -64
- package/dist/sdk/start-task-status.d.ts +2 -2
- package/dist/sdk/stats.d.ts +13 -48
- package/dist/sdk/structured-mutations.d.ts +18 -26
- package/dist/sdk/telemetry-flush.d.ts +1 -1
- package/dist/sdk/telemetry.d.ts +14 -20
- package/dist/sdk/templates.d.ts +14 -35
- package/dist/sdk/test/batch.d.ts +10 -25
- package/dist/sdk/test/execution.d.ts +44 -209
- package/dist/sdk/test/json-path.d.ts +2 -5
- package/dist/sdk/test/linked-command-detection.d.ts +10 -25
- package/dist/sdk/test/measurements.d.ts +10 -13
- package/dist/sdk/test/parsers.d.ts +16 -20
- package/dist/sdk/test/prerequisites.d.ts +2 -3
- package/dist/sdk/test/runs.d.ts +19 -52
- package/dist/sdk/test/trust.d.ts +8 -12
- package/dist/sdk/test/update.d.ts +9 -25
- package/dist/sdk/testing.d.ts +97 -206
- package/dist/sdk/traceability/source-traceability.d.ts +25 -56
- package/dist/sdk/tracker-root-discovery.d.ts +1 -1
- package/dist/sdk/workspace-contracts-cache.d.ts +2 -2
- package/dist/sdk/workspace-contracts.d.ts +8 -14
- package/dist/sdk/workspace-memory.d.ts +24 -42
- package/dist/sdk/workspace-recipe.d.ts +10 -14
- package/dist/sdk/workspace-snapshot.d.ts +26 -53
- package/dist/sdk/workspace-transaction-gc.d.ts +12 -16
- package/dist/sdk/workspace-transaction.d.ts +26 -40
- package/dist/sdk/workspace.d.ts +8 -10
- package/dist/types/index.d.ts +1 -1
- package/dist/types.d.ts +210 -353
- package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -0
- package/docs/COMMANDS.md +8 -0
- package/docs/CONFIGURATION.md +17 -0
- package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +28 -9
- package/docs/README.md +1 -1
- package/docs/READ_OUTPUT_CONTRACTS.md +21 -0
- package/docs/RELEASING.md +52 -5
- package/docs/SDK.md +17 -2
- package/docs/TESTING.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 +41 -4
- package/dist/cli-bundle/chunks/chunk-3A5DJZCC.js +0 -116
- package/dist/cli-bundle/chunks/chunk-AFZS6WFV.js +0 -3
- package/dist/cli-bundle/chunks/chunk-JAE5MWLX.js +0 -2
- package/dist/cli-bundle/chunks/chunk-LLTRUVKK.js +0 -6
- package/dist/cli-bundle/chunks/chunk-PE6CZ3PE.js +0 -3
- package/dist/cli-bundle/chunks/item-revision-TUGZYYXX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-2RRBAQN3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2A3QZELL.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-KBRSA4OK.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-P6TG33FV.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-PL6EO4GJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PSLDGAEY.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-UNNLBJRI.js +0 -2
- package/dist/cli-bundle/focused-chunks/item-revision-XNSRDTFB.js +0 -2
- package/docs/ECOSYSTEM_PLANNING_REVIEW.md +0 -274
|
@@ -1,2 +1,2 @@
|
|
|
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]="
|
|
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]="4d563454-0999-5df5-afb9-58503b409436")}catch{}})();import{coercePositiveInteger}from"../shared/primitives.js";const DEFAULT_SEARCH_CORPUS_FIELDS=["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 resolveSearchCorpusFields(settings){const configured=settings?.search?.corpus_fields;if(!Array.isArray(configured))return[...DEFAULT_SEARCH_CORPUS_FIELDS];const knownFields=new Set(DEFAULT_SEARCH_CORPUS_FIELDS),selected=Array.from(new Set(configured.filter(entry=>typeof entry=="string").map(entry=>entry.trim()).filter(entry=>entry.length>0&&knownFields.has(entry))));return selected.length>0?selected:[...DEFAULT_SEARCH_CORPUS_FIELDS]}const DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS=8e3,OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS=3200,SEMANTIC_CORPUS_TRUNCATION_SUFFIX="...[semantic corpus truncated]",SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING="search_embedding_corpus_max_characters_invalid:using_provider_default";function compactParts(parts){return parts.map(part=>part==null?"":String(part).trim()).filter(part=>part.length>0).join(" ")}function buildReminderCorpus(item){return(item.reminders??[]).map(reminder=>compactParts([reminder.at,reminder.text]))}function buildEventCorpus(item){return(item.events??[]).map(event=>compactParts([event.start_at,event.end_at,event.title,event.description,event.location,event.all_day===!0?"all day":void 0,event.timezone,event.recurrence?.freq,event.recurrence?.interval,event.recurrence?.count,event.recurrence?.until,event.recurrence?.by_weekday?.join(" "),event.recurrence?.by_month_day?.join(" "),event.recurrence?.exdates?.join(" ")]))}function appendPlanStepFlatCorpus(segments,step){segments.push(step.title,step.body,step.status,step.owner,step.evidence,step.blocked_reason,step.superseded_by);for(const link of step.linked_items??[])segments.push(`${link.kind} ${link.id}`,link.note);for(const file of step.files??[])segments.push(file.path,file.note);for(const test of step.tests??[])segments.push(test.command,test.path,test.note);for(const doc of step.docs??[])segments.push(doc.path,doc.note)}function appendPlanMetadataFlatCorpus(segments,item){for(const decision of item.plan_decisions??[])segments.push(decision.decision,decision.rationale,decision.evidence);for(const discovery of item.plan_discoveries??[])segments.push(discovery.text);for(const check of item.plan_validation??[])segments.push(check.text,check.command,check.expected)}function buildPlanFlatCorpus(item){const segments=[];segments.push(item.plan_mode,item.plan_scope,item.plan_harness,item.plan_resume_context);for(const step of item.plan_steps??[])appendPlanStepFlatCorpus(segments,step);return appendPlanMetadataFlatCorpus(segments,item),segments.filter(segment=>typeof segment=="string"&&segment.length>0).join(" ")}function buildPlanCorpus(item){const steps=(item.plan_steps??[]).map(step=>compactParts([step.order,step.id,step.title,step.body,step.status,step.owner,step.evidence,step.blocked_reason,step.superseded_by,(step.linked_items??[]).map(link=>compactParts([link.kind,link.id,link.note])).join(" "),(step.files??[]).map(file=>compactParts([file.path,file.note])).join(" "),(step.tests??[]).map(test=>compactParts([test.command,test.path,test.note])).join(" "),(step.docs??[]).map(doc=>compactParts([doc.path,doc.note])).join(" ")])),decisions=(item.plan_decisions??[]).map(entry=>compactParts([entry.decision,entry.rationale,entry.evidence,entry.step_id])),discoveries=(item.plan_discoveries??[]).map(entry=>compactParts([entry.text,entry.step_id])),validation=(item.plan_validation??[]).map(entry=>compactParts([entry.text,entry.command,entry.expected]));if([item.plan_mode,item.plan_scope,item.plan_harness,item.plan_resume_context,...steps,...decisions,...discoveries,...validation].some(entry=>entry!==void 0))return{mode:item.plan_mode,scope:item.plan_scope,harness:item.plan_harness,resume_context:item.plan_resume_context,steps,decisions,discoveries,validation}}function annotationTexts(entries){return(entries??[]).flatMap(entry=>Object.prototype.toString.call(entry)==="[object Object]"&&typeof entry.text=="string"?[entry.text]:[])}function isNonEmptyString(value){return typeof value=="string"&&value.trim().length>0}const CORPUS_FIELD_BUILDERS={title:document=>document.metadata.title,description:document=>document.metadata.description,tags:document=>document.metadata.tags,status:document=>document.metadata.status,type:document=>document.metadata.type,priority:document=>typeof document.metadata.priority=="number"?document.metadata.priority:void 0,assignee:document=>isNonEmptyString(document.metadata.assignee)?document.metadata.assignee:void 0,parent:document=>isNonEmptyString(document.metadata.parent)?document.metadata.parent:void 0,goal:document=>isNonEmptyString(document.metadata.goal)?document.metadata.goal:void 0,value:document=>isNonEmptyString(document.metadata.value)?document.metadata.value:void 0,why_now:document=>isNonEmptyString(document.metadata.why_now)?document.metadata.why_now:void 0,risk:document=>isNonEmptyString(document.metadata.risk)?document.metadata.risk:void 0,confidence:document=>document.metadata.confidence!==void 0&&document.metadata.confidence!==null?document.metadata.confidence:void 0,estimated_minutes:document=>typeof document.metadata.estimated_minutes=="number"?document.metadata.estimated_minutes:void 0,acceptance_criteria:document=>isNonEmptyString(document.metadata.acceptance_criteria)?document.metadata.acceptance_criteria:void 0,resolution:document=>isNonEmptyString(document.metadata.resolution)?document.metadata.resolution:void 0,expected_result:document=>isNonEmptyString(document.metadata.expected_result)?document.metadata.expected_result:void 0,actual_result:document=>isNonEmptyString(document.metadata.actual_result)?document.metadata.actual_result:void 0,body:document=>document.body,comments:document=>annotationTexts(document.metadata.comments),notes:document=>annotationTexts(document.metadata.notes),learnings:document=>annotationTexts(document.metadata.learnings),reminders:document=>buildReminderCorpus(document.metadata),events:document=>buildEventCorpus(document.metadata),dependencies:document=>(document.metadata.dependencies??[]).map(entry=>({id:entry.id,kind:entry.kind})),plan:document=>buildPlanCorpus(document.metadata)};function buildSearchCorpus(document,options={}){const fields=options.fields??DEFAULT_SEARCH_CORPUS_FIELDS,corpus={};for(const field of fields){const builder=CORPUS_FIELD_BUILDERS[field];if(!builder)continue;const value=builder(document);value!==void 0&&(corpus[field]=value)}return corpus}function resolveSemanticCorpusInputCharacterLimit(providerName){return providerName?.trim().toLowerCase()==="ollama"?OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS:DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS}function resolveSemanticCorpusCharacterLimit(providerName,configuredMaxCharacters){const providerDefaultLimit=resolveSemanticCorpusInputCharacterLimit(providerName),parsed=coercePositiveInteger(configuredMaxCharacters);return parsed!==null?{maxCharacters:parsed,warning:null}:{maxCharacters:providerDefaultLimit,warning:configuredMaxCharacters==null?null:SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING}}function buildSemanticCorpusInput(document,options={}){const serialized=JSON.stringify(buildSearchCorpus(document,{fields:options.fields})),maxCharacters=resolveSemanticCorpusCharacterLimit(options.providerName,options.maxCharacters).maxCharacters;if(serialized.length<=maxCharacters)return serialized;if(maxCharacters<=SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length)return SEMANTIC_CORPUS_TRUNCATION_SUFFIX.slice(0,maxCharacters);const keepLength=Math.max(0,maxCharacters-SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length);return`${serialized.slice(0,keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`}export{DEFAULT_SEARCH_CORPUS_FIELDS,DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS,OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS,SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING,SEMANTIC_CORPUS_TRUNCATION_SUFFIX,buildEventCorpus,buildPlanCorpus,buildPlanFlatCorpus,buildReminderCorpus,buildSearchCorpus,buildSemanticCorpusInput,resolveSearchCorpusFields,resolveSemanticCorpusCharacterLimit,resolveSemanticCorpusInputCharacterLimit};
|
|
2
2
|
//# sourceMappingURL=corpus.js.map
|
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
* Bounds embedding requests independently of per-input truncation and preserves
|
|
5
5
|
* input ordering through retries and adaptive splits.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import type { EmbeddingProviderConfig } from "./providers.js";
|
|
7
|
+
import type{PmSettings}from "../../types/index.js";import type{EmbeddingProviderConfig}from "./providers.js";
|
|
9
8
|
/** Completed vectors and execution evidence returned only after every input succeeds. */
|
|
10
|
-
export interface EmbeddingBatchExecutionResult
|
|
9
|
+
export interface EmbeddingBatchExecutionResult{
|
|
11
10
|
/** One vector for each input position, including repeated input text. */
|
|
12
11
|
vectors:number[][];
|
|
13
12
|
/** Truncation, retry, and split diagnostics; never contains source input text. */
|
|
14
13
|
warnings:string[];
|
|
15
14
|
/** Actual provider work, including retries and adaptive splits. */
|
|
16
|
-
receipt?:EmbeddingBatchReceipt;
|
|
17
|
-
}
|
|
15
|
+
receipt?:EmbeddingBatchReceipt;}
|
|
18
16
|
/** Bounded summary of actual provider work; histogram keys are successful request sizes. */
|
|
19
|
-
export interface EmbeddingBatchReceipt
|
|
17
|
+
export interface EmbeddingBatchReceipt{
|
|
20
18
|
/** Provider and model used for this execution, without endpoint or credentials. */
|
|
21
19
|
provider:string;
|
|
22
20
|
/** Model requested from the provider. */
|
|
@@ -24,7 +22,7 @@ model:string;
|
|
|
24
22
|
/** Maximum encoded JSON request size, including model and escaping. */
|
|
25
23
|
max_request_bytes:number;
|
|
26
24
|
/** Whether the request ceiling was supplied by the caller or the runtime. */
|
|
27
|
-
limit_source:"caller"
|
|
25
|
+
limit_source:"caller"|"default";
|
|
28
26
|
/** Number of requests planned before adaptive splitting. */
|
|
29
27
|
planned_batches:number;
|
|
30
28
|
/** Total HTTP attempts, including unsuccessful requests. */
|
|
@@ -40,10 +38,9 @@ batch_size_histogram:Record<string,number>;
|
|
|
40
38
|
/** Wall-clock duration including provider time and retry backoff. */
|
|
41
39
|
elapsed_ms:number;
|
|
42
40
|
/** Completed input positions divided by elapsed seconds. */
|
|
43
|
-
inputs_per_second:number;
|
|
44
|
-
}
|
|
41
|
+
inputs_per_second:number;}
|
|
45
42
|
/** Progress across planned batches; actual HTTP work is reported separately in the receipt. */
|
|
46
|
-
export interface EmbeddingBatchProgressEvent
|
|
43
|
+
export interface EmbeddingBatchProgressEvent{
|
|
47
44
|
/** One-based index of the current planned batch. */
|
|
48
45
|
batch_index:number;
|
|
49
46
|
/** Number of planned batches before adaptive splitting. */
|
|
@@ -57,14 +54,12 @@ total_inputs:number;
|
|
|
57
54
|
/** Optional attempt counter for callers extending progress reporting. */
|
|
58
55
|
attempt?:number;
|
|
59
56
|
/** Whether dispatch is starting or the complete planned batch has succeeded. */
|
|
60
|
-
phase:"start"
|
|
61
|
-
}
|
|
57
|
+
phase:"start"|"complete";}
|
|
62
58
|
/** Host controls for progress reporting and transport payload bounds. */
|
|
63
|
-
export interface EmbeddingBatchExecutionOptions
|
|
59
|
+
export interface EmbeddingBatchExecutionOptions{
|
|
64
60
|
/** Observe planned-batch boundaries without receiving input text. */
|
|
65
|
-
onProgress?:(event:EmbeddingBatchProgressEvent)
|
|
61
|
+
onProgress?:(event:EmbeddingBatchProgressEvent)=> void;
|
|
66
62
|
/** Positive JSON payload byte ceiling, independent of per-input corpus truncation; defaults to 256 KiB. */
|
|
67
|
-
maxRequestBytes?:number;
|
|
68
|
-
}
|
|
63
|
+
maxRequestBytes?:number;}
|
|
69
64
|
/** Execute count- and byte-bounded batches in order. Reject impossible inputs before dispatch, retry transient failures, and subdivide size or timeout failures without returning partial vectors. */
|
|
70
|
-
export declare function executeEmbeddingBatchesWithRetry(provider:EmbeddingProviderConfig,settings:PmSettings,inputs:string[],options?:EmbeddingBatchExecutionOptions):Promise<EmbeddingBatchExecutionResult>;
|
|
65
|
+
export declare function executeEmbeddingBatchesWithRetry(provider:EmbeddingProviderConfig,settings:PmSettings,inputs:string[],options?:EmbeddingBatchExecutionOptions):Promise<EmbeddingBatchExecutionResult>;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* scores. Shared by the public evaluator and repository quality gates.
|
|
6
6
|
*/
|
|
7
7
|
/** Ranking metrics eligible for a declared quality floor. */
|
|
8
|
-
export declare const EVAL_METRIC_NAMES:readonly
|
|
8
|
+
export declare const EVAL_METRIC_NAMES:readonly["ndcg","mrr","precision","recall"];
|
|
9
9
|
/** Optional normalized lower bounds; omitted metrics impose no constraint. */
|
|
10
|
-
export type EvalMetricFloors
|
|
10
|
+
export type EvalMetricFloors=Partial<Record<typeof EVAL_METRIC_NAMES[number],number>>;
|
|
11
11
|
/** Reject malformed or misspelled floors rather than silently weakening a quality contract. */
|
|
12
12
|
export declare function parseEvalMetricFloors(value:unknown):EvalMetricFloors;
|
|
13
13
|
/** Compare unrounded metrics to validated floors and return stable, actionable violations. */
|
|
14
|
-
export declare function evaluateMetricFloors(metrics:Record<typeof EVAL_METRIC_NAMES[number],number>,floors:EvalMetricFloors):string[];
|
|
14
|
+
export declare function evaluateMetricFloors(metrics:Record<typeof EVAL_METRIC_NAMES[number],number>,floors:EvalMetricFloors):string[];
|
|
@@ -13,32 +13,19 @@
|
|
|
13
13
|
* not. This keeps the golden set cheap to curate while still supporting the
|
|
14
14
|
* graded-discount behavior of DCG (earlier hits are worth more).
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
16
|
+
import{type EvalMetricFloors}from "./eval-thresholds.js";
|
|
17
17
|
/** Retrieval mode a golden query is evaluated under. Mirrors the `pm search` mode surface; omitting it on a query defers to the eval run's default mode. */
|
|
18
|
-
export type EvalSearchMode
|
|
18
|
+
export type EvalSearchMode="keyword"|"semantic"|"hybrid";
|
|
19
19
|
/** Default cutoff (`@k`) used for every metric when the caller does not override it. */
|
|
20
|
-
export declare const DEFAULT_EVAL_K
|
|
20
|
+
export declare const DEFAULT_EVAL_K=10;
|
|
21
21
|
/** Stable public schema identifier for versioned golden-query files. */
|
|
22
22
|
export declare const EVAL_QUERY_SET_SCHEMA_ID:"https://schema.unbrained.dev/pm/eval-query-set/v1";
|
|
23
23
|
/** Machine-readable input contract exposed by the SDK and CLI guidance. */
|
|
24
|
-
export declare const EVAL_QUERY_SET_CONTRACT:{
|
|
25
|
-
readonly schema:"https://schema.unbrained.dev/pm/eval-query-set/v1";
|
|
26
|
-
readonly accepted_top_level:readonly ["array","object"];
|
|
27
|
-
readonly required_query_fields:readonly ["query","relevant_ids"];
|
|
28
|
-
readonly optional_fields:readonly ["mode","description","minimum"];
|
|
29
|
-
readonly modes:readonly ["keyword","semantic","hybrid"];
|
|
30
|
-
};
|
|
24
|
+
export declare const EVAL_QUERY_SET_CONTRACT:{readonly schema:"https://schema.unbrained.dev/pm/eval-query-set/v1";readonly accepted_top_level:readonly["array","object"];readonly required_query_fields:readonly["query","relevant_ids"];readonly optional_fields:readonly["mode","description","minimum"];readonly modes:readonly["keyword","semantic","hybrid"];};
|
|
31
25
|
/** Copy-ready minimal query set shared by help, diagnostics, and integrations. */
|
|
32
|
-
export declare const EVAL_QUERY_SET_EXAMPLE:{
|
|
33
|
-
readonly schema:"https://schema.unbrained.dev/pm/eval-query-set/v1";
|
|
34
|
-
readonly queries:readonly [{
|
|
35
|
-
readonly query:"offline search";
|
|
36
|
-
readonly relevant_ids:readonly ["pm-75k9"];
|
|
37
|
-
readonly mode:"keyword";
|
|
38
|
-
}];
|
|
39
|
-
};
|
|
26
|
+
export declare const EVAL_QUERY_SET_EXAMPLE:{readonly schema:"https://schema.unbrained.dev/pm/eval-query-set/v1";readonly queries:readonly[{readonly query:"offline search";readonly relevant_ids:readonly["pm-75k9"];readonly mode:"keyword";}];};
|
|
40
27
|
/** One curated golden query: the query text, the set of item ids considered relevant, an optional per-query retrieval mode override, and an optional human-readable description of the relevance intent. */
|
|
41
|
-
export interface EvalQuery
|
|
28
|
+
export interface EvalQuery{
|
|
42
29
|
/** Value that configures or reports query for this contract. */
|
|
43
30
|
query:string;
|
|
44
31
|
/** Value that configures or reports relevant ids for this contract. */
|
|
@@ -48,24 +35,21 @@ mode?:EvalSearchMode;
|
|
|
48
35
|
/** Value that configures or reports description for this contract. */
|
|
49
36
|
description?:string;
|
|
50
37
|
/** Per-query floors applied before rounding, independently of the aggregate gate. */
|
|
51
|
-
minimum?:EvalMetricFloors;
|
|
52
|
-
}
|
|
38
|
+
minimum?:EvalMetricFloors;}
|
|
53
39
|
/** A parsed, validated golden-query set. */
|
|
54
|
-
export interface EvalQuerySet
|
|
40
|
+
export interface EvalQuerySet{
|
|
55
41
|
/** Versioned schema used to interpret the query-set payload. */
|
|
56
42
|
schema:typeof EVAL_QUERY_SET_SCHEMA_ID;
|
|
57
43
|
/** Value that configures or reports queries for this contract. */
|
|
58
|
-
queries:EvalQuery[];
|
|
59
|
-
}
|
|
44
|
+
queries:EvalQuery[];}
|
|
60
45
|
/**
|
|
61
46
|
* Thrown by {@link parseEvalQuerySet} when the raw golden-query payload is
|
|
62
47
|
* structurally invalid. Carries a precise, human-actionable message naming the
|
|
63
48
|
* offending query index/field so an author can fix the JSON directly.
|
|
64
49
|
*/
|
|
65
|
-
export declare class EvalQuerySetError extends Error
|
|
50
|
+
export declare class EvalQuerySetError extends Error{
|
|
66
51
|
/** Construct an error describing why a golden-query set failed validation. */
|
|
67
|
-
constructor(message:string);
|
|
68
|
-
}
|
|
52
|
+
constructor(message:string);}
|
|
69
53
|
/** Compute Discounted Cumulative Gain at cutoff `k` for an ordered list of binary relevance gains (`1` relevant, `0` not). Position `i` (1-based) contributes `gain / log2(i + 1)`, so a relevant hit ranked first is worth `1` and later hits are progressively discounted. Gains beyond `k` are ignored. */
|
|
70
54
|
export declare function dcgAtK(relevanceGains:number[],k:number):number;
|
|
71
55
|
/** Normalized DCG at cutoff `k`: the ranking's DCG divided by the DCG of the ideal ranking (all relevant ids first). Returns `0` when the query has no relevant ids (the ideal DCG is `0` and the score is undefined), giving a stable lower bound for aggregation. Result is in `[0, 1]`. */
|
|
@@ -81,7 +65,7 @@ export declare function precisionAtK(rankedIds:string[],relevantIds:ReadonlySet<
|
|
|
81
65
|
/** Recall at cutoff `k`: relevant ids retrieved in the top `k` divided by the total number of relevant ids. Returns `0` when the query has no relevant ids. */
|
|
82
66
|
export declare function recallAtK(rankedIds:string[],relevantIds:ReadonlySet<string>,k:number):number;
|
|
83
67
|
/** The four ranking metrics computed for a single query, plus match counts. */
|
|
84
|
-
export interface QueryEvalMetrics
|
|
68
|
+
export interface QueryEvalMetrics{
|
|
85
69
|
/** Value that configures or reports ndcg for this contract. */
|
|
86
70
|
ndcg:number;
|
|
87
71
|
/** Value that configures or reports mrr for this contract. */
|
|
@@ -93,12 +77,11 @@ recall:number;
|
|
|
93
77
|
/** Value that configures or reports relevant total for this contract. */
|
|
94
78
|
relevant_total:number;
|
|
95
79
|
/** Value that configures or reports retrieved relevant for this contract. */
|
|
96
|
-
retrieved_relevant:number;
|
|
97
|
-
}
|
|
80
|
+
retrieved_relevant:number;}
|
|
98
81
|
/** Evaluate one ranking against its relevant-id set at cutoff `k`, returning all four metrics together so callers compute the document ranking once and read every score off the result. */
|
|
99
82
|
export declare function evaluateRanking(rankedIds:string[],relevantIds:ReadonlySet<string>,k:number):QueryEvalMetrics;
|
|
100
83
|
/** Macro-averaged metrics across all evaluated queries. */
|
|
101
|
-
export interface AggregateEvalMetrics
|
|
84
|
+
export interface AggregateEvalMetrics{
|
|
102
85
|
/** Value that configures or reports ndcg for this contract. */
|
|
103
86
|
ndcg:number;
|
|
104
87
|
/** Value that configures or reports mrr for this contract. */
|
|
@@ -108,8 +91,7 @@ precision:number;
|
|
|
108
91
|
/** Value that configures or reports recall for this contract. */
|
|
109
92
|
recall:number;
|
|
110
93
|
/** Number of query entries represented by this result. */
|
|
111
|
-
query_count:number;
|
|
112
|
-
}
|
|
94
|
+
query_count:number;}
|
|
113
95
|
/** Macro-average per-query metrics (each query weighted equally). Returns all zeros with `query_count: 0` for an empty input so the gate path has a stable shape to compare against. */
|
|
114
96
|
export declare function aggregateEvalMetrics(perQuery:QueryEvalMetrics[]):AggregateEvalMetrics;
|
|
115
97
|
/**
|
|
@@ -120,4 +102,4 @@ export declare function aggregateEvalMetrics(perQuery:QueryEvalMetrics[]):Aggreg
|
|
|
120
102
|
* `queries` is missing/not an array, when the set is empty, or when any entry
|
|
121
103
|
* fails {@link parseEvalQueryEntry}.
|
|
122
104
|
*/
|
|
123
|
-
export declare function parseEvalQuerySet(raw:unknown):EvalQuerySet;
|
|
105
|
+
export declare function parseEvalQuerySet(raw:unknown):EvalQuerySet;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** HTTP failure with a status code that schedulers can classify without parsing provider text. */
|
|
2
|
-
export declare class SearchHttpError extends Error
|
|
2
|
+
export declare class SearchHttpError extends Error{
|
|
3
3
|
/** HTTP status returned by the provider, retained independently of its response body. */
|
|
4
4
|
readonly status:number;
|
|
5
5
|
/** Preserve the existing user-facing message and the machine-readable HTTP status. */
|
|
6
|
-
constructor(message:string,status:number);
|
|
7
|
-
}
|
|
6
|
+
constructor(message:string,status:number);}
|
|
8
7
|
/** Documents the search http response payload exchanged by command, SDK, and package integrations. */
|
|
9
|
-
export interface SearchHttpResponse
|
|
8
|
+
export interface SearchHttpResponse{
|
|
10
9
|
/** Whether the operation completed without a blocking failure. */
|
|
11
10
|
ok:boolean;
|
|
12
11
|
/** Lifecycle state reported for status. */
|
|
@@ -16,27 +15,25 @@ statusText:string;
|
|
|
16
15
|
/** Value that configures or reports json for this contract. */
|
|
17
16
|
json():Promise<unknown>;
|
|
18
17
|
/** Value that configures or reports text for this contract. */
|
|
19
|
-
text():Promise<string>;
|
|
20
|
-
}
|
|
18
|
+
text():Promise<string>;}
|
|
21
19
|
/** Documents the search http request init payload exchanged by command, SDK, and package integrations. */
|
|
22
|
-
export interface SearchHttpRequestInit
|
|
20
|
+
export interface SearchHttpRequestInit{
|
|
23
21
|
/** Value that configures or reports method for this contract. */
|
|
24
|
-
method:"DELETE"
|
|
22
|
+
method:"DELETE"|"POST"|"PUT";
|
|
25
23
|
/** Value that configures or reports headers for this contract. */
|
|
26
24
|
headers:Record<string,string>;
|
|
27
25
|
/** Value that configures or reports body for this contract. */
|
|
28
26
|
body:string;
|
|
29
27
|
/** Value that configures or reports signal for this contract. */
|
|
30
|
-
signal:AbortSignal;
|
|
31
|
-
}
|
|
28
|
+
signal:AbortSignal;}
|
|
32
29
|
/** Restricts search http fetcher values accepted by command, SDK, and storage contracts. */
|
|
33
|
-
export type SearchHttpFetcher<ResponseType extends SearchHttpResponse
|
|
30
|
+
export type SearchHttpFetcher<ResponseType extends SearchHttpResponse=SearchHttpResponse>=(url:string,init:SearchHttpRequestInit)=> Promise<ResponseType>;
|
|
34
31
|
/** Documents the execute search json request options payload exchanged by command, SDK, and package integrations. */
|
|
35
|
-
export interface ExecuteSearchJsonRequestOptions<ResponseType extends SearchHttpResponse
|
|
32
|
+
export interface ExecuteSearchJsonRequestOptions<ResponseType extends SearchHttpResponse=SearchHttpResponse>{
|
|
36
33
|
/** Value that configures or reports endpoint for this contract. */
|
|
37
34
|
endpoint:string;
|
|
38
35
|
/** Value that configures or reports method for this contract. */
|
|
39
|
-
method:"DELETE"
|
|
36
|
+
method:"DELETE"|"POST"|"PUT";
|
|
40
37
|
/** Value that configures or reports headers for this contract. */
|
|
41
38
|
headers:Record<string,string>;
|
|
42
39
|
/** Value that configures or reports body for this contract. */
|
|
@@ -48,13 +45,12 @@ fetcher:SearchHttpFetcher<ResponseType>;
|
|
|
48
45
|
/** Value that configures or reports request label for this contract. */
|
|
49
46
|
requestLabel:string;
|
|
50
47
|
/** Value that configures or reports response label for this contract. */
|
|
51
|
-
responseLabel:string;
|
|
52
|
-
}
|
|
48
|
+
responseLabel:string;}
|
|
53
49
|
/** Implements normalize search http timeout ms for the public runtime surface of this module. */
|
|
54
|
-
export declare function normalizeSearchHttpTimeoutMs(timeoutMs:number
|
|
50
|
+
export declare function normalizeSearchHttpTimeoutMs(timeoutMs:number|undefined,requestLabel:string,defaultTimeoutMs?:number):number;
|
|
55
51
|
/** Implements resolve search http fetcher for the public runtime surface of this module. */
|
|
56
|
-
export declare function resolveSearchHttpFetcher<ResponseType extends SearchHttpResponse>(fetcher:SearchHttpFetcher<ResponseType
|
|
52
|
+
export declare function resolveSearchHttpFetcher<ResponseType extends SearchHttpResponse>(fetcher:SearchHttpFetcher<ResponseType>|undefined,requestLabel:string):SearchHttpFetcher<ResponseType>;
|
|
57
53
|
/** Implements read failed search http response body for the public runtime surface of this module. */
|
|
58
54
|
export declare function readFailedSearchHttpResponseBody(response:SearchHttpResponse):Promise<string>;
|
|
59
55
|
/** Implements execute search json request for the public runtime surface of this module. */
|
|
60
|
-
export declare function executeSearchJsonRequest<ResponseType extends SearchHttpResponse>(options:ExecuteSearchJsonRequestOptions<ResponseType>):Promise<unknown>;
|
|
56
|
+
export declare function executeSearchJsonRequest<ResponseType extends SearchHttpResponse>(options:ExecuteSearchJsonRequestOptions<ResponseType>):Promise<unknown>;
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Powers search, embeddings, and semantic retrieval behavior for Providers.
|
|
5
5
|
*/
|
|
6
|
-
import type
|
|
7
|
-
import type { SearchHttpFetcher,SearchHttpResponse } from "./http-client.js";
|
|
6
|
+
import type{PmSettings}from "../../types/index.js";import type{SearchHttpFetcher,SearchHttpResponse}from "./http-client.js";
|
|
8
7
|
/** Restricts embedding provider name values accepted by command, SDK, and storage contracts. */
|
|
9
|
-
export type EmbeddingProviderName
|
|
8
|
+
export type EmbeddingProviderName="openai"|"ollama";
|
|
10
9
|
/** Documents the embedding provider config payload exchanged by command, SDK, and package integrations. */
|
|
11
|
-
export interface EmbeddingProviderConfig
|
|
10
|
+
export interface EmbeddingProviderConfig{
|
|
12
11
|
/** Value that configures or reports name for this contract. */
|
|
13
12
|
name:EmbeddingProviderName;
|
|
14
13
|
/** Value that configures or reports base url for this contract. */
|
|
@@ -16,30 +15,27 @@ base_url:string;
|
|
|
16
15
|
/** Value that configures or reports model for this contract. */
|
|
17
16
|
model:string;
|
|
18
17
|
/** Value that configures or reports api key for this contract. */
|
|
19
|
-
api_key?:string;
|
|
20
|
-
}
|
|
18
|
+
api_key?:string;}
|
|
21
19
|
/** Documents the embedding provider resolution payload exchanged by command, SDK, and package integrations. */
|
|
22
|
-
export interface EmbeddingProviderResolution
|
|
20
|
+
export interface EmbeddingProviderResolution{
|
|
23
21
|
/** Value that configures or reports active for this contract. */
|
|
24
|
-
active:EmbeddingProviderConfig
|
|
22
|
+
active:EmbeddingProviderConfig|null;
|
|
25
23
|
/** Value that configures or reports available for this contract. */
|
|
26
|
-
available:EmbeddingProviderConfig[];
|
|
27
|
-
}
|
|
24
|
+
available:EmbeddingProviderConfig[];}
|
|
28
25
|
/** GH-244: how an active search-provider / vector-store adapter came to be resolved, so `pm health` can explain why a working runtime can coexist with empty persisted `search.provider` / `vector_store.adapter` settings: - "configured": the persisted setting names the active resolution. - "auto-detected": runtime auto-detection selected it; the setting is empty. - "unconfigured": nothing is active. */
|
|
29
|
-
export type ProviderConfigSource
|
|
26
|
+
export type ProviderConfigSource="configured"|"auto-detected"|"unconfigured";
|
|
30
27
|
/** Classifies the resolution source for an active provider/adapter given the persisted (possibly empty) configured value. Pure and adapter-agnostic so it serves both the embedding provider and the vector-store adapter. "configured" requires the persisted value to actually MATCH the active resolution (case-insensitively): a configured-but-unhonored value (typo or unsupported name that the runtime fell back from) is reported as "auto-detected", not falsely "configured". */
|
|
31
|
-
export declare function resolveProviderConfigSource(activeName:string
|
|
28
|
+
export declare function resolveProviderConfigSource(activeName:string|null|undefined,configured:string|null|undefined):ProviderConfigSource;
|
|
32
29
|
/** Documents the embedding request target payload exchanged by command, SDK, and package integrations. */
|
|
33
|
-
export interface EmbeddingRequestTarget
|
|
30
|
+
export interface EmbeddingRequestTarget{
|
|
34
31
|
/** Value that configures or reports provider for this contract. */
|
|
35
32
|
provider:EmbeddingProviderName;
|
|
36
33
|
/** Value that configures or reports endpoint for this contract. */
|
|
37
34
|
endpoint:string;
|
|
38
35
|
/** Value that configures or reports model for this contract. */
|
|
39
|
-
model:string;
|
|
40
|
-
}
|
|
36
|
+
model:string;}
|
|
41
37
|
/** Documents the embedding request plan payload exchanged by command, SDK, and package integrations. */
|
|
42
|
-
export interface EmbeddingRequestPlan
|
|
38
|
+
export interface EmbeddingRequestPlan{
|
|
43
39
|
/** Value that configures or reports target for this contract. */
|
|
44
40
|
target:EmbeddingRequestTarget;
|
|
45
41
|
/** Value that configures or reports method for this contract. */
|
|
@@ -47,41 +43,28 @@ method:"POST";
|
|
|
47
43
|
/** Value that configures or reports headers for this contract. */
|
|
48
44
|
headers:Record<string,string>;
|
|
49
45
|
/** Value that configures or reports body for this contract. */
|
|
50
|
-
body:Record<string,unknown>;
|
|
51
|
-
}
|
|
46
|
+
body:Record<string,unknown>;}
|
|
52
47
|
/** Restricts embedding http response values accepted by command, SDK, and storage contracts. */
|
|
53
|
-
export type EmbeddingHttpResponse
|
|
48
|
+
export type EmbeddingHttpResponse=SearchHttpResponse;
|
|
54
49
|
/** Restricts embedding request fetcher values accepted by command, SDK, and storage contracts. */
|
|
55
|
-
export type EmbeddingRequestFetcher
|
|
50
|
+
export type EmbeddingRequestFetcher=SearchHttpFetcher<EmbeddingHttpResponse>;
|
|
56
51
|
/** Documents the execute embedding request options payload exchanged by command, SDK, and package integrations. */
|
|
57
|
-
export interface ExecuteEmbeddingRequestOptions
|
|
52
|
+
export interface ExecuteEmbeddingRequestOptions{
|
|
58
53
|
/** Elapsed time in milliseconds for timeout. */
|
|
59
54
|
timeout_ms?:number;
|
|
60
55
|
/** Value that configures or reports fetcher for this contract. */
|
|
61
|
-
fetcher?:EmbeddingRequestFetcher;
|
|
62
|
-
}
|
|
56
|
+
fetcher?:EmbeddingRequestFetcher;}
|
|
63
57
|
/** Settings subset that configures the embedding providers semantic search can call. */
|
|
64
|
-
export type ProviderSettingsInput
|
|
58
|
+
export type ProviderSettingsInput={
|
|
65
59
|
/** OpenAI-compatible and Ollama endpoint, credential and model settings. */
|
|
66
|
-
providers?:{
|
|
67
|
-
openai?:{
|
|
68
|
-
base_url?:string;
|
|
69
|
-
api_key?:string;
|
|
70
|
-
model?:string;
|
|
71
|
-
};
|
|
72
|
-
ollama?:{
|
|
73
|
-
base_url?:string;
|
|
74
|
-
model?:string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
};
|
|
60
|
+
providers?:{openai?:{base_url?:string;api_key?:string;model?:string;};ollama?:{base_url?:string;model?:string;};};};
|
|
78
61
|
/** Implements resolve embedding providers for the public runtime surface of this module. */
|
|
79
|
-
export declare function resolveEmbeddingProviders(settings:PmSettings
|
|
62
|
+
export declare function resolveEmbeddingProviders(settings:PmSettings|ProviderSettingsInput):EmbeddingProviderResolution;
|
|
80
63
|
/** Implements resolve embedding request target for the public runtime surface of this module. */
|
|
81
64
|
export declare function resolveEmbeddingRequestTarget(provider:EmbeddingProviderConfig):EmbeddingRequestTarget;
|
|
82
65
|
/** Implements build embedding request plan for the public runtime surface of this module. */
|
|
83
|
-
export declare function buildEmbeddingRequestPlan(provider:EmbeddingProviderConfig,input:string
|
|
66
|
+
export declare function buildEmbeddingRequestPlan(provider:EmbeddingProviderConfig,input:string|string[]):EmbeddingRequestPlan;
|
|
84
67
|
/** Implements normalize embedding response for the public runtime surface of this module. */
|
|
85
68
|
export declare function normalizeEmbeddingResponse(provider:EmbeddingProviderConfig,response:unknown):number[][];
|
|
86
69
|
/** Implements execute embedding request for the public runtime surface of this module. */
|
|
87
|
-
export declare function executeEmbeddingRequest(provider:EmbeddingProviderConfig,input:string
|
|
70
|
+
export declare function executeEmbeddingRequest(provider:EmbeddingProviderConfig,input:string|string[],options?:ExecuteEmbeddingRequestOptions):Promise<number[][]>;
|
|
@@ -3,44 +3,39 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Powers search, embeddings, and semantic retrieval behavior for Relevance.
|
|
5
5
|
*/
|
|
6
|
-
import type
|
|
7
|
-
import { type EmbeddingProviderConfig } from "./providers.js";
|
|
6
|
+
import type{PmSettings}from "../../types.js";import{type EmbeddingProviderConfig}from "./providers.js";
|
|
8
7
|
/** Fallback query expansion max queries used when callers do not provide an override. */
|
|
9
|
-
export declare const DEFAULT_QUERY_EXPANSION_MAX_QUERIES
|
|
8
|
+
export declare const DEFAULT_QUERY_EXPANSION_MAX_QUERIES=4;
|
|
10
9
|
/** Fallback rerank top k used when callers do not provide an override. */
|
|
11
|
-
export declare const DEFAULT_RERANK_TOP_K
|
|
10
|
+
export declare const DEFAULT_RERANK_TOP_K=20;
|
|
12
11
|
/** Documents the query expansion config payload exchanged by command, SDK, and package integrations. */
|
|
13
|
-
export interface QueryExpansionConfig
|
|
12
|
+
export interface QueryExpansionConfig{
|
|
14
13
|
/** Whether enabled applies to this operation. */
|
|
15
14
|
enabled:boolean;
|
|
16
15
|
/** Value that configures or reports provider for this contract. */
|
|
17
|
-
provider:string
|
|
16
|
+
provider:string|null;
|
|
18
17
|
/** Value that configures or reports max queries for this contract. */
|
|
19
|
-
max_queries:number;
|
|
20
|
-
}
|
|
18
|
+
max_queries:number;}
|
|
21
19
|
/** Documents the rerank config payload exchanged by command, SDK, and package integrations. */
|
|
22
|
-
export interface RerankConfig
|
|
20
|
+
export interface RerankConfig{
|
|
23
21
|
/** Whether enabled applies to this operation. */
|
|
24
22
|
enabled:boolean;
|
|
25
23
|
/** Value that configures or reports model for this contract. */
|
|
26
24
|
model:string;
|
|
27
25
|
/** Value that configures or reports top k for this contract. */
|
|
28
|
-
top_k:number;
|
|
29
|
-
}
|
|
26
|
+
top_k:number;}
|
|
30
27
|
/** Documents the rerank candidate payload exchanged by command, SDK, and package integrations. */
|
|
31
|
-
export interface RerankCandidate
|
|
28
|
+
export interface RerankCandidate{
|
|
32
29
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
33
30
|
id:string;
|
|
34
31
|
/** Value that configures or reports text for this contract. */
|
|
35
|
-
text:string;
|
|
36
|
-
}
|
|
32
|
+
text:string;}
|
|
37
33
|
/** Documents the rerank scored hit payload exchanged by command, SDK, and package integrations. */
|
|
38
|
-
export interface RerankScoredHit
|
|
34
|
+
export interface RerankScoredHit{
|
|
39
35
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
40
36
|
id:string;
|
|
41
37
|
/** Value that configures or reports score for this contract. */
|
|
42
|
-
score:number;
|
|
43
|
-
}
|
|
38
|
+
score:number;}
|
|
44
39
|
/** Implements build deterministic query expansions for the public runtime surface of this module. */
|
|
45
40
|
export declare function buildDeterministicQueryExpansions(query:string,maxQueries?:number):string[];
|
|
46
41
|
/** Implements normalize query expansion output for the public runtime surface of this module. */
|
|
@@ -48,10 +43,10 @@ export declare function normalizeQueryExpansionOutput(raw:unknown):string[];
|
|
|
48
43
|
/** Implements merge query expansions for the public runtime surface of this module. */
|
|
49
44
|
export declare function mergeQueryExpansions(base:string[],extra:string[],maxQueries:number):string[];
|
|
50
45
|
/** Implements resolve query expansion config for the public runtime surface of this module. */
|
|
51
|
-
export declare function resolveQueryExpansionConfig(settings:PmSettings,fallbackProviderName:string
|
|
46
|
+
export declare function resolveQueryExpansionConfig(settings:PmSettings,fallbackProviderName:string|null):QueryExpansionConfig;
|
|
52
47
|
/** Implements resolve rerank config for the public runtime surface of this module. */
|
|
53
48
|
export declare function resolveRerankConfig(settings:PmSettings,fallbackModel:string):RerankConfig;
|
|
54
49
|
/** Implements normalize rerank output for the public runtime surface of this module. */
|
|
55
50
|
export declare function normalizeRerankOutput(raw:unknown):RerankScoredHit[];
|
|
56
51
|
/** Implements rerank candidates with embeddings for the public runtime surface of this module. */
|
|
57
|
-
export declare function rerankCandidatesWithEmbeddings(provider:EmbeddingProviderConfig,model:string,query:string,candidates:RerankCandidate[],timeoutMs?:number):Promise<Map<string,number>>;
|
|
52
|
+
export declare function rerankCandidatesWithEmbeddings(provider:EmbeddingProviderConfig,model:string,query:string,candidates:RerankCandidate[],timeoutMs?:number):Promise<Map<string,number>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type{PmSettings}from "../../types/index.js";
|
|
2
2
|
/** Documents the semantic runtime defaults resolution payload exchanged by command, SDK, and package integrations. */
|
|
3
|
-
export interface SemanticRuntimeDefaultsResolution
|
|
3
|
+
export interface SemanticRuntimeDefaultsResolution{
|
|
4
4
|
/** Value that configures or reports settings for this contract. */
|
|
5
5
|
settings:PmSettings;
|
|
6
6
|
/** Value that configures or reports auto ollama defaults applied for this contract. */
|
|
@@ -8,7 +8,6 @@ auto_ollama_defaults_applied:boolean;
|
|
|
8
8
|
/** Value that configures or reports auto ollama defaults skipped reason for this contract. */
|
|
9
9
|
auto_ollama_defaults_skipped_reason?:"no_installed_embedding_model";
|
|
10
10
|
/** Value that configures or reports auto ollama defaults remediation for this contract. */
|
|
11
|
-
auto_ollama_defaults_remediation?:string;
|
|
12
|
-
}
|
|
11
|
+
auto_ollama_defaults_remediation?:string;}
|
|
13
12
|
/** Implements resolve settings with semantic runtime defaults for the public runtime surface of this module. */
|
|
14
|
-
export declare function resolveSettingsWithSemanticRuntimeDefaults(settings:PmSettings):SemanticRuntimeDefaultsResolution;
|
|
13
|
+
export declare function resolveSettingsWithSemanticRuntimeDefaults(settings:PmSettings):SemanticRuntimeDefaultsResolution;
|