@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,5 +1,5 @@
|
|
|
1
1
|
/** Versioned state supplied to a sequence of related read invocations. */
|
|
2
|
-
export interface PmReadOutputSessionState
|
|
2
|
+
export interface PmReadOutputSessionState{
|
|
3
3
|
/** Session-state schema version. */
|
|
4
4
|
version:1;
|
|
5
5
|
/** Caller-selected request-group identity. */
|
|
@@ -9,19 +9,17 @@ token_budget:number;
|
|
|
9
9
|
/** Tokens already spent by earlier invocations. */
|
|
10
10
|
spent_tokens:number;
|
|
11
11
|
/** Item facts already serialized in full during this session. */
|
|
12
|
-
seen_item_ids:string[];
|
|
13
|
-
}
|
|
12
|
+
seen_item_ids:string[];}
|
|
14
13
|
/** Lightweight row emitted instead of repeating a previously served item. */
|
|
15
|
-
export interface PmReadOutputSessionReference
|
|
14
|
+
export interface PmReadOutputSessionReference{
|
|
16
15
|
/** Stable item identity retained for joins and follow-up reads. */
|
|
17
16
|
id:string;
|
|
18
17
|
/** Resolvable reference to the session fact already in caller context. */
|
|
19
|
-
context_ref:string;
|
|
20
|
-
}
|
|
18
|
+
context_ref:string;}
|
|
21
19
|
/** Narrow a delivered reference before accessing the original row's fields. */
|
|
22
20
|
export declare function isReadOutputSessionReference(value:unknown):value is PmReadOutputSessionReference;
|
|
23
21
|
/** Receipt proving cross-call suppression and budget accounting. */
|
|
24
|
-
export interface PmReadOutputSessionReceipt
|
|
22
|
+
export interface PmReadOutputSessionReceipt{
|
|
25
23
|
/** Session-receipt schema version. */
|
|
26
24
|
contract_version:1;
|
|
27
25
|
/** Caller-selected request-group identity. */
|
|
@@ -57,17 +55,16 @@ reference_format:"session:<session-id>:<item-id>";
|
|
|
57
55
|
/** Command that restores a referenced item when prior context is unavailable. */
|
|
58
56
|
restore_reference_with:"pm get <item-id> --depth brief";
|
|
59
57
|
/** Caller-carried state for the next read in the same request group. */
|
|
60
|
-
next_state:PmReadOutputSessionState;
|
|
61
|
-
}
|
|
58
|
+
next_state:PmReadOutputSessionState;}
|
|
62
59
|
/** Smallest session ceiling that can carry a useful result and both receipts. */
|
|
63
|
-
export declare const PM_READ_OUTPUT_SESSION_MIN_TOKENS
|
|
60
|
+
export declare const PM_READ_OUTPUT_SESSION_MIN_TOKENS=256;
|
|
64
61
|
/** Maximum caller-carried served-item identities accepted in one session state. */
|
|
65
|
-
export declare const PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS
|
|
62
|
+
export declare const PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS=10000;
|
|
66
63
|
/** Parse and strictly validate a JSON string or typed session-state object. */
|
|
67
|
-
export declare function parseReadOutputSession(value:unknown):PmReadOutputSessionState
|
|
64
|
+
export declare function parseReadOutputSession(value:unknown):PmReadOutputSessionState|undefined;
|
|
68
65
|
/** Replace previously served item rows with compact, resolvable references. */
|
|
69
66
|
export declare function applyReadOutputSessionReferences(result:Record<string,unknown>,state:PmReadOutputSessionState):Record<string,unknown>;
|
|
70
67
|
/** Attach a fixed-point session receipt and return the exact charged tokens. */
|
|
71
|
-
export declare function attachReadOutputSessionReceipt(result:Record<string,unknown>,state:PmReadOutputSessionState,format?:"json"
|
|
68
|
+
export declare function attachReadOutputSessionReceipt(result:Record<string,unknown>,state:PmReadOutputSessionState,format?:"json"|"toon"):Record<string,unknown>;
|
|
72
69
|
/** Return the unspent group budget available to the current invocation. */
|
|
73
|
-
export declare function readOutputSessionRemainingTokens(state:PmReadOutputSessionState):number;
|
|
70
|
+
export declare function readOutputSessionRemainingTokens(state:PmReadOutputSessionState):number;
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* Provides exact, deterministic graph analytics with explicit semantics and
|
|
5
5
|
* provenance suitable for planning, impact analysis, and context selection.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import { RelationshipGraph,RelationshipKindRegistry,type RelationshipEdge,type RelationshipQueryOptions } from "./relationships.js";
|
|
7
|
+
import type{RelationshipSnapshot}from "./relationship-history.js";import{RelationshipGraph,RelationshipKindRegistry,type RelationshipEdge,type RelationshipQueryOptions}from "./relationships.js";
|
|
9
8
|
/** Exact execution-graph analysis over registered ordering kinds. */
|
|
10
|
-
export interface RelationshipExecutionAnalysis
|
|
9
|
+
export interface RelationshipExecutionAnalysis{
|
|
11
10
|
/** Whether the result is exact rather than sampled or approximate. */
|
|
12
11
|
exact:true;
|
|
13
12
|
/** Whether the order-bearing graph is acyclic. */
|
|
@@ -27,22 +26,17 @@ criticalPathLength:number;
|
|
|
27
26
|
/** Strongly connected order-bearing components that represent cycles. */
|
|
28
27
|
cycles:string[][];
|
|
29
28
|
/** Semantic provenance for the analysis. */
|
|
30
|
-
provenance:{
|
|
31
|
-
algorithm:"kahn-longest-path";
|
|
32
|
-
edgeFamily:"ordering";
|
|
33
|
-
};
|
|
34
|
-
}
|
|
29
|
+
provenance:{algorithm:"kahn-longest-path";edgeFamily:"ordering";};}
|
|
35
30
|
/** One affected node with its exact shortest explanation path. */
|
|
36
|
-
export interface RelationshipImpactRow
|
|
31
|
+
export interface RelationshipImpactRow{
|
|
37
32
|
/** Affected node identifier. */
|
|
38
33
|
id:string;
|
|
39
34
|
/** Shortest relationship distance from the root. */
|
|
40
35
|
distance:number;
|
|
41
36
|
/** Exact path explaining why the node is affected. */
|
|
42
|
-
path:string[];
|
|
43
|
-
}
|
|
37
|
+
path:string[];}
|
|
44
38
|
/** Bounded reverse- or forward-impact result. */
|
|
45
|
-
export interface RelationshipImpactAnalysis
|
|
39
|
+
export interface RelationshipImpactAnalysis{
|
|
46
40
|
/** Impact origin. */
|
|
47
41
|
root:string;
|
|
48
42
|
/** Deterministic affected-node rows. */
|
|
@@ -54,13 +48,9 @@ truncated:boolean;
|
|
|
54
48
|
/** Cursor resuming after the final returned impact row. */
|
|
55
49
|
nextCursor?:string;
|
|
56
50
|
/** Query work retained for performance and explainability. */
|
|
57
|
-
cost:{
|
|
58
|
-
visitedNodes:number;
|
|
59
|
-
inspectedEdges:number;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
51
|
+
cost:{visitedNodes:number;inspectedEdges:number;};}
|
|
62
52
|
/** Exact structural summary of the complete graph snapshot. */
|
|
63
|
-
export interface RelationshipKnowledgeAnalysis
|
|
53
|
+
export interface RelationshipKnowledgeAnalysis{
|
|
64
54
|
/** Weakly connected components, largest then lexicographic. */
|
|
65
55
|
components:string[][];
|
|
66
56
|
/** Strongly connected components over directed stored edges. */
|
|
@@ -68,20 +58,13 @@ stronglyConnected:string[][];
|
|
|
68
58
|
/** Nodes with no relationship edges. */
|
|
69
59
|
orphans:string[];
|
|
70
60
|
/** Maximum-degree nodes and their unique-neighbor degree. */
|
|
71
|
-
hubs:{
|
|
72
|
-
id:string;
|
|
73
|
-
degree:number;
|
|
74
|
-
}[];
|
|
61
|
+
hubs:{id:string;degree:number;}[];
|
|
75
62
|
/** Whether the result is exact. */
|
|
76
63
|
exact:true;
|
|
77
64
|
/** Semantic provenance for the analysis. */
|
|
78
|
-
provenance:{
|
|
79
|
-
algorithm:"component-degree";
|
|
80
|
-
edgeFamily:"all";
|
|
81
|
-
};
|
|
82
|
-
}
|
|
65
|
+
provenance:{algorithm:"component-degree";edgeFamily:"all";};}
|
|
83
66
|
/** Edge-level delta between two immutable snapshots. */
|
|
84
|
-
export interface RelationshipSnapshotComparison
|
|
67
|
+
export interface RelationshipSnapshotComparison{
|
|
85
68
|
/** Earlier snapshot version. */
|
|
86
69
|
fromVersion:number;
|
|
87
70
|
/** Later snapshot version. */
|
|
@@ -93,18 +76,15 @@ removed:RelationshipEdge[];
|
|
|
93
76
|
/** Number of byte-equivalent edges retained. */
|
|
94
77
|
unchangedCount:number;
|
|
95
78
|
/** Whether the comparison is exact. */
|
|
96
|
-
exact:true;
|
|
97
|
-
}
|
|
79
|
+
exact:true;}
|
|
98
80
|
/** Registry override for custom domain semantics. */
|
|
99
|
-
export interface RelationshipAnalyticsOptions
|
|
81
|
+
export interface RelationshipAnalyticsOptions{
|
|
100
82
|
/** Registry used to interpret ordering direction and custom kinds. */
|
|
101
|
-
registry?:RelationshipKindRegistry;
|
|
102
|
-
}
|
|
83
|
+
registry?:RelationshipKindRegistry;}
|
|
103
84
|
/** Impact-specific pagination layered onto the shared graph query controls. */
|
|
104
|
-
export interface RelationshipImpactOptions extends RelationshipQueryOptions
|
|
85
|
+
export interface RelationshipImpactOptions extends RelationshipQueryOptions{
|
|
105
86
|
/** Resume emission from an opaque cursor bound to the traversal semantics. */
|
|
106
|
-
after?:string;
|
|
107
|
-
}
|
|
87
|
+
after?:string;}
|
|
108
88
|
/** Analyze registered order-bearing relationships without treating associative cycles as blockers. */
|
|
109
89
|
export declare function analyzeRelationshipExecution(graph:RelationshipGraph,options?:RelationshipAnalyticsOptions):RelationshipExecutionAnalysis;
|
|
110
90
|
/** Compute bounded impact rows and exact shortest explanation paths. */
|
|
@@ -112,4 +92,4 @@ export declare function analyzeGraphImpact(graph:RelationshipGraph,root:string,o
|
|
|
112
92
|
/** Analyze weak/strong components, isolates, and exact unique-neighbor hubs. */
|
|
113
93
|
export declare function analyzeKnowledgeGraph(graph:RelationshipGraph):RelationshipKnowledgeAnalysis;
|
|
114
94
|
/** Compare two immutable relationship snapshots by full normalized edge value. */
|
|
115
|
-
export declare function compareRelationshipSnapshots(before:RelationshipSnapshot,after:RelationshipSnapshot):RelationshipSnapshotComparison;
|
|
95
|
+
export declare function compareRelationshipSnapshots(before:RelationshipSnapshot,after:RelationshipSnapshot):RelationshipSnapshotComparison;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{RelationshipGraph,RelationshipKindRegistry,type RelationshipEdge,type RelationshipTraversalDirection}from "./relationships.js";
|
|
2
2
|
/** Canonical default shared by the kernel and rendered-budget recovery. */
|
|
3
|
-
export declare const DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET
|
|
3
|
+
export declare const DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET=1200;
|
|
4
4
|
/** Semantic family explaining why a node or edge participates in graph context. */
|
|
5
|
-
export type RelationshipContextRole
|
|
5
|
+
export type RelationshipContextRole="prerequisite"|"dependent"|"ancestor"|"descendant"|"provenance"|"related";
|
|
6
6
|
/**
|
|
7
7
|
* Completeness marker for one graph-context packet.
|
|
8
8
|
*
|
|
@@ -10,9 +10,9 @@ export type RelationshipContextRole = "prerequisite" | "dependent" | "ancestor"
|
|
|
10
10
|
* the remaining values are reserved so index-backed, sampled, or policy-redacted
|
|
11
11
|
* providers can report their result quality through the same contract.
|
|
12
12
|
*/
|
|
13
|
-
export type RelationshipContextCompleteness
|
|
13
|
+
export type RelationshipContextCompleteness="complete"|"truncated"|"sampled"|"approximate"|"stale_index"|"redacted";
|
|
14
14
|
/** Caller-owned compact node details joined into graph context. */
|
|
15
|
-
export interface RelationshipContextNodeDetails
|
|
15
|
+
export interface RelationshipContextNodeDetails{
|
|
16
16
|
/** Stable graph node identifier. */
|
|
17
17
|
id:string;
|
|
18
18
|
/** Optional display title. */
|
|
@@ -20,10 +20,9 @@ title?:string;
|
|
|
20
20
|
/** Optional lifecycle status. */
|
|
21
21
|
status?:string;
|
|
22
22
|
/** Optional evidence pointers such as files, tests, or history ids. */
|
|
23
|
-
evidence?:readonly string[];
|
|
24
|
-
}
|
|
23
|
+
evidence?:readonly string[];}
|
|
25
24
|
/** One selected graph-context node with explainable inclusion. */
|
|
26
|
-
export interface RelationshipContextNode extends RelationshipContextNodeDetails
|
|
25
|
+
export interface RelationshipContextNode extends RelationshipContextNodeDetails{
|
|
27
26
|
/** Shortest bounded distance from the root. */
|
|
28
27
|
distance:number;
|
|
29
28
|
/** Semantic family of this node relative to its discovery counterpart. */
|
|
@@ -31,10 +30,9 @@ role:RelationshipContextRole;
|
|
|
31
30
|
/** Node through which bounded traversal first discovered this node. */
|
|
32
31
|
via:string;
|
|
33
32
|
/** Concise deterministic reasons the node was selected. */
|
|
34
|
-
reasons:string[];
|
|
35
|
-
}
|
|
33
|
+
reasons:string[];}
|
|
36
34
|
/** Counts-first packet overview served before any row payload. */
|
|
37
|
-
export interface RelationshipContextSummary
|
|
35
|
+
export interface RelationshipContextSummary{
|
|
38
36
|
/** Root node identifier. */
|
|
39
37
|
rootId:string;
|
|
40
38
|
/** Root lifecycle status when the caller supplied node details. */
|
|
@@ -56,10 +54,9 @@ omittedEdges:number;
|
|
|
56
54
|
/** Root evidence pointers promoted into the packet. */
|
|
57
55
|
evidenceCount:number;
|
|
58
56
|
/** Whether a continuation cursor is available. */
|
|
59
|
-
hasMore:boolean;
|
|
60
|
-
}
|
|
57
|
+
hasMore:boolean;}
|
|
61
58
|
/** Controls for bounded graph-context assembly. */
|
|
62
|
-
export interface RelationshipContextOptions
|
|
59
|
+
export interface RelationshipContextOptions{
|
|
63
60
|
/** Traversal direction relative to each visited node. */
|
|
64
61
|
direction?:RelationshipTraversalDirection;
|
|
65
62
|
/** Optional registered kind filter. */
|
|
@@ -77,10 +74,9 @@ cursor?:string;
|
|
|
77
74
|
/** Registry used to explain custom relationship semantics. */
|
|
78
75
|
registry?:RelationshipKindRegistry;
|
|
79
76
|
/** Abort signal checked during traversal. */
|
|
80
|
-
signal?:AbortSignal;
|
|
81
|
-
}
|
|
77
|
+
signal?:AbortSignal;}
|
|
82
78
|
/** Explainable graph context packet. */
|
|
83
|
-
export interface RelationshipContextResult
|
|
79
|
+
export interface RelationshipContextResult{
|
|
84
80
|
/** Root node details. */
|
|
85
81
|
root:RelationshipContextNodeDetails;
|
|
86
82
|
/** Counts-first overview of the packet. */
|
|
@@ -92,20 +88,6 @@ edges:RelationshipEdge[];
|
|
|
92
88
|
/** Root evidence pointers promoted for immediate consumption. */
|
|
93
89
|
evidence:string[];
|
|
94
90
|
/** Completeness, continuation, and cost envelope. */
|
|
95
|
-
meta:{
|
|
96
|
-
exact:true;
|
|
97
|
-
truncated:boolean;
|
|
98
|
-
completeness:RelationshipContextCompleteness;
|
|
99
|
-
nodeLimit:number;
|
|
100
|
-
edgeLimit:number;
|
|
101
|
-
tokenBudget:number;
|
|
102
|
-
usedTokens:number;
|
|
103
|
-
visitedNodes:number;
|
|
104
|
-
inspectedEdges:number;
|
|
105
|
-
omittedNodes:number;
|
|
106
|
-
omittedEdges:number;
|
|
107
|
-
nextCursor?:string;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
91
|
+
meta:{exact:true;truncated:boolean;completeness:RelationshipContextCompleteness;nodeLimit:number;edgeLimit:number;tokenBudget:number;usedTokens:number;visitedNodes:number;inspectedEdges:number;omittedNodes:number;omittedEdges:number;nextCursor?:string;};}
|
|
110
92
|
/** Build one deterministic bounded graph-context packet with continuation. */
|
|
111
|
-
export declare function buildRelationshipContext(graph:RelationshipGraph,rootId:string,details:readonly RelationshipContextNodeDetails[],options?:RelationshipContextOptions):RelationshipContextResult;
|
|
93
|
+
export declare function buildRelationshipContext(graph:RelationshipGraph,rootId:string,details:readonly RelationshipContextNodeDetails[],options?:RelationshipContextOptions):RelationshipContextResult;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{RelationshipGraph,RelationshipKindRegistry,type RelationshipEdge}from "./relationships.js";
|
|
2
2
|
/** Mutation kinds retained in the immutable relationship event stream. */
|
|
3
|
-
export type RelationshipEventAction
|
|
3
|
+
export type RelationshipEventAction="add"|"remove"|"supersede";
|
|
4
4
|
/** Caller-authored relationship mutation before its sequence is assigned. */
|
|
5
|
-
export interface RelationshipEventInput
|
|
5
|
+
export interface RelationshipEventInput{
|
|
6
6
|
/** Globally unique idempotency key for this event. */
|
|
7
7
|
eventId:string;
|
|
8
8
|
/** Stable logical relationship identifier across superseding events. */
|
|
@@ -18,15 +18,13 @@ timestamp:string;
|
|
|
18
18
|
/** Optional optimistic concurrency precondition. */
|
|
19
19
|
expectedVersion?:number;
|
|
20
20
|
/** Optional human-readable mutation rationale. */
|
|
21
|
-
reason?:string;
|
|
22
|
-
}
|
|
21
|
+
reason?:string;}
|
|
23
22
|
/** One immutable sequenced relationship mutation. */
|
|
24
|
-
export interface RelationshipEvent extends Omit<RelationshipEventInput,"expectedVersion">
|
|
23
|
+
export interface RelationshipEvent extends Omit<RelationshipEventInput,"expectedVersion">{
|
|
25
24
|
/** One-based append sequence assigned by the ledger. */
|
|
26
|
-
sequence:number;
|
|
27
|
-
}
|
|
25
|
+
sequence:number;}
|
|
28
26
|
/** Point-in-time materialized relationship view. */
|
|
29
|
-
export interface RelationshipSnapshot
|
|
27
|
+
export interface RelationshipSnapshot{
|
|
30
28
|
/** Final event sequence included in this snapshot. */
|
|
31
29
|
version:number;
|
|
32
30
|
/** Timestamp of the final included event, when one exists. */
|
|
@@ -34,10 +32,9 @@ asOf?:string;
|
|
|
34
32
|
/** Deterministic active edge materialization. */
|
|
35
33
|
edges:readonly RelationshipEdge[];
|
|
36
34
|
/** Immutable graph query view over the active edges. */
|
|
37
|
-
graph:RelationshipGraph;
|
|
38
|
-
}
|
|
35
|
+
graph:RelationshipGraph;}
|
|
39
36
|
/** Stable cursor page over a fixed relationship event-log version. */
|
|
40
|
-
export interface RelationshipEventPage
|
|
37
|
+
export interface RelationshipEventPage{
|
|
41
38
|
/** Log version against which this page was produced. */
|
|
42
39
|
version:number;
|
|
43
40
|
/** Events in append order. */
|
|
@@ -45,19 +42,17 @@ events:RelationshipEvent[];
|
|
|
45
42
|
/** Whether another event page exists. */
|
|
46
43
|
hasMore:boolean;
|
|
47
44
|
/** Opaque continuation cursor when another page exists. */
|
|
48
|
-
nextCursor?:string;
|
|
49
|
-
}
|
|
45
|
+
nextCursor?:string;}
|
|
50
46
|
/** Bounded controls for deterministic relationship-event batch iteration. */
|
|
51
|
-
export interface RelationshipEventStreamOptions
|
|
47
|
+
export interface RelationshipEventStreamOptions{
|
|
52
48
|
/** One-based first event version to include. */
|
|
53
49
|
fromVersion?:number;
|
|
54
50
|
/** One-based final event version to include. */
|
|
55
51
|
toVersion?:number;
|
|
56
52
|
/** Maximum number of events yielded in each immutable batch. */
|
|
57
|
-
batchSize?:number;
|
|
58
|
-
}
|
|
53
|
+
batchSize?:number;}
|
|
59
54
|
/** Result of folding an immutable relationship-event prefix into domain state. */
|
|
60
|
-
export interface RelationshipEventProjection<State>
|
|
55
|
+
export interface RelationshipEventProjection<State>{
|
|
61
56
|
/** Final projected state returned by the caller-owned reducer. */
|
|
62
57
|
state:State;
|
|
63
58
|
/** Final event sequence included in the projection. */
|
|
@@ -65,36 +60,32 @@ version:number;
|
|
|
65
60
|
/** Number of events processed by this projection. */
|
|
66
61
|
processed:number;
|
|
67
62
|
/** Timestamp of the final included event, when one exists. */
|
|
68
|
-
asOf?:string;
|
|
69
|
-
}
|
|
63
|
+
asOf?:string;}
|
|
70
64
|
/** Pure reducer used to derive application state from relationship events. */
|
|
71
|
-
export type RelationshipEventReducer<State
|
|
65
|
+
export type RelationshipEventReducer<State>=(state:State,event:RelationshipEvent)=> State;
|
|
72
66
|
/** Construction controls for the in-memory reference ledger. */
|
|
73
|
-
export interface RelationshipEventLogOptions
|
|
67
|
+
export interface RelationshipEventLogOptions{
|
|
74
68
|
/** Registry defining edge semantics and cardinality. */
|
|
75
|
-
registry?:RelationshipKindRegistry;
|
|
76
|
-
}
|
|
69
|
+
registry?:RelationshipKindRegistry;}
|
|
77
70
|
/** Filesystem controls for the durable relationship event store. */
|
|
78
|
-
export interface RelationshipEventStoreOptions extends RelationshipEventLogOptions
|
|
71
|
+
export interface RelationshipEventStoreOptions extends RelationshipEventLogOptions{
|
|
79
72
|
/** Tracker root that owns the relationship history directory. */
|
|
80
73
|
pmRoot:string;
|
|
81
74
|
/** Fixed node universe validated by every replay and append. */
|
|
82
75
|
nodes:Iterable<string>;
|
|
83
76
|
/** Optional JSONL path relative to the tracker root. */
|
|
84
|
-
relativePath?:string;
|
|
85
|
-
}
|
|
77
|
+
relativePath?:string;}
|
|
86
78
|
/** Collision policy applied while publishing a durable event batch. */
|
|
87
|
-
export type RelationshipExistingEventPolicy
|
|
79
|
+
export type RelationshipExistingEventPolicy="error"|"skip_identical";
|
|
88
80
|
/** Controls for one atomic durable relationship-event batch. */
|
|
89
|
-
export interface RelationshipEventBatchOptions
|
|
81
|
+
export interface RelationshipEventBatchOptions{
|
|
90
82
|
/**
|
|
91
83
|
* Existing event ids fail by default. Migration resume flows may skip an id
|
|
92
84
|
* only when every persisted semantic field is identical to the input.
|
|
93
85
|
*/
|
|
94
|
-
existingEventPolicy?:RelationshipExistingEventPolicy;
|
|
95
|
-
}
|
|
86
|
+
existingEventPolicy?:RelationshipExistingEventPolicy;}
|
|
96
87
|
/** Result of one validated, atomic durable relationship-event batch. */
|
|
97
|
-
export interface RelationshipEventBatchResult
|
|
88
|
+
export interface RelationshipEventBatchResult{
|
|
98
89
|
/** Durable stream version observed while holding the writer lock. */
|
|
99
90
|
version_before:number;
|
|
100
91
|
/** Durable stream version after the atomic publication. */
|
|
@@ -102,14 +93,12 @@ version_after:number;
|
|
|
102
93
|
/** Immutable sequenced events newly published by this call. */
|
|
103
94
|
appended:readonly RelationshipEvent[];
|
|
104
95
|
/** Existing byte-equivalent event ids skipped by resume mode. */
|
|
105
|
-
skipped_event_ids:readonly string[];
|
|
106
|
-
}
|
|
96
|
+
skipped_event_ids:readonly string[];}
|
|
107
97
|
/**
|
|
108
98
|
* Append-only in-memory reference ledger. Durable adapters can persist the
|
|
109
99
|
* returned immutable events while reusing the same replay and validation model.
|
|
110
100
|
*/
|
|
111
|
-
export declare class RelationshipEventLog
|
|
112
|
-
#private;
|
|
101
|
+
export declare class RelationshipEventLog{#private;
|
|
113
102
|
/** Create an empty relationship ledger for a fixed node universe. */
|
|
114
103
|
constructor(nodes:Iterable<string>,options?:RelationshipEventLogOptions);
|
|
115
104
|
/** Current append sequence. */
|
|
@@ -128,24 +117,15 @@ project<State>(initialState:State,reducer:RelationshipEventReducer<State>,option
|
|
|
128
117
|
/** Validate and append one attributable relationship mutation. */
|
|
129
118
|
append(input:RelationshipEventInput):RelationshipEvent;
|
|
130
119
|
/** Materialize an exact point-in-time graph without mutating the ledger. */
|
|
131
|
-
snapshot(options?:{
|
|
132
|
-
atVersion?:number;
|
|
133
|
-
atTimestamp?:string;
|
|
134
|
-
}):RelationshipSnapshot;
|
|
120
|
+
snapshot(options?:{atVersion?:number;atTimestamp?:string;}):RelationshipSnapshot;
|
|
135
121
|
/** Page the immutable event stream with a cursor bound to this log version. */
|
|
136
|
-
page(options:{
|
|
137
|
-
limit:number;
|
|
138
|
-
cursor?:string;
|
|
139
|
-
}):RelationshipEventPage;
|
|
140
|
-
}
|
|
122
|
+
page(options:{limit:number;cursor?:string;}):RelationshipEventPage;}
|
|
141
123
|
/**
|
|
142
124
|
* Lock-serialized durable JSONL adapter for {@link RelationshipEventLog}.
|
|
143
125
|
* Every append replays the current stream while holding the workspace lock, so
|
|
144
126
|
* independent processes share optimistic versions without lost updates.
|
|
145
127
|
*/
|
|
146
|
-
export declare class RelationshipEventStore
|
|
147
|
-
#private;
|
|
148
|
-
private constructor();
|
|
128
|
+
export declare class RelationshipEventStore{#private;private constructor();
|
|
149
129
|
/** Open and validate an existing stream or create an empty store view. */
|
|
150
130
|
static open(options:RelationshipEventStoreOptions):Promise<RelationshipEventStore>;
|
|
151
131
|
/** Absolute JSONL path, exposed for diagnostics and backup tooling. */
|
|
@@ -173,5 +153,4 @@ page(options:Parameters<RelationshipEventLog["page"]>[0]):Promise<RelationshipEv
|
|
|
173
153
|
*/
|
|
174
154
|
stream(options?:RelationshipEventStreamOptions):AsyncGenerator<readonly RelationshipEvent[]>;
|
|
175
155
|
/** Refresh once and fold a coherent durable prefix into application state. */
|
|
176
|
-
project<State>(initialState:State,reducer:RelationshipEventReducer<State>,options?:Omit<RelationshipEventStreamOptions,"batchSize">):Promise<RelationshipEventProjection<State>>;
|
|
177
|
-
}
|
|
156
|
+
project<State>(initialState:State,reducer:RelationshipEventReducer<State>,options?:Omit<RelationshipEventStreamOptions,"batchSize">):Promise<RelationshipEventProjection<State>>;}
|
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
* Dependency-free relationship ontology shared by contracts and graph runtime.
|
|
5
5
|
*/
|
|
6
6
|
/** Direction exposed by a relationship kind. */
|
|
7
|
-
export type RelationshipDirection
|
|
7
|
+
export type RelationshipDirection="directed"|"undirected";
|
|
8
8
|
/** Cardinality constraint applied independently to outgoing and incoming edges. */
|
|
9
|
-
export type RelationshipCardinality
|
|
9
|
+
export type RelationshipCardinality="one"|"many";
|
|
10
10
|
/** Lifecycle policy for a relationship kind. */
|
|
11
|
-
export type RelationshipLifecycle
|
|
11
|
+
export type RelationshipLifecycle="persistent"|"supersedable"|"ephemeral";
|
|
12
12
|
/** Temporal meaning carried by a directed relationship independently of execution precedence. */
|
|
13
|
-
export type RelationshipTemporalOrder
|
|
13
|
+
export type RelationshipTemporalOrder="source_after_target";
|
|
14
14
|
/** Direction in which an ordering edge contributes to execution precedence. */
|
|
15
|
-
export type RelationshipPrecedence
|
|
15
|
+
export type RelationshipPrecedence="source_before_target"|"target_before_source";
|
|
16
16
|
/** Endpoint that represents the structural parent for hierarchy kinds. */
|
|
17
|
-
export type RelationshipHierarchyDirection
|
|
17
|
+
export type RelationshipHierarchyDirection="source_parent"|"target_parent";
|
|
18
18
|
/** Closure family that gives a relationship its default traversal vocabulary. */
|
|
19
|
-
export type RelationshipTraversalFamily
|
|
19
|
+
export type RelationshipTraversalFamily="hierarchy"|"ordering"|"semantic"|"association";
|
|
20
20
|
/** Direction in which an edge can carry a node toward a declared outcome. */
|
|
21
|
-
export type RelationshipOutcomeTraversal
|
|
21
|
+
export type RelationshipOutcomeTraversal="source_to_target"|"target_to_source"|"both";
|
|
22
22
|
/** Versioned semantic definition for a built-in or application-defined edge kind. */
|
|
23
|
-
export interface RelationshipKindDefinition
|
|
23
|
+
export interface RelationshipKindDefinition{
|
|
24
24
|
/** Canonical, case-insensitive kind identifier. */
|
|
25
25
|
kind:string;
|
|
26
26
|
/** Whether traversing source to target has distinct meaning from the reverse. */
|
|
@@ -54,7 +54,6 @@ aliases?:readonly string[];
|
|
|
54
54
|
/** Compatibility version of this semantic contract. */
|
|
55
55
|
compatibilityVersion:number;
|
|
56
56
|
/** Whether source and target may be the same node. */
|
|
57
|
-
allowSelf:boolean;
|
|
58
|
-
}
|
|
57
|
+
allowSelf:boolean;}
|
|
59
58
|
/** Stable built-in relationship ontology without graph or storage dependencies. */
|
|
60
|
-
export declare const BUILTIN_RELATIONSHIP_KINDS:readonly RelationshipKindDefinition[];
|
|
59
|
+
export declare const BUILTIN_RELATIONSHIP_KINDS:readonly RelationshipKindDefinition[];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { RelationshipEventInput } from "./relationship-history.js";
|
|
3
|
-
import type { RelationshipKindRegistry } from "./relationships.js";
|
|
1
|
+
import{type WorkspaceRelationshipItem}from "./graph/assembly.js";import type{RelationshipEventInput}from "./relationship-history.js";import type{RelationshipKindRegistry}from "./relationships.js";
|
|
4
2
|
/** Controls for deterministic legacy relationship-event planning. */
|
|
5
|
-
export interface RelationshipEventBackfillOptions
|
|
3
|
+
export interface RelationshipEventBackfillOptions{
|
|
6
4
|
/** Stable migration identity retained in generated event and relationship ids. */
|
|
7
5
|
migrationId:string;
|
|
8
6
|
/** Attributable actor responsible for the migration. */
|
|
@@ -12,10 +10,9 @@ timestamp:string;
|
|
|
12
10
|
/** Optional custom relationship ontology used during legacy normalization. */
|
|
13
11
|
registry?:RelationshipKindRegistry;
|
|
14
12
|
/** Event ids already committed by an earlier partial or concurrent run. */
|
|
15
|
-
existingEventIds?:Iterable<string>;
|
|
16
|
-
}
|
|
13
|
+
existingEventIds?:Iterable<string>;}
|
|
17
14
|
/** Deterministic migration plan plus compact governance evidence. */
|
|
18
|
-
export interface RelationshipEventBackfillPlan
|
|
15
|
+
export interface RelationshipEventBackfillPlan{
|
|
19
16
|
/** Caller-provided stable migration identity. */
|
|
20
17
|
migration_id:string;
|
|
21
18
|
/** SHA-256 identity of the complete normalized plan before resume filtering. */
|
|
@@ -31,12 +28,11 @@ skipped_existing_count:number;
|
|
|
31
28
|
/** Duplicate raw dependency identities found before graph deduplication. */
|
|
32
29
|
duplicate_dependency_rows:number;
|
|
33
30
|
/** Missing internal references retained as explicit placeholder nodes. */
|
|
34
|
-
dangling_reference_count:number;
|
|
35
|
-
}
|
|
31
|
+
dangling_reference_count:number;}
|
|
36
32
|
/**
|
|
37
33
|
* Convert legacy item relationship fields into an immutable deterministic event
|
|
38
34
|
* batch. Input order does not affect ids, fingerprints, or event order.
|
|
39
35
|
* Dangling internal targets and external dependency targets become explicit
|
|
40
36
|
* nodes so replay never silently drops contextual edges.
|
|
41
37
|
*/
|
|
42
|
-
export declare function planRelationshipEventBackfill(items:readonly WorkspaceRelationshipItem[],options:RelationshipEventBackfillOptions):RelationshipEventBackfillPlan;
|
|
38
|
+
export declare function planRelationshipEventBackfill(items:readonly WorkspaceRelationshipItem[],options:RelationshipEventBackfillOptions):RelationshipEventBackfillPlan;
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* Provides the dependency-free relationship ontology and bounded graph-query
|
|
5
5
|
* kernel shared by the SDK, CLI, MCP adapters, extensions, and non-PM apps.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
8
|
-
import { type RelationshipKindDefinition } from "./relationship-kinds/contract.js";
|
|
9
|
-
export { BUILTIN_RELATIONSHIP_KINDS,type RelationshipCardinality,type RelationshipDirection,type RelationshipHierarchyDirection,type RelationshipKindDefinition,type RelationshipLifecycle,type RelationshipOutcomeTraversal,type RelationshipPrecedence,type RelationshipTemporalOrder,type RelationshipTraversalFamily,} from "./relationship-kinds/contract.js";
|
|
7
|
+
import type{Dependency,ItemMetadata}from "../types/index.js";import{type RelationshipKindDefinition}from "./relationship-kinds/contract.js";export{BUILTIN_RELATIONSHIP_KINDS,type RelationshipCardinality,type RelationshipDirection,type RelationshipHierarchyDirection,type RelationshipKindDefinition,type RelationshipLifecycle,type RelationshipOutcomeTraversal,type RelationshipPrecedence,type RelationshipTemporalOrder,type RelationshipTraversalFamily,}from "./relationship-kinds/contract.js";
|
|
10
8
|
/** One normalized relationship edge indexed by the graph kernel. */
|
|
11
|
-
export interface RelationshipEdge
|
|
9
|
+
export interface RelationshipEdge{
|
|
12
10
|
/** Source node identifier. */
|
|
13
11
|
source:string;
|
|
14
12
|
/** Target node identifier. */
|
|
@@ -20,12 +18,11 @@ createdAt?:string;
|
|
|
20
18
|
/** Optional author retained from storage. */
|
|
21
19
|
author?:string;
|
|
22
20
|
/** Optional application-owned edge payload. */
|
|
23
|
-
payload?:Readonly<Record<string,unknown>>;
|
|
24
|
-
}
|
|
21
|
+
payload?:Readonly<Record<string,unknown>>;}
|
|
25
22
|
/** Direction used by adjacency, closure, and path traversal. */
|
|
26
|
-
export type RelationshipTraversalDirection
|
|
23
|
+
export type RelationshipTraversalDirection="outgoing"|"incoming"|"both";
|
|
27
24
|
/** Shared bounded-query controls. */
|
|
28
|
-
export interface RelationshipQueryOptions
|
|
25
|
+
export interface RelationshipQueryOptions{
|
|
29
26
|
/** Edge kinds to traverse after alias normalization. */
|
|
30
27
|
kinds?:readonly string[];
|
|
31
28
|
/** Traversal direction relative to each visited node. */
|
|
@@ -35,10 +32,9 @@ limit?:number;
|
|
|
35
32
|
/** Maximum traversal depth. */
|
|
36
33
|
maxDepth?:number;
|
|
37
34
|
/** Abort signal checked throughout traversal. */
|
|
38
|
-
signal?:AbortSignal;
|
|
39
|
-
}
|
|
35
|
+
signal?:AbortSignal;}
|
|
40
36
|
/** Cost and truncation metadata returned by every graph query. */
|
|
41
|
-
export interface RelationshipQueryMeta
|
|
37
|
+
export interface RelationshipQueryMeta{
|
|
42
38
|
/** Number of nodes removed from the traversal frontier. */
|
|
43
39
|
visitedNodes:number;
|
|
44
40
|
/** Number of candidate edges inspected. */
|
|
@@ -46,49 +42,43 @@ inspectedEdges:number;
|
|
|
46
42
|
/** Whether a configured bound stopped traversal. */
|
|
47
43
|
truncated:boolean;
|
|
48
44
|
/** Deterministic continuation cursor for the final returned node. */
|
|
49
|
-
nextCursor?:string;
|
|
50
|
-
}
|
|
45
|
+
nextCursor?:string;}
|
|
51
46
|
/** Generic bounded graph query result. */
|
|
52
|
-
export interface RelationshipQueryResult<T>
|
|
47
|
+
export interface RelationshipQueryResult<T>{
|
|
53
48
|
/** Deterministically ordered query value. */
|
|
54
49
|
value:T;
|
|
55
50
|
/** Explicit query work and truncation metadata. */
|
|
56
|
-
meta:RelationshipQueryMeta;
|
|
57
|
-
}
|
|
51
|
+
meta:RelationshipQueryMeta;}
|
|
58
52
|
/** One neighbor row pairing an adjacent node with the edge that connects it. */
|
|
59
|
-
export interface RelationshipNeighborEdge
|
|
53
|
+
export interface RelationshipNeighborEdge{
|
|
60
54
|
/** Adjacent node identifier. */
|
|
61
55
|
id:string;
|
|
62
56
|
/** Edge connecting the queried node to this neighbor. */
|
|
63
|
-
edge:RelationshipEdge;
|
|
64
|
-
}
|
|
57
|
+
edge:RelationshipEdge;}
|
|
65
58
|
/** Induced subgraph returned by bounded traversal. */
|
|
66
|
-
export interface RelationshipSubgraph
|
|
59
|
+
export interface RelationshipSubgraph{
|
|
67
60
|
/** Deterministically ordered node identifiers. */
|
|
68
61
|
nodes:string[];
|
|
69
62
|
/** Deterministically ordered edges whose endpoints are both present. */
|
|
70
|
-
edges:RelationshipEdge[];
|
|
71
|
-
}
|
|
63
|
+
edges:RelationshipEdge[];}
|
|
72
64
|
/** Mutable registry with immutable snapshots and collision-safe extension registration. */
|
|
73
|
-
export declare class RelationshipKindRegistry
|
|
74
|
-
#private;
|
|
65
|
+
export declare class RelationshipKindRegistry{#private;
|
|
75
66
|
/** Create a registry initialized with the stable built-in ontology by default. */
|
|
76
67
|
constructor(definitions?:readonly RelationshipKindDefinition[]);
|
|
77
68
|
/** Register one definition after validating its identifier, version, and aliases. */
|
|
78
69
|
register(definition:RelationshipKindDefinition):this;
|
|
79
70
|
/** Resolve a canonical kind or compatibility alias. */
|
|
80
|
-
resolve(kind:unknown):RelationshipKindDefinition
|
|
71
|
+
resolve(kind:unknown):RelationshipKindDefinition|undefined;
|
|
81
72
|
/** Resolve a kind or throw a precise error suitable for command adapters. */
|
|
82
73
|
require(kind:string):RelationshipKindDefinition;
|
|
83
74
|
/** Return a deterministic immutable registry snapshot. */
|
|
84
|
-
list():readonly RelationshipKindDefinition[];
|
|
85
|
-
}
|
|
75
|
+
list():readonly RelationshipKindDefinition[];}
|
|
86
76
|
/** Create a registry containing the built-in relationship ontology. */
|
|
87
77
|
export declare function createRelationshipKindRegistry():RelationshipKindRegistry;
|
|
88
78
|
/** Resolve an accepted built-in relationship spelling to its canonical stored kind. */
|
|
89
79
|
export declare function canonicalizeRelationshipKind(kind:string):string;
|
|
90
80
|
/** Resolve an accepted built-in relationship spelling, returning undefined for unknown kinds. */
|
|
91
|
-
export declare function resolveCanonicalRelationshipKind(kind:unknown):string
|
|
81
|
+
export declare function resolveCanonicalRelationshipKind(kind:unknown):string|undefined;
|
|
92
82
|
/** Report whether a kind participates in execution-order cycle detection. */
|
|
93
83
|
export declare function isOrderingRelationshipKind(kind:string,registry?:RelationshipKindRegistry):boolean;
|
|
94
84
|
/**
|
|
@@ -101,12 +91,11 @@ export declare function isOrderingRelationshipKind(kind:string,registry?:Relatio
|
|
|
101
91
|
*/
|
|
102
92
|
export declare function assertRelationshipEdgeAllowed(source:string,target:string,kind:string,registry?:RelationshipKindRegistry):RelationshipKindDefinition;
|
|
103
93
|
/** Build an immutable, deterministic in-memory relationship index. */
|
|
104
|
-
export declare class RelationshipGraph
|
|
105
|
-
#private;
|
|
94
|
+
export declare class RelationshipGraph{#private;
|
|
106
95
|
/** Validate and index nodes and edges without reading tracker storage. */
|
|
107
96
|
constructor(nodes:Iterable<string>,edges:Iterable<RelationshipEdge>,registry?:RelationshipKindRegistry);
|
|
108
97
|
/** Build the graph directly from item metadata, including hierarchy and legacy blocker fields. */
|
|
109
|
-
static fromItems(items:readonly Pick<ItemMetadata,"id"
|
|
98
|
+
static fromItems(items:readonly Pick<ItemMetadata,"id"|"parent"|"blocked_by"|"dependencies">[],registry?:RelationshipKindRegistry):RelationshipGraph;
|
|
110
99
|
/** Return the deterministic immutable edge snapshot. */
|
|
111
100
|
edges():readonly RelationshipEdge[];
|
|
112
101
|
/** Return the deterministic immutable edges incident to one node. */
|
|
@@ -126,7 +115,6 @@ closure(id:string,options?:RelationshipQueryOptions):RelationshipQueryResult<str
|
|
|
126
115
|
/** Return a deterministic shortest path, or an empty array when disconnected. */
|
|
127
116
|
shortestPath(source:string,target:string,options?:RelationshipQueryOptions):RelationshipQueryResult<string[]>;
|
|
128
117
|
/** Return the induced subgraph over a bounded closure including the root. */
|
|
129
|
-
subgraph(id:string,options?:RelationshipQueryOptions):RelationshipQueryResult<RelationshipSubgraph>;
|
|
130
|
-
}
|
|
118
|
+
subgraph(id:string,options?:RelationshipQueryOptions):RelationshipQueryResult<RelationshipSubgraph>;}
|
|
131
119
|
/** Convert one stored dependency into the public relationship edge contract. */
|
|
132
|
-
export declare function dependencyToRelationship(source:string,dependency:Dependency,registry?:RelationshipKindRegistry):RelationshipEdge;
|
|
120
|
+
export declare function dependencyToRelationship(source:string,dependency:Dependency,registry?:RelationshipKindRegistry):RelationshipEdge;
|