@unbrained/pm-cli 2026.11.21 → 2026.11.23
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/.agents/skills/pm-developer/SKILL.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/after-command-context-usage.js +1 -1
- package/dist/cli/argv-utils.js +1 -1
- package/dist/cli/bootstrap-args.js +1 -1
- package/dist/cli/bundle-integrity.js +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/commander-usage.js +11 -11
- package/dist/cli/commands/annotations/comments.js +1 -1
- package/dist/cli/commands/annotations/docs.js +1 -1
- package/dist/cli/commands/annotations/files.js +1 -1
- package/dist/cli/commands/annotations/learnings.js +1 -1
- package/dist/cli/commands/annotations/notes.js +1 -1
- package/dist/cli/commands/extension/describe.js +1 -1
- package/dist/cli/commands/extension/extension.js +1 -1
- package/dist/cli/commands/extension/scaffold.js +1 -1
- package/dist/cli/commands/extension/shared.js +1 -1
- package/dist/cli/commands/governance/gc.js +1 -1
- package/dist/cli/commands/governance/health.js +1 -1
- package/dist/cli/commands/governance/telemetry.js +1 -1
- package/dist/cli/commands/governance/validate.js +1 -1
- package/dist/cli/commands/history/activity.js +1 -1
- package/dist/cli/commands/history/history-compact.js +1 -1
- package/dist/cli/commands/history/history-redact.js +1 -1
- package/dist/cli/commands/history/history-repair.js +1 -1
- package/dist/cli/commands/history/history.js +1 -1
- package/dist/cli/commands/history/restore.js +1 -1
- package/dist/cli/commands/lifecycle/append.js +1 -1
- package/dist/cli/commands/lifecycle/claim.js +1 -1
- package/dist/cli/commands/lifecycle/close-many.js +1 -1
- package/dist/cli/commands/lifecycle/close.js +1 -1
- package/dist/cli/commands/lifecycle/copy.js +1 -1
- package/dist/cli/commands/lifecycle/create.js +1 -1
- package/dist/cli/commands/lifecycle/delete.js +1 -1
- package/dist/cli/commands/lifecycle/focus.js +1 -1
- package/dist/cli/commands/lifecycle/plan.js +1 -1
- package/dist/cli/commands/lifecycle/update-many.js +1 -1
- package/dist/cli/commands/lifecycle/update.js +1 -1
- package/dist/cli/commands/query/aggregate.js +1 -1
- package/dist/cli/commands/query/context.js +1 -1
- package/dist/cli/commands/query/deps.js +1 -1
- package/dist/cli/commands/query/duplicates.js +1 -1
- package/dist/cli/commands/query/eval.js +1 -1
- package/dist/cli/commands/query/get.js +1 -1
- package/dist/cli/commands/query/graph.js +1 -1
- package/dist/cli/commands/query/list.js +1 -1
- package/dist/cli/commands/query/next.js +1 -1
- package/dist/cli/commands/query/search.js +1 -1
- package/dist/cli/commands/query/stats.js +1 -1
- package/dist/cli/commands/test/test-all.js +1 -1
- package/dist/cli/commands/test/test-runs.js +1 -1
- package/dist/cli/commands/test/test.js +1 -1
- package/dist/cli/commands/workspace/config.js +1 -1
- package/dist/cli/commands/workspace/contracts.js +1 -1
- package/dist/cli/commands/workspace/init.js +1 -1
- package/dist/cli/commands/workspace/merge.js +1 -1
- package/dist/cli/commands/workspace/profile.js +1 -1
- package/dist/cli/commands/workspace/schema.js +1 -1
- package/dist/cli/commands/workspace/upgrade.js +1 -1
- package/dist/cli/context-intent-invocation.js +1 -1
- package/dist/cli/description-stdin.js +1 -1
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/extension-command-help.js +6 -6
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -5
- package/dist/cli/help-json-payload.js +7 -7
- package/dist/cli/invocation-profile.js +2 -2
- package/dist/cli/main.js +5 -5
- package/dist/cli/migration-gates.js +1 -1
- package/dist/cli/option-values.js +1 -1
- package/dist/cli/preflight-warnings.js +3 -3
- package/dist/cli/public.js +1 -1
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/register-assurance.js +1 -1
- package/dist/cli/register-files-lookup.js +1 -1
- package/dist/cli/register-history-activity.js +1 -1
- package/dist/cli/register-history-author.js +1 -1
- package/dist/cli/register-history-maintenance.js +2 -2
- package/dist/cli/register-list-query.js +10 -10
- package/dist/cli/register-mutation-options.js +0 -1
- package/dist/cli/register-mutation.js +6 -6
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-structured-mutation.js +1 -1
- package/dist/cli/registration-helpers.js +1 -1
- package/dist/cli/runtime/activation.js +1 -1
- package/dist/cli/runtime/annotation-option-retry.js +1 -1
- package/dist/cli/runtime/close-fields-retry.js +1 -1
- package/dist/cli/runtime/field-route-retry.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli/runtime/invocation-rewrites.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +1 -1
- package/dist/cli/runtime/refusal-credential-redaction.js +1 -1
- package/dist/cli/runtime/selection.js +1 -1
- package/dist/cli/runtime/telemetry-outcome.js +1 -1
- package/dist/cli/runtime-compatibility-boundary.js +4 -4
- package/dist/cli/schema/registration.js +15 -15
- package/dist/cli/schema-registration-helpers.js +1 -1
- package/dist/cli/search-refresh.js +1 -1
- package/dist/cli/stats-analytics-json.js +1 -1
- package/dist/cli/telemetry-flush.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-2UQU7HRR.js +9 -0
- package/dist/cli-bundle/chunks/chunk-5DUP4AZA.js +2 -0
- package/dist/cli-bundle/chunks/chunk-5WZZ5XEN.js +3 -0
- package/dist/cli-bundle/chunks/chunk-6H36ZHMI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +2 -0
- package/dist/cli-bundle/chunks/chunk-AA52P34H.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AEOHUSUI.js +2289 -0
- package/dist/cli-bundle/chunks/chunk-BSRIVYTM.js +8 -0
- package/dist/cli-bundle/chunks/chunk-CFWLQFJM.js +71 -0
- package/dist/cli-bundle/chunks/chunk-D6PDUKUG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-ENKXRSFZ.js +31 -0
- package/dist/cli-bundle/chunks/chunk-F2Z6XLZB.js +3 -0
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +2 -0
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +2 -0
- package/dist/cli-bundle/chunks/chunk-H7JEXRIN.js +6 -0
- package/dist/cli-bundle/chunks/chunk-J2PDAVBC.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KZHIBEJL.js +33 -0
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +115 -0
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +2 -0
- package/dist/cli-bundle/chunks/chunk-O7JHS64G.js +3 -0
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +9 -0
- package/dist/cli-bundle/chunks/chunk-PZA7QECY.js +1 -0
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +2 -0
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SLFRSZK6.js +1 -0
- package/dist/cli-bundle/chunks/chunk-TZY5MVJF.js +125 -0
- package/dist/cli-bundle/chunks/chunk-YYT3MIRF.js +3 -0
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +8 -0
- package/dist/cli-bundle/chunks/context-budget-recovery-M5RFUEFG.js +2 -0
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-BPYKN5Q7.js +4 -0
- package/dist/cli-bundle/chunks/{item-revision-R5SZPJZ5.js → item-revision-FMD4KWBB.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-SPGPS3OS.js → register-list-query-L4IBU64P.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +2 -0
- package/dist/cli-bundle/chunks/settlement-hook-6MR32OOC.js +7 -0
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-A6VEMCRR.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-AIDL2ZNT.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPUUW5O.js +1 -0
- package/dist/cli-bundle/focused-chunks/chunk-BWOVFE5B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IIP6LZ5E.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IROZDIDX.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-K53OIT5J.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-NQTEE66P.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OTMMOKPM.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QQIIMMFU.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIE3SJSE.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-UFTUNBMY.js +27 -0
- package/dist/cli-bundle/focused-chunks/chunk-X6CXWWNB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XRS3VNC6.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Y2ESLKCF.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +102 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZHWPCVQL.js +78 -0
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-CSJV3TY3.js +2 -0
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-EGEJMG3G.js +4 -0
- package/dist/cli-bundle/focused-chunks/{item-revision-3V3UIP5X.js → item-revision-YDACCDVY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +2 -0
- package/dist/cli-bundle/focused-chunks/settlement-hook-FMLGKG7J.js +7 -0
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +2 -0
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +5 -5
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +72 -60
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +13 -13
- package/dist/cli.js +1 -1
- package/dist/core/checkpoint/checkpoint-gc.js +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
- package/dist/core/checkpoint/mutation-context.js +1 -1
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/config/positional-value.js +1 -1
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +2 -2
- package/dist/core/extensions/activation-summary.js +1 -1
- package/dist/core/extensions/activation-transaction.js +1 -1
- package/dist/core/extensions/capability-usage.js +1 -1
- package/dist/core/extensions/command-hook-context.js +1 -1
- package/dist/core/extensions/command-metadata-contract.js +1 -1
- package/dist/core/extensions/command-visibility-tier.js +1 -1
- package/dist/core/extensions/contribution-inventory.js +1 -1
- package/dist/core/extensions/exporter-output-contract.js +1 -1
- package/dist/core/extensions/extension-candidate.js +1 -1
- package/dist/core/extensions/extension-capability-aliases.js +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-policy.js +1 -1
- package/dist/core/extensions/extension-registries.js +1 -1
- package/dist/core/extensions/extension-runtime-helpers.js +1 -1
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/flag-definition-validation.js +1 -1
- package/dist/core/extensions/flag-value-types.js +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/item-field-types.js +1 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/manifest-parser.js +1 -1
- package/dist/core/extensions/manifest-schema.js +1 -1
- package/dist/core/extensions/module-graph-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor.js +1 -1
- package/dist/core/extensions/preflight-ownership.js +1 -1
- package/dist/core/extensions/read-output-contract.js +1 -1
- package/dist/core/extensions/registration-contracts.js +1 -1
- package/dist/core/extensions/registration-validation.js +1 -1
- package/dist/core/extensions/registration-values.js +1 -1
- package/dist/core/extensions/reserved-host-flags.js +1 -1
- package/dist/core/extensions/runtime-registrations.js +1 -1
- package/dist/core/extensions/service-ownership.js +1 -1
- package/dist/core/extensions/version-compat.js +1 -1
- package/dist/core/extensions/version-diagnostics.js +1 -1
- package/dist/core/fs/atomic-create.js +1 -1
- package/dist/core/fs/file-glob.js +1 -1
- package/dist/core/fs/fs-utils.js +2 -2
- package/dist/core/fs/host-environment-errors.js +1 -1
- package/dist/core/fs/index.js +1 -1
- package/dist/core/fs/path-utils.js +1 -1
- package/dist/core/governance/content-fields.js +1 -1
- package/dist/core/governance/issue-codes.js +1 -1
- package/dist/core/governance/metadata-coverage.js +1 -1
- package/dist/core/history/bridge.js +2 -0
- package/dist/core/history/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- package/dist/core/history/drift-scan.js +1 -1
- package/dist/core/history/event-classification.js +1 -1
- package/dist/core/history/event-index.js +11 -11
- package/dist/core/history/history-compact-bulk.js +1 -1
- package/dist/core/history/history-diff.js +1 -1
- package/dist/core/history/history-rewrite.js +1 -1
- package/dist/core/history/history-storage-stats.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/history.d.ts +12 -0
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/identity.js +1 -1
- package/dist/core/history/index.js +1 -1
- package/dist/core/history/operation-contract.js +1 -1
- package/dist/core/history/projection.js +1 -1
- package/dist/core/history/read.d.ts +9 -0
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.d.ts +46 -5
- package/dist/core/history/replay.js +2 -2
- package/dist/core/history/stream-summary.js +2 -2
- package/dist/core/history/tombstone.js +1 -1
- package/dist/core/history/version-address.js +1 -1
- package/dist/core/history/workspace-history.js +2 -2
- package/dist/core/io/body-file.js +1 -1
- package/dist/core/io/bulk-ids-input.js +2 -2
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/item/deferred-fields.js +1 -1
- package/dist/core/item/dependency-reference.js +1 -1
- package/dist/core/item/id.js +1 -1
- package/dist/core/item/index.js +1 -1
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +7 -7
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/literal-mutation-input.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -8
- package/dist/core/item/plan-lifecycle.js +1 -1
- package/dist/core/item/priority.js +1 -1
- package/dist/core/item/sprint-release-format.js +1 -1
- package/dist/core/item/status-filter.js +1 -1
- package/dist/core/item/status.js +1 -1
- package/dist/core/item/toon-decode.js +1 -1
- package/dist/core/item/type-registry.js +1 -1
- package/dist/core/item/type-synonyms.js +1 -1
- package/dist/core/lock/index.js +1 -1
- package/dist/core/lock/lock-confinement.js +1 -1
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock-owner.js +1 -1
- package/dist/core/lock/lock.js +4 -4
- package/dist/core/output/linked-test-projection.js +5 -5
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +19 -19
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -3
- package/dist/core/packages/manifest.js +1 -1
- package/dist/core/packages/root.js +1 -1
- package/dist/core/policy/workflow-policy-schema.js +1 -1
- package/dist/core/policy/workflow-policy-store.js +1 -1
- package/dist/core/policy/workflow-policy.js +1 -1
- package/dist/core/profile/profile-describe.js +1 -1
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/profile/profile-plan.js +1 -1
- package/dist/core/profile/profile-presets.js +4 -4
- package/dist/core/reproducibility/context.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/item-types-file.js +2 -2
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/schema/status-defs-file.js +2 -2
- package/dist/core/schema/status-token.js +1 -1
- package/dist/core/schema/type-inference.js +1 -1
- package/dist/core/schema/type-presets.js +1 -1
- package/dist/core/schema/type-workflows.js +1 -1
- package/dist/core/search/background-refresh.js +2 -2
- package/dist/core/search/bm25.js +1 -1
- package/dist/core/search/cache.js +2 -2
- package/dist/core/search/corpus.js +1 -1
- package/dist/core/search/embedding-batches.js +1 -1
- package/dist/core/search/eval-thresholds.js +1 -1
- package/dist/core/search/eval.js +1 -1
- package/dist/core/search/http-client.js +1 -1
- package/dist/core/search/providers.js +1 -1
- package/dist/core/search/relevance.js +1 -1
- package/dist/core/search/semantic-defaults.js +1 -1
- package/dist/core/search/staleness.js +1 -1
- package/dist/core/search/vector-stores.js +2 -2
- package/dist/core/search/vectorization-metadata.js +1 -1
- package/dist/core/sentry/helpers.js +1 -1
- package/dist/core/sentry/instrument.js +1 -1
- package/dist/core/sentry/sensitive-assignments.js +1 -1
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/agent-session-context.js +1 -1
- package/dist/core/shared/author.js +5 -5
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +0 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/error-details.js +1 -1
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/html-entity-decode.js +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/item-metadata-contract.js +1 -1
- package/dist/core/shared/lazy-module.js +1 -1
- package/dist/core/shared/levenshtein.js +1 -1
- package/dist/core/shared/memo.js +1 -1
- package/dist/core/shared/numeric-parsers.js +1 -1
- package/dist/core/shared/option-alias-visibility.js +1 -1
- package/dist/core/shared/output-unicode.js +1 -1
- package/dist/core/shared/primitives.js +1 -1
- package/dist/core/shared/process-tree.js +2 -2
- package/dist/core/shared/secret-rules.js +5 -5
- package/dist/core/shared/serial-queue.js +1 -1
- package/dist/core/shared/serialization.js +1 -1
- package/dist/core/shared/split-comma-list.js +1 -1
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/time.js +2 -2
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/index.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-metadata-cache.js +1 -1
- package/dist/core/store/item-metadata-query-index.js +11 -11
- package/dist/core/store/item-metadata-read-work.js +1 -1
- package/dist/core/store/item-mutation-precondition.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/settings-concurrency.js +1 -1
- package/dist/core/store/settings-read-cache.js +1 -1
- package/dist/core/store/settings-sections.js +2 -2
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +3 -1
- package/dist/core/store/settings.js +6 -6
- package/dist/core/store/sqlite-runtime.js +1 -1
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/store/transaction-coordinator-scope.js +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/observability.js +1 -1
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/core/telemetry/read-sampling.js +2 -2
- package/dist/core/telemetry/runtime.js +9 -9
- package/dist/core/test/background-runs.js +4 -4
- package/dist/core/test/item-test-run-tracking.js +1 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/core/validate/estimate-defaults.js +1 -1
- package/dist/core/validate/fix-planning.js +1 -1
- package/dist/core/validate/linked-artifact-reference.js +1 -1
- package/dist/core/validate/missing-by-type.js +1 -1
- package/dist/core/validate/missing-link-owners.js +1 -1
- package/dist/core/validate/stale-file-classification.js +1 -1
- package/dist/mcp/http-server.js +5 -5
- package/dist/mcp/legacy-adapter.js +1 -1
- package/dist/mcp/runtime-capabilities.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/actionability.js +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +1 -1
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/command-suggestions.js +1 -1
- package/dist/sdk/agent/create-option-policy.js +1 -1
- package/dist/sdk/agent/identity-config.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/linked-resource-recovery.js +1 -1
- package/dist/sdk/agent/refusal-closure-census.js +2 -2
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -3
- package/dist/sdk/agent-session-context.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/author-attribution.js +1 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -5
- package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +2 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +7 -7
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -1
- package/dist/sdk/cli-contracts/string-lists.js +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +2 -2
- package/dist/sdk/cli-contracts/typed-action-inputs.js +0 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/cli-program.js +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/comments.js +1 -1
- package/dist/sdk/compile-cache.js +1 -1
- package/dist/sdk/completion/bash.js +2 -2
- package/dist/sdk/completion/fish.js +74 -73
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +77 -76
- package/dist/sdk/completion.js +1 -1
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/context/recency.js +1 -1
- package/dist/sdk/context/semantic-session-attribution.js +1 -1
- package/dist/sdk/context/usage-egress.js +1 -1
- package/dist/sdk/context/usage-ledger.js +6 -6
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/context-intent-runtime.js +1 -1
- package/dist/sdk/context-packing.js +1 -1
- package/dist/sdk/context-relevance.js +1 -1
- package/dist/sdk/context-signal-store.js +2 -2
- package/dist/sdk/context-usage.js +1 -1
- package/dist/sdk/dependencies/context-budget-recovery.js +1 -1
- package/dist/sdk/dependencies.js +1 -1
- package/dist/sdk/dependency-flag-validation.js +1 -1
- package/dist/sdk/dependency-provenance.js +1 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/duplicates.js +1 -1
- package/dist/sdk/environment/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- package/dist/sdk/environment/source-context.js +1 -1
- package/dist/sdk/environment/tracker-preflight.js +1 -1
- package/dist/sdk/error-code-catalog.js +1 -1
- package/dist/sdk/error-runtime.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/eval.js +1 -1
- package/dist/sdk/extension/author-manifest.js +1 -1
- package/dist/sdk/extension/bundled-catalog.js +1 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension/concurrency.js +1 -1
- package/dist/sdk/extension/copy-scope.js +1 -1
- package/dist/sdk/extension/custom-field-collisions.js +1 -1
- package/dist/sdk/extension/describe.js +3 -3
- package/dist/sdk/extension/doctor.js +1 -1
- package/dist/sdk/extension/install-plan.js +1 -1
- package/dist/sdk/extension/install-receipts.js +1 -1
- package/dist/sdk/extension/install-runtime.js +3 -3
- package/dist/sdk/extension/install-snapshot.js +1 -1
- package/dist/sdk/extension/install-sources.js +5 -5
- package/dist/sdk/extension/managed-state.js +2 -2
- package/dist/sdk/extension/managed-update-status.js +1 -1
- package/dist/sdk/extension/migrations.js +2 -2
- package/dist/sdk/extension/native-command-options.js +1 -1
- package/dist/sdk/extension/output-ownership.js +1 -1
- package/dist/sdk/extension/runtime-summary.js +1 -1
- package/dist/sdk/extension/scaffold.js +11 -11
- package/dist/sdk/extension/shared.js +1 -1
- package/dist/sdk/extension/source-resolution.js +1 -1
- package/dist/sdk/extension/static-inventory.js +1 -1
- package/dist/sdk/extension/update-check.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/extension-contracts.js +1 -1
- package/dist/sdk/extension.js +1 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/flag-invocation-contracts.js +1 -1
- package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/generated-error-code-catalog.js +1 -1
- package/dist/sdk/governance/assurance-action-contracts.js +0 -1
- package/dist/sdk/governance/assurance-action.js +1 -1
- package/dist/sdk/governance/assurance-limits.js +1 -1
- package/dist/sdk/governance/assurance-mutation-error.js +1 -1
- package/dist/sdk/governance/assurance-presets.js +1 -1
- package/dist/sdk/governance/assurance-runtime.js +1 -1
- package/dist/sdk/governance/assurance.js +4 -4
- package/dist/sdk/governance/boundary-fixtures.js +1 -1
- package/dist/sdk/governance/closure-timestamps.js +1 -1
- package/dist/sdk/governance/defect-recurrence-coverage.js +1 -1
- package/dist/sdk/governance/defect-recurrence-graph.js +1 -1
- package/dist/sdk/governance/defect-recurrence-signals.js +1 -1
- package/dist/sdk/governance/defect-recurrence.js +2 -2
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health/history-drift-remedies.js +2 -0
- package/dist/sdk/governance/health/projection.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/governance/hierarchy-validation.js +1 -1
- package/dist/sdk/governance/in-progress-work-health.js +1 -1
- package/dist/sdk/governance/lifecycle-dependency-cycles.js +1 -1
- package/dist/sdk/governance/linked-file-report.js +1 -1
- package/dist/sdk/governance/merge-receipt-history.js +1 -1
- package/dist/sdk/governance/provenance-health.js +4 -4
- package/dist/sdk/governance/reindex.js +5 -5
- package/dist/sdk/governance/stale-work.js +1 -1
- package/dist/sdk/governance/status-role-diagnostics.js +1 -1
- package/dist/sdk/governance/storage-integrity.js +1 -1
- package/dist/sdk/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/governance/upgrade.js +2 -2
- package/dist/sdk/governance/validate-deferred-fields.js +1 -1
- package/dist/sdk/governance/validate-history-drift.js +1 -1
- package/dist/sdk/governance/validate-item-reader.js +1 -1
- package/dist/sdk/governance/validate-normalization.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance/workflow-completeness.js +1 -1
- package/dist/sdk/governance/workflow-policy.js +3 -3
- package/dist/sdk/governance/workspace-position.js +2 -2
- package/dist/sdk/graph/analytics.js +1 -1
- package/dist/sdk/graph/assembly.js +1 -1
- package/dist/sdk/graph/cache.js +1 -1
- package/dist/sdk/graph/cardinality-integrity.js +1 -1
- package/dist/sdk/graph/centrality.js +1 -1
- package/dist/sdk/graph/deadline-scheduling.js +1 -1
- package/dist/sdk/graph/durable-cache.js +1 -1
- package/dist/sdk/graph/governance-contracts.js +1 -1
- package/dist/sdk/graph/governance.js +1 -1
- package/dist/sdk/graph/hierarchy-integrity.js +1 -1
- package/dist/sdk/graph/lifecycle-coverage.js +1 -1
- package/dist/sdk/graph/mutation-advisory.js +1 -1
- package/dist/sdk/graph/query-contracts.js +1 -1
- package/dist/sdk/graph/remediation.js +1 -1
- package/dist/sdk/graph/run.js +1 -1
- package/dist/sdk/graph/scheduling.js +1 -1
- package/dist/sdk/graph/traversal.js +1 -1
- package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/guide.js +7 -7
- package/dist/sdk/history/append-only-repair.d.ts +30 -0
- package/dist/sdk/history/append-only-repair.js +6 -0
- package/dist/sdk/history/attestation-command.js +2 -2
- package/dist/sdk/history/attestation-contract.js +1 -1
- package/dist/sdk/history/attestation-scan.js +1 -1
- package/dist/sdk/history/attestation.js +1 -1
- package/dist/sdk/history/maintenance.d.ts +8 -2
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/reanchor-refusal.js +2 -0
- package/dist/sdk/history/reseed.d.ts +15 -0
- package/dist/sdk/history/reseed.js +2 -0
- package/dist/sdk/history/salvage.d.ts +19 -8
- package/dist/sdk/history/salvage.js +5 -3
- package/dist/sdk/history/subject.js +1 -1
- package/dist/sdk/history-analytics.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-mcp.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.d.ts +8 -2
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/improvement-ledger-validation.js +1 -1
- package/dist/sdk/improvement-ledger.js +2 -2
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/init-agent-guidance.js +10 -10
- package/dist/sdk/init.js +14 -14
- package/dist/sdk/invocation-author.js +1 -1
- package/dist/sdk/item-children.js +1 -1
- package/dist/sdk/item-metadata-index.js +1 -1
- package/dist/sdk/item-schedule.js +1 -1
- package/dist/sdk/item-transaction.d.ts +33 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +3 -3
- package/dist/sdk/lifecycle/checkpoint-rollback.js +1 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/cli-input.js +1 -1
- package/dist/sdk/lifecycle/close-many.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/copy.js +1 -1
- package/dist/sdk/lifecycle/core-field-recovery.js +1 -1
- package/dist/sdk/lifecycle/core-item-fields.js +1 -1
- package/dist/sdk/lifecycle/create-deferrals.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/delete.js +1 -1
- package/dist/sdk/lifecycle/dependency-removal.js +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
- package/dist/sdk/lifecycle/focus.js +1 -1
- package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -1
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -1
- package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -1
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/metadata-normalizers.js +1 -1
- package/dist/sdk/lifecycle/mutation-command-options.js +0 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/mutation-option-validation.js +1 -1
- package/dist/sdk/lifecycle/plan-mutation-receipt.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/lifecycle/recurrence-parsers.js +1 -1
- package/dist/sdk/lifecycle/release-handoff.js +1 -1
- package/dist/sdk/lifecycle/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -2
- package/dist/sdk/lifecycle/repeated-terminal-state.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/start-blockers.js +1 -1
- package/dist/sdk/lifecycle/structured-mutation-plan.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -2
- package/dist/sdk/lifecycle/workflow-transition.js +1 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/mcp/apps.js +5 -5
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/executable.js +4 -4
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -3
- package/dist/sdk/mcp/subscriptions.js +1 -1
- package/dist/sdk/mcp/tasks.js +2 -2
- package/dist/sdk/mcp/transport.js +1 -1
- package/dist/sdk/merge/abandoned-receipts.js +1 -1
- package/dist/sdk/merge/driver.js +7 -7
- package/dist/sdk/merge/history-scalar-rebase.js +1 -1
- package/dist/sdk/merge/ignored-artifacts.js +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/indexed-receipt-blobs.js +2 -2
- package/dist/sdk/merge/install.js +6 -6
- package/dist/sdk/merge/receipt-file-boundary.js +1 -1
- package/dist/sdk/merge/receipt-operation.js +1 -1
- package/dist/sdk/merge/receipt-schema.js +1 -1
- package/dist/sdk/merge/receipts.js +4 -4
- package/dist/sdk/merge/reconcile.js +1 -1
- package/dist/sdk/merge/settlement-hook.js +4 -4
- package/dist/sdk/merge/stage.js +1 -1
- package/dist/sdk/merge/three-way.d.ts +22 -3
- package/dist/sdk/merge/three-way.js +9 -3
- package/dist/sdk/merge/worktree-config.js +2 -2
- package/dist/sdk/merge.js +1 -1
- package/dist/sdk/mutation-events.js +1 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/notes.js +1 -1
- package/dist/sdk/output/fit-envelope.js +1 -1
- package/dist/sdk/output/list-envelope.js +1 -1
- package/dist/sdk/output/table-rows.js +1 -1
- package/dist/sdk/output-contracts.js +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/output-token-accounting.js +1 -1
- package/dist/sdk/output.js +2 -2
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/package-migrations.js +1 -1
- package/dist/sdk/package-runtime-options.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/profile.js +5 -5
- package/dist/sdk/provenance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.js +1 -1
- package/dist/sdk/query/aggregate.js +1 -1
- package/dist/sdk/query/calendar.js +4 -4
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query/declared-blockers.js +1 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get-facet-roots.js +1 -1
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +0 -1
- package/dist/sdk/query/light-metadata.js +1 -1
- package/dist/sdk/query/list-filter-shared.js +1 -1
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/multi-value-filters.js +1 -1
- package/dist/sdk/query/next-ranking-policy.js +1 -1
- package/dist/sdk/query/next-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -2
- package/dist/sdk/query/parsers.js +1 -1
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/query/search/corpus.js +2 -2
- package/dist/sdk/query/search/filters.js +1 -1
- package/dist/sdk/query/search/input.js +1 -1
- package/dist/sdk/query/search/lexical.js +1 -1
- package/dist/sdk/query/search/response.js +1 -1
- package/dist/sdk/query/search/semantic.js +3 -3
- package/dist/sdk/query/search/types.js +0 -1
- package/dist/sdk/query/search-contracts.js +1 -1
- package/dist/sdk/query/search-pagination.js +1 -1
- package/dist/sdk/query/search-rendering.js +1 -1
- package/dist/sdk/query/search.js +1 -1
- package/dist/sdk/query/window-pagination.js +1 -1
- package/dist/sdk/query/workspace-contracts.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/extension.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +1 -1
- package/dist/sdk/read-output/provenance.js +1 -1
- package/dist/sdk/read-output/session-result.js +0 -1
- package/dist/sdk/read-output/surfaces.js +1 -1
- package/dist/sdk/read-output/tail-retention.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.js +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/relationship-analytics.js +1 -1
- package/dist/sdk/relationship-context.js +1 -1
- package/dist/sdk/relationship-history.js +6 -6
- package/dist/sdk/relationship-kinds/contract.js +1 -1
- package/dist/sdk/relationships.js +1 -1
- package/dist/sdk/reproducibility/process.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime/context.js +1 -1
- package/dist/sdk/runtime/mutation-admission.js +1 -1
- package/dist/sdk/runtime/mutation-value-validation.js +1 -1
- package/dist/sdk/runtime/schema-preview.js +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-action-aliases.js +1 -1
- package/dist/sdk/runtime-extended-actions.js +1 -1
- package/dist/sdk/runtime-input.d.ts +8 -2
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +0 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.d.ts +9 -0
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema/field-option-collisions.js +2 -0
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/schema.js +7 -7
- package/dist/sdk/search-refresh-worker.js +1 -1
- package/dist/sdk/similarity-scoring.js +1 -1
- package/dist/sdk/similarity.js +1 -1
- package/dist/sdk/start-task-status.js +1 -1
- package/dist/sdk/stats.js +1 -1
- package/dist/sdk/structured-mutations.d.ts +5 -5
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -4
- package/dist/sdk/templates.js +3 -3
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/command-resolution.js +2 -2
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution-receipts.js +2 -2
- package/dist/sdk/test/execution.js +5 -5
- package/dist/sdk/test/json-path.js +1 -1
- package/dist/sdk/test/linked-command-detection.js +1 -1
- package/dist/sdk/test/measurements.js +1 -1
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/prerequisites.js +1 -1
- package/dist/sdk/test/receipt-index-snapshot.js +1 -1
- package/dist/sdk/test/run-phases.js +1 -1
- package/dist/sdk/test/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/update.js +1 -1
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -2
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/transactions/item-finalization.js +2 -0
- package/dist/sdk/workspace-contracts-cache.js +1 -1
- package/dist/sdk/workspace-contracts.js +1 -1
- package/dist/sdk/workspace-memory.js +2 -2
- package/dist/sdk/workspace-snapshot.js +5 -5
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +6 -6
- package/dist/types/index.js +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.js +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +1 -1
- package/docs/COMMANDS.md +7 -3
- package/docs/EXTENSIONS.md +1 -1
- package/docs/HISTORY_RECOVERY.md +229 -5
- package/docs/README.md +2 -2
- package/docs/SDK.md +174 -5
- package/docs/SDK_CONTEXT_COORDINATION.md +3 -2
- package/marketplace.json +1 -1
- package/node_modules/tar/package.json +2 -3
- package/package.json +31 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/scripts/finalize-build.mjs +63 -24
- package/scripts/prepare-build-cache.mjs +28 -1
- package/dist/cli-bundle/chunks/chunk-2DXRTIC6.js +0 -21
- package/dist/cli-bundle/chunks/chunk-5647LU3A.js +0 -2287
- package/dist/cli-bundle/chunks/chunk-6QLEXRUG.js +0 -9
- package/dist/cli-bundle/chunks/chunk-AHQB7W2H.js +0 -3
- package/dist/cli-bundle/chunks/chunk-BKSVHOWI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CASX6SFI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CIKGG34F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D6ILFXZY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IB7UB5TE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IUIOTAF6.js +0 -9
- package/dist/cli-bundle/chunks/chunk-JVGRFU5H.js +0 -3
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-KVBIMFUG.js +0 -6
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +0 -3
- package/dist/cli-bundle/chunks/chunk-NCFCBKIP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NT5AKFE5.js +0 -31
- package/dist/cli-bundle/chunks/chunk-PJXKA4QU.js +0 -125
- package/dist/cli-bundle/chunks/chunk-RMIRNYRG.js +0 -71
- package/dist/cli-bundle/chunks/chunk-RULHZRFN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S6HB3WL2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SA4BNP3Q.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SPPHDVZE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SRVTCYAU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WELSVDPU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XHJ3H5PL.js +0 -3
- package/dist/cli-bundle/chunks/chunk-XWHJIRNV.js +0 -8
- package/dist/cli-bundle/chunks/chunk-YJEBK7HU.js +0 -8
- package/dist/cli-bundle/chunks/chunk-YKJKQ7DM.js +0 -115
- package/dist/cli-bundle/chunks/chunk-YMUSRWV4.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YR2KEBHP.js +0 -2
- package/dist/cli-bundle/chunks/context-budget-recovery-L2WP5S26.js +0 -2
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-ITTXIN4K.js +0 -4
- package/dist/cli-bundle/chunks/item-transaction-7DFCG73I.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-3TG636XG.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-LICSDNNO.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-WWVECKFQ.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-L6HFJNWD.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-K7UFG5TD.js +0 -2
- package/dist/cli-bundle/chunks/settlement-hook-BXN5LEQD.js +0 -7
- package/dist/cli-bundle/chunks/stage-57KH3KAC.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3IRCYJI5.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-3V53UBHN.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-532WZV65.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7A4QWNZX.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-C3O6JJPO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-CU2BRAOX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CWWKRI5P.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EGN2HFRU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHQVM6K6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HGFNL5XI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IQK5NPMG.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-J63D6QST.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-JMQJBZQ5.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LNHUE4VV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MKM5NKD7.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-NP72ZDXE.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OSLQD5VH.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-QGKLRXP7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QSJW6NSQ.js +0 -66
- package/dist/cli-bundle/focused-chunks/chunk-RPE6IX26.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-SRDQSA6M.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-SVOOGGAK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UOC6257J.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-URJ2E6AS.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-WXMI4AV5.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XCJSHNXK.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-XQQSSKJI.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-YOAYY3HE.js +0 -2
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-5MKOCGY5.js +0 -2
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-AF4U3F3D.js +0 -4
- package/dist/cli-bundle/focused-chunks/item-transaction-HLBW7B3J.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-62HKR5IO.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-X4PF2SG3.js +0 -2
- package/dist/cli-bundle/focused-chunks/settlement-hook-ARYCZQY4.js +0 -7
- package/dist/cli-bundle/focused-chunks/stage-O7T7CXBB.js +0 -2
- package/dist/sdk/agent/refusal-closure.js +0 -2
- package/dist/sdk/agent/refusal-reachability.js +0 -4
- package/dist/sdk/agent/task-transcript-contracts.js +0 -2
- package/dist/sdk/agent/tracker-preflight-contracts.js +0 -2
- package/dist/sdk/authoring.js +0 -2
- package/dist/sdk/compose.js +0 -2
- package/dist/sdk/contracts.js +0 -2
- package/dist/sdk/core-governance.js +0 -2
- package/dist/sdk/core.js +0 -2
- package/dist/sdk/corpus-shape.js +0 -2
- package/dist/sdk/define.js +0 -2
- package/dist/sdk/environment/agent-environment.js +0 -2
- package/dist/sdk/governance/artifact-ledgers.js +0 -2
- package/dist/sdk/governance/coverage-assurance.js +0 -2
- package/dist/sdk/governance/reliability.js +0 -2
- package/dist/sdk/governance.js +0 -2
- package/dist/sdk/graph/adapter.js +0 -2
- package/dist/sdk/graph/conformance.js +0 -2
- package/dist/sdk/graph/index.js +0 -2
- package/dist/sdk/graph.js +0 -2
- package/dist/sdk/index.js +0 -2
- package/dist/sdk/query.js +0 -2
- package/dist/sdk/relationship-migration.js +0 -2
- package/dist/sdk/testing.js +0 -8
- package/dist/sdk/workspace-recipe.js +0 -2
- package/docs/AGENT_PROVENANCE_ADR.md +0 -206
- package/docs/DEFECT_RECURRENCE.md +0 -257
- package/docs/PERFORMANCE.md +0 -204
package/dist/sdk/workspace.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
`)}function
|
|
3
|
-
`)){const
|
|
1
|
+
import{isFileMissingError as f}from"../core/fs/fs-utils.js";import{readFile as $,realpath as _,stat as G,writeFile as k}from"node:fs/promises";import l from"node:path";import{EXIT_CODE as g}from"../core/shared/constants.js";import{PmCliError as m}from"../core/shared/errors.js";const p="# pm-cli:runtime-cache:start",h="# pm-cli:runtime-cache:end",d=".agents/pm";async function w(n){let e=l.resolve(n);const t=[];for(;;)try{const i=await _(e);if(!(await G(i)).isDirectory())throw Object.assign(new Error("Initialization path ancestry must be a directory."),{code:"ENOTDIR"});return l.join(i,...t)}catch(i){if(!f(i)||l.dirname(e)===e)throw i;t.unshift(l.basename(e)),e=l.dirname(e)}}const E=["runtime/","search/","locks/","transactions/","checkpoints/"],T=["search/eval-queries.json"];async function R(n){try{return await n()}catch(e){throw e instanceof Error&&"code"in e&&typeof e.code=="string"&&["EACCES","EPERM","EROFS"].includes(e.code)?new m("The workspace .gitignore is not writable.",g.GENERIC_FAILURE,{code:"init_gitignore_unwritable",reason:e.code.toLowerCase(),required:"Grant the current user read and write access to the workspace .gitignore before initialization.",why:"pm init must publish its managed runtime-cache ignore fence without replacing unrelated entries.",nextSteps:["Grant read and write access to the workspace .gitignore and rerun pm init.","If the workspace is intentionally read-only, initialize pm in a writable workspace or clone."]}):e}}function I(n){const e=n.split(l.sep).join("/").replace(/^\.\/+/,"");let t=e.length;for(;t>0&&e[t-1]==="/";)t-=1;return e.slice(0,t)}function x(n){const e=n.replaceAll("\\","/");return l.isAbsolute(n)||e===".."||e.startsWith("../")}function b(n=d){const e=I(n);if(/[\r\n]/u.test(e))throw new m("A tracker path containing a line break cannot be represented safely in .gitignore.",g.USAGE,{code:"invalid_argument_value",required:"a tracker path without line breaks",nextSteps:["Choose a tracker path without carriage returns or newlines and rerun pm init."]});const t=e.replace(/[\\*?[\]#! \t]/gu,"\\$&");return[p,...E.map(i=>i==="search/"?`${t}/${i}*`:`${t}/${i}`),...T.map(i=>`!${t}/${i}`),h].join(`
|
|
2
|
+
`)}function y(n,e,t){const i=e.replace(/[\\*?[\]#! \t]/gu,"\\$&"),o=[...new Set([e,i])].flatMap(s=>E.flatMap(c=>[`${s}/${c}`,`!${s}/${c}`])),a=[];let r=!1;for(const s of n)o.some(c=>s.startsWith(c))?(r||a.push(...t),r=!0):a.push(s);return r||a.push(...t),a}function O(n){const e=[];let t=-1,i=0,o=0;for(const a of n.split(`
|
|
3
|
+
`)){const r=a.endsWith("\r")?a.slice(0,-1):a;r===p?(t=o,i=o+a.length+1):r===h&&t>=0&&(e.push({index:t,end:o+r.length,lines:n.slice(i,o).split(/\r?\n/u).filter(s=>s.length>0)}),t=-1),o+=a.length+1}return e}function P(n,e){const t=n.includes(`\r
|
|
4
4
|
`)?`\r
|
|
5
5
|
`:`
|
|
6
|
-
`,
|
|
7
|
-
`).slice(1,-1),
|
|
8
|
-
`)?
|
|
6
|
+
`,i=b(e).split(`
|
|
7
|
+
`).slice(1,-1),o=O(n),a=o.flatMap(c=>c.lines),r=[p,...y(a,e,i),h].join(t);if(o.length===0){const c=n.length===0?"":n.endsWith(`
|
|
8
|
+
`)?t:`${t}${t}`;return`${n}${c}${r}${t}`}let s=n;for(const[c,u]of[...o.entries()].reverse())s=`${s.slice(0,u.index)}${c===0?r:""}${s.slice(u.end)}`;return s}async function N(n,e={}){const t=l.join(n,".gitignore");let i=d;if(e.pmRoot!==void 0){const r=I(l.relative(await w(n),await w(e.pmRoot)));if(x(r))return{path:t,changed:!1};i=r}let o="";try{o=await R(()=>$(t,"utf8"))}catch(r){if(!(r instanceof Error&&"code"in r&&f(r)))throw r}const a=P(o,i);return a===o?{path:t,changed:!1}:(await R(()=>k(t,a,"utf8")),{path:t,changed:!0})}export{d as PM_GITIGNORE_DEFAULT_TRACKER_ROOT,h as PM_GITIGNORE_END,E as PM_GITIGNORE_RUNTIME_DIRECTORIES,p as PM_GITIGNORE_START,T as PM_GITIGNORE_TRACKED_FILES,N as ensurePmGitignore,b as getPmGitignoreBlock,x as isPathOutsideRoot};
|
|
9
9
|
//# sourceMappingURL=workspace.js.map
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"../types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -791,6 +791,22 @@ record_hash_version?:number;
|
|
|
791
791
|
record_hash?:string;
|
|
792
792
|
/** Exact prior sealed record when maintenance can retain its non-sensitive payload. */
|
|
793
793
|
record?:HistoryEntry;}
|
|
794
|
+
/** One chain break an append-only history repair names (GH-1715). */
|
|
795
|
+
export interface HistoryBridgeBreak{
|
|
796
|
+
/** after_hash recorded by the entry before the break. */
|
|
797
|
+
gap_from:string;
|
|
798
|
+
/** before_hash recorded by the first entry after the break. */
|
|
799
|
+
gap_to:string;
|
|
800
|
+
/** record_hash of that first entry; null when it is a legacy entry without one. */
|
|
801
|
+
record_hash:string|null;}
|
|
802
|
+
/** Sealed bridge envelope carried by an append-only `history_repair` record. */
|
|
803
|
+
export interface HistoryBridge{
|
|
804
|
+
/** Envelope version. */
|
|
805
|
+
version:1;
|
|
806
|
+
/** Every break the bridge closes, in stream order. */
|
|
807
|
+
breaks:HistoryBridgeBreak[];
|
|
808
|
+
/** Digest, under the record's hash algorithm, of every record from the first break up to the bridge, so none of them can change under it. */
|
|
809
|
+
segment_digest:string;}
|
|
794
810
|
/** Documents the history entry payload exchanged by command, SDK, and package integrations. */
|
|
795
811
|
export interface HistoryEntry{
|
|
796
812
|
/** Algorithm for before_hash, after_hash and record_hash; absent means legacy SHA-256. */
|
|
@@ -847,6 +863,10 @@ record_hash_version?:number;
|
|
|
847
863
|
record_hash?:string;
|
|
848
864
|
/** Append-only evidence for every prior anchor or patch representation replaced by maintenance. */
|
|
849
865
|
reanchor_evidence?:HistoryReanchorEvidence[];
|
|
866
|
+
/** Chain breaks this append-only `history_repair` record closes (GH-1715). */
|
|
867
|
+
bridge?:HistoryBridge;
|
|
868
|
+
/** Set when maintenance re-anchored this entry across an unrecorded change by dissolving a bridge: its replayed state lacks that change, so history reads refuse to present it as the historical version. */
|
|
869
|
+
replay_inexact?:true;
|
|
850
870
|
/** Human-readable explanation suitable for logs and agent-facing output. */
|
|
851
871
|
message?:string;
|
|
852
872
|
/** Structured audit metadata that does not alter replayed item state. */
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const t=["Epic","Feature","Task","Chore","Issue","Decision","Event","Reminder","Milestone","Meeting","Plan"],o=t,E=["draft","open","in_progress","blocked","closed","canceled"],_=["draft","active","blocked","terminal","terminal_done","terminal_canceled","default_open","default_close","default_cancel"],s=["string","number","boolean","string_array","array","object"],c=["create","update","update_many","list","search","calendar","context"],n=["allow","warn","reject"],i=["blocks","parent","child","parent_child","child_of","related","related_to","discovered_from","blocked_by","incident_from","epic","implements","recurs_from","supersedes","task","verifies"],a=["project","global"],A=["low","medium","high","critical"],d=["low","medium","high","critical"],p=["low","medium","high"],l=["toon","json_markdown"],L=["warn","strict_error"],S=["warn","strict_error"],N=["core","strict","custom"],T=["minimal","default","strict","custom"],U=["none","warn","strict"],V=["progressive","strict"],R=["off","warn","strict"],x=["off","warn","strict"],I=["off","warn","strict"],O=["off","advisory","strict"],u=["author","acceptance_criteria","estimated_minutes","close_reason","reviewer","risk","confidence","sprint","release"],C=["daily","weekly","monthly","yearly"],r=["mon","tue","wed","thu","fri","sat","sun"];function m(e){return r.indexOf(e)}const f=["draft","research","review","approved","executing","paused","completed","superseded"],D=["pending","in_progress","completed","blocked","skipped","superseded"],P=["codex","claude-code","cursor","generic"],M=["related","blocks","blocked_by","depends_on","discovered_from","implements","recurs_from","verifies","supersedes"],w=["brief","standard","deep","full"],h=["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"];export{t as BUILTIN_ITEM_TYPE_VALUES,p as CONFIDENCE_TEXT_VALUES,w as CONTEXT_DEPTH_VALUES,h as CONTEXT_SECTION_VALUES,i as DEPENDENCY_KIND_VALUES,R as GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES,V as GOVERNANCE_CREATE_MODE_DEFAULT_VALUES,O as GOVERNANCE_DUPLICATE_DETECTION_MODE_VALUES,U as GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES,T as GOVERNANCE_PRESET_VALUES,I as GOVERNANCE_START_BLOCKER_ENFORCEMENT_VALUES,x as GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES,d as ISSUE_SEVERITY_VALUES,l as ITEM_FORMAT_VALUES,o as ITEM_TYPE_VALUES,S as PARENT_REFERENCE_POLICY_VALUES,P as PLAN_HARNESS_VALUES,f as PLAN_MODE_VALUES,M as PLAN_STEP_LINK_KIND_VALUES,D as PLAN_STEP_STATUS_VALUES,C as RECURRENCE_FREQUENCY_VALUES,r as RECURRENCE_WEEKDAY_VALUES,A as RISK_VALUES,c as RUNTIME_FIELD_COMMAND_VALUES,s as RUNTIME_FIELD_TYPE_VALUES,_ as RUNTIME_STATUS_ROLE_VALUES,n as RUNTIME_UNKNOWN_FIELD_POLICY_VALUES,a as SCOPE_VALUES,L as SPRINT_RELEASE_FORMAT_POLICY_VALUES,E as STATUS_VALUES,N as VALIDATE_METADATA_PROFILE_VALUES,u as VALIDATE_METADATA_REQUIRED_FIELD_VALUES,m as weekdayOrderIndex};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -226,7 +226,7 @@ and MCP release options use the same atomic transition.
|
|
|
226
226
|
|
|
227
227
|
Before closing repository defects, set `escape_class` and structured
|
|
228
228
|
`gate_evidence` through `pm update` as described in
|
|
229
|
-
[Defect Evidence](DEFECT_RECURRENCE.md#defect-evidence-on-pm-items).
|
|
229
|
+
[Defect Evidence](https://github.com/unbraind/pm-cli/blob/main/docs/DEFECT_RECURRENCE.md#defect-evidence-on-pm-items) (repository-only, excluded from npm).
|
|
230
230
|
Run `pnpm quality:defect-evidence` after the terminal transitions: a static
|
|
231
231
|
gate run before closure cannot validate evidence required only for closed items.
|
|
232
232
|
|
|
@@ -173,7 +173,7 @@ handshake. Optional host-provided `model`, `session`, `provenance`, and
|
|
|
173
173
|
session. Provenance keys must use the bounded
|
|
174
174
|
lowercase dimension vocabulary; blank, malformed, and oversized data is
|
|
175
175
|
discarded before mutation context is created. See
|
|
176
|
-
[Agent Provenance ADR Amendment](AGENT_PROVENANCE_ADR.md) for precedence,
|
|
176
|
+
[Agent Provenance ADR Amendment](https://github.com/unbraind/pm-cli/blob/main/docs/AGENT_PROVENANCE_ADR.md) (repository-only, excluded from npm) for precedence,
|
|
177
177
|
privacy, compatibility, and coverage-report contracts.
|
|
178
178
|
|
|
179
179
|
## Unknown-author remediation
|
package/docs/COMMANDS.md
CHANGED
|
@@ -1430,7 +1430,9 @@ pm telemetry local-analytics status
|
|
|
1430
1430
|
"remediation_map": { "locks_stale_count": "pm gc --scope locks" }
|
|
1431
1431
|
```
|
|
1432
1432
|
|
|
1433
|
-
|
|
1433
|
+
Each advised history remedy repairs the streams it names ([pm-3os5p6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-3os5p6.toon); tracker record excluded from npm). `pm health` previews the append-only repair for every chain mismatch. A break a bridge can repair keeps `history_drift_chain_mismatch` (`pm history-repair <id> --append-only`). A break only the rewriting repair can fix, such as a recorded patch that applies only on top of the unrecorded change, becomes `history_drift_chain_unbridgeable` (`pm history-repair <id>`). When the rewriting preview refuses too, for example because a sealed record no longer matches its seal, it becomes `history_drift_unrepairable_stream`, as does a missing stream whose history path is a symbolic link (`pm history <id> --verify --full`; restore the item's own stream from version control). `details.repair_refusals` lists each stream with the refusal `reason` and, for an unrepairable one, the `rewrite_refusal`. A missing stream is rebuilt by `pm history-repair <id>`, and an unreadable one is salvaged with `pm history-repair <id> --salvage-tail --dry-run` followed by the same command without `--dry-run`.
|
|
1434
|
+
|
|
1435
|
+
When more than one history stream is drifted, the repair remedies are rewritten to one bulk command. `pm history-repair --all --append-only` applies when every drifted stream is a bridgeable chain mismatch or a missing stream, so the bulk remedy never rewrites recorded entries. Otherwise the remaining repair remedies become `pm history-repair --all` and a bridgeable chain mismatch keeps its per-item `--append-only` remedy. Both bulk forms run on every drifted stream, so while a stream is unreadable, unrepairable, written by a newer pm, or attributed to a pending merge receipt, every remedy stays per item: the bulk run would fail that row or reconcile it without the merge audit. An unrepairable or version-skewed stream keeps only that verdict, without the hash- or chain-mismatch advice whose repair would refuse.
|
|
1434
1436
|
|
|
1435
1437
|
`remediation_map` appears in default and `--full` output and is omitted in `--brief`/`--summary` to stay token-efficient. Extension checks keep their existing richer `details.triage.remediation` instead.
|
|
1436
1438
|
|
|
@@ -1506,6 +1508,7 @@ pm history-compact --ids pm-a1b2,pm-c3d4 --dry-run
|
|
|
1506
1508
|
pm history-redact <id> --literal "[redacted_path_prefix]/private" --replacement "[redacted_path]"
|
|
1507
1509
|
pm history-redact <id> --regex "/192\\.168\\.[0-9.]+/g" --dry-run
|
|
1508
1510
|
pm history-repair <id> --dry-run
|
|
1511
|
+
pm history-repair <id> --append-only --dry-run
|
|
1509
1512
|
pm history-repair <id> --message "re-anchor legacy drift"
|
|
1510
1513
|
pm history-repair --all --dry-run
|
|
1511
1514
|
pm history-repair --all --message "bulk re-anchor drifted streams"
|
|
@@ -1636,7 +1639,8 @@ still match only at the current position. Omit `y` to search later positions. Tr
|
|
|
1636
1639
|
(repository-only tracker record, excluded from npm).
|
|
1637
1640
|
`history-compact` rewrites long streams into a synthetic checkpoint baseline plus a retained tail (`--before` accepts a 1-based version or ISO timestamp), re-anchors hashes, verifies integrity, and appends an auditable `history_compact` marker when applied.
|
|
1638
1641
|
`history-compact` bulk mode (mutually exclusive with a positional `<id>`) compacts many streams in one audited pass. Select with `--ids <a,b,c>` (an explicit list — used on its own, not combined with the scan selectors below), or a scan: `--all-over <N>` (every stream with more than N entries) and/or a lifecycle filter `--closed` (terminal items only) or `--all-streams` (every stream). `--closed` and `--all-streams` are mutually exclusive. `--min-entries <N>` (default 3) skips already-compact streams; when `history.compact_policy` is enabled and `--all-over` is omitted, the policy's `max_entries` becomes the default threshold. `--before` is single-id only and is rejected in bulk mode. Each selected stream runs the same single-item compaction; one failing stream never aborts the rest — the result reports `totals` (`streams_considered`/`selected`/`items_compacted`/`items_skipped`/`items_errored`) plus one row per stream (`compacted`/`skipped` with a `skip_reason`/`errored`), and the command exits non-zero only if any stream errored.
|
|
1639
|
-
`history-repair` re-anchors a drifted history chain when `pm health`/`pm validate --check-history-drift` report stale hashes: it replays the stream, recomputes every before/after hash using the stream's detected hash epoch, repairs legacy patch ops that no longer strictly apply, reconciles the latest hash with the on-disk item, and appends an auditable `history_repair` marker. It never modifies item content and is a safe no-op on a clean stream. The result reports the before/after hash versions and whether the epoch was preserved or selected for an ambiguous broken stream, preventing old/new runtimes from alternately rewriting an otherwise consistent legacy chain.
|
|
1642
|
+
`history-repair` re-anchors a drifted history chain when `pm health`/`pm validate --check-history-drift` report stale hashes: it replays the stream, recomputes every before/after hash using the stream's detected hash epoch, repairs legacy patch ops that no longer strictly apply, reconciles the latest hash with the on-disk item, and appends an auditable `history_repair` marker. It never modifies item content and is a safe no-op on a clean stream. A live item whose stream is absent or holds no record, which `pm health` reports as `history_drift_missing_stream`, gets one sealed `history_repair` baseline from the empty document to the on-disk item, in both repair modes, after any whitespace the stream held. Its `context.history_reseed` and the result's `reseed` receipt record `reason` (`missing_stream` or `empty_stream`) and `prior_versions: "unrecorded"`: version 1 is the item as of the repair. A deleted item's empty stream and the audited merge-reconciliation modes keep refusing. A record whose seal no longer matches its content refuses with `history_record_integrity_invalid`, exit 4, because no repair can tell which part to keep. The result reports the before/after hash versions and whether the epoch was preserved or selected for an ambiguous broken stream, preventing old/new runtimes from alternately rewriting an otherwise consistent legacy chain.
|
|
1643
|
+
`history-repair --append-only` never rewrites a recorded entry, so the stream before the repair stays a byte prefix of the repaired stream. When the chain breaks, it appends one sealed `history_repair` record whose `bridge` names every break (by `gap_from`, `gap_to` and the break entry's `record_hash`) and whose patch reconciles replay with the on-disk item. When the chain verifies and only the item drifted, it appends a reconciliation record without a bridge. Verification accepts a break only when the next bridge names it, and `pm health` names this form as the remedy for `history_drift_chain_mismatch`. It refuses with `history_append_only_repair_unavailable` (and a `reason`) when a break cannot be bridged, for example when a recorded patch only applies on top of the unrecorded change, and it cannot be combined with `--salvage-tail` or `--normalize-provenance`. See [History durability and recovery](HISTORY_RECOVERY.md#bridge-a-broken-chain-without-rewriting-it).
|
|
1640
1644
|
`history-repair --all` (mutually exclusive with `<id>`) runs the same drift scan `pm health` uses and applies the audited single-stream repair (ownership check, lock, post-repair no-drift verification, `--message` audit marker, per-stream `--force`) to every drifted stream in one pass. One failing stream never aborts the rest: the result lists one compact row per targeted stream (`repaired` / `skipped_clean` / `failed`) plus `totals`, and the command exits non-zero only if any stream failed. Add `--normalize-provenance` to include streams containing invalid boolean or single-digit provenance observations. The normalizer removes only those invalid observations and writes aggregate harness/dimension/kind counts in the audit receipt; it never echoes or retains the removed value.
|
|
1641
1645
|
|
|
1642
1646
|
Every `pm health` projection exposes `findings` and `failed_because`. A finding binds one warning token to its owning check, stable code, `advisory|gate_failing` severity, and either an executable remediation or `no_safe_automatic_remediation`. Extension health also publishes `host_version_census`, which enumerates the host and every pm-cli copy resolved by loaded extensions across npm/pnpm layouts. A version mismatch makes the extension check non-clean; matching workspace-linked or deduplicated copies remain healthy.
|
|
@@ -1684,7 +1688,7 @@ pm create Spike "Investigate retry backoff"
|
|
|
1684
1688
|
- `add-status <id>` writes a custom lifecycle status (idempotent UPSERT keyed on the normalized id; re-adding sets `replaced: true`). Roles are validated against the runtime status roles: `draft`, `active`, `blocked`, `terminal`, `terminal_done`, `terminal_canceled`, `default_open`, `default_close`, `default_cancel`.
|
|
1685
1689
|
- `remove-status <id>` removes a custom status. The six built-in statuses (`open`, `in_progress`, `blocked`, `closed`, `canceled`, `draft`) are refused. It WARNS (non-blocking) with `items_using_status:<N>` when items currently use that status.
|
|
1686
1690
|
- Built-in types (Chore, Decision, Epic, Event, Feature, Issue, Meeting, Milestone, Plan, Reminder, Task) are reserved and cannot be redefined or removed.
|
|
1687
|
-
- `add-field <key>` registers a custom metadata field in `.agents/pm/schema/fields.json` (shape: `{ "fields": [RuntimeFieldDefinition...] }`). Each custom field dynamically registers a CLI flag on create/update (and any other commands you list) so projects can capture typed project-specific metadata without hand-editing JSON. It is an idempotent UPSERT keyed on the normalized key, and refuses keys that shadow a built-in field. `list-fields` / `show-field <key>` inspect registered fields; `remove-field <key>` drops one and WARNS (non-blocking) with `items_using_field:<N>` when items still carry a value. See [CONFIGURATION.md](CONFIGURATION.md) for the full `schema/fields.json` format.
|
|
1691
|
+
- `add-field <key>` registers a custom metadata field in `.agents/pm/schema/fields.json` (shape: `{ "fields": [RuntimeFieldDefinition...] }`). Each custom field dynamically registers a CLI flag on create/update (and any other commands you list) so projects can capture typed project-specific metadata without hand-editing JSON. It is an idempotent UPSERT keyed on the normalized key, and refuses keys that shadow a built-in field. It also refuses a field whose key, flag or alias equals a built-in option of a command it is registered for (`schema_field_option_collision`, exit 2): the parser keeps one option per name, so `pm schema add-field full --commands create,list` would make `pm list --full` read as a field filter. Names are compared as the option keys a value is read under, so punctuation counts as a word break (`token.budget` equals `--token-budget`). The refusal names each shadowed option per command and, when some requested commands are free, the narrower `--commands` list. `severity` is the one built-in a field may redefine. `pm profile apply` and `pm schema rename-field` (for the target name, dry run included) refuse the same way, `pm profile lint` reports `field_option_collision`, and `pm validate --check-metadata` reports fields already stored as `validate_schema_field_option_collision:<n>` with rows under `schema_field_option_collisions` ([pm-pta8um](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-pta8um.toon); repository-only tracker record excluded from npm). `list-fields` / `show-field <key>` inspect registered fields; `remove-field <key>` drops one and WARNS (non-blocking) with `items_using_field:<N>` when items still carry a value. See [CONFIGURATION.md](CONFIGURATION.md) for the full `schema/fields.json` format.
|
|
1688
1692
|
- `apply-preset <agile|ops|research>` batch-registers a domain type preset into an already-initialized project (the same vocabulary `pm init --type-preset` seeds); it is idempotent (re-running reports `replaced` entries) and shares its definitions with init.
|
|
1689
1693
|
- `add-type --infer` scans existing item titles for stable `PREFIX-`/`PREFIX:` conventions and proposes them as custom types. It previews candidates by default (dry-run); pass `--apply` to register the non-shadowing candidates and `--min-count <n>` to tune the per-prefix threshold (default 10). Candidates whose name resolves to a built-in type are reported and skipped.
|
|
1690
1694
|
- `rename-type`, `rename-field`, and `remap-status` are lossless migration verbs. The runtime derives a deterministic workspace-and-request-bound migration id for resumable retries; `--migration-id` remains an optional authoritative override for external orchestration. Start with `--dry-run --json` to inspect the derived id, fingerprint, affected count, and ordered per-item changes without persisting a plan. Execution stages the target definition, writes immutable history on every affected item and the workspace stream, then retires the source. A field rename refuses any item that already has the target key; `--type <Type>` optionally restricts a field rename.
|
package/docs/EXTENSIONS.md
CHANGED
|
@@ -307,7 +307,7 @@ Use the public SDK barrel. Do not deep-import from `src/core` or `dist/core`.
|
|
|
307
307
|
- `api.registerCommand(definition)` adds package-owned commands; `read_output` opts readers into the [SDK output contract](SDK.md#minimal-command-extension).
|
|
308
308
|
- `api.registerFlags(command, flags)` adds runtime command flags. A flag may declare `value_type` (canonical; the legacy `type` alias is honored only when `value_type` is absent), `list: true` to accumulate repeated/comma-joined values like core `--tags`, a `default` applied when the flag is omitted, and `value_validation: "strict"` to refuse malformed `number`/`boolean` tokens before the handler runs (the default `"coerce"` forwards the raw token). The handler reads each flag from `context.options` under its camel-case handler key (`--status-filter` → `statusFilter`), published as `sdk_option` by `pm contracts --command <command> --flags-only --json`; CLI, `PmClient.run`, MCP, and `runRegisteredCommandForTest` all deliver that key with the same defaults and coercion, and host flags such as `--json`, `--author`, and `--pm-path` arrive in `context.global` and are listed as `inherited_flags`. On the CLI, a command that declares flags refuses any other option with `unknown_option` before the handler runs (a command that declares none still receives undeclared options for now, see pm-4of199 in the SDK guide), and two spellings of one flag with different values (`--status-filter open -s closed`) are refused with `extension_option_spelling_conflict`, so declare every option a handler reads. See [Handler keys and ownership](SDK.md#handler-keys-and-ownership).
|
|
309
309
|
- `api.registerItemFields(fields)` adds custom metadata fields. Agents can set declared fields with repeatable `pm create --field name=value` and `pm update <id> --field name=value`; undeclared names are rejected. Extension declarations are matched first; a name that no active extension declares but the project schema does (for example `gate_evidence`) is refused with `project_schema_field_requires_declared_flag`, which names a CLI flag and an SDK option that each set only that field (each is omitted when every spelling is shared with another declared field or with an option of the command itself) and, on the CLI, an executable `suggested_retry_args` that rewrites only that assignment. The guidance follows the invoking scope (a bulk `update-many` row is routed under `update_many`, not `update`), and when the same invocation already sets that field through a declared flag, alias or option, no route or retry is offered, because the retry would carry two values for one field ([pm-wftvem](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-wftvem.toon); tracker record excluded from npm); reserved core keys keep `core_item_field_requires_dedicated_flag`. `SchemaFieldDefinition.type` is the same closed union used by `pm schema add-field`: `string | number | boolean | string_array | array | object`. Unsupported values fail at compile time for TypeScript authors and at activation for JavaScript packages, with a did-you-mean hint on typos. `string_array` is the repeatable string collection; `array` and `object` require JSON containers. Active fields support `get`, `list` and `search` projections with `--fields name` or `--fields item.name`, preserving declared value types through `PmClient` and CLI reads. Disabled packages do not contribute selectors. Tracked by [pm-gh1571](../.agents/pm/issues/pm-gh1571.toon).
|
|
310
|
-
- Custom fields whose camel-case option name is already owned by a canonical MCP input remain usable through `options.<name>`, but authoring surfaces report the collision instead of allowing silent top-level shadowing. `pm schema add-field`, `pm profile lint`, and `pm package doctor` name the field, canonical `mcp_tool_input` owner, and nested recovery path. SDK authors can preflight the same rule with `resolvePmToolCustomFieldCollision`.
|
|
310
|
+
- Custom fields whose camel-case option name is already owned by a canonical MCP input remain usable through `options.<name>`, but authoring surfaces report the collision instead of allowing silent top-level shadowing. `pm schema add-field`, `pm profile lint`, and `pm package doctor` name the field, canonical `mcp_tool_input` owner, and nested recovery path. SDK authors can preflight the same rule with `resolvePmToolCustomFieldCollision`. A separate, stricter rule covers CLI options: a field whose key, flag or alias equals a built-in option of a command it is registered for is refused by `pm schema add-field` and `pm profile apply` with `schema_field_option_collision`, because the built-in option would stop working there; give profile fields a project-specific prefix or list only commands where the name is free.
|
|
311
311
|
- `api.registerItemTypes(types)` adds custom item types.
|
|
312
312
|
- `api.registerRelationshipKinds(definitions)` adds validated graph semantics. Definitions declare direction, inverse spelling, ordering/precedence, hierarchy, cardinality, lifecycle, aliases, payload schema, compatibility version, and self-edge policy. Active definitions govern CLI, MCP, and SDK dependency mutation admission as well as workspace graph assembly; mutation aliases are stored canonically. Requires the `schema` capability and is governed by the `schema.relationshipkinds` policy surface. See [relationship mutation admission](RELATIONSHIP_GRAPH.md#contract), tracked by [pm-7dsolo](../.agents/pm/issues/pm-7dsolo.toon).
|
|
313
313
|
- `api.registerMigration(definition)` adds schema migrations.
|
package/docs/HISTORY_RECOVERY.md
CHANGED
|
@@ -4,8 +4,12 @@ Tracked by [pm-96fsma](../.agents/pm/issues/pm-96fsma.toon),
|
|
|
4
4
|
[pm-m0yjtg](../.agents/pm/issues/pm-m0yjtg.toon),
|
|
5
5
|
[pm-qw1uw6](../.agents/pm/issues/pm-qw1uw6.toon),
|
|
6
6
|
[pm-e3gn0z](../.agents/pm/issues/pm-e3gn0z.toon),
|
|
7
|
-
[pm-wlqxg3](../.agents/pm/tasks/pm-wlqxg3.toon),
|
|
8
|
-
[pm-nb4zwz](../.agents/pm/issues/pm-nb4zwz.toon)
|
|
7
|
+
[pm-wlqxg3](../.agents/pm/tasks/pm-wlqxg3.toon),
|
|
8
|
+
[pm-nb4zwz](../.agents/pm/issues/pm-nb4zwz.toon),
|
|
9
|
+
[pm-jbplbq](../.agents/pm/issues/pm-jbplbq.toon),
|
|
10
|
+
[pm-gh1715](../.agents/pm/issues/pm-gh1715.toon),
|
|
11
|
+
[pm-3os5p6](../.agents/pm/issues/pm-3os5p6.toon), and
|
|
12
|
+
[pm-rpucvb](../.agents/pm/issues/pm-rpucvb.toon).
|
|
9
13
|
|
|
10
14
|
Project management depends on trustworthy context. History is not just an
|
|
11
15
|
activity feed: it is the reconstructable source for prior item states, including
|
|
@@ -76,9 +80,31 @@ pm history-repair <id> --salvage-tail --json
|
|
|
76
80
|
pm history <id> --verify --strict-exit
|
|
77
81
|
```
|
|
78
82
|
|
|
79
|
-
Salvage
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
Salvage retains every record byte unchanged. Discarding an invalid suffix
|
|
84
|
+
requires a nonempty, hash-verified prefix, because truncation must not cut a
|
|
85
|
+
chain whose damage it cannot see. It also removes lines whose JSON value is a
|
|
86
|
+
null, a boolean or a number wherever they sit, because such a value cannot hold
|
|
87
|
+
a record. Removing only such lines conceals nothing, so it does not require the
|
|
88
|
+
chain to verify: a stream with both a scalar line and a chain break is salvaged
|
|
89
|
+
first, the result reports `verify_ok: false` with the `verify_errors`, and its
|
|
90
|
+
`history_chain_unverified` warning names the append-only repair preview, with
|
|
91
|
+
the rewriting preview for a break a bridge cannot repair. `pm history-repair
|
|
92
|
+
<id> --append-only` then bridges the break. A stream of only scalar lines is
|
|
93
|
+
salvaged to an empty stream without a salvage record, because no record is
|
|
94
|
+
left to anchor one on. For a live item, the result's `history_stream_empty`
|
|
95
|
+
warning names `pm history-repair <id>`, which rebuilds the stream (see below).
|
|
96
|
+
With nothing to discard, salvage refuses and names the repair the chain needs.
|
|
97
|
+
Salvage checks the item identity at every replayed state, so a stream that
|
|
98
|
+
names another item anywhere refuses, even when a later delete cleared the id.
|
|
99
|
+
The salvage record is planned before the lock, so a preview refuses wherever
|
|
100
|
+
the write would, for example on a digest algorithm this pm cannot compute. A
|
|
101
|
+
broken stream that declares no hash epoch keeps its salvage record implicit. A string,
|
|
102
|
+
an array or a complete malformed object might encode one, so salvage refuses
|
|
103
|
+
those. A truncated object at the tail, such as `{"ts":`, is part of the invalid
|
|
104
|
+
suffix after the verified prefix and is discarded with it.
|
|
105
|
+
The receipt records the first discarded physical line, discarded UTF-8 byte
|
|
106
|
+
count, SHA-256 of the discarded bytes in file order, retained record count, and
|
|
107
|
+
`non_record_lines` when scalar lines were removed. An appended `history_salvage`
|
|
82
108
|
event records that receipt without copying potentially private damaged contents.
|
|
83
109
|
Salvage does not rehash prior entries, reconcile item state, or normalize
|
|
84
110
|
provenance. It refuses bulk selection, conflicting repair modes, merge conflict
|
|
@@ -87,6 +113,14 @@ with attached corruption. Recover those cases from version control or a backup.
|
|
|
87
113
|
Non-UTF-8 streams are also refused, so receipt hashes and rollback snapshots
|
|
88
114
|
always describe the original bytes rather than a lossy decoded approximation.
|
|
89
115
|
|
|
116
|
+
Every reader that goes through the shared history decoder refuses a history
|
|
117
|
+
line that is valid JSON but not an object with `history_record_invalid`. The
|
|
118
|
+
merge driver parses its inputs itself and reports such a line as invalid JSON
|
|
119
|
+
at that line. The error names the item (`item_id`), the value kind
|
|
120
|
+
(`reason`, for example `a JSON null`) and the physical line (`details.line`), and
|
|
121
|
+
its next step is the salvage preview above. Readers never report such a line as
|
|
122
|
+
`unknown_error`. `pm health` keeps reporting the stream under `unreadable_streams`.
|
|
123
|
+
|
|
90
124
|
The public SDK uses the same operation:
|
|
91
125
|
|
|
92
126
|
```ts
|
|
@@ -103,6 +137,196 @@ console.log(preview.salvage);
|
|
|
103
137
|
The CLI and MCP expose this SDK-owned contract; package authors do not need a
|
|
104
138
|
separate recovery implementation.
|
|
105
139
|
|
|
140
|
+
## Rebuild a missing history stream
|
|
141
|
+
|
|
142
|
+
A live item whose history stream is absent, or holds no record (the default
|
|
143
|
+
`history.missing_stream: auto_create` policy recreates a deleted stream as an
|
|
144
|
+
empty file on read), is reported by `pm health` as
|
|
145
|
+
`history_drift_missing_stream`. When the stream was deleted by mistake, restore
|
|
146
|
+
it from version control first. Otherwise rebuild it:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pm history-repair <id> --dry-run --json
|
|
150
|
+
pm history-repair <id> --json
|
|
151
|
+
pm health --strict-exit
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The repair writes one sealed `history_repair` record from the empty document
|
|
155
|
+
to the on-disk item, after any whitespace the stream held, so it keeps every
|
|
156
|
+
existing byte in either repair mode. An existing empty stream gets the record
|
|
157
|
+
through `O_APPEND`, on the exact bytes the repair verified. An absent stream is
|
|
158
|
+
published complete: the record is staged and flushed beside it, then
|
|
159
|
+
hard-linked into the absent path, so no partial or empty stream is ever
|
|
160
|
+
visible. A stream that another writer created or extended meanwhile refuses
|
|
161
|
+
with `stream_changed`. A filesystem whose link call fails with `EPERM`,
|
|
162
|
+
`ENOTSUP`, `EOPNOTSUPP` or `ENOSYS` refuses with `stream_publish_unsupported`;
|
|
163
|
+
any other link failure (for example `EISDIR`, which Windows exFAT reports;
|
|
164
|
+
[pm-ue6pqv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ue6pqv.toon),
|
|
165
|
+
tracker record excluded from npm) surfaces as that error. On a local
|
|
166
|
+
filesystem nothing is published either way. A network filesystem can publish
|
|
167
|
+
the link and lose the reply, so before restoring or retrying, check whether the
|
|
168
|
+
item's stream file exists as a regular file, without running a pm command on
|
|
169
|
+
the item first: under the default `auto_create` policy a pm read recreates an
|
|
170
|
+
absent stream as an empty file. If it exists, verify it with `pm history <id>
|
|
171
|
+
--verify --full`. Restore the stream from version control, or repair from a
|
|
172
|
+
clone on a filesystem with hard links, only when nothing valid was published. A
|
|
173
|
+
history path that is a symbolic link refuses with `stream_not_regular_file`,
|
|
174
|
+
both in the preview and in the write, and `pm health` reports it as
|
|
175
|
+
`history_drift_unrepairable_stream` instead of advising the rebuild. `context.history_reseed` and the result's
|
|
176
|
+
`reseed` receipt record why (`missing_stream` or `empty_stream`) and
|
|
177
|
+
`prior_versions: "unrecorded"`: version 1 is the item as of the repair, and
|
|
178
|
+
earlier versions cannot be read or restored. The record is maintenance, so it
|
|
179
|
+
does not count as work on the item. `pm history-repair --all`, with or without
|
|
180
|
+
`--append-only`, rebuilds every missing stream in one pass. A deleted item's
|
|
181
|
+
empty stream has nothing to anchor on and keeps refusing, as do the audited
|
|
182
|
+
merge-reconciliation modes, which prove their evidence against recorded
|
|
183
|
+
history.
|
|
184
|
+
|
|
185
|
+
## Bridge a broken chain without rewriting it
|
|
186
|
+
|
|
187
|
+
A change made outside pm, such as a hand edit or a merge resolution that
|
|
188
|
+
bypassed the driver, breaks the item's history chain. `pm health` previews
|
|
189
|
+
the append-only repair for every broken chain and reports
|
|
190
|
+
`history_drift_chain_mismatch` when a bridge can repair it. A break only the
|
|
191
|
+
rewriting repair can fix (`pm history-repair <id>`), such as a recorded patch
|
|
192
|
+
that applies only on top of the unrecorded change, is reported as
|
|
193
|
+
`history_drift_chain_unbridgeable`. A stream neither repair can keep, such as
|
|
194
|
+
one whose sealed record no longer matches its seal, is reported as
|
|
195
|
+
`history_drift_unrepairable_stream`. Restore that one from version control:
|
|
196
|
+
the rewriting repair refuses it with `history_record_integrity_invalid`. Such a
|
|
197
|
+
stream, and one a newer pm wrote (`history_drift_version_skew`, including a
|
|
198
|
+
record seal format this pm cannot read, which refuses with
|
|
199
|
+
`history_record_version_unsupported`), keeps only that verdict: its chain- and
|
|
200
|
+
hash-mismatch warnings would advise a repair that refuses, so health drops
|
|
201
|
+
them from the advice while `details` keeps the evidence.
|
|
202
|
+
Repair a bridgeable break append-only:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
pm history-repair <id> --append-only --dry-run --json
|
|
206
|
+
pm history-repair <id> --append-only --json
|
|
207
|
+
pm health --strict-exit
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
The repair appends one sealed `history_repair` record carrying a `bridge`. The
|
|
211
|
+
bridge names each break by the `after_hash` before it (`gap_from`), the
|
|
212
|
+
`before_hash` after it (`gap_to`) and that entry's `record_hash`. Its
|
|
213
|
+
`segment_digest` commits to every record from the first break up to the bridge,
|
|
214
|
+
so no record it covers can change under it, sealed or not. Its patch
|
|
215
|
+
reconciles replay with the on-disk item. Its anchors keep the hash epoch the
|
|
216
|
+
stream already uses:
|
|
217
|
+
|
|
218
|
+
- If any record declares an epoch, the newest declared epoch.
|
|
219
|
+
- For an implicit stream, the epoch the verified records prove, unless the
|
|
220
|
+
last record's own anchor proves another epoch. Then the newest epoch it
|
|
221
|
+
proves wins.
|
|
222
|
+
- The epoch-2 variant that replay or the on-disk item proves.
|
|
223
|
+
|
|
224
|
+
The repair refuses with `hash_surface_ambiguous` when nothing proves the epoch
|
|
225
|
+
or the variant. The record is appended with `O_APPEND` to the exact bytes the
|
|
226
|
+
repair verified. If another writer that ignores pm's lock appends in the same
|
|
227
|
+
moment, its bytes are kept and the repair reports `stream_changed`. Every earlier line stays
|
|
228
|
+
byte-identical, so the stream before the repair remains a prefix of the
|
|
229
|
+
repaired stream. Other clones, worktrees and append-only consumers keep the
|
|
230
|
+
bytes they already hold. `--all --append-only` attempts every drifted stream:
|
|
231
|
+
it bridges each bridgeable break, rebuilds each missing stream, and refuses a
|
|
232
|
+
stream a bridge cannot repair with a typed reason. When several streams drift
|
|
233
|
+
and every one is a bridgeable chain mismatch or a missing stream, `pm health`
|
|
234
|
+
names it as the bulk remedy. With other drift present a bridgeable mismatch
|
|
235
|
+
keeps its per-item `--append-only` remedy, and while any stream is unreadable,
|
|
236
|
+
unrepairable, written by a newer pm or attributed to a pending merge receipt,
|
|
237
|
+
every remedy stays per item.
|
|
238
|
+
|
|
239
|
+
Verification accepts a break exactly when the next bridge names it. Inside the
|
|
240
|
+
bridged segment it checks the recorded links, and each further break must be
|
|
241
|
+
the next one the bridge names. Wherever replay proves an entry's recorded
|
|
242
|
+
before-state, for example after a later change overwrote the edited field, that
|
|
243
|
+
entry's recorded effect must match too. Every record from the break to the
|
|
244
|
+
bridge must be complete, with item anchors that are well-formed digests of its
|
|
245
|
+
algorithm (`record_incomplete`). A declared epoch inside the segment governs the
|
|
246
|
+
records after it, and the bridge must keep the epoch the stream declared
|
|
247
|
+
(`bridge_epoch_mismatch`). The bridge must name no break that did
|
|
248
|
+
not occur, must match its `segment_digest`, and must re-anchor replay on its
|
|
249
|
+
own `after_hash`. A forged, unsealed or partial bridge is drift
|
|
250
|
+
(`bridge_invalid`, `bridge_unnamed_break`, `bridge_names_absent_break`,
|
|
251
|
+
`bridge_link_mismatch`, `bridge_segment_mismatch` or
|
|
252
|
+
`bridge_after_hash_mismatch`).
|
|
253
|
+
|
|
254
|
+
A later rewriting repair keeps a verified bridged segment's records unchanged.
|
|
255
|
+
Like every rewriting repair, it re-serializes the file, so it normalizes line
|
|
256
|
+
endings and spacing; only `--append-only` keeps the existing bytes.
|
|
257
|
+
Three rewrites must dissolve the bridge into an ordinary re-anchored record:
|
|
258
|
+
|
|
259
|
+
- a rewrite that changes an entry before the segment
|
|
260
|
+
- a merge union, which rebases every patch
|
|
261
|
+
- `history-redact`, which recomputes every state anchor
|
|
262
|
+
|
|
263
|
+
Each keeps the original bridge as rewrite evidence. It also marks every entry
|
|
264
|
+
the segment covered with a sealed `replay_inexact`, because those states were
|
|
265
|
+
re-anchored without the unrecorded change. Each rewrite locates a bridge's segment from the bridge's own commitments. The
|
|
266
|
+
segment digest proves the segment from a start that the first break's record
|
|
267
|
+
hash or recorded anchors name, so a rewrite that repairs a record before the
|
|
268
|
+
segment still marks it. When no intact commitment proves the segment, the
|
|
269
|
+
rewrite marks every record since the previous bridge, and the bridge record
|
|
270
|
+
itself. That over-restricts but never serves a version as exact. `history-redact` refuses a stream whose
|
|
271
|
+
bridge does not locate its segment (`history_redact_bridge_unlocated`) instead
|
|
272
|
+
of dropping that bridge's evidence. The markers are written before anything can
|
|
273
|
+
void the bridge:
|
|
274
|
+
|
|
275
|
+
- Provenance normalization writes them before it reseals a covered record.
|
|
276
|
+
- A merge union writes them on the records a bridge covers on either original
|
|
277
|
+
branch, before it interleaves the branches. It also marks every event the
|
|
278
|
+
merged order places between such a segment's first record and its bridge.
|
|
279
|
+
Every merge, including identical and fast-forward results, keeps a marker
|
|
280
|
+
either branch already carries, except on records a retained live bridge
|
|
281
|
+
covers.
|
|
282
|
+
- A compaction checkpoint taken at an inexact version keeps the marker. When two clones bridged the same
|
|
283
|
+
break independently, the merge driver keeps ours byte-for-byte unless a marker
|
|
284
|
+
theirs carries must be propagated onto one of ours' records, in which case the
|
|
285
|
+
changed stream is written. It appends the other bridge as a neutral record with
|
|
286
|
+
an empty patch (`equivalent_bridges`), so both repairs' provenance survives. It
|
|
287
|
+
does this only when both sides and the result verify.
|
|
288
|
+
|
|
289
|
+
Versions between a break and its bridge cannot be reconstructed exactly,
|
|
290
|
+
because the unrecorded change is missing from replay. `pm restore` and
|
|
291
|
+
`pm get --at` refuse them with `history_version_unreconstructable`, both before
|
|
292
|
+
and after a dissolution. Versions before the break and from the bridge onward
|
|
293
|
+
remain addressable. While the bridge is live, `pm history-compact` cannot
|
|
294
|
+
checkpoint such a version either. It refuses with
|
|
295
|
+
`history_compact_boundary_bridged` and names the
|
|
296
|
+
nearest durable `--before` versions before the break and from the bridge
|
|
297
|
+
onward, or timestamps when a legacy checkpoint has no trustworthy offset. After
|
|
298
|
+
a rewrite has dissolved the bridge, a checkpoint at a marked version is allowed
|
|
299
|
+
and inherits the marker, so reads and restores keep refusing it.
|
|
300
|
+
|
|
301
|
+
Clones that repaired the same break independently and then kept working
|
|
302
|
+
diverge in a run of the same repair, live or neutral and in either order,
|
|
303
|
+
followed by ordinary records. The merge driver first turns both runs into one
|
|
304
|
+
shared run: ours, plus neutral copies of theirs' repairs ours lacks. It then
|
|
305
|
+
orders only the later records, so reciprocal merges merge again without
|
|
306
|
+
contradictory orders. It does this only when no repair of the runs recurs
|
|
307
|
+
later and both rewritten sides still verify; otherwise the streams merge as
|
|
308
|
+
recorded. Its receipt keeps the original coordinates: the shared prefix of
|
|
309
|
+
the two inputs, and theirs' neutral copies count as theirs.
|
|
310
|
+
|
|
311
|
+
The repair refuses with `history_append_only_repair_unavailable` and names the
|
|
312
|
+
rewriting repair as the fallback when a bridge cannot carry the drift:
|
|
313
|
+
|
|
314
|
+
| `reason` | Meaning |
|
|
315
|
+
|---|---|
|
|
316
|
+
| `chain_failure_not_a_break` | The stream fails for another reason, such as a broken record envelope. |
|
|
317
|
+
| `patch_does_not_replay` | A recorded patch only applies on top of the unrecorded change. |
|
|
318
|
+
| `item_missing` | No on-disk item exists to anchor the bridge. |
|
|
319
|
+
| `stream_not_utf8` | The stream bytes cannot be kept exactly. |
|
|
320
|
+
| `stream_changed` | The stream changed or was replaced after the repair verified it. The record may already be in the stream, so run `pm health` and inspect the stream before retrying. |
|
|
321
|
+
| `hash_surface_ambiguous` | Neither replay nor the on-disk item proves the tail's epoch-2 variant. |
|
|
322
|
+
| `bridge_does_not_verify` | The extended stream would not verify. |
|
|
323
|
+
|
|
324
|
+
A preview reports the recorded effects the reconciliation overwrites
|
|
325
|
+
(`reconciliation`, with the `history_repair_reconcile_discards_events` warning),
|
|
326
|
+
as the rewriting repair does. `pm history-repair <id>` without `--append-only`
|
|
327
|
+
still re-anchors every recorded entry after the break, for single-writer
|
|
328
|
+
trackers that want a continuous chain.
|
|
329
|
+
|
|
106
330
|
## Permanent item identities
|
|
107
331
|
|
|
108
332
|
Reading a deleted ID returns `item_deleted`, distinct from an unknown ID.
|
package/docs/README.md
CHANGED
|
@@ -81,13 +81,13 @@ pm guide release --json
|
|
|
81
81
|
- [Agent Recovery and Guidance](AGENT_RECOVERY_AND_GUIDANCE.md) - policy refusal evidence, canonical help, and managed instruction freshness.
|
|
82
82
|
- [Declarative Workflow Policies](WORKFLOW_POLICIES.md) - portable lifecycle requirements, independent approvals, and completeness reports.
|
|
83
83
|
- [Mutation Integrity](MUTATION_INTEGRITY.md) - shared CLI/SDK/MCP author, secret, append-only disposition, and stale-work guardrails.
|
|
84
|
-
- [Agent Provenance ADR Amendment](AGENT_PROVENANCE_ADR.md) - extensible model, effort, role, and host provenance with privacy and compatibility boundaries.
|
|
84
|
+
- [Agent Provenance ADR Amendment](https://github.com/unbraind/pm-cli/blob/main/docs/AGENT_PROVENANCE_ADR.md) (repository-only, excluded from npm) - extensible model, effort, role, and host provenance with privacy and compatibility boundaries.
|
|
85
85
|
- [SDK Agent Session and Episode Context](SDK_AGENT_SESSION_CONTEXT.md) - inherited role/topic context, cross-process episode identity, and deterministic history grouping.
|
|
86
86
|
- [SDK Agent Environments](AGENT_ENVIRONMENTS.md) - calibrated observations, total verdicts, isolated episodes, and an executable public-SDK environment.
|
|
87
87
|
- [Improvement Ledger and History Analytics](IMPROVEMENT_ANALYTICS.md) - audited quantitative observations, live provenance coverage, and bounded observational fleet outcomes.
|
|
88
88
|
- [Project Assurance Primitives](ASSURANCE.md) - SDK-owned measurements, assertions, lifecycle gates, cost receipts, and durable verdict history shared by CLI and MCP.
|
|
89
89
|
- [Planning Measurements](PLANNING_MEASUREMENTS.md) - lifecycle coverage, set-membership aggregation, and derived deadline constraints.
|
|
90
|
-
- [Defect Recurrence and Boundary Evidence](DEFECT_RECURRENCE.md) - captured external samples, structured defect-escape evidence, incremental change-risk indexing, and executable recovery-producer census.
|
|
90
|
+
- [Defect Recurrence and Boundary Evidence](https://github.com/unbraind/pm-cli/blob/main/docs/DEFECT_RECURRENCE.md) (repository-only, excluded from npm) - captured external samples, structured defect-escape evidence, incremental change-risk indexing, and executable recovery-producer census.
|
|
91
91
|
- [Recurrence and Executable Recovery Contracts](RECURRENCE_RECOVERY_CONTRACTS.md) - terminal-item recurrence, duplicate-intake routing, capability-aware reindex recovery, and target-aware generated test guidance.
|
|
92
92
|
- [Trustworthy Context and Evidence Contracts](TRUSTWORTHY_CONTEXT_EVIDENCE.md) - full-record assurance, graph composition, boolean health rows, lossless linked-test removal, and role-labelled recovery.
|
|
93
93
|
- [Context Integrity Contracts](CONTEXT_INTEGRITY_CONTRACTS.md) - sparse-read identity, closed extension manifests, lossless remote docs, direction-locked graph impact, and cross-version history epochs.
|