Version not found. Please check the version and try again.
@unbrained/pm-cli 2026.10.4 → 2026.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +37 -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.d.ts +1 -1
- package/dist/cli/commander-usage.js +7 -4
- 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 +3 -1
- package/dist/cli/extension-command-help.js +5 -3
- package/dist/cli/extension-command-options.js +1 -1
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -2
- package/dist/cli/help-json-payload.js +6 -3
- 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/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 +1 -1
- package/dist/cli/register-mutation.js +2 -2
- 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/invocation-options.js +1 -1
- package/dist/cli/runtime/projection-retry.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 +2 -2
- 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 +163 -163
- package/dist/cli-bundle/chunks/{chunk-SMKHR6BM.js → chunk-25EW53VO.js} +89 -88
- package/dist/cli-bundle/chunks/chunk-3CCVTV6Q.js +8 -0
- package/dist/cli-bundle/chunks/chunk-3REXBTST.js +3 -0
- package/dist/cli-bundle/chunks/chunk-4WB55TBC.js +80 -0
- package/dist/cli-bundle/chunks/{chunk-7CE2DJMA.js → chunk-6STTPXOC.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ATB4ZZBQ.js +20 -0
- package/dist/cli-bundle/chunks/chunk-D4G43LBV.js +238 -0
- package/dist/cli-bundle/chunks/chunk-K6D6DMRT.js +31 -0
- package/dist/cli-bundle/chunks/chunk-KIRHWPZB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-O67BH435.js +6 -0
- package/dist/cli-bundle/chunks/chunk-R7CG2DB7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-RJHLD64E.js +3 -0
- package/dist/cli-bundle/chunks/chunk-TUKO5NF7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-UZ7BIUCI.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-GZMWISWW.js → chunk-XJD47LUH.js} +3 -3
- package/dist/cli-bundle/chunks/{register-list-query-QBGXO5JJ.js → register-list-query-53WYLNZT.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-34XXUBVI.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-WANO6EIM.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-WT37UPBQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6KFKQD2D.js +165 -0
- package/dist/cli-bundle/focused-chunks/chunk-FOHRPFIT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-GRQXL5G5.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-467EW5RL.js → chunk-JZ4WGUVH.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-NM3PM6O6.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-OT7HK7SG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Q6DJ5DFQ.js → chunk-PCLU34KB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-HFAW3FJQ.js → chunk-PSXFFQFT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QQIE4L42.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RPUNVKXK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RXSVJPZ7.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-SPN5QTZ3.js +30 -0
- package/dist/cli-bundle/focused-chunks/chunk-SUZJNPGB.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-W4BG5HHS.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Y5HXFDTZ.js +20 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZK5SOOPC.js +75 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZQK2XUSS.js +12 -0
- package/dist/cli-bundle/main.js +25 -25
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +25 -24
- 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 +55 -55
- 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 +10 -10
- 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/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 -1
- 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.d.ts +2 -0
- 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/preflight-ownership.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/fs/atomic-create.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/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- package/dist/core/history/drift-scan.d.ts +4 -0
- 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 +8 -7
- package/dist/core/history/history-compact-bulk.js +1 -1
- package/dist/core/history/history-diff.js +1 -1
- package/dist/core/history/history-rewrite.js +1 -1
- package/dist/core/history/history-storage-stats.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/identity.js +1 -1
- package/dist/core/history/index.js +1 -1
- package/dist/core/history/operation-contract.js +1 -1
- package/dist/core/history/projection.js +1 -1
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.js +2 -1
- 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 -1
- package/dist/core/item/actionability.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 +6 -4
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -2
- 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-gc.js +1 -1
- package/dist/core/lock/lock.js +3 -3
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +22 -10
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -1
- 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.js +1 -1
- package/dist/core/profile/profile-plan.js +1 -1
- package/dist/core/profile/profile-presets.js +25 -1
- 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/session/session-state.js +1 -1
- package/dist/core/shared/agent-session-context.js +1 -1
- package/dist/core/shared/author.js +5 -1
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +1 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.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/primitives.js +1 -1
- package/dist/core/shared/secret-rules.js +1 -1
- 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 -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 +7 -7
- package/dist/core/store/item-metadata-read-work.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-validator.js +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/telemetry/consent.js +2 -2
- 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 -5
- package/dist/core/test/background-runs.js +3 -3
- 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 +6 -4
- 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/refusal-closure-census.js +2 -1
- package/dist/sdk/agent/refusal-closure.js +1 -1
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/refusal-reachability.js +3 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent/task-transcript-contracts.js +1 -1
- package/dist/sdk/agent/tracker-preflight-contracts.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -1
- 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/authoring.js +1 -1
- package/dist/sdk/cli-bootstrap.d.ts +5 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -3
- 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 -1
- 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.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.js +1 -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 -1
- package/dist/sdk/completion/fish.js +13 -7
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +14 -8
- package/dist/sdk/completion.js +1 -1
- package/dist/sdk/compose.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 -3
- 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/contracts.js +1 -1
- package/dist/sdk/core-governance.js +1 -1
- package/dist/sdk/core.js +1 -1
- package/dist/sdk/corpus-shape.js +1 -1
- package/dist/sdk/define.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/agent-environment.js +1 -1
- package/dist/sdk/environment/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -1
- 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/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 +4 -2
- 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.d.ts +2 -0
- package/dist/sdk/extension/managed-state.js +2 -2
- package/dist/sdk/extension/managed-update-status.d.ts +3 -0
- package/dist/sdk/extension/managed-update-status.js +2 -0
- package/dist/sdk/extension/migrations.js +2 -2
- 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 -4
- package/dist/sdk/extension/shared.js +1 -1
- package/dist/sdk/extension/source-resolution.d.ts +2 -6
- package/dist/sdk/extension/source-resolution.js +1 -1
- package/dist/sdk/extension/static-inventory.js +1 -1
- package/dist/sdk/extension/update-check.d.ts +10 -0
- package/dist/sdk/extension/update-check.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -1
- package/dist/sdk/extension-contracts.js +1 -1
- package/dist/sdk/extension.d.ts +4 -0
- 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/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 +1 -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/coverage-assurance.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 +1 -1
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -1
- package/dist/sdk/governance/hierarchy-validation.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 -1
- package/dist/sdk/governance/reindex.js +5 -4
- 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-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 -1
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/graph/adapter.js +1 -1
- 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/centrality.js +1 -1
- package/dist/sdk/graph/conformance.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/index.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/graph.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/guide.js +8 -1
- package/dist/sdk/history/attestation-command.js +1 -1
- package/dist/sdk/history/attestation-contract.js +1 -1
- package/dist/sdk/history/attestation-scan.js +1 -1
- package/dist/sdk/history/attestation.js +1 -1
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/salvage.js +3 -2
- package/dist/sdk/history/subject.js +1 -1
- package/dist/sdk/history-analytics.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-mcp.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/improvement-ledger-validation.js +1 -1
- package/dist/sdk/improvement-ledger.js +2 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/init-agent-guidance.js +16 -2
- package/dist/sdk/init.js +16 -2
- package/dist/sdk/invocation-author.js +1 -1
- package/dist/sdk/item-children.js +1 -1
- package/dist/sdk/item-metadata-index.js +1 -1
- package/dist/sdk/item-schedule.js +1 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +4 -2
- package/dist/sdk/lifecycle/claim.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/create.js +1 -1
- package/dist/sdk/lifecycle/delete.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/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 +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/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.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 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -1
- package/dist/sdk/mcp/apps.js +1 -1
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -1
- 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 +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/install.js +4 -2
- 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/three-way.js +3 -2
- package/dist/sdk/merge/worktree-config.js +1 -1
- 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-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 -1
- 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 -1
- 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 -1
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get.d.ts +14 -2
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +1 -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-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -1
- 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 -1
- 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 -2
- package/dist/sdk/query/search/types.js +1 -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/workspace-contracts.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/provenance.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 +7 -4
- package/dist/sdk/relationship-kinds/contract.js +1 -1
- package/dist/sdk/relationship-migration.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/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.js +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +1 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema-migration.js +4 -3
- package/dist/sdk/schema.js +7 -1
- package/dist/sdk/search-refresh-worker.js +1 -1
- package/dist/sdk/similarity-scoring.js +1 -1
- package/dist/sdk/similarity.js +1 -1
- package/dist/sdk/start-task-status.js +1 -1
- package/dist/sdk/stats.js +1 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -3
- package/dist/sdk/templates.js +26 -2
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/entry.js +1 -1
- package/dist/sdk/test/execution.d.ts +2 -1
- package/dist/sdk/test/execution.js +6 -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/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/testing.js +7 -4
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -1
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/workspace-contracts-cache.js +1 -1
- package/dist/sdk/workspace-contracts.js +1 -1
- package/dist/sdk/workspace-memory.js +2 -2
- package/dist/sdk/workspace-recipe.js +1 -1
- package/dist/sdk/workspace-snapshot.js +5 -4
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +3 -2
- package/dist/types/index.js +1 -1
- package/dist/types.js +1 -1
- package/docs/AGENT_EVIDENCE_CONSISTENCY.md +88 -0
- package/docs/DEVELOPMENT_DEPENDENCY_SECURITY.md +36 -0
- package/docs/GET_READ_EVIDENCE.md +84 -0
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +23 -0
- package/docs/PR_REVIEW_LOOP.md +21 -4
- package/docs/README.md +3 -0
- package/docs/RELEASING.md +18 -0
- package/docs/SDK_CONFIGURATION_SAFETY.md +123 -0
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +3 -3
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
- package/marketplace.json +2 -2
- package/package.json +3 -3
- 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/extensions/vcs/index.ts +4 -2
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +2 -2
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +2 -2
- package/plugins/pm-codex/plugin.json +1 -1
- package/scripts/finalize-build.mjs +3 -2
- package/dist/cli-bundle/chunks/chunk-7UVXKI7K.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D7Z2ZMJL.js +0 -3
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J52QIRRZ.js +0 -80
- package/dist/cli-bundle/chunks/chunk-JDKD3WGG.js +0 -6
- package/dist/cli-bundle/chunks/chunk-JQ7DW663.js +0 -2
- package/dist/cli-bundle/chunks/chunk-QXIDOOWT.js +0 -20
- package/dist/cli-bundle/chunks/chunk-SGFQQXFD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-V3U77H3V.js +0 -31
- package/dist/cli-bundle/chunks/chunk-XZDWAYJC.js +0 -3
- package/dist/cli-bundle/chunks/chunk-Y6VRBTP3.js +0 -238
- package/dist/cli-bundle/chunks/chunk-YAAFYFS4.js +0 -8
- package/dist/cli-bundle/chunks/register-mutation-53ZLT4RX.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-OBK2FXUU.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-HM3OCBH2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2JFYR56O.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-32EVUSS4.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-5GUSO2P4.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-6XBRADQQ.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-7O4NUJVO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CURTIIQT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IJUWEEEB.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-JCVMOSWQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JMJK2L4Z.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-KG3H4UZZ.js +0 -30
- package/dist/cli-bundle/focused-chunks/chunk-MHQ2XICU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RJV6QVJE.js +0 -75
- package/dist/cli-bundle/focused-chunks/chunk-ZE2JZ7R6.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-ZLEN4HZD.js +0 -165
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
`)}function hasValidJournalMetadata(journal){return Number.isInteger(journal.attempt)&&typeof journal.author
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0bd9a904-c076-5c2a-a9d8-42a543625e33")}catch{}})();import{mkdir,readFile}from"node:fs/promises";import path from"node:path";import{acquireLock}from"../core/lock/lock.js";import{isFileMissingError,writeFileAtomic}from"../core/fs/fs-utils.js";import{nowIso}from"../core/shared/time.js";class WorkspaceTransactionInterruptedError extends Error{constructor(message="Workspace transaction interrupted"){super(message),this.name="WorkspaceTransactionInterruptedError"}}const WORKSPACE_TRANSACTION_LOCK_ID="sdk-workspace-transaction",TRANSACTION_ID_PATTERN=/^[a-zA-Z0-9._-]+$/,DEFAULT_LOCK_TTL_SECONDS=30,DEFAULT_LOCK_WAIT_MS=3e3;function requiredIdentifier(value,label){if(typeof value!="string")throw new TypeError(`${label} must be a string`);const normalized=value.trim();if(!normalized||!TRANSACTION_ID_PATTERN.test(normalized))throw new TypeError(`${label} must match [a-zA-Z0-9._-]+`);return normalized}function requiredText(value,label){if(typeof value!="string")throw new TypeError(`${label} must be a string`);const normalized=value.trim();if(!normalized)throw new TypeError(`${label} must be non-empty`);return normalized}function validateWorkspaceTransactionIdentity(options){return{pmRoot:requiredText(options.pmRoot,"Transaction pmRoot"),transactionId:requiredIdentifier(options.transactionId,"Transaction id"),author:requiredText(options.author,"Transaction author")}}function positiveInteger(value,fallback,label){const resolved=value??fallback;if(!Number.isInteger(resolved)||resolved<=0)throw new TypeError(`${label} must be a positive integer`);return resolved}function journalPath(pmRoot,transactionId){return path.join(pmRoot,"transactions","sdk",`${transactionId}.json`)}async function writeJournal(pmRoot,journal){journal.updatedAt=nowIso();const target=journalPath(pmRoot,journal.transactionId);await mkdir(path.dirname(target),{recursive:!0}),await writeFileAtomic(target,`${JSON.stringify(journal,null,2)}
|
|
2
|
+
`)}function hasValidJournalMetadata(journal){return Number.isInteger(journal.attempt)&&typeof journal.author=="string"&&typeof journal.createdAt=="string"&&typeof journal.updatedAt=="string"}function createResultMap(source){return Object.assign(Object.create(null),source)}function cloneJournalValue(value,label){try{const serialized=JSON.stringify(value,(_key,nestedValue)=>{if(typeof nestedValue=="number"&&!Number.isFinite(nestedValue))throw new TypeError(`${label} contains a non-finite number`);if(nestedValue===void 0||typeof nestedValue=="function"||typeof nestedValue=="symbol")throw new TypeError(`${label} contains a non-JSON value`);return nestedValue});return JSON.parse(serialized)}catch(error){throw new TypeError(`${label} must be JSON serializable`,{cause:error})}}function cloneOptionalJournalValue(value,label){return value===void 0?void 0:cloneJournalValue(value,label)}function setJournalEntry(target,stepId,value,label){const cloned=cloneOptionalJournalValue(value,label);cloned===void 0?delete target[stepId]:target[stepId]=cloned}function isJournalMap(value){return value!==null&&typeof value=="object"&&!Array.isArray(value)}function hasUniqueKnownStepIds(value,stepIds){return Array.isArray(value)&&new Set(value).size===value.length&&value.every(stepId=>typeof stepId=="string"&&stepIds.includes(stepId))}function hasValidJournalLifecycle(journal,stepIds){if(!hasUniqueKnownStepIds(journal.startedStepIds,stepIds)||!hasUniqueKnownStepIds(journal.completedStepIds,stepIds)||!isJournalMap(journal.results)||!isJournalMap(journal.compensationData))return!1;const startedStepIds=journal.startedStepIds,started=new Set(startedStepIds),completedStepIds=journal.completedStepIds,completed=new Set(completedStepIds);return Object.keys(journal.compensationData).some(stepId=>!started.has(stepId))||Object.keys(journal.results).some(stepId=>!completed.has(stepId))?!1:journal.status==="committed"?stepIds.every(stepId=>completed.has(stepId)):journal.status!=="compensated"||completed.size===0&&started.size===0}function parseJournal(raw,transactionId,stepIds){let parsed;try{parsed=JSON.parse(raw)}catch{throw new TypeError(`Workspace transaction ${transactionId} journal is invalid JSON`)}if(!parsed||typeof parsed!="object"||Array.isArray(parsed))throw new TypeError(`Workspace transaction ${transactionId} journal is invalid`);const journal=parsed,identityMatches=journal.schemaVersion===1&&journal.transactionId===transactionId,stepsMatch=Array.isArray(journal.stepIds)&&journal.stepIds.length===stepIds.length&&journal.stepIds.every((stepId,index)=>stepId===stepIds[index]),lifecycleMatches=hasValidJournalLifecycle(journal,stepIds),metadataMatches=hasValidJournalMetadata(journal),statusMatches=["applying","compensating","compensated","committed"].includes(String(journal.status));if(!identityMatches||!stepsMatch||!lifecycleMatches||!metadataMatches||!statusMatches)throw new TypeError(`Workspace transaction ${transactionId} journal does not match the supplied plan`);return{...journal,results:createResultMap(journal.results),compensationData:createResultMap(journal.compensationData)}}async function prepareJournalForApply(options,transactionId,author,stepIds,existing){let journal=existing;const recovered=journal!==void 0;if(journal?.status==="compensating"&&await compensateAppliedSteps(options,journal),journal===void 0||journal.status==="compensated"){const timestamp=nowIso();journal={schemaVersion:1,transactionId,author,status:"applying",attempt:(journal?.attempt??0)+1,createdAt:journal?.createdAt??timestamp,updatedAt:timestamp,stepIds,startedStepIds:[],completedStepIds:[],results:createResultMap(),compensationData:createResultMap()},await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"prepared")}return{journal,recovered}}async function applyPreparedTransaction(options,journal,recovered){try{await discoverAppliedSteps(journal,options.steps),await writeJournal(options.pmRoot,journal);const completed=new Set(journal.completedStepIds),started=new Set(journal.startedStepIds);for(const step of options.steps){if(completed.has(step.id))continue;const inspection=await step.inspect();let result=cloneOptionalJournalValue(inspection.result,`Step ${step.id} result`);if(inspection.state!=="applied"){const compensationData=await step.prepareCompensation?.();setJournalEntry(journal.compensationData,step.id,compensationData,`Step ${step.id} compensation data`),started.add(step.id),journal.startedStepIds=options.steps.map(candidate=>candidate.id).filter(stepId=>started.has(stepId)),await writeJournal(options.pmRoot,journal);const appliedResult=await step.apply();result=cloneOptionalJournalValue(appliedResult,`Step ${step.id} result`)}await emitTransition(options,journal,"step_applied",step.id),completed.add(step.id),journal.completedStepIds=options.steps.map(candidate=>candidate.id).filter(stepId=>completed.has(stepId)),setJournalEntry(journal.results,step.id,result,`Step ${step.id} result`),await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"step_recorded",step.id)}return await emitTransition(options,journal,"committing"),journal.status="committed",await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"committed"),{transactionId:journal.transactionId,status:"committed",recovered,results:createResultMap(journal.results)}}catch(error){if(error instanceof WorkspaceTransactionInterruptedError||journal.status==="committed")throw error;try{await compensateAppliedSteps(options,journal)}catch(compensationError){throw new AggregateError([error,compensationError],`Workspace transaction failed and compensation failed: ${String(compensationError)}`,{cause:compensationError})}throw error}}async function loadJournal(pmRoot,transactionId,stepIds){try{return parseJournal(await readFile(journalPath(pmRoot,transactionId),"utf8"),transactionId,stepIds)}catch(error){if(error!==null&&typeof error=="object"&&"code"in error&&isFileMissingError(error))return;throw error}}async function emitTransition(options,journal,transition,stepId){await options.onTransition?.({transactionId:journal.transactionId,attempt:journal.attempt,transition,...stepId===void 0?{}:{stepId}})}async function discoverAppliedSteps(journal,steps){const completed=new Set,results=createResultMap();for(const step of steps){const inspection=await step.inspect();inspection.state==="applied"&&(completed.add(step.id),setJournalEntry(results,step.id,inspection.result,`Step ${step.id} result`))}journal.results=results,journal.completedStepIds=steps.map(step=>step.id).filter(stepId=>completed.has(stepId))}async function compensateAppliedSteps(options,journal){journal.status="compensating",await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"compensating");const completed=new Set(journal.completedStepIds),started=new Set(journal.startedStepIds);for(const step of[...options.steps].reverse()){if(!started.has(step.id)&&!completed.has(step.id))continue;let shouldCompensate;try{shouldCompensate=started.has(step.id)&&(await step.inspect()).state==="applied"}catch{shouldCompensate=started.has(step.id)}shouldCompensate&&(await emitTransition(options,journal,"step_compensating",step.id),await step.compensate(journal.compensationData[step.id])),completed.delete(step.id),started.delete(step.id),journal.completedStepIds=options.steps.map(candidate=>candidate.id).filter(stepId=>completed.has(stepId)),journal.startedStepIds=options.steps.map(candidate=>candidate.id).filter(stepId=>started.has(stepId)),delete journal.results[step.id],delete journal.compensationData[step.id],await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"step_compensated",step.id)}journal.status="compensated",await writeJournal(options.pmRoot,journal),await emitTransition(options,journal,"compensated")}async function commitWorkspaceTransaction(options){const{pmRoot,transactionId,author}=validateWorkspaceTransactionIdentity(options),lockTtlSeconds=positiveInteger(options.lockTtlSeconds,DEFAULT_LOCK_TTL_SECONDS,"Transaction lock TTL"),lockWaitMs=positiveInteger(options.lockWaitMs,DEFAULT_LOCK_WAIT_MS,"Transaction lock wait"),steps=[...options.steps];if(steps.length===0)throw new TypeError("Workspace transaction requires at least one step");const stepIds=steps.map(step=>{const stepId=requiredIdentifier(step.id,"Transaction step id");if(stepId!==step.id)throw new TypeError("Transaction step id must not contain surrounding whitespace");return stepId});if(new Set(stepIds).size!==stepIds.length)throw new TypeError("Workspace transaction step ids must be unique");const stableOptions={...options,pmRoot,transactionId,author,steps,lockTtlSeconds,lockWaitMs},release=await acquireLock(pmRoot,WORKSPACE_TRANSACTION_LOCK_ID,lockTtlSeconds,author,!1,!1,lockWaitMs);try{const existing=await loadJournal(pmRoot,transactionId,stepIds),recovered=existing!==void 0;if(existing?.status==="committed")return{transactionId,status:"committed",recovered:!0,results:createResultMap(existing.results)};const prepared=await prepareJournalForApply(stableOptions,transactionId,author,stepIds,existing);return await applyPreparedTransaction(stableOptions,prepared.journal,recovered||prepared.recovered)}finally{await release()}}export{WorkspaceTransactionInterruptedError,commitWorkspaceTransaction,validateWorkspaceTransactionIdentity};
|
|
3
3
|
//# sourceMappingURL=workspace-transaction.js.map
|
package/dist/sdk/workspace.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1de99e25-e132-5071-833e-37361b4cc7e6")}catch{}})();import{isFileMissingError}from"../core/fs/fs-utils.js";import{readFile,writeFile}from"node:fs/promises";import path from"node:path";import{EXIT_CODE}from"../core/shared/constants.js";import{PmCliError}from"../core/shared/errors.js";const PM_GITIGNORE_START="# pm-cli:runtime-cache:start",PM_GITIGNORE_END="# pm-cli:runtime-cache:end",PM_GITIGNORE_DEFAULT_TRACKER_ROOT=".agents/pm",PM_GITIGNORE_RUNTIME_DIRECTORIES=["runtime/","search/","locks/","transactions/","checkpoints/"],PM_GITIGNORE_TRACKED_FILES=["search/eval-queries.json"];async function withGitignorePermissionRecovery(operation){try{return await operation()}catch(error){throw error instanceof Error&&"code"in error&&typeof error.code=="string"&&["EACCES","EPERM","EROFS"].includes(error.code)?new PmCliError("The workspace .gitignore is not writable.",EXIT_CODE.GENERIC_FAILURE,{code:"init_gitignore_unwritable",reason:error.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."]}):error}}function normalizeTrackerRelativeRoot(trackerRelativeRoot){return trackerRelativeRoot.replaceAll("\\","/").replace(/^\.\/+/,"").replace(/\/+$/,"")}function isPathOutsideRoot(relativePath){const normalized=relativePath.replaceAll("\\","/");return path.isAbsolute(relativePath)||normalized===".."||normalized.startsWith("../")}function getPmGitignoreBlock(trackerRelativeRoot=PM_GITIGNORE_DEFAULT_TRACKER_ROOT){const root=normalizeTrackerRelativeRoot(trackerRelativeRoot);return[PM_GITIGNORE_START,...PM_GITIGNORE_RUNTIME_DIRECTORIES.map(directory=>directory==="search/"?`${root}/${directory}*`:`${root}/${directory}`),...PM_GITIGNORE_TRACKED_FILES.map(file=>`!${root}/${file}`),PM_GITIGNORE_END].join(`
|
|
2
|
+
`)}async function ensurePmGitignore(workspaceRoot,options={}){const gitignorePath=path.join(workspaceRoot,".gitignore");let trackerRelativeRoot=PM_GITIGNORE_DEFAULT_TRACKER_ROOT;if(options.pmRoot!==void 0){const relative=normalizeTrackerRelativeRoot(path.relative(path.resolve(workspaceRoot),path.resolve(options.pmRoot)));if(isPathOutsideRoot(relative))return{path:gitignorePath,changed:!1};relative.length>0&&(trackerRelativeRoot=relative)}let current="";try{current=await withGitignorePermissionRecovery(()=>readFile(gitignorePath,"utf8"))}catch(error){if(!(error instanceof Error&&"code"in error&&isFileMissingError(error)))throw error}const start=current.indexOf(PM_GITIGNORE_START),end=current.indexOf(PM_GITIGNORE_END),prefix=(start>=0&&end>=start?`${current.slice(0,start)}${current.slice(end+PM_GITIGNORE_END.length)}`:current).trimEnd(),next=`${prefix.length>0?`${prefix}
|
|
2
3
|
|
|
3
4
|
`:""}${getPmGitignoreBlock(trackerRelativeRoot)}
|
|
4
|
-
`;
|
|
5
|
+
`;return next===current?{path:gitignorePath,changed:!1}:(await withGitignorePermissionRecovery(()=>writeFile(gitignorePath,next,"utf8")),{path:gitignorePath,changed:!0})}export{PM_GITIGNORE_DEFAULT_TRACKER_ROOT,PM_GITIGNORE_END,PM_GITIGNORE_RUNTIME_DIRECTORIES,PM_GITIGNORE_START,PM_GITIGNORE_TRACKED_FILES,ensurePmGitignore,getPmGitignoreBlock,isPathOutsideRoot};
|
|
5
6
|
//# sourceMappingURL=workspace.js.map
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0ca7f52c-fb31-5cd9-b689-a918f4e61816")}catch{}})();export*from"../types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e6847fdd-b2c1-5503-b510-56fdfdcf933f")}catch{}})();const BUILTIN_ITEM_TYPE_VALUES=["Epic","Feature","Task","Chore","Issue","Decision","Event","Reminder","Milestone","Meeting","Plan"],ITEM_TYPE_VALUES=BUILTIN_ITEM_TYPE_VALUES,STATUS_VALUES=["draft","open","in_progress","blocked","closed","canceled"],RUNTIME_STATUS_ROLE_VALUES=["draft","active","blocked","terminal","terminal_done","terminal_canceled","default_open","default_close","default_cancel"],RUNTIME_FIELD_TYPE_VALUES=["string","number","boolean","string_array","array","object"],RUNTIME_FIELD_COMMAND_VALUES=["create","update","update_many","list","search","calendar","context"],RUNTIME_UNKNOWN_FIELD_POLICY_VALUES=["allow","warn","reject"],DEPENDENCY_KIND_VALUES=["blocks","parent","child","parent_child","child_of","related","related_to","discovered_from","blocked_by","incident_from","epic","implements","recurs_from","supersedes","task","verifies"],SCOPE_VALUES=["project","global"],RISK_VALUES=["low","medium","high","critical"],ISSUE_SEVERITY_VALUES=["low","medium","high","critical"],CONFIDENCE_TEXT_VALUES=["low","medium","high"],ITEM_FORMAT_VALUES=["toon","json_markdown"],SPRINT_RELEASE_FORMAT_POLICY_VALUES=["warn","strict_error"],PARENT_REFERENCE_POLICY_VALUES=["warn","strict_error"],VALIDATE_METADATA_PROFILE_VALUES=["core","strict","custom"],GOVERNANCE_PRESET_VALUES=["minimal","default","strict","custom"],GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES=["none","warn","strict"],GOVERNANCE_CREATE_MODE_DEFAULT_VALUES=["progressive","strict"],GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES=["off","warn","strict"],GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES=["off","warn","strict"],GOVERNANCE_DUPLICATE_DETECTION_MODE_VALUES=["off","advisory","strict"],VALIDATE_METADATA_REQUIRED_FIELD_VALUES=["author","acceptance_criteria","estimated_minutes","close_reason","reviewer","risk","confidence","sprint","release"],RECURRENCE_FREQUENCY_VALUES=["daily","weekly","monthly","yearly"],RECURRENCE_WEEKDAY_VALUES=["mon","tue","wed","thu","fri","sat","sun"];function weekdayOrderIndex(value){return RECURRENCE_WEEKDAY_VALUES.indexOf(value)}const PLAN_MODE_VALUES=["draft","research","review","approved","executing","paused","completed","superseded"],PLAN_STEP_STATUS_VALUES=["pending","in_progress","completed","blocked","skipped","superseded"],PLAN_HARNESS_VALUES=["codex","claude-code","cursor","generic"],PLAN_STEP_LINK_KIND_VALUES=["related","blocks","blocked_by","depends_on","discovered_from","implements","recurs_from","verifies","supersedes"],CONTEXT_DEPTH_VALUES=["brief","standard","deep","full"],CONTEXT_SECTION_VALUES=["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"];export{BUILTIN_ITEM_TYPE_VALUES,CONFIDENCE_TEXT_VALUES,CONTEXT_DEPTH_VALUES,CONTEXT_SECTION_VALUES,DEPENDENCY_KIND_VALUES,GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES,GOVERNANCE_CREATE_MODE_DEFAULT_VALUES,GOVERNANCE_DUPLICATE_DETECTION_MODE_VALUES,GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES,GOVERNANCE_PRESET_VALUES,GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES,ISSUE_SEVERITY_VALUES,ITEM_FORMAT_VALUES,ITEM_TYPE_VALUES,PARENT_REFERENCE_POLICY_VALUES,PLAN_HARNESS_VALUES,PLAN_MODE_VALUES,PLAN_STEP_LINK_KIND_VALUES,PLAN_STEP_STATUS_VALUES,RECURRENCE_FREQUENCY_VALUES,RECURRENCE_WEEKDAY_VALUES,RISK_VALUES,RUNTIME_FIELD_COMMAND_VALUES,RUNTIME_FIELD_TYPE_VALUES,RUNTIME_STATUS_ROLE_VALUES,RUNTIME_UNKNOWN_FIELD_POLICY_VALUES,SCOPE_VALUES,SPRINT_RELEASE_FORMAT_POLICY_VALUES,STATUS_VALUES,VALIDATE_METADATA_PROFILE_VALUES,VALIDATE_METADATA_REQUIRED_FIELD_VALUES,weekdayOrderIndex};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Agent evidence consistency
|
|
2
|
+
|
|
3
|
+
Trackers: [pm-gh1383](../.agents/pm/issues/pm-gh1383.toon),
|
|
4
|
+
[pm-gh1385](../.agents/pm/issues/pm-gh1385.toon), and
|
|
5
|
+
[pm-7wzc6f](../.agents/pm/issues/pm-7wzc6f.toon). Distribution verification:
|
|
6
|
+
[pm-2evidence-dist](../.agents/pm/issues/pm-2evidence-dist.toon).
|
|
7
|
+
|
|
8
|
+
## Agent quick context
|
|
9
|
+
|
|
10
|
+
Evidence must retain its literal text, validation must compare a consistent
|
|
11
|
+
item/history pair, and recovery help must identify a declared command. These
|
|
12
|
+
contracts apply to ordinary project work and to the evidence used for recursive
|
|
13
|
+
self-improvement.
|
|
14
|
+
|
|
15
|
+
## Literal annotations
|
|
16
|
+
|
|
17
|
+
`comments`, `notes`, and `learnings` preserve positional annotation bodies through
|
|
18
|
+
bootstrap normalization. A prefix such as `TDD:` or `add:` is evidence text.
|
|
19
|
+
The same text is preserved when supplied through `--add`, `--file`, `--stdin`,
|
|
20
|
+
`--add -`, or `--file -`.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pm comments <id> "TDD: regression reproduced before the fix"
|
|
24
|
+
pm notes <id> --file evidence.txt
|
|
25
|
+
pm learnings <id> --stdin
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The annotation SDK still supports its explicit `text:` and `text=` structured
|
|
29
|
+
input syntax. Files and standard input remain literal text sources. Other
|
|
30
|
+
commands retain their supported bare-key option normalization.
|
|
31
|
+
|
|
32
|
+
## Consistent history validation
|
|
33
|
+
|
|
34
|
+
Validation first scans the captured corpus. An ordinary writer can advance an
|
|
35
|
+
item and its history after that capture. An item-hash discrepancy is therefore
|
|
36
|
+
read again while holding the same item mutation lock used by ordinary writers.
|
|
37
|
+
This fresh source/history pair determines the finding. A reread whose declared
|
|
38
|
+
identity differs from the locked identity fails before any finding is replaced.
|
|
39
|
+
|
|
40
|
+
Clean rows and history-only findings do not incur another item read or lock
|
|
41
|
+
acquisition. Each item-hash discrepancy gets one bounded recheck. Lock contention
|
|
42
|
+
and missing or unreadable item source are reported as failures; validation does
|
|
43
|
+
not steal locks or certify an unread pair.
|
|
44
|
+
Missing histories, malformed streams, record-chain corruption, unsupported
|
|
45
|
+
epochs, and identity discontinuities retain their strict findings. History-only
|
|
46
|
+
diagnostics remain available to repair workflows even when a writer owns the item.
|
|
47
|
+
Workspace singleton findings retain their own verification semantics.
|
|
48
|
+
|
|
49
|
+
The core `scanHistoryDrift` API continues to compare the snapshots supplied by
|
|
50
|
+
its caller. Its strict `scanItemHistoryDrift` companion shares stream verification
|
|
51
|
+
without loading or writing the corpus cache or rereading workspace history and
|
|
52
|
+
governed documents. Workspace checks run once in the initial corpus scan.
|
|
53
|
+
|
|
54
|
+
## Declared recovery help
|
|
55
|
+
|
|
56
|
+
An unknown option has no declared value arity. In an invocation such as
|
|
57
|
+
`pm --unknown-option synthetic-value context`, the parser cannot safely assume
|
|
58
|
+
that `synthetic-value` is a command. Recovery falls back to `pm --help --all`
|
|
59
|
+
unless the inferred target belongs to the core or active runtime command surface.
|
|
60
|
+
Known commands, command-first invocations, namespaced aliases, and options with
|
|
61
|
+
an equals value retain command-specific recovery help.
|
|
62
|
+
|
|
63
|
+
## Verification
|
|
64
|
+
|
|
65
|
+
The regression owner exercises real isolated tracker persistence, all annotation
|
|
66
|
+
transports, strict corruption cases, writer-lock contention, cache preservation,
|
|
67
|
+
identity binding, bounded cache reads, and public bootstrap normalization:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node scripts/run-tests.mjs test -- tests/unit/regressions/agent-evidence-consistency.spec.ts
|
|
71
|
+
node scripts/release/agent-evidence-consistency-control.mjs
|
|
72
|
+
node scripts/release/agent-evidence-consistency-control.mjs --negative-control
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The final command must exit with status `1`: each disposable source mutation
|
|
76
|
+
must fail its selected regression. A failure caused by unrelated setup is not
|
|
77
|
+
accepted as regression proof.
|
|
78
|
+
|
|
79
|
+
Build finalization also compacts redundant syntax in retained runtime modules.
|
|
80
|
+
Exported names, module paths, declarations, bundled files and original source
|
|
81
|
+
maps remain covered by real filesystem and Node consumer tests. The npm artifact
|
|
82
|
+
must satisfy its existing size ceiling before installed npm/npx/bunx acceptance.
|
|
83
|
+
|
|
84
|
+
Packed SDK continuation acceptance stages the actual publish selectors and
|
|
85
|
+
unchanged package manifest in a disposable source directory before invoking
|
|
86
|
+
`npm pack`. This avoids traversing development dependencies while retaining
|
|
87
|
+
the real tarball, public SDK export, and existing process and test time limits.
|
|
88
|
+
Installed package smoke acceptance separately verifies dependency installation.
|
|
@@ -20,6 +20,42 @@ nightly quality and release paths enforce it. The registry-owned local
|
|
|
20
20
|
preflight also requires the static gate and permits no skip. Trivy separately
|
|
21
21
|
includes development dependencies in its required repository scan.
|
|
22
22
|
|
|
23
|
+
## Indexed source-map offsets
|
|
24
|
+
|
|
25
|
+
[pm-dba47](../.agents/pm/issues/pm-dba47.toon) tracks Dependabot alert 47 and
|
|
26
|
+
the new source-map cause of Scorecard alert 29.
|
|
27
|
+
[GHSA-68fv-2mgg-jv7q](https://github.com/advisories/GHSA-68fv-2mgg-jv7q)
|
|
28
|
+
affects `source-map-js` before 1.2.2. Unchecked indexed-map section offsets can
|
|
29
|
+
block the event loop. The dependency is used by the development lint and test
|
|
30
|
+
graph through `@eslint/css-tree`, `magicast` and `postcss`; this inventory does
|
|
31
|
+
not establish a production exploit. The pnpm override requires a patched 1.x
|
|
32
|
+
release while retaining normal release-age policy and frozen installation.
|
|
33
|
+
The pinned pnpm 11 uses its default one-day minimum release age; the separate
|
|
34
|
+
seven-day Dependabot cooldown governs version-update scheduling. This repair
|
|
35
|
+
adds no age override or exclusion.
|
|
36
|
+
|
|
37
|
+
A clean audit feed is only evidence about that feed at its observation time.
|
|
38
|
+
GitHub and OSV reported this advisory while the npm audit response was still
|
|
39
|
+
empty. A freshly updated Trivy database also admitted both vulnerable and
|
|
40
|
+
patched temporary fixtures, so that scan did not establish regression sensitivity.
|
|
41
|
+
The independent safe constructor control rejected an oversized indexed-map
|
|
42
|
+
offset only on the patched version, without serializing the huge offset.
|
|
43
|
+
Read the actual locked graph and every available scanner report before
|
|
44
|
+
claiming that findings are retired. Native scans of merged main must confirm
|
|
45
|
+
retirement independently of green PR workflow jobs.
|
|
46
|
+
|
|
47
|
+
## Worker diagnostics
|
|
48
|
+
|
|
49
|
+
[pm-cql43](../.agents/pm/issues/pm-cql43.toon) tracks CodeQL alert 43 in the
|
|
50
|
+
test worker bridge. Its captured scanner flow contains a generated temporary
|
|
51
|
+
path, so it does not prove a credential leak. The debug path nevertheless
|
|
52
|
+
previously broadcast arbitrary CLI arguments and stderr. Debug failures now
|
|
53
|
+
emit only a fixed notification; the complete captured result remains available
|
|
54
|
+
to deliberate assertions. A real worker regression uses synthetic private
|
|
55
|
+
input and verifies both notification privacy and preserved result contents,
|
|
56
|
+
plus silence when debugging is disabled or the command succeeds. The harness
|
|
57
|
+
is excluded from the published package.
|
|
58
|
+
|
|
23
59
|
## File matching dependency removal
|
|
24
60
|
|
|
25
61
|
[GHSA-vfj7-8cjw-p6xm](https://github.com/advisories/GHSA-vfj7-8cjw-p6xm)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Actionable item-read evidence
|
|
2
|
+
|
|
3
|
+
Trackers: [pm-gh1388](../.agents/pm/issues/pm-gh1388.toon),
|
|
4
|
+
[pm-gh1389](../.agents/pm/issues/pm-gh1389.toon),
|
|
5
|
+
[pm-gh1409](../.agents/pm/issues/pm-gh1409.toon).
|
|
6
|
+
|
|
7
|
+
The public SDK item query supplies the same evidence to CLI and MCP callers.
|
|
8
|
+
Standard and deep current reads include a `blockers` facet when the item declares
|
|
9
|
+
prerequisites through its legacy `blocked_by` scalar or `blocked_by` dependency
|
|
10
|
+
edges. `blockers.open` supplies each nonterminal target's ID, title and status;
|
|
11
|
+
`blockers.closed_count` counts terminal targets using the runtime status registry.
|
|
12
|
+
Repeated scalar/edge references are deduplicated by the shared actionability
|
|
13
|
+
primitive. Missing targets and external references remain unresolved, with null
|
|
14
|
+
status, so they cannot silently authorize work.
|
|
15
|
+
Short local references resolve to their verified full IDs and count once even
|
|
16
|
+
when both forms are stored. Rows under `open` are unresolved by definition;
|
|
17
|
+
they omit the redundant `resolved: false` flag while retaining resolver context.
|
|
18
|
+
Local comparison keys ignore case for deduplication, while filesystem lookups
|
|
19
|
+
retain the declared spelling. Imported mixed-case IDs therefore resolve to their
|
|
20
|
+
live status on both case-sensitive and case-insensitive filesystems without
|
|
21
|
+
weakening the embedded-identity check.
|
|
22
|
+
Legacy text that is not a portable filename remains unresolved and never causes
|
|
23
|
+
a lookup outside the registered item folders.
|
|
24
|
+
A target file with a different embedded item identity refuses the read with an
|
|
25
|
+
identity conflict rather than borrowing an unrelated item's terminal status.
|
|
26
|
+
Physical filename verification also runs when the probe and embedded IDs match:
|
|
27
|
+
case-insensitive access can open a differently spelled leaf with the same probe.
|
|
28
|
+
Verification gives an exact leaf precedence and sorts equally
|
|
29
|
+
preferred case aliases deterministically. A directory-read failure refuses the
|
|
30
|
+
query with `blocker_identity_read_failed` and access-restoration guidance. The
|
|
31
|
+
public SDK retains the original error as its cause; the read never invents a
|
|
32
|
+
missing prerequisite or changes item/history bytes. Native case-insensitive
|
|
33
|
+
fixtures intentionally share a physical destination, while case-sensitive
|
|
34
|
+
fixtures retain colliding leaves and exercise the same identity refusal.
|
|
35
|
+
If the physical leaf disappears between the document read and verification,
|
|
36
|
+
the query refuses the identity instead of treating the probe as proof.
|
|
37
|
+
|
|
38
|
+
`blockers.scope` is `declared`: the facet resolves forward declarations from this
|
|
39
|
+
item, without enumerating unrelated items. Reverse `blocks` relationships require
|
|
40
|
+
a corpus graph or actionability query. The stored scalar remains a compatibility
|
|
41
|
+
field and identifies only the last scalar value. Standard reads replace that
|
|
42
|
+
partial scalar with the complete declared facet; `--fields blocked_by` and
|
|
43
|
+
`--full` retain access to the stored scalar. Storage and provenance are preserved.
|
|
44
|
+
Ordinary dependency rows retain `id` and `kind`; `--full`, `--depth full`, and
|
|
45
|
+
`--fields dependencies` restore the stored timestamp and author/source columns.
|
|
46
|
+
The `dependency_provenance` omission receipt names `--fields dependencies` as the
|
|
47
|
+
narrow restoration. This presentation change preserves every stored edge.
|
|
48
|
+
The receipt describes attribution actually withheld by the selected projection.
|
|
49
|
+
Legacy rows with no timestamp remain complete under full or explicit reads;
|
|
50
|
+
following the restoration never invents a timestamp or repeats a false omission.
|
|
51
|
+
Rows containing only identities and kinds have no attribution to withhold.
|
|
52
|
+
Field selection takes precedence when combined with `--depth full`: a narrow
|
|
53
|
+
selector still discloses withheld attribution, while selecting `dependencies`
|
|
54
|
+
restores its complete stored rows.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pm get <id>
|
|
58
|
+
pm get <id> --depth brief
|
|
59
|
+
pm get <id> --fields blockers
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Brief and selected reads disclose material withheld blocker evidence with the
|
|
63
|
+
compact `--full` restoration. Use `--fields blockers` for the narrow facet alone;
|
|
64
|
+
`item.blockers` is an equivalent selector.
|
|
65
|
+
Historical reads preserve historical metadata and omit current blocker status.
|
|
66
|
+
An explicit historical blocker projection refuses with current-read guidance,
|
|
67
|
+
because a present-day target status cannot certify a past prerequisite state.
|
|
68
|
+
|
|
69
|
+
Omission receipts account for what the result actually renders. A reminder or
|
|
70
|
+
event supplied through `schedule.reminders` or `schedule.events` is included even
|
|
71
|
+
when its metadata alias is absent. Nonempty files, tests and docs rendered under
|
|
72
|
+
`linked` are included too. Narrow selectors continue to disclose unselected
|
|
73
|
+
material members; the stable linked envelope's empty placeholders do not certify
|
|
74
|
+
that unrequested artifact contents were returned.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pm get <id> --fields schedule.reminders
|
|
78
|
+
pm get <id> --fields linked.tests
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The regression suite creates actual disposable tracker data and checks open,
|
|
82
|
+
terminal, custom-terminal, missing and external prerequisites; brief restoration;
|
|
83
|
+
historical separation; and independent schedule/artifact alias projections.
|
|
84
|
+
No source tracker, mocked resolver or suppressed drift check is involved.
|
|
@@ -21,6 +21,11 @@ is tracked by [pm-8nev0o](../.agents/pm/issues/pm-8nev0o.toon) and
|
|
|
21
21
|
projection discovery is tracked by
|
|
22
22
|
[pm-q4isdq](../.agents/pm/issues/pm-q4isdq.toon). Shared graph defaults and
|
|
23
23
|
scale enforcement are tracked by [pm-mfy1ux](../.agents/pm/issues/pm-mfy1ux.toon).
|
|
24
|
+
Combined ceiling coordinates, explicit-selector receipt cost, and executable
|
|
25
|
+
global projection retries are tracked by
|
|
26
|
+
[pm-gh1411](../.agents/pm/issues/pm-gh1411.toon),
|
|
27
|
+
[pm-gh1408](../.agents/pm/issues/pm-gh1408.toon), and
|
|
28
|
+
[pm-gh1386](../.agents/pm/issues/pm-gh1386.toon).
|
|
24
29
|
|
|
25
30
|
For enforcement of declared MCP input options in repository tests, see
|
|
26
31
|
[MCP Option Conformance](MCP_OPTION_CONFORMANCE.md).
|
|
@@ -199,6 +204,15 @@ when several groups are needed. This remains truthful for leaf items because
|
|
|
199
204
|
an explicit children projection returns an empty rollup instead of silently
|
|
200
205
|
conflating “no children” with “children were not requested.”
|
|
201
206
|
|
|
207
|
+
Explicit `get --fields` selection defines the requested answer. Its receipt
|
|
208
|
+
describes that selection, so intentionally unselected groups do not generate
|
|
209
|
+
restoration rows. The existing complete-receipt shape remains available, and
|
|
210
|
+
requested empty collections and canonical identity remain explicit. Default
|
|
211
|
+
and depth reads retain material-group restoration instructions. A token budget
|
|
212
|
+
that shortens requested strings or collections still emits the shared
|
|
213
|
+
`read_output` and budget-truncation evidence; a complete field-selection
|
|
214
|
+
receipt does not certify that later budget shaping preserved every value.
|
|
215
|
+
|
|
202
216
|
## Intent Budgets
|
|
203
217
|
|
|
204
218
|
Built-in read intents apply valid command-specific defaults and disclose the
|
|
@@ -274,6 +288,10 @@ Full/projection conflicts retain the selected full or brief mode and remove the
|
|
|
274
288
|
conflicting projection and intent controls. If that correction cannot be
|
|
275
289
|
constructed safely, the error does not advertise an automatic retry.
|
|
276
290
|
Tracked by [pm-gh1364](../.agents/pm/issues/pm-gh1364.toon).
|
|
291
|
+
Global `--output-include` conflicts are removed with their consumed values,
|
|
292
|
+
including attached values and options before the subcommand. The surviving
|
|
293
|
+
command-local mode keeps its original option position. An ambiguous mode
|
|
294
|
+
location does not produce an automatic retry.
|
|
277
295
|
|
|
278
296
|
For a budget-compacted producer page, follow
|
|
279
297
|
`output_budget_truncation.recovery.cursor` with `--output-cursor`, keeping the
|
|
@@ -284,6 +302,11 @@ actual filter and scope changes still invalidate its cursor. Emitted `count`
|
|
|
284
302
|
and `summary.returned_focus` describe delivered rows; matching-population totals
|
|
285
303
|
remain separate, including explicit count-only aggregates. Context hierarchy companions may repeat while continuing a
|
|
286
304
|
focus collection. Tracked by [pm-gh1371](../.agents/pm/issues/pm-gh1371.toon).
|
|
305
|
+
When `--output-limit` and `--output-budget` both reduce a page, snapshot counts
|
|
306
|
+
and fingerprints are captured before either row ceiling. Producer cursors
|
|
307
|
+
rebase from the original page coordinate, so an unchanged output continuation
|
|
308
|
+
is accepted and deletion of its last delivered identity cannot skip withheld
|
|
309
|
+
rows through positional fallback. Filter and tracker-scope checks still apply.
|
|
287
310
|
|
|
288
311
|
The first cursor page carries the complete projection, filtering, sorting,
|
|
289
312
|
completeness, row, and omission contracts. Continuation pages replace those
|
package/docs/PR_REVIEW_LOOP.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pull Request Review Loop
|
|
2
2
|
|
|
3
|
-
Trackers: [pm-hq28](../.agents/pm/tasks/pm-hq28.toon), [pm-cp5pbo](../.agents/pm/tasks/pm-cp5pbo.toon), [pm-8we38i](../.agents/pm/issues/pm-8we38i.toon)
|
|
3
|
+
Trackers: [pm-hq28](../.agents/pm/tasks/pm-hq28.toon), [pm-0fxa](../.agents/pm/tasks/pm-0fxa.toon), [pm-zpwfzy](../.agents/pm/issues/pm-zpwfzy.toon), [pm-cp5pbo](../.agents/pm/tasks/pm-cp5pbo.toon), [pm-8we38i](../.agents/pm/issues/pm-8we38i.toon)
|
|
4
4
|
|
|
5
5
|
Use `scripts/reviews/pr-review-loop.mjs` to inventory every GitHub pull-request
|
|
6
6
|
conversation surface before deciding that review is complete. The inventory includes
|
|
@@ -46,10 +46,27 @@ reply thread. Legacy calls without the flag retain their existing behavior.
|
|
|
46
46
|
After every push or reviewer retrigger, run `watch`. It delegates waiting to
|
|
47
47
|
`gh pr checks --watch`, because reviewer agents report completion through GitHub
|
|
48
48
|
checks, and only fetches the complete conversation inventory after those checks
|
|
49
|
-
finish.
|
|
49
|
+
finish. Native watch success covers emitted checks only: a required provider may
|
|
50
|
+
never emit its context. The helper unions classic branch-protection requirements
|
|
51
|
+
with all effective ruleset requirements, compares those names with the complete
|
|
52
|
+
head rollup, and records `mergeReadiness.requiredContexts`, `missingContexts`, and
|
|
53
|
+
GitHub's `mergeStateStatus`. An attempt is `passed` only when no required name is
|
|
54
|
+
missing and GitHub reports `CLEAN`. GitHub's merge state also retains enforcement
|
|
55
|
+
of expected check publishers and other merge requirements; a matching name alone
|
|
56
|
+
does not establish that its expected app passed. Missing contexts and blocked or
|
|
57
|
+
unknown merge state remain `incomplete`; native watch failures remain `failed`.
|
|
58
|
+
Superseded attempts carry `superseded: true` and never certify readiness. Unavailable policy or status reads
|
|
59
|
+
fail visibly instead of certifying readiness. Successful
|
|
60
|
+
coverage uploads alone cannot certify a downstream provider's patch status.
|
|
61
|
+
The direct `watch` command emits its complete JSON receipt before exiting `1`
|
|
62
|
+
for `incomplete` or `failed`, and exits `0` only for `passed`. Shell automation
|
|
63
|
+
can therefore stop on the exit status while retaining all findings for triage.
|
|
64
|
+
|
|
65
|
+
A failed reviewer check is still a completed review signal: `watch` records
|
|
50
66
|
the failed outcome and returns all findings instead of aborting before inventory.
|
|
51
|
-
If the PR head
|
|
52
|
-
the new
|
|
67
|
+
If the PR head or target branch changes during the wait or final readiness read,
|
|
68
|
+
the helper watches the new target, up to three consecutive attempts, before
|
|
69
|
+
returning exact-head state. It does not poll an absent required provider status.
|
|
53
70
|
A review pass is complete only when every bot surface in that inventory has been
|
|
54
71
|
handled appropriately, every actionable thread is resolved, and required checks
|
|
55
72
|
have completed successfully.
|
package/docs/README.md
CHANGED
|
@@ -35,6 +35,8 @@ pm guide release --json
|
|
|
35
35
|
- [Onboarding](ONBOARDING.md) - first-two-hours maintainer and contributor setup.
|
|
36
36
|
- [Agent Guide](AGENT_GUIDE.md) - canonical agent loop, tracker linking, and token-minimal command choices.
|
|
37
37
|
- [Agent Read and Test Receipts](AGENT_READ_AND_TEST_RECEIPTS.md) - JSON help provenance, linked-test persistence, and history diff continuation.
|
|
38
|
+
- [Agent Evidence Consistency](AGENT_EVIDENCE_CONSISTENCY.md) - literal annotations, concurrent history validation, and declared recovery help.
|
|
39
|
+
- [Actionable Item-read Evidence](GET_READ_EVIDENCE.md) - declared blocker status, historical separation, and truthful schedule/artifact omission receipts.
|
|
38
40
|
- [Command Reference](COMMANDS.md) - command families with examples and when to use each family.
|
|
39
41
|
- [Context and Operations Namespaces](COMMAND_NAMESPACES.md) - native navigation, diagnostics, event streams, and compatibility aliases.
|
|
40
42
|
- [CLI Scripting Contract](SCRIPTING.md) - exit codes, flat mutation receipts versus read envelopes, stdout/stderr boundaries, stable JSON fields, uniform OR filters, and shell composition recipes.
|
|
@@ -48,6 +50,7 @@ pm guide release --json
|
|
|
48
50
|
- [Noun–Verb CLI Grammar](CLI_GRAMMAR.md) - accepted command architecture, exhaustive destination census, hidden aliases, and the surface-growth gate.
|
|
49
51
|
- [SDK Primitive Inventory](SDK_PRIMITIVE_INVENTORY.md) - SDK-first migration map and private-import ratchet for CLI/MCP layering.
|
|
50
52
|
- [Package SDK Contract Conformance](PACKAGE_SDK_CONTRACT_CONFORMANCE.md) - authoritative public types, `typeof` module derivation, and the first-party parity gate.
|
|
53
|
+
- [SDK Configuration and Diagnostic Safety](SDK_CONFIGURATION_SAFETY.md) - explicit settings ownership, transient npm freshness, audited schema sandboxes, and mutation-safe help.
|
|
51
54
|
- [SDK Action and Boundary Conformance](SDK_ACTION_CONFORMANCE.md) - derived CLI/SDK/MCP action vocabulary, public-import ratchets, intent budget diagnostics, and package-runner proof.
|
|
52
55
|
- [MCP 2026-07-28 Protocol Decision](MCP_2026_07_28.md) - stateless request metadata, discovery, result envelopes, explicit legacy boundary, and migration policy.
|
|
53
56
|
- [Progressive Tool Discovery](PROGRESSIVE_TOOL_DISCOVERY.md) - opt-in bounded MCP catalogs, public SDK ranking and pagination, canonical results, and compatibility isolation.
|
package/docs/RELEASING.md
CHANGED
|
@@ -494,6 +494,24 @@ gh run list --workflow Release --limit 5
|
|
|
494
494
|
gh run watch <run-id> --exit-status
|
|
495
495
|
```
|
|
496
496
|
|
|
497
|
+
## Verified Coverage Uploads
|
|
498
|
+
|
|
499
|
+
Tracked by [pm-2x67z9](../.agents/pm/issues/pm-2x67z9.toon). CI downloads the
|
|
500
|
+
official Codecov CLI from an immutable GitHub release and checks the reviewed
|
|
501
|
+
SHA-256 before making it executable. Both coverage and test-result uploads
|
|
502
|
+
require that verifier to succeed and retain mandatory upload failures plus
|
|
503
|
+
the exact PR-head identity. The pinned action's supported `url` input selects
|
|
504
|
+
the official `https://codecov.io` Cloud host for the current coverage and
|
|
505
|
+
test-result APIs; certificate validation remains required for every request.
|
|
506
|
+
Both uploads disable verbose logging because debug output can expose signed
|
|
507
|
+
storage upload URLs in public Actions logs. Normal upload-result diagnostics
|
|
508
|
+
remain available, and upload errors still fail the required gate.
|
|
509
|
+
Failed tests can still upload diagnostic reports
|
|
510
|
+
after successful verification. Update the release URL and digest together;
|
|
511
|
+
verify the official artifact and its adoption age before changing those pins.
|
|
512
|
+
The shell regression executes the real checksum with approved and corrupt
|
|
513
|
+
download fixtures; a failed check must prevent executable permission and uploads.
|
|
514
|
+
|
|
497
515
|
## Post-Release Verification
|
|
498
516
|
|
|
499
517
|
Use the [rolling reliability report](RELEASE_RELIABILITY.md) as well as the
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# SDK Configuration and Diagnostic Safety
|
|
2
|
+
|
|
3
|
+
Trackers: [pm-gh1394](../.agents/pm/issues/pm-gh1394.toon), [pm-gh1393](../.agents/pm/issues/pm-gh1393.toon), [pm-gh1392](../.agents/pm/issues/pm-gh1392.toon), [pm-gh1398](../.agents/pm/issues/pm-gh1398.toon).
|
|
4
|
+
|
|
5
|
+
Package authors use the host-injected `context.sdk` services to change project
|
|
6
|
+
configuration. The SDK owns settings normalization, locking, immutable audit
|
|
7
|
+
history, retry identity, and dry-run behavior. See [SDK](SDK.md) and
|
|
8
|
+
[Packages and Extensions](EXTENSIONS.md) for the broader authoring contract.
|
|
9
|
+
|
|
10
|
+
## Explicit Settings Ownership
|
|
11
|
+
|
|
12
|
+
`mutateWorkspaceSettings` preserves unknown source fields by default. A package
|
|
13
|
+
that replaces a complete settings object can explicitly declare the objects it
|
|
14
|
+
owns with `replaceSubtrees`:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
await context.sdk!.mutateWorkspaceSettings({
|
|
18
|
+
operationId: "apply-governance-policy",
|
|
19
|
+
replaceSubtrees: ["governance"],
|
|
20
|
+
includePreview: true,
|
|
21
|
+
dryRun: context.options.dryRun === true,
|
|
22
|
+
mutate: (current) => ({
|
|
23
|
+
...current,
|
|
24
|
+
governance: { ...current.governance, preset: "minimal" },
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The selected object is replaced by its normalized serialized value, removing
|
|
30
|
+
unknown raw keys omitted from the callback's result. Unselected source fields,
|
|
31
|
+
including future root fields and sibling objects, are preserved. Dot-delimited
|
|
32
|
+
paths such as `search.rerank` select nested objects. Missing ancestors are
|
|
33
|
+
materialized with their canonical settings so the complete persisted document
|
|
34
|
+
remains valid. Scalar, array, unknown, and prototype paths are rejected before
|
|
35
|
+
writing. Declare ownership only for configuration the package is authorized to
|
|
36
|
+
replace. An empty ownership list retains the default preservation behavior.
|
|
37
|
+
|
|
38
|
+
Replacement runs inside the same settings lock and history transaction as the
|
|
39
|
+
callback. Dry runs write no settings or workspace history; retries with the same
|
|
40
|
+
operation identity skip the callback after a successful commit. Fresh semantic
|
|
41
|
+
no-ops preserve the existing bytes and produce no history event.
|
|
42
|
+
|
|
43
|
+
The optional `preview` describes normalized inline settings resolved from the
|
|
44
|
+
exact proposed bytes. Preset-derived values can be omitted from serialized JSON
|
|
45
|
+
and reconstructed in the preview. File-backed schema overlays and unknown raw
|
|
46
|
+
keys are outside this normalized preview. Inspect the persisted document when
|
|
47
|
+
raw-source information is needed.
|
|
48
|
+
|
|
49
|
+
## Read-only Package Freshness
|
|
50
|
+
|
|
51
|
+
`pm package explore`, `doctor`, and `manage` preserve managed installation state.
|
|
52
|
+
`manage` checks GitHub revisions and npm registry identities transiently; it
|
|
53
|
+
does not rewrite `.managed-extensions.json`, reorder its contribution inventory,
|
|
54
|
+
or advance its modification time. Install, update, and explicit adoption own
|
|
55
|
+
managed-state persistence. `--fix-managed-state` remains an explicit adoption
|
|
56
|
+
mutation.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pm package manage --project --json
|
|
60
|
+
pm package manage --project --offline --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
For npm sources the SDK compares the recorded package version with the configured
|
|
64
|
+
registry's `latest` dist-tag, honoring npm registry configuration. A different
|
|
65
|
+
dist-tag version reports `update_available: true`; this is a channel comparison,
|
|
66
|
+
including an intentional registry rollback. `last_update_remote_version` identifies
|
|
67
|
+
the observed registry version. Missing provenance, invalid metadata, and failed
|
|
68
|
+
lookups report unknown availability and incomplete health. Lookups are bounded
|
|
69
|
+
to ten seconds and 64 KiB. npm execution failures use a stable public diagnostic
|
|
70
|
+
code to avoid exposing registry credentials through command stderr. Invalid
|
|
71
|
+
installed versions, registry versions, and JSON metadata also use stable reasons
|
|
72
|
+
that do not reflect their raw contents.
|
|
73
|
+
|
|
74
|
+
`--offline` performs no remote freshness lookup and reports `not_checked`,
|
|
75
|
+
`offline_requested`, and unknown availability for supported remote sources.
|
|
76
|
+
Runtime activation diagnostics still run. A bare installed npm extension name
|
|
77
|
+
or recorded package name reuses its managed registry identity on reinstall;
|
|
78
|
+
explicit local paths and bundled aliases retain their existing precedence.
|
|
79
|
+
For a confirmed missing bare input, npm records match by exact manifest name,
|
|
80
|
+
then stored directory, then recorded package identity. A weaker identity match
|
|
81
|
+
cannot replace a stronger match because its record appears earlier.
|
|
82
|
+
The selected stored package must parse as exactly one registry package name.
|
|
83
|
+
URLs, local files, aliases, versioned specs, options, and shell-bearing values
|
|
84
|
+
cannot become installation authority through managed metadata; invalid identity
|
|
85
|
+
retains local-source recovery. Explicit `npm:` sources still accept their existing
|
|
86
|
+
caller-selected package specs. Managed state is local installation provenance
|
|
87
|
+
written by lifecycle operations, not permission for arbitrary source execution;
|
|
88
|
+
protect project and global extension roots with the invoking account's filesystem
|
|
89
|
+
permissions.
|
|
90
|
+
|
|
91
|
+
## Isolated Schema History
|
|
92
|
+
|
|
93
|
+
Linked tests using `pm_context_mode=schema` inherit project and global settings
|
|
94
|
+
and extensions without inheriting source items. Settings are seeded through the
|
|
95
|
+
workspace history writer against each sandbox's own initialized state. Nested
|
|
96
|
+
`pm validate --check-history-drift --strict-exit` therefore validates that
|
|
97
|
+
sandbox's configuration successfully. Out-of-band sandbox edits still fail
|
|
98
|
+
history validation. Tracker context continues to retain the source audit history
|
|
99
|
+
and its genuine drift. Source settings and history are never changed by seeding.
|
|
100
|
+
|
|
101
|
+
## Help Discovery Before Mutation
|
|
102
|
+
|
|
103
|
+
Bare `--help` and `-h` following declared options are discovery requests:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pm test pm-example --add --help
|
|
107
|
+
pm files pm-example --add -h
|
|
108
|
+
pm update pm-example -b -h
|
|
109
|
+
pm create --file --help
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
These invocations print help and leave item and history bytes unchanged. To
|
|
113
|
+
persist a literal flag-looking value, attach it explicitly: `--add=--help`.
|
|
114
|
+
JSON help follows the same discovery policy. Bootstrap normalization preserves
|
|
115
|
+
the argv terminator and attached values. The immediately preceding declared
|
|
116
|
+
option is neutralized before parsing, regardless of whether its contract has
|
|
117
|
+
value metadata. Short options, aliases, and booleans follow the same policy;
|
|
118
|
+
no value parser runs for the neutralized option. The original help token stays
|
|
119
|
+
reachable even when another adjacent option consumes the replacement token.
|
|
120
|
+
Global boolean flags retain their presentation semantics, so `--json --help`
|
|
121
|
+
still renders JSON help.
|
|
122
|
+
Explicit bare assignments preserve a single value boundary during expansion,
|
|
123
|
+
so values such as `body=--help` retain their literal meaning.
|
|
@@ -7,9 +7,9 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
|
|
|
7
7
|
| `init` | workspace | 30 | 30 |
|
|
8
8
|
| `item` | intake | 20 | 20 |
|
|
9
9
|
| `config` | workspace | 36 | 36 |
|
|
10
|
-
| `extension` | extensions |
|
|
11
|
-
| `package` | extensions |
|
|
12
|
-
| `packages` | extensions |
|
|
10
|
+
| `extension` | extensions | 55 | 55 |
|
|
11
|
+
| `package` | extensions | 56 | 56 |
|
|
12
|
+
| `packages` | extensions | 56 | 56 |
|
|
13
13
|
| `install` | extensions | 27 | 27 |
|
|
14
14
|
| `upgrade` | extensions | 29 | 29 |
|
|
15
15
|
| `create` | intake | 100 | 100 |
|