@unbrained/pm-cli 2026.11.9 → 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 +16 -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-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-G6Q4VQSI.js → chunk-4AASUCHO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EZRLW4R6.js → chunk-4FLAKTZW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-5CAMQHEW.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-3BMIAI4P.js → chunk-7NAAW5EX.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BSJSGDA3.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-XKY4LUXN.js → chunk-CZETQYKO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ASJZMYKM.js → chunk-D727C4RO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6V4PGJBZ.js → chunk-EHDGHFMJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GZVOOHTO.js → chunk-F6FBGLR7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O2M3TNFY.js → chunk-F7P2NZEG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YK5GAWOT.js → chunk-FYD6LSJA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-L4WWG2H6.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-YV5ALMG2.js → chunk-NNE63MSM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Z3QEEOAM.js → chunk-NZAFLDSH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MSJ7IHMJ.js → chunk-OJ2KEDUX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ELNWRSGZ.js → chunk-T2MNRM3S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VATZTJE3.js → chunk-TBBWPEF5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GDQ2T2OR.js → chunk-U7LILCUN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BLUCQ4T4.js → chunk-UFPLZ6LZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JK7O7MFO.js → chunk-UL64P6MR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GCPP37N6.js → chunk-WNEUWDUE.js} +46 -46
- package/dist/cli-bundle/chunks/{chunk-5VRJPPUC.js → chunk-X7NM5HVQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGT252ES.js → chunk-YSWD2NXB.js} +2 -2
- package/dist/cli-bundle/chunks/{item-revision-Y5CE3EIN.js → item-revision-M7KXLQXF.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-4N5P34GO.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-TAQN2AKK.js → mutation-admission-374UR7NI.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-XMQYFUFI.js → register-list-query-GSB7PP5P.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-OBVCFLDK.js → register-mutation-ZBF6ITYK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-CGNFZ6DR.js → register-operations-PWF6GOHE.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-LFB5ERXH.js → register-setup-QDZ2Y3CI.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-NQHF6JPC.js → stage-67WGPKPH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HNFY3XLC.js → chunk-2Y4H4LIX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UIKLNSW3.js → chunk-3DWNH72D.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3K2MYE7R.js +26 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CUGJ2DY2.js → chunk-56MIAFEN.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-Q45LDP7P.js → chunk-67M7E2Z3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XLSTFUXM.js → chunk-BE2GK2G7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-C3DO4ZGZ.js → chunk-HTMQDNVC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QWUWNFQO.js → chunk-LY3JXL25.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IS5FLEZW.js → chunk-PAGW6A2X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4FWMXQN3.js → chunk-QCHCEFTO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-AH5IST3V.js → chunk-QHGGO7SY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QK7FX4O5.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RNZUORGI.js → chunk-RFMKS7VD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MYBKRV5R.js → chunk-U7HWWEJ2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-UIZVD36C.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J7PWHKZK.js → chunk-WJHDUON5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LDMBNTOG.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-M6FOLME2.js → item-revision-XC4ZJ7MY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{item-transaction-H6VA5JGB.js → item-transaction-CVGK4RJP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-PRTQWQK6.js → mutation-admission-N27D5H64.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-7T77PSJD.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 +1 -1
- 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 +51 -51
- 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 +1 -1
- 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 +11 -59
- 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 +10 -19
- 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/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/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/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/generated-error-code-catalog-part-1.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 +25 -45
- 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/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.d.ts +13 -55
- 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/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 +59 -103
- 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/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/COMMANDS.md +8 -0
- package/docs/CONFIGURATION.md +17 -0
- package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +28 -9
- package/docs/RELEASING.md +25 -0
- package/docs/SDK.md +17 -2
- package/docs/TESTING.md +11 -0
- package/marketplace.json +1 -1
- package/package.json +1 -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-JYQXIC6C.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LVDFPGD7.js +0 -3
- package/dist/cli-bundle/chunks/chunk-UFIM5ZC5.js +0 -6
- package/dist/cli-bundle/chunks/item-transaction-XBIN4KYM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HLQOGAWG.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-IB6TCE7N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JU62TKJP.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-NUFO3OR6.js +0 -44
|
@@ -6,35 +6,21 @@
|
|
|
6
6
|
* tools can reuse the exact selection contract with their own projections.
|
|
7
7
|
*/
|
|
8
8
|
/** Detail levels a context candidate may occupy inside a bounded packet. */
|
|
9
|
-
export type ContextProjectionLevel
|
|
9
|
+
export type ContextProjectionLevel="identity"|"summary"|"full";
|
|
10
10
|
/** Stable intent-keyed policies for risk, diversity, and safety-aware packing. */
|
|
11
|
-
export declare const CONTEXT_PACKING_PROFILES:{
|
|
12
|
-
readonly balanced:{
|
|
13
|
-
readonly redundancyPenalty:0.35;
|
|
14
|
-
readonly uncertaintyPenalty:0.2;
|
|
15
|
-
};
|
|
16
|
-
readonly context:{
|
|
17
|
-
readonly redundancyPenalty:0.45;
|
|
18
|
-
readonly uncertaintyPenalty:0.15;
|
|
19
|
-
};
|
|
20
|
-
readonly next:{
|
|
21
|
-
readonly redundancyPenalty:0.25;
|
|
22
|
-
readonly uncertaintyPenalty:0.3;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
11
|
+
export declare const CONTEXT_PACKING_PROFILES:{readonly balanced:{readonly redundancyPenalty:0.35;readonly uncertaintyPenalty:0.2;};readonly context:{readonly redundancyPenalty:0.45;readonly uncertaintyPenalty:0.15;};readonly next:{readonly redundancyPenalty:0.25;readonly uncertaintyPenalty:0.3;};};
|
|
25
12
|
/** Built-in task-set profiles selected from the triggering command intent. */
|
|
26
|
-
export type ContextPackingProfile
|
|
13
|
+
export type ContextPackingProfile=keyof typeof CONTEXT_PACKING_PROFILES;
|
|
27
14
|
/** Token costs for the monotone projection levels of one candidate. */
|
|
28
|
-
export interface ContextProjectionCosts
|
|
15
|
+
export interface ContextProjectionCosts{
|
|
29
16
|
/** Stable identity-only representation cost. */
|
|
30
17
|
identity:number;
|
|
31
18
|
/** Compact summary representation cost. */
|
|
32
19
|
summary:number;
|
|
33
20
|
/** Full representation cost. */
|
|
34
|
-
full:number;
|
|
35
|
-
}
|
|
21
|
+
full:number;}
|
|
36
22
|
/** One ranked candidate offered to the context packet optimizer. */
|
|
37
|
-
export interface ContextPackingCandidate<TItem>
|
|
23
|
+
export interface ContextPackingCandidate<TItem>{
|
|
38
24
|
/** Stable candidate identifier. */
|
|
39
25
|
id:string;
|
|
40
26
|
/** Caller-owned value returned unchanged for selected candidates. */
|
|
@@ -52,19 +38,17 @@ required?:boolean;
|
|
|
52
38
|
/** Optional credible-width estimate used for risk-adjusted value. */
|
|
53
39
|
uncertainty?:number;
|
|
54
40
|
/** Optional lineage identity used to suppress superseded duplicates. */
|
|
55
|
-
lineage?:string;
|
|
56
|
-
}
|
|
41
|
+
lineage?:string;}
|
|
57
42
|
/** One selected candidate and the projection depth bought for it. */
|
|
58
|
-
export interface PackedContextCandidate<TItem> extends ContextPackingCandidate<TItem>
|
|
43
|
+
export interface PackedContextCandidate<TItem> extends ContextPackingCandidate<TItem>{
|
|
59
44
|
/** Projection depth selected by the packer. */
|
|
60
45
|
projection:ContextProjectionLevel;
|
|
61
46
|
/** Tokens charged to the packet. */
|
|
62
47
|
tokens:number;
|
|
63
48
|
/** Risk- and redundancy-adjusted value used for selection. */
|
|
64
|
-
marginal_value:number;
|
|
65
|
-
}
|
|
49
|
+
marginal_value:number;}
|
|
66
50
|
/** Accounting and completeness metadata for one packed context packet. */
|
|
67
|
-
export interface ContextPackingReport<TItem>
|
|
51
|
+
export interface ContextPackingReport<TItem>{
|
|
68
52
|
/** Selected candidates in deterministic relevance order. */
|
|
69
53
|
included:PackedContextCandidate<TItem>[];
|
|
70
54
|
/** Ranked candidate identifiers omitted after projection degradation. */
|
|
@@ -80,18 +64,17 @@ complete:boolean;
|
|
|
80
64
|
/** Whether selection inspected every optional candidate before its deadline. */
|
|
81
65
|
selection_complete:boolean;
|
|
82
66
|
/** Machine-readable reason selection stopped. */
|
|
83
|
-
termination_reason:"exhausted"
|
|
67
|
+
termination_reason:"exhausted"|"latency_budget";
|
|
84
68
|
/** Candidate comparisons completed by the bounded selector. */
|
|
85
69
|
evaluated_candidates:number;
|
|
86
70
|
/** Explicit selection latency budget, or null when unbounded. */
|
|
87
|
-
latency_budget_ms:number
|
|
71
|
+
latency_budget_ms:number|null;
|
|
88
72
|
/** Stable task-set profile disclosed to downstream evaluation. */
|
|
89
73
|
profile:ContextPackingProfile;
|
|
90
74
|
/** Projection degradation order used by the optimizer. */
|
|
91
|
-
degradation_ladder:ContextProjectionLevel[];
|
|
92
|
-
}
|
|
75
|
+
degradation_ladder:ContextProjectionLevel[];}
|
|
93
76
|
/** Options controlling deterministic packet selection. */
|
|
94
|
-
export interface PackContextCandidatesOptions
|
|
77
|
+
export interface PackContextCandidatesOptions{
|
|
95
78
|
/** Maximum estimated tokens available to the packet. */
|
|
96
79
|
tokenBudget:number;
|
|
97
80
|
/** Task-set profile disclosed in the result envelope. */
|
|
@@ -103,12 +86,11 @@ uncertaintyPenalty?:number;
|
|
|
103
86
|
/** Maximum selector wall-clock time; required anchors remain mask-immune. */
|
|
104
87
|
latencyBudgetMs?:number;
|
|
105
88
|
/** Monotonic clock override for deterministic hosts and tests. */
|
|
106
|
-
readClock?:()
|
|
107
|
-
}
|
|
89
|
+
readClock?:()=> number;}
|
|
108
90
|
/**
|
|
109
91
|
* Packs ranked candidates under an explicit token budget. Required anchors are
|
|
110
92
|
* admitted first, optional rows compete by marginal value per token, and then
|
|
111
93
|
* selected rows are upgraded from identity to summary to full detail. This
|
|
112
94
|
* guarantees projection degradation happens before omission.
|
|
113
95
|
*/
|
|
114
|
-
export declare function packContextCandidates<TItem>(candidates:readonly ContextPackingCandidate<TItem>[],options:PackContextCandidatesOptions):ContextPackingReport<TItem>;
|
|
96
|
+
export declare function packContextCandidates<TItem>(candidates:readonly ContextPackingCandidate<TItem>[],options:PackContextCandidatesOptions):ContextPackingReport<TItem>;
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { ItemMetadata } from "../types/index.js";
|
|
3
|
-
import type { HistoryEventClass } from "../core/history/event-classification.js";
|
|
4
|
-
import { type PmReadOutputResult } from "./read-output-contracts.js";
|
|
5
|
-
import type { PmContextIntentReceipt } from "./context-intent-contracts.js";
|
|
1
|
+
import type{RuntimeStatusRegistry}from "../core/schema/runtime-schema.js";import type{ItemMetadata}from "../types/index.js";import type{HistoryEventClass}from "../core/history/event-classification.js";import{type PmReadOutputResult}from "./read-output-contracts.js";import type{PmContextIntentReceipt}from "./context-intent-contracts.js";
|
|
6
2
|
/** Canonical signal keys understood by the built-in relevance model. */
|
|
7
|
-
export declare const CONTEXT_RELEVANCE_SIGNAL_NAMES:readonly
|
|
3
|
+
export declare const CONTEXT_RELEVANCE_SIGNAL_NAMES:readonly["structural","recency","activity_density","graph_proximity","claim_focus","priority_pressure","risk_pressure","deadline_pressure","knowledge_density","author_affinity","usage_affinity","semantic_similarity"];
|
|
8
4
|
/** A normalized signal consumed by the built-in context relevance scorer. */
|
|
9
|
-
export type ContextRelevanceSignalName
|
|
5
|
+
export type ContextRelevanceSignalName=(typeof CONTEXT_RELEVANCE_SIGNAL_NAMES)[number];
|
|
10
6
|
/** Normalized candidate features; omitted signals are excluded from weighting. */
|
|
11
|
-
export type ContextRelevanceSignals
|
|
7
|
+
export type ContextRelevanceSignals=Partial<Record<Exclude<ContextRelevanceSignalName,"structural">,number>>;
|
|
12
8
|
/** Authoritative coordinate and fallback that produced an item's recency. */
|
|
13
|
-
export interface ContextRecencyEvidence
|
|
9
|
+
export interface ContextRecencyEvidence{
|
|
14
10
|
/** Source selected by the canonical fallback ladder. */
|
|
15
|
-
source:"substantive_history"
|
|
11
|
+
source:"substantive_history"|"release_cohort"|"created_at";
|
|
16
12
|
/** ISO coordinate used for deterministic recency ordering. */
|
|
17
13
|
coordinate:string;
|
|
18
14
|
/** Immutable operation selected from history when source is substantive_history. */
|
|
19
15
|
history_op?:string;
|
|
20
16
|
/** Declared class selected from history when source is substantive_history. */
|
|
21
|
-
event_class?:HistoryEventClass;
|
|
22
|
-
}
|
|
17
|
+
event_class?:HistoryEventClass;}
|
|
23
18
|
/** Per-signal provenance exposed by explained relevance results. */
|
|
24
|
-
export interface ContextSignalProvenance
|
|
19
|
+
export interface ContextSignalProvenance{
|
|
25
20
|
/** Evidence for the canonical temporal component. */
|
|
26
|
-
recency:ContextRecencyEvidence;
|
|
27
|
-
}
|
|
21
|
+
recency:ContextRecencyEvidence;}
|
|
28
22
|
/** A project-management object and its derived relevance signals. */
|
|
29
|
-
export interface ContextRelevanceCandidate<TItem>
|
|
23
|
+
export interface ContextRelevanceCandidate<TItem>{
|
|
30
24
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
31
25
|
id:string;
|
|
32
26
|
/** Value that configures or reports item for this contract. */
|
|
@@ -34,17 +28,15 @@ item:TItem;
|
|
|
34
28
|
/** Value that configures or reports signals for this contract. */
|
|
35
29
|
signals?:ContextRelevanceSignals;
|
|
36
30
|
/** Authoritative source details for explainable derived signals. */
|
|
37
|
-
signal_provenance?:ContextSignalProvenance;
|
|
38
|
-
}
|
|
31
|
+
signal_provenance?:ContextSignalProvenance;}
|
|
39
32
|
/** Item candidate whose built-in metadata derivation always supplies signals. */
|
|
40
|
-
export interface ItemContextRelevanceCandidate extends ContextRelevanceCandidate<ItemMetadata>
|
|
33
|
+
export interface ItemContextRelevanceCandidate extends ContextRelevanceCandidate<ItemMetadata>{
|
|
41
34
|
/** Complete built-in derivation result, with unavailable signals omitted by value. */
|
|
42
35
|
signals:ContextRelevanceSignals;
|
|
43
36
|
/** Built-in recency derivation always discloses its source. */
|
|
44
|
-
signal_provenance:ContextSignalProvenance;
|
|
45
|
-
}
|
|
37
|
+
signal_provenance:ContextSignalProvenance;}
|
|
46
38
|
/** Inputs that make item-signal derivation deterministic and host-configurable. */
|
|
47
|
-
export interface BuildItemContextRelevanceCandidatesOptions
|
|
39
|
+
export interface BuildItemContextRelevanceCandidatesOptions{
|
|
48
40
|
/** Workspace lifecycle registry, including custom in-progress aliases. */
|
|
49
41
|
statusRegistry:RuntimeStatusRegistry;
|
|
50
42
|
/** Stable clock used for deadline pressure. */
|
|
@@ -66,8 +58,7 @@ knowledgeDensity?:Readonly<Record<string,number>>;
|
|
|
66
58
|
/** Optional history-derived author affinity by item id. */
|
|
67
59
|
authorAffinity?:Readonly<Record<string,number>>;
|
|
68
60
|
/** Latest substantive history evidence keyed by item id. */
|
|
69
|
-
recencyEvidence?:Readonly<Record<string,ContextRecencyEvidence>>;
|
|
70
|
-
}
|
|
61
|
+
recencyEvidence?:Readonly<Record<string,ContextRecencyEvidence>>;}
|
|
71
62
|
/**
|
|
72
63
|
* Derive the canonical metadata signals consumed by `pm context` and `pm next`.
|
|
73
64
|
* Extensions can pair this with {@link scoreContextCandidatesWithActiveExtensions}
|
|
@@ -75,9 +66,9 @@ recencyEvidence?:Readonly<Record<string,ContextRecencyEvidence>>;
|
|
|
75
66
|
*/
|
|
76
67
|
export declare function buildItemContextRelevanceCandidates(items:readonly ItemMetadata[],options:BuildItemContextRelevanceCandidatesOptions):ItemContextRelevanceCandidate[];
|
|
77
68
|
/** Per-signal weighted contributions used to explain a ranked result. */
|
|
78
|
-
export type ContextRelevanceContributions
|
|
69
|
+
export type ContextRelevanceContributions=Record<string,number>;
|
|
79
70
|
/** One ranked candidate with deterministic score and explanation metadata. */
|
|
80
|
-
export interface RankedContextCandidate<TItem> extends ContextRelevanceCandidate<TItem>
|
|
71
|
+
export interface RankedContextCandidate<TItem> extends ContextRelevanceCandidate<TItem>{
|
|
81
72
|
/** Value that configures or reports baseline rank for this contract. */
|
|
82
73
|
baseline_rank:number;
|
|
83
74
|
/** Value that configures or reports rank for this contract. */
|
|
@@ -85,10 +76,9 @@ rank:number;
|
|
|
85
76
|
/** Value that configures or reports score for this contract. */
|
|
86
77
|
score:number;
|
|
87
78
|
/** Value that configures or reports contributions for this contract. */
|
|
88
|
-
contributions:ContextRelevanceContributions;
|
|
89
|
-
}
|
|
79
|
+
contributions:ContextRelevanceContributions;}
|
|
90
80
|
/** Complete output from a context relevance scorer. */
|
|
91
|
-
export interface ContextRelevanceReport<TItem>
|
|
81
|
+
export interface ContextRelevanceReport<TItem>{
|
|
92
82
|
/** Value that configures or reports model for this contract. */
|
|
93
83
|
model:string;
|
|
94
84
|
/** Value that configures or reports available signals for this contract. */
|
|
@@ -96,35 +86,31 @@ available_signals:ContextRelevanceSignalName[];
|
|
|
96
86
|
/** Value that configures or reports ranked for this contract. */
|
|
97
87
|
ranked:RankedContextCandidate<TItem>[];
|
|
98
88
|
/** Value that configures or reports warnings for this contract. */
|
|
99
|
-
warnings?:string[];
|
|
100
|
-
}
|
|
89
|
+
warnings?:string[];}
|
|
101
90
|
/** Minimal custom score returned by a replacement or wrapper scorer. */
|
|
102
|
-
export interface ContextRelevanceCustomScore
|
|
91
|
+
export interface ContextRelevanceCustomScore{
|
|
103
92
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
104
93
|
id:string;
|
|
105
94
|
/** Value that configures or reports score for this contract. */
|
|
106
|
-
score:number;
|
|
107
|
-
}
|
|
95
|
+
score:number;}
|
|
108
96
|
/** Input provided to a custom scorer, including the deterministic default. */
|
|
109
|
-
export interface ContextRelevanceScorerInput<TItem>
|
|
97
|
+
export interface ContextRelevanceScorerInput<TItem>{
|
|
110
98
|
/** Value that configures or reports candidates for this contract. */
|
|
111
99
|
candidates:readonly ContextRelevanceCandidate<TItem>[];
|
|
112
100
|
/** Fallback report used when callers do not provide an override. */
|
|
113
|
-
default_report:ContextRelevanceReport<TItem>;
|
|
114
|
-
}
|
|
101
|
+
default_report:ContextRelevanceReport<TItem>;}
|
|
115
102
|
/** Replaceable package/extension scorer contract. */
|
|
116
|
-
export type ContextRelevanceScorer<TItem
|
|
103
|
+
export type ContextRelevanceScorer<TItem>=(input:ContextRelevanceScorerInput<TItem>)=> readonly ContextRelevanceCustomScore[]|Promise<readonly ContextRelevanceCustomScore[]>;
|
|
117
104
|
/** Options for the built-in or replaceable context relevance scorer. */
|
|
118
|
-
export interface ScoreContextCandidatesOptions<TItem>
|
|
105
|
+
export interface ScoreContextCandidatesOptions<TItem>{
|
|
119
106
|
/** Value that configures or reports weights for this contract. */
|
|
120
107
|
weights?:Partial<Record<ContextRelevanceSignalName,number>>;
|
|
121
108
|
/** Value that configures or reports scorer for this contract. */
|
|
122
|
-
scorer?:ContextRelevanceScorer<TItem>;
|
|
123
|
-
}
|
|
109
|
+
scorer?:ContextRelevanceScorer<TItem>;}
|
|
124
110
|
/** Governed extension service used to replace or wrap context ranking. */
|
|
125
111
|
export declare const CONTEXT_RELEVANCE_SERVICE:"context_relevance";
|
|
126
112
|
/** Command surface requesting an active extension relevance override. */
|
|
127
|
-
export type ContextRelevanceSurface
|
|
113
|
+
export type ContextRelevanceSurface="context"|"next";
|
|
128
114
|
/** Score candidates with pm's deterministic weighted model. Candidate order is the structural baseline and remains unchanged when no advanced signals exist. */
|
|
129
115
|
export declare function defaultScoreContextCandidates<TItem>(candidates:readonly ContextRelevanceCandidate<TItem>[],options?:Pick<ScoreContextCandidatesOptions<TItem>,"weights">):ContextRelevanceReport<TItem>;
|
|
130
116
|
/** Score candidates with the default model or a validated replacement/wrapper. */
|
|
@@ -132,7 +118,7 @@ export declare function scoreContextCandidates<TItem>(candidates:readonly Contex
|
|
|
132
118
|
/** Score command candidates through the public default model and then the active governed `context_relevance` service override, when one is registered. */
|
|
133
119
|
export declare function scoreContextCandidatesWithActiveExtensions<TItem>(surface:ContextRelevanceSurface,candidates:readonly ContextRelevanceCandidate<TItem>[],options?:Pick<ScoreContextCandidatesOptions<TItem>,"weights">):Promise<ContextRelevanceReport<TItem>>;
|
|
134
120
|
/** Input for rank-aware context/next quality evaluation. */
|
|
135
|
-
export interface ContextRankingEvaluationInput
|
|
121
|
+
export interface ContextRankingEvaluationInput{
|
|
136
122
|
/** Value that configures or reports ranked ids for this contract. */
|
|
137
123
|
ranked_ids:string[];
|
|
138
124
|
/** Value that configures or reports judgments for this contract. */
|
|
@@ -144,10 +130,9 @@ continuity_ids?:string[];
|
|
|
144
130
|
/** Value that configures or reports actual tokens for this contract. */
|
|
145
131
|
actual_tokens:number;
|
|
146
132
|
/** Value that configures or reports token budget for this contract. */
|
|
147
|
-
token_budget:number;
|
|
148
|
-
}
|
|
133
|
+
token_budget:number;}
|
|
149
134
|
/** Rank-quality, continuity, recall, and token-budget metrics for one scenario. */
|
|
150
|
-
export interface ContextRankingEvaluation
|
|
135
|
+
export interface ContextRankingEvaluation{
|
|
151
136
|
/** Value that configures or reports ndcg for this contract. */
|
|
152
137
|
ndcg:number;
|
|
153
138
|
/** Value that configures or reports reciprocal rank for this contract. */
|
|
@@ -159,29 +144,21 @@ continuity_coverage:number;
|
|
|
159
144
|
/** Value that configures or reports token budget adherence for this contract. */
|
|
160
145
|
token_budget_adherence:number;
|
|
161
146
|
/** Value that configures or reports within token budget for this contract. */
|
|
162
|
-
within_token_budget:boolean;
|
|
163
|
-
}
|
|
147
|
+
within_token_budget:boolean;}
|
|
164
148
|
/** Flexible read options accepted by context evaluation scenarios. */
|
|
165
|
-
export interface ContextEvaluationReadOptions
|
|
149
|
+
export interface ContextEvaluationReadOptions{
|
|
166
150
|
/** Value that configures or reports explain ranking for this contract. */
|
|
167
|
-
explainRanking?:boolean;
|
|
168
|
-
[key:string]:unknown;
|
|
169
|
-
}
|
|
151
|
+
explainRanking?:boolean;[key:string]:unknown;}
|
|
170
152
|
/** Minimal item identity consumed by the context evaluation runner. */
|
|
171
|
-
export interface ContextEvaluationResultItem
|
|
153
|
+
export interface ContextEvaluationResultItem{
|
|
172
154
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
173
|
-
id:string;
|
|
174
|
-
}
|
|
155
|
+
id:string;}
|
|
175
156
|
/** Optional scorer attribution returned by an evaluated read primitive. */
|
|
176
|
-
export interface ContextEvaluationResultRanking
|
|
157
|
+
export interface ContextEvaluationResultRanking{
|
|
177
158
|
/** Value that configures or reports items for this contract. */
|
|
178
|
-
items?:Array<{
|
|
179
|
-
id:string;
|
|
180
|
-
contributions:ContextRelevanceContributions;
|
|
181
|
-
}>;
|
|
182
|
-
}
|
|
159
|
+
items?:Array<{id:string;contributions:ContextRelevanceContributions;}>;}
|
|
183
160
|
/** Structural context result consumed by the evaluation runner. */
|
|
184
|
-
export interface ContextEvaluationContextResult
|
|
161
|
+
export interface ContextEvaluationContextResult{
|
|
185
162
|
/** Value that configures or reports high level for this contract. */
|
|
186
163
|
high_level?:ContextEvaluationResultItem[];
|
|
187
164
|
/** Value that configures or reports low level for this contract. */
|
|
@@ -191,32 +168,26 @@ blocked_fallback?:ContextEvaluationResultItem[];
|
|
|
191
168
|
/** Value that configures or reports ranking for this contract. */
|
|
192
169
|
ranking?:ContextEvaluationResultRanking;
|
|
193
170
|
/** Intent receipt retained so whole-result omissions cannot be graded. */
|
|
194
|
-
context_intent?:Pick<PmContextIntentReceipt,"result_omitted">;
|
|
195
|
-
[key:string]:unknown;
|
|
196
|
-
}
|
|
171
|
+
context_intent?:Pick<PmContextIntentReceipt,"result_omitted">;[key:string]:unknown;}
|
|
197
172
|
/** Structural next result consumed by the evaluation runner. */
|
|
198
|
-
export interface ContextEvaluationNextResult
|
|
173
|
+
export interface ContextEvaluationNextResult{
|
|
199
174
|
/** Value that configures or reports recommended for this contract. */
|
|
200
|
-
recommended?:ContextEvaluationResultItem
|
|
175
|
+
recommended?:ContextEvaluationResultItem|null;
|
|
201
176
|
/** Value that configures or reports ready for this contract. */
|
|
202
177
|
ready?:ContextEvaluationResultItem[];
|
|
203
178
|
/** Value that configures or reports ranking for this contract. */
|
|
204
179
|
ranking?:ContextEvaluationResultRanking;
|
|
205
180
|
/** Intent receipt retained so whole-result omissions cannot be graded. */
|
|
206
|
-
context_intent?:Pick<PmContextIntentReceipt,"result_omitted">;
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
type ContextEvaluationContextFields = Pick<ContextEvaluationContextResult,"high_level" | "low_level" | "blocked_fallback" | "ranking" | "context_intent">;
|
|
210
|
-
type ContextEvaluationNextFields = Pick<ContextEvaluationNextResult,"recommended" | "ready" | "ranking" | "context_intent">;
|
|
181
|
+
context_intent?:Pick<PmContextIntentReceipt,"result_omitted">;[key:string]:unknown;}
|
|
182
|
+
type ContextEvaluationContextFields=Pick<ContextEvaluationContextResult,"high_level"|"low_level"|"blocked_fallback"|"ranking"|"context_intent">;type ContextEvaluationNextFields=Pick<ContextEvaluationNextResult,"recommended"|"ready"|"ranking"|"context_intent">;
|
|
211
183
|
/** Read-only SDK surface required by the context evaluation runner. */
|
|
212
|
-
export interface ContextEvaluationReader
|
|
184
|
+
export interface ContextEvaluationReader{
|
|
213
185
|
/** Value that configures or reports context for this contract. */
|
|
214
186
|
context(options?:ContextEvaluationReadOptions):Promise<PmReadOutputResult<ContextEvaluationContextFields>>;
|
|
215
187
|
/** Value that configures or reports next for this contract. */
|
|
216
|
-
next(options?:ContextEvaluationReadOptions):Promise<PmReadOutputResult<ContextEvaluationNextFields>>;
|
|
217
|
-
}
|
|
188
|
+
next(options?:ContextEvaluationReadOptions):Promise<PmReadOutputResult<ContextEvaluationNextFields>>;}
|
|
218
189
|
/** One graded context or next scenario evaluated against a real SDK reader. */
|
|
219
|
-
export interface ContextEvaluationScenario
|
|
190
|
+
export interface ContextEvaluationScenario{
|
|
220
191
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
221
192
|
id:string;
|
|
222
193
|
/** Value that configures or reports surface for this contract. */
|
|
@@ -232,17 +203,15 @@ continuity_ids?:string[];
|
|
|
232
203
|
/** Value that configures or reports token budget for this contract. */
|
|
233
204
|
token_budget:number;
|
|
234
205
|
/** Value that configures or reports rationale for this contract. */
|
|
235
|
-
rationale:string;
|
|
236
|
-
}
|
|
206
|
+
rationale:string;}
|
|
237
207
|
/** Per-item signal attribution retained by a context evaluation report. */
|
|
238
|
-
export interface ContextEvaluationAttribution
|
|
208
|
+
export interface ContextEvaluationAttribution{
|
|
239
209
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
240
210
|
id:string;
|
|
241
211
|
/** Value that configures or reports contributions for this contract. */
|
|
242
|
-
contributions:ContextRelevanceContributions;
|
|
243
|
-
}
|
|
212
|
+
contributions:ContextRelevanceContributions;}
|
|
244
213
|
/** Result of executing and grading one context evaluation scenario. */
|
|
245
|
-
export interface ContextEvaluationScenarioReport
|
|
214
|
+
export interface ContextEvaluationScenarioReport{
|
|
246
215
|
/** Stable identifier used to reference this record across commands and storage. */
|
|
247
216
|
id:string;
|
|
248
217
|
/** Value that configures or reports surface for this contract. */
|
|
@@ -256,10 +225,9 @@ actual_tokens:number;
|
|
|
256
225
|
/** Value that configures or reports metrics for this contract. */
|
|
257
226
|
metrics:ContextRankingEvaluation;
|
|
258
227
|
/** Value that configures or reports attribution for this contract. */
|
|
259
|
-
attribution:ContextEvaluationAttribution[];
|
|
260
|
-
}
|
|
228
|
+
attribution:ContextEvaluationAttribution[];}
|
|
261
229
|
/** Minimum acceptable aggregate metrics for a context evaluation corpus. */
|
|
262
|
-
export interface ContextEvaluationThresholds
|
|
230
|
+
export interface ContextEvaluationThresholds{
|
|
263
231
|
/** Value that configures or reports ndcg for this contract. */
|
|
264
232
|
ndcg:number;
|
|
265
233
|
/** Value that configures or reports reciprocal rank for this contract. */
|
|
@@ -269,12 +237,11 @@ required_recall:number;
|
|
|
269
237
|
/** Value that configures or reports continuity coverage for this contract. */
|
|
270
238
|
continuity_coverage:number;
|
|
271
239
|
/** Value that configures or reports token budget adherence for this contract. */
|
|
272
|
-
token_budget_adherence:number;
|
|
273
|
-
}
|
|
240
|
+
token_budget_adherence:number;}
|
|
274
241
|
/** Canonical aggregate metrics required by every context evaluation corpus. */
|
|
275
|
-
export declare const CONTEXT_EVALUATION_METRIC_NAMES:readonly
|
|
242
|
+
export declare const CONTEXT_EVALUATION_METRIC_NAMES:readonly["ndcg","reciprocal_rank","required_recall","continuity_coverage","token_budget_adherence"];
|
|
276
243
|
/** Aggregate context evaluation report suitable for a CI quality gate. */
|
|
277
|
-
export interface ContextEvaluationCorpusReport
|
|
244
|
+
export interface ContextEvaluationCorpusReport{
|
|
278
245
|
/** Number of scenario entries represented by this result. */
|
|
279
246
|
scenario_count:number;
|
|
280
247
|
/** Value that configures or reports aggregate for this contract. */
|
|
@@ -284,8 +251,7 @@ scenarios:ContextEvaluationScenarioReport[];
|
|
|
284
251
|
/** Value that configures or reports passed for this contract. */
|
|
285
252
|
passed:boolean;
|
|
286
253
|
/** Value that configures or reports failures for this contract. */
|
|
287
|
-
failures:string[];
|
|
288
|
-
}
|
|
254
|
+
failures:string[];}
|
|
289
255
|
/** Evaluate one ranked context packet against graded human judgments. */
|
|
290
256
|
export declare function evaluateContextRanking(input:ContextRankingEvaluationInput):ContextRankingEvaluation;
|
|
291
257
|
/** Execute one graded scenario through public SDK context/next read primitives. */
|
|
@@ -293,5 +259,4 @@ export declare function runContextEvaluationScenario(scenario:ContextEvaluationS
|
|
|
293
259
|
/** Aggregate scenario reports and evaluate every metric against explicit thresholds. */
|
|
294
260
|
export declare function summarizeContextEvaluationReports(reports:readonly ContextEvaluationScenarioReport[],thresholds:ContextEvaluationThresholds):ContextEvaluationCorpusReport;
|
|
295
261
|
/** Execute a same-workspace scenario corpus through public SDK read primitives. */
|
|
296
|
-
export declare function runContextEvaluationCorpus(scenarios:readonly ContextEvaluationScenario[],reader:ContextEvaluationReader,thresholds:ContextEvaluationThresholds):Promise<ContextEvaluationCorpusReport>;
|
|
297
|
-
export {};
|
|
262
|
+
export declare function runContextEvaluationCorpus(scenarios:readonly ContextEvaluationScenario[],reader:ContextEvaluationReader,thresholds:ContextEvaluationThresholds):Promise<ContextEvaluationCorpusReport>;export{};
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ItemMetadata } from "../types/index.js";
|
|
1
|
+
import{type BuildItemContextRelevanceCandidatesOptions,type ContextRelevanceCandidate,type ContextRelevanceSignals,type ContextSignalProvenance}from "./context-relevance.js";import type{ItemMetadata}from "../types/index.js";
|
|
3
2
|
/** Current serialized feature-store envelope version. */
|
|
4
|
-
export declare const CONTEXT_SIGNAL_STORE_FORMAT_VERSION
|
|
3
|
+
export declare const CONTEXT_SIGNAL_STORE_FORMAT_VERSION=3;
|
|
5
4
|
/** Current canonical signal-vector version. */
|
|
6
|
-
export declare const CONTEXT_SIGNAL_SET_VERSION
|
|
5
|
+
export declare const CONTEXT_SIGNAL_SET_VERSION=2;
|
|
7
6
|
/** Authoritative substrate used to derive one snapshot. */
|
|
8
|
-
export type ContextSignalSnapshotSource
|
|
7
|
+
export type ContextSignalSnapshotSource="derived_index"|"scan_fallback";
|
|
9
8
|
/** One immutable item signal row. */
|
|
10
|
-
export interface ContextSignalSnapshotItem
|
|
9
|
+
export interface ContextSignalSnapshotItem{
|
|
11
10
|
/** Stable item identifier. */
|
|
12
11
|
id:string;
|
|
13
12
|
/** Canonical normalized signal vector. */
|
|
14
13
|
signals:ContextRelevanceSignals;
|
|
15
14
|
/** Authoritative temporal source retained for explained ranking. */
|
|
16
|
-
signal_provenance:ContextSignalProvenance;
|
|
17
|
-
}
|
|
15
|
+
signal_provenance:ContextSignalProvenance;}
|
|
18
16
|
/** Rebuildable, deterministic context-signal snapshot. */
|
|
19
|
-
export interface ContextSignalSnapshot
|
|
17
|
+
export interface ContextSignalSnapshot{
|
|
20
18
|
/** Serialized envelope version. */
|
|
21
19
|
format_version:number;
|
|
22
20
|
/** Signal algorithm version. */
|
|
@@ -30,69 +28,45 @@ generated_at:string;
|
|
|
30
28
|
/** Read substrate used for the fold. */
|
|
31
29
|
source:ContextSignalSnapshotSource;
|
|
32
30
|
/** Item rows sorted by canonical id. */
|
|
33
|
-
items:readonly ContextSignalSnapshotItem[];
|
|
34
|
-
}
|
|
31
|
+
items:readonly ContextSignalSnapshotItem[];}
|
|
35
32
|
/** Pluggable persistence boundary for context-signal snapshots. */
|
|
36
|
-
export interface ContextSignalStoreAdapter
|
|
33
|
+
export interface ContextSignalStoreAdapter{
|
|
37
34
|
/** Read the serialized snapshot, or null when none exists. */
|
|
38
|
-
read():Promise<unknown
|
|
35
|
+
read():Promise<unknown|null>;
|
|
39
36
|
/** Atomically replace the serialized snapshot. */
|
|
40
|
-
write(snapshot:ContextSignalSnapshot):Promise<void>;
|
|
41
|
-
}
|
|
37
|
+
write(snapshot:ContextSignalSnapshot):Promise<void>;}
|
|
42
38
|
/** Options required to fold authoritative items into a snapshot. */
|
|
43
|
-
export interface BuildContextSignalSnapshotOptions extends BuildItemContextRelevanceCandidatesOptions
|
|
39
|
+
export interface BuildContextSignalSnapshotOptions extends BuildItemContextRelevanceCandidatesOptions{
|
|
44
40
|
/** Authoritative history or derived-index cursor. */
|
|
45
41
|
sourceCursor:string;
|
|
46
42
|
/** Substrate used to load the authoritative items. */
|
|
47
|
-
source:ContextSignalSnapshotSource;
|
|
48
|
-
}
|
|
43
|
+
source:ContextSignalSnapshotSource;}
|
|
49
44
|
/** Result of a feature-store read with explicit degradation metadata. */
|
|
50
|
-
export interface ContextSignalStoreReadResult
|
|
45
|
+
export interface ContextSignalStoreReadResult{
|
|
51
46
|
/** Valid snapshot used for candidate assembly. */
|
|
52
47
|
snapshot:ContextSignalSnapshot;
|
|
53
48
|
/** Candidates joined to the caller's authoritative item objects. */
|
|
54
49
|
candidates:ContextRelevanceCandidate<ItemMetadata>[];
|
|
55
50
|
/** Whether the persisted snapshot was reused or rebuilt. */
|
|
56
|
-
cache_status:"fresh"
|
|
51
|
+
cache_status:"fresh"|"rebuilt";
|
|
57
52
|
/** Non-fatal recovery diagnostics. */
|
|
58
53
|
warnings:readonly string[];
|
|
59
54
|
/** Actionable meanings and executable recovery commands for every warning. */
|
|
60
|
-
warning_details?:readonly ContextSignalStoreWarningDetail[];
|
|
61
|
-
}
|
|
55
|
+
warning_details?:readonly ContextSignalStoreWarningDetail[];}
|
|
62
56
|
/** Stable recovery contract for one context signal-store warning. */
|
|
63
|
-
export interface ContextSignalStoreWarningDetail
|
|
57
|
+
export interface ContextSignalStoreWarningDetail{
|
|
64
58
|
/** Machine-readable warning code also present in `warnings`. */
|
|
65
|
-
code:"context_signal_store_invalid"
|
|
59
|
+
code:"context_signal_store_invalid"|"context_signal_store_stale"|"context_signal_store_write_failed";
|
|
66
60
|
/** Bounded explanation of the observed derived-state condition. */
|
|
67
61
|
meaning:string;
|
|
68
62
|
/** Safe executable command that retries or confirms recovery. */
|
|
69
63
|
recovery_command:"pm context";
|
|
70
64
|
/** Expected observable effect of the recovery command. */
|
|
71
|
-
recovery_effect:string;
|
|
72
|
-
}
|
|
65
|
+
recovery_effect:string;}
|
|
73
66
|
/** Canonical actionable contracts shared by CLI, SDK, MCP, and package hosts. */
|
|
74
|
-
export declare const CONTEXT_SIGNAL_STORE_WARNING_DETAILS:{
|
|
75
|
-
readonly context_signal_store_invalid:{
|
|
76
|
-
readonly code:"context_signal_store_invalid";
|
|
77
|
-
readonly meaning:"The persisted context-signal snapshot was unreadable or invalid and was rebuilt from authoritative items.";
|
|
78
|
-
readonly recovery_command:"pm context";
|
|
79
|
-
readonly recovery_effect:"Re-read context and confirm the rebuilt snapshot can be loaded without the warning.";
|
|
80
|
-
};
|
|
81
|
-
readonly context_signal_store_stale:{
|
|
82
|
-
readonly code:"context_signal_store_stale";
|
|
83
|
-
readonly meaning:"The persisted context-signal snapshot did not match the authoritative cursor or item corpus and was rebuilt.";
|
|
84
|
-
readonly recovery_command:"pm context";
|
|
85
|
-
readonly recovery_effect:"Re-read context and confirm the rebuilt snapshot is now fresh.";
|
|
86
|
-
};
|
|
87
|
-
readonly context_signal_store_write_failed:{
|
|
88
|
-
readonly code:"context_signal_store_write_failed";
|
|
89
|
-
readonly meaning:"Context signals were rebuilt in memory, but the derived snapshot could not be persisted.";
|
|
90
|
-
readonly recovery_command:"pm context";
|
|
91
|
-
readonly recovery_effect:"Retry the derived snapshot write and confirm the warning clears after storage access is restored.";
|
|
92
|
-
};
|
|
93
|
-
};
|
|
67
|
+
export declare const CONTEXT_SIGNAL_STORE_WARNING_DETAILS:{readonly context_signal_store_invalid:{readonly code:"context_signal_store_invalid";readonly meaning:"The persisted context-signal snapshot was unreadable or invalid and was rebuilt from authoritative items.";readonly recovery_command:"pm context";readonly recovery_effect:"Re-read context and confirm the rebuilt snapshot can be loaded without the warning.";};readonly context_signal_store_stale:{readonly code:"context_signal_store_stale";readonly meaning:"The persisted context-signal snapshot did not match the authoritative cursor or item corpus and was rebuilt.";readonly recovery_command:"pm context";readonly recovery_effect:"Re-read context and confirm the rebuilt snapshot is now fresh.";};readonly context_signal_store_write_failed:{readonly code:"context_signal_store_write_failed";readonly meaning:"Context signals were rebuilt in memory, but the derived snapshot could not be persisted.";readonly recovery_command:"pm context";readonly recovery_effect:"Retry the derived snapshot write and confirm the warning clears after storage access is restored.";};};
|
|
94
68
|
/** Workspace-bound feature-store options used by CLI, MCP, and SDK readers. */
|
|
95
|
-
export interface ReadWorkspaceContextSignalsOptions extends BuildItemContextRelevanceCandidatesOptions
|
|
69
|
+
export interface ReadWorkspaceContextSignalsOptions extends BuildItemContextRelevanceCandidatesOptions{
|
|
96
70
|
/** Tracker root containing rebuildable runtime state. */
|
|
97
71
|
pmRoot:string;
|
|
98
72
|
/** Explicit cursor for custom SDK hosts; the stock host reads the metadata index. */
|
|
@@ -100,29 +74,24 @@ sourceCursor?:string;
|
|
|
100
74
|
/** Explicit source classification paired with sourceCursor. */
|
|
101
75
|
source?:ContextSignalSnapshotSource;
|
|
102
76
|
/** Stable projection namespace when one workspace serves distinct candidate corpora. */
|
|
103
|
-
storeKey?:string;
|
|
104
|
-
}
|
|
77
|
+
storeKey?:string;}
|
|
105
78
|
/** Validate an untrusted serialized snapshot without accepting partial envelopes. */
|
|
106
|
-
export declare function parseContextSignalSnapshot(value:unknown):ContextSignalSnapshot
|
|
79
|
+
export declare function parseContextSignalSnapshot(value:unknown):ContextSignalSnapshot|null;
|
|
107
80
|
/** Fold authoritative items into a deterministic, immutable signal snapshot. */
|
|
108
81
|
export declare function buildContextSignalSnapshot(items:readonly ItemMetadata[],options:BuildContextSignalSnapshotOptions):ContextSignalSnapshot;
|
|
109
82
|
/** Filesystem adapter using same-directory atomic replacement. */
|
|
110
|
-
export declare class JsonFileContextSignalStoreAdapter implements ContextSignalStoreAdapter
|
|
111
|
-
private readonly filePath;
|
|
83
|
+
export declare class JsonFileContextSignalStoreAdapter implements ContextSignalStoreAdapter{private readonly filePath;
|
|
112
84
|
/** Create an adapter for an explicit derived-state file path. */
|
|
113
85
|
constructor(filePath:string);
|
|
114
86
|
/** Read and decode the JSON snapshot, returning null when it does not exist. */
|
|
115
|
-
read():Promise<unknown
|
|
87
|
+
read():Promise<unknown|null>;
|
|
116
88
|
/** Write a complete snapshot through a unique same-directory temporary file. */
|
|
117
|
-
write(snapshot:ContextSignalSnapshot):Promise<void>;
|
|
118
|
-
}
|
|
89
|
+
write(snapshot:ContextSignalSnapshot):Promise<void>;}
|
|
119
90
|
/** Cursor-aware feature store that self-heals from absent, stale, or corrupt state. */
|
|
120
|
-
export declare class ContextSignalStore
|
|
121
|
-
private readonly adapter;
|
|
91
|
+
export declare class ContextSignalStore{private readonly adapter;
|
|
122
92
|
/** Bind the store to a caller-selected persistence adapter. */
|
|
123
93
|
constructor(adapter:ContextSignalStoreAdapter);
|
|
124
94
|
/** Read matching signals or rebuild them from authoritative items. */
|
|
125
|
-
readOrRebuild(items:readonly ItemMetadata[],options:BuildContextSignalSnapshotOptions):Promise<ContextSignalStoreReadResult>;
|
|
126
|
-
}
|
|
95
|
+
readOrRebuild(items:readonly ItemMetadata[],options:BuildContextSignalSnapshotOptions):Promise<ContextSignalStoreReadResult>;}
|
|
127
96
|
/** Read cursor-bound workspace signals with deterministic scan fallback. */
|
|
128
|
-
export declare function readWorkspaceContextSignals(items:readonly ItemMetadata[],options:ReadWorkspaceContextSignalsOptions):Promise<ContextSignalStoreReadResult>;
|
|
97
|
+
export declare function readWorkspaceContextSignals(items:readonly ItemMetadata[],options:ReadWorkspaceContextSignalsOptions):Promise<ContextSignalStoreReadResult>;
|