@unbrained/pm-cli 2026.11.22 → 2026.11.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/cli/after-command-context-usage.js +1 -1
- package/dist/cli/argv-utils.js +1 -1
- package/dist/cli/bootstrap-args.js +1 -1
- package/dist/cli/bundle-integrity.js +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/commander-usage.js +11 -11
- package/dist/cli/commands/annotations/comments.js +1 -1
- package/dist/cli/commands/annotations/docs.js +1 -1
- package/dist/cli/commands/annotations/files.js +1 -1
- package/dist/cli/commands/annotations/learnings.js +1 -1
- package/dist/cli/commands/annotations/notes.js +1 -1
- package/dist/cli/commands/extension/describe.js +1 -1
- package/dist/cli/commands/extension/extension.js +1 -1
- package/dist/cli/commands/extension/scaffold.js +1 -1
- package/dist/cli/commands/extension/shared.js +1 -1
- package/dist/cli/commands/governance/gc.js +1 -1
- package/dist/cli/commands/governance/health.js +1 -1
- package/dist/cli/commands/governance/telemetry.js +1 -1
- package/dist/cli/commands/governance/validate.js +1 -1
- package/dist/cli/commands/history/activity.js +1 -1
- package/dist/cli/commands/history/history-compact.js +1 -1
- package/dist/cli/commands/history/history-redact.js +1 -1
- package/dist/cli/commands/history/history-repair.js +1 -1
- package/dist/cli/commands/history/history.js +1 -1
- package/dist/cli/commands/history/restore.js +1 -1
- package/dist/cli/commands/lifecycle/append.js +1 -1
- package/dist/cli/commands/lifecycle/claim.js +1 -1
- package/dist/cli/commands/lifecycle/close-many.js +1 -1
- package/dist/cli/commands/lifecycle/close.js +1 -1
- package/dist/cli/commands/lifecycle/copy.js +1 -1
- package/dist/cli/commands/lifecycle/create.js +1 -1
- package/dist/cli/commands/lifecycle/delete.js +1 -1
- package/dist/cli/commands/lifecycle/focus.js +1 -1
- package/dist/cli/commands/lifecycle/plan.js +1 -1
- package/dist/cli/commands/lifecycle/update-many.js +1 -1
- package/dist/cli/commands/lifecycle/update.js +1 -1
- package/dist/cli/commands/query/aggregate.js +1 -1
- package/dist/cli/commands/query/context.js +1 -1
- package/dist/cli/commands/query/deps.js +1 -1
- package/dist/cli/commands/query/duplicates.js +1 -1
- package/dist/cli/commands/query/eval.js +1 -1
- package/dist/cli/commands/query/get.js +1 -1
- package/dist/cli/commands/query/graph.js +1 -1
- package/dist/cli/commands/query/list.js +1 -1
- package/dist/cli/commands/query/next.js +1 -1
- package/dist/cli/commands/query/search.js +1 -1
- package/dist/cli/commands/query/stats.js +1 -1
- package/dist/cli/commands/test/test-all.js +1 -1
- package/dist/cli/commands/test/test-runs.js +1 -1
- package/dist/cli/commands/test/test.js +1 -1
- package/dist/cli/commands/workspace/config.js +1 -1
- package/dist/cli/commands/workspace/contracts.js +1 -1
- package/dist/cli/commands/workspace/init.js +1 -1
- package/dist/cli/commands/workspace/merge.js +1 -1
- package/dist/cli/commands/workspace/profile.js +1 -1
- package/dist/cli/commands/workspace/schema.js +1 -1
- package/dist/cli/commands/workspace/upgrade.js +1 -1
- package/dist/cli/context-intent-invocation.js +1 -1
- package/dist/cli/description-stdin.js +1 -1
- package/dist/cli/error-guidance.js +5 -5
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/extension-command-help.js +6 -6
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -5
- package/dist/cli/help-json-payload.js +7 -7
- package/dist/cli/invocation-profile.js +2 -2
- package/dist/cli/main.js +5 -5
- package/dist/cli/migration-gates.js +1 -1
- package/dist/cli/option-values.js +1 -1
- package/dist/cli/preflight-warnings.js +3 -3
- package/dist/cli/public.js +1 -1
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/register-assurance.js +1 -1
- package/dist/cli/register-files-lookup.js +1 -1
- package/dist/cli/register-history-activity.js +1 -1
- package/dist/cli/register-history-author.js +1 -1
- package/dist/cli/register-history-maintenance.js +2 -2
- package/dist/cli/register-list-query.js +10 -10
- package/dist/cli/register-mutation-options.js +0 -1
- package/dist/cli/register-mutation.js +6 -6
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-structured-mutation.js +1 -1
- package/dist/cli/registration-helpers.js +1 -1
- package/dist/cli/runtime/activation.js +1 -1
- package/dist/cli/runtime/annotation-option-retry.js +1 -1
- package/dist/cli/runtime/close-fields-retry.js +1 -1
- package/dist/cli/runtime/field-route-retry.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli/runtime/invocation-rewrites.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +1 -1
- package/dist/cli/runtime/refusal-credential-redaction.js +1 -1
- package/dist/cli/runtime/selection.js +1 -1
- package/dist/cli/runtime/telemetry-outcome.js +1 -1
- package/dist/cli/runtime-compatibility-boundary.js +4 -4
- package/dist/cli/schema/registration.js +15 -15
- package/dist/cli/schema-registration-helpers.js +1 -1
- package/dist/cli/search-refresh.js +1 -1
- package/dist/cli/stats-analytics-json.js +1 -1
- package/dist/cli/telemetry-flush.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-2UQU7HRR.js +9 -0
- package/dist/cli-bundle/chunks/chunk-5DUP4AZA.js +2 -0
- package/dist/cli-bundle/chunks/chunk-5WZZ5XEN.js +3 -0
- package/dist/cli-bundle/chunks/chunk-6H36ZHMI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +2 -0
- package/dist/cli-bundle/chunks/chunk-AA52P34H.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-B76TFRO2.js → chunk-AEOHUSUI.js} +101 -101
- package/dist/cli-bundle/chunks/chunk-BSRIVYTM.js +8 -0
- package/dist/cli-bundle/chunks/chunk-CFWLQFJM.js +71 -0
- package/dist/cli-bundle/chunks/chunk-D6PDUKUG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-ENKXRSFZ.js +31 -0
- package/dist/cli-bundle/chunks/chunk-F2Z6XLZB.js +3 -0
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +2 -0
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +2 -0
- package/dist/cli-bundle/chunks/chunk-H7JEXRIN.js +6 -0
- package/dist/cli-bundle/chunks/chunk-J2PDAVBC.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KZHIBEJL.js +33 -0
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +115 -0
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +2 -0
- package/dist/cli-bundle/chunks/chunk-O7JHS64G.js +3 -0
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +9 -0
- package/dist/cli-bundle/chunks/chunk-PZA7QECY.js +1 -0
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +2 -0
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SLFRSZK6.js +1 -0
- package/dist/cli-bundle/chunks/chunk-TZY5MVJF.js +125 -0
- package/dist/cli-bundle/chunks/chunk-YYT3MIRF.js +3 -0
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +8 -0
- package/dist/cli-bundle/chunks/context-budget-recovery-M5RFUEFG.js +2 -0
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-BPYKN5Q7.js +4 -0
- package/dist/cli-bundle/chunks/{item-revision-4QBMZXKX.js → item-revision-FMD4KWBB.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-RR5KACJ3.js → register-list-query-L4IBU64P.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +2 -0
- package/dist/cli-bundle/chunks/settlement-hook-6MR32OOC.js +7 -0
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-A6VEMCRR.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-AIDL2ZNT.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPUUW5O.js +1 -0
- package/dist/cli-bundle/focused-chunks/chunk-BWOVFE5B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IIP6LZ5E.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IROZDIDX.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-K53OIT5J.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-NQTEE66P.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OTMMOKPM.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QQIIMMFU.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIE3SJSE.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-UFTUNBMY.js +27 -0
- package/dist/cli-bundle/focused-chunks/chunk-X6CXWWNB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XRS3VNC6.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Y2ESLKCF.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +102 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZHWPCVQL.js +78 -0
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-CSJV3TY3.js +2 -0
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-EGEJMG3G.js +4 -0
- package/dist/cli-bundle/focused-chunks/{item-revision-2O6MLPEX.js → item-revision-YDACCDVY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +2 -0
- package/dist/cli-bundle/focused-chunks/settlement-hook-FMLGKG7J.js +7 -0
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +2 -0
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +5 -5
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +66 -66
- 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 +12 -12
- package/dist/cli.js +1 -1
- package/dist/core/checkpoint/checkpoint-gc.js +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
- package/dist/core/checkpoint/mutation-context.js +1 -1
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/config/positional-value.js +1 -1
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +2 -2
- package/dist/core/extensions/activation-summary.js +1 -1
- package/dist/core/extensions/activation-transaction.js +1 -1
- package/dist/core/extensions/capability-usage.js +1 -1
- package/dist/core/extensions/command-hook-context.js +1 -1
- package/dist/core/extensions/command-metadata-contract.js +1 -1
- package/dist/core/extensions/command-visibility-tier.js +1 -1
- package/dist/core/extensions/contribution-inventory.js +1 -1
- package/dist/core/extensions/exporter-output-contract.js +1 -1
- package/dist/core/extensions/extension-candidate.js +1 -1
- package/dist/core/extensions/extension-capability-aliases.js +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-policy.js +1 -1
- package/dist/core/extensions/extension-registries.js +1 -1
- package/dist/core/extensions/extension-runtime-helpers.js +1 -1
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/flag-definition-validation.js +1 -1
- package/dist/core/extensions/flag-value-types.js +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/item-field-types.js +1 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/manifest-parser.js +1 -1
- package/dist/core/extensions/manifest-schema.js +1 -1
- package/dist/core/extensions/module-graph-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor.js +1 -1
- package/dist/core/extensions/preflight-ownership.js +1 -1
- package/dist/core/extensions/read-output-contract.js +1 -1
- package/dist/core/extensions/registration-contracts.js +1 -1
- package/dist/core/extensions/registration-validation.js +1 -1
- package/dist/core/extensions/registration-values.js +1 -1
- package/dist/core/extensions/reserved-host-flags.js +1 -1
- package/dist/core/extensions/runtime-registrations.js +1 -1
- package/dist/core/extensions/service-ownership.js +1 -1
- package/dist/core/extensions/version-compat.js +1 -1
- package/dist/core/extensions/version-diagnostics.js +1 -1
- package/dist/core/fs/atomic-create.js +1 -1
- package/dist/core/fs/file-glob.js +1 -1
- package/dist/core/fs/fs-utils.js +2 -2
- package/dist/core/fs/host-environment-errors.js +1 -1
- package/dist/core/fs/index.js +1 -1
- package/dist/core/fs/path-utils.js +1 -1
- package/dist/core/governance/content-fields.js +1 -1
- package/dist/core/governance/issue-codes.js +1 -1
- package/dist/core/governance/metadata-coverage.js +1 -1
- package/dist/core/history/bridge.js +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.js +1 -1
- package/dist/core/history/event-classification.js +1 -1
- package/dist/core/history/event-index.js +11 -11
- package/dist/core/history/history-compact-bulk.js +1 -1
- package/dist/core/history/history-diff.js +1 -1
- package/dist/core/history/history-rewrite.js +1 -1
- package/dist/core/history/history-storage-stats.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/history.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 -2
- package/dist/core/history/stream-summary.js +2 -2
- package/dist/core/history/tombstone.js +1 -1
- package/dist/core/history/version-address.js +1 -1
- package/dist/core/history/workspace-history.js +2 -2
- package/dist/core/io/body-file.js +1 -1
- package/dist/core/io/bulk-ids-input.js +2 -2
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/item/deferred-fields.js +1 -1
- package/dist/core/item/dependency-reference.js +1 -1
- package/dist/core/item/id.js +1 -1
- package/dist/core/item/index.js +1 -1
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +7 -7
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/literal-mutation-input.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -8
- package/dist/core/item/plan-lifecycle.js +1 -1
- package/dist/core/item/priority.js +1 -1
- package/dist/core/item/sprint-release-format.js +1 -1
- package/dist/core/item/status-filter.js +1 -1
- package/dist/core/item/status.js +1 -1
- package/dist/core/item/toon-decode.js +1 -1
- package/dist/core/item/type-registry.js +1 -1
- package/dist/core/item/type-synonyms.js +1 -1
- package/dist/core/lock/index.js +1 -1
- package/dist/core/lock/lock-confinement.js +1 -1
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock-owner.js +1 -1
- package/dist/core/lock/lock.js +4 -4
- package/dist/core/output/linked-test-projection.js +5 -5
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +19 -19
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -3
- package/dist/core/packages/manifest.js +1 -1
- package/dist/core/packages/root.js +1 -1
- package/dist/core/policy/workflow-policy-schema.js +1 -1
- package/dist/core/policy/workflow-policy-store.js +1 -1
- package/dist/core/policy/workflow-policy.js +1 -1
- package/dist/core/profile/profile-describe.js +1 -1
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/profile/profile-plan.js +1 -1
- package/dist/core/profile/profile-presets.js +4 -4
- package/dist/core/reproducibility/context.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/item-types-file.js +2 -2
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/schema/status-defs-file.js +2 -2
- package/dist/core/schema/status-token.js +1 -1
- package/dist/core/schema/type-inference.js +1 -1
- package/dist/core/schema/type-presets.js +1 -1
- package/dist/core/schema/type-workflows.js +1 -1
- package/dist/core/search/background-refresh.js +2 -2
- package/dist/core/search/bm25.js +1 -1
- package/dist/core/search/cache.js +2 -2
- package/dist/core/search/corpus.js +1 -1
- package/dist/core/search/embedding-batches.js +1 -1
- package/dist/core/search/eval-thresholds.js +1 -1
- package/dist/core/search/eval.js +1 -1
- package/dist/core/search/http-client.js +1 -1
- package/dist/core/search/providers.js +1 -1
- package/dist/core/search/relevance.js +1 -1
- package/dist/core/search/semantic-defaults.js +1 -1
- package/dist/core/search/staleness.js +1 -1
- package/dist/core/search/vector-stores.js +2 -2
- package/dist/core/search/vectorization-metadata.js +1 -1
- package/dist/core/sentry/helpers.js +1 -1
- package/dist/core/sentry/instrument.js +1 -1
- package/dist/core/sentry/sensitive-assignments.js +1 -1
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/agent-session-context.js +1 -1
- package/dist/core/shared/author.js +5 -5
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +0 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/error-details.js +1 -1
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/html-entity-decode.js +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/item-metadata-contract.js +1 -1
- package/dist/core/shared/lazy-module.js +1 -1
- package/dist/core/shared/levenshtein.js +1 -1
- package/dist/core/shared/memo.js +1 -1
- package/dist/core/shared/numeric-parsers.js +1 -1
- package/dist/core/shared/option-alias-visibility.js +1 -1
- package/dist/core/shared/output-unicode.js +1 -1
- package/dist/core/shared/primitives.js +1 -1
- package/dist/core/shared/process-tree.js +2 -2
- package/dist/core/shared/secret-rules.js +5 -5
- package/dist/core/shared/serial-queue.js +1 -1
- package/dist/core/shared/serialization.js +1 -1
- package/dist/core/shared/split-comma-list.js +1 -1
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/time.js +2 -2
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/index.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-metadata-cache.js +1 -1
- package/dist/core/store/item-metadata-query-index.js +11 -11
- package/dist/core/store/item-metadata-read-work.js +1 -1
- package/dist/core/store/item-mutation-precondition.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/settings-concurrency.js +1 -1
- package/dist/core/store/settings-read-cache.js +1 -1
- package/dist/core/store/settings-sections.js +2 -2
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +3 -1
- package/dist/core/store/settings.js +6 -6
- package/dist/core/store/sqlite-runtime.js +1 -1
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/store/transaction-coordinator-scope.js +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/observability.js +1 -1
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/core/telemetry/read-sampling.js +2 -2
- package/dist/core/telemetry/runtime.js +9 -9
- package/dist/core/test/background-runs.js +4 -4
- package/dist/core/test/item-test-run-tracking.js +1 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/core/validate/estimate-defaults.js +1 -1
- package/dist/core/validate/fix-planning.js +1 -1
- package/dist/core/validate/linked-artifact-reference.js +1 -1
- package/dist/core/validate/missing-by-type.js +1 -1
- package/dist/core/validate/missing-link-owners.js +1 -1
- package/dist/core/validate/stale-file-classification.js +1 -1
- package/dist/mcp/http-server.js +5 -5
- package/dist/mcp/legacy-adapter.js +1 -1
- package/dist/mcp/runtime-capabilities.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/actionability.js +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +1 -1
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/command-suggestions.js +1 -1
- package/dist/sdk/agent/create-option-policy.js +1 -1
- package/dist/sdk/agent/identity-config.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/linked-resource-recovery.js +1 -1
- package/dist/sdk/agent/refusal-closure-census.js +2 -2
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -3
- package/dist/sdk/agent-session-context.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/author-attribution.js +1 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -5
- package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +2 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +7 -7
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -1
- package/dist/sdk/cli-contracts/string-lists.js +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.js +0 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/cli-program.js +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/comments.js +1 -1
- package/dist/sdk/compile-cache.js +1 -1
- package/dist/sdk/completion/bash.js +2 -2
- package/dist/sdk/completion/fish.js +72 -72
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +75 -75
- package/dist/sdk/completion.js +1 -1
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/context/recency.js +1 -1
- package/dist/sdk/context/semantic-session-attribution.js +1 -1
- package/dist/sdk/context/usage-egress.js +1 -1
- package/dist/sdk/context/usage-ledger.js +6 -6
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/context-intent-runtime.js +1 -1
- package/dist/sdk/context-packing.js +1 -1
- package/dist/sdk/context-relevance.js +1 -1
- package/dist/sdk/context-signal-store.js +2 -2
- package/dist/sdk/context-usage.js +1 -1
- package/dist/sdk/dependencies/context-budget-recovery.js +1 -1
- package/dist/sdk/dependencies.js +1 -1
- package/dist/sdk/dependency-flag-validation.js +1 -1
- package/dist/sdk/dependency-provenance.js +1 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/duplicates.js +1 -1
- package/dist/sdk/environment/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- package/dist/sdk/environment/source-context.js +1 -1
- package/dist/sdk/environment/tracker-preflight.js +1 -1
- package/dist/sdk/error-code-catalog.js +1 -1
- package/dist/sdk/error-runtime.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/eval.js +1 -1
- package/dist/sdk/extension/author-manifest.js +1 -1
- package/dist/sdk/extension/bundled-catalog.js +1 -1
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension/concurrency.js +1 -1
- package/dist/sdk/extension/copy-scope.js +1 -1
- package/dist/sdk/extension/custom-field-collisions.js +1 -1
- package/dist/sdk/extension/describe.js +3 -3
- package/dist/sdk/extension/doctor.js +1 -1
- package/dist/sdk/extension/install-plan.js +1 -1
- package/dist/sdk/extension/install-receipts.js +1 -1
- package/dist/sdk/extension/install-runtime.js +3 -3
- package/dist/sdk/extension/install-snapshot.js +1 -1
- package/dist/sdk/extension/install-sources.js +5 -5
- package/dist/sdk/extension/managed-state.js +2 -2
- package/dist/sdk/extension/managed-update-status.js +1 -1
- package/dist/sdk/extension/migrations.js +2 -2
- package/dist/sdk/extension/native-command-options.js +1 -1
- package/dist/sdk/extension/output-ownership.js +1 -1
- package/dist/sdk/extension/runtime-summary.js +1 -1
- package/dist/sdk/extension/scaffold.js +11 -11
- package/dist/sdk/extension/shared.js +1 -1
- package/dist/sdk/extension/source-resolution.js +1 -1
- package/dist/sdk/extension/static-inventory.js +1 -1
- package/dist/sdk/extension/update-check.js +1 -1
- package/dist/sdk/extension-command-context.js +2 -2
- package/dist/sdk/extension-contracts.js +1 -1
- package/dist/sdk/extension.js +1 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/flag-invocation-contracts.js +1 -1
- package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/generated-error-code-catalog.js +1 -1
- package/dist/sdk/governance/assurance-action-contracts.js +0 -1
- package/dist/sdk/governance/assurance-action.js +1 -1
- package/dist/sdk/governance/assurance-limits.js +1 -1
- package/dist/sdk/governance/assurance-mutation-error.js +1 -1
- package/dist/sdk/governance/assurance-presets.js +1 -1
- package/dist/sdk/governance/assurance-runtime.js +1 -1
- package/dist/sdk/governance/assurance.js +4 -4
- package/dist/sdk/governance/boundary-fixtures.js +1 -1
- package/dist/sdk/governance/closure-timestamps.js +1 -1
- package/dist/sdk/governance/defect-recurrence-coverage.js +1 -1
- package/dist/sdk/governance/defect-recurrence-graph.js +1 -1
- package/dist/sdk/governance/defect-recurrence-signals.js +1 -1
- package/dist/sdk/governance/defect-recurrence.js +2 -2
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health/history-drift-remedies.js +1 -1
- package/dist/sdk/governance/health/projection.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/governance/hierarchy-validation.js +1 -1
- package/dist/sdk/governance/in-progress-work-health.js +1 -1
- package/dist/sdk/governance/lifecycle-dependency-cycles.js +1 -1
- package/dist/sdk/governance/linked-file-report.js +1 -1
- package/dist/sdk/governance/merge-receipt-history.js +1 -1
- package/dist/sdk/governance/provenance-health.js +4 -4
- package/dist/sdk/governance/reindex.js +5 -5
- package/dist/sdk/governance/stale-work.js +1 -1
- package/dist/sdk/governance/status-role-diagnostics.js +1 -1
- package/dist/sdk/governance/storage-integrity.js +1 -1
- package/dist/sdk/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/governance/upgrade.js +2 -2
- package/dist/sdk/governance/validate-deferred-fields.js +1 -1
- package/dist/sdk/governance/validate-history-drift.js +1 -1
- package/dist/sdk/governance/validate-item-reader.js +1 -1
- package/dist/sdk/governance/validate-normalization.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance/workflow-completeness.js +1 -1
- package/dist/sdk/governance/workflow-policy.js +3 -3
- package/dist/sdk/governance/workspace-position.js +2 -2
- package/dist/sdk/graph/analytics.js +1 -1
- package/dist/sdk/graph/assembly.js +1 -1
- package/dist/sdk/graph/cache.js +1 -1
- package/dist/sdk/graph/cardinality-integrity.js +1 -1
- package/dist/sdk/graph/centrality.js +1 -1
- package/dist/sdk/graph/deadline-scheduling.js +1 -1
- package/dist/sdk/graph/durable-cache.js +1 -1
- package/dist/sdk/graph/governance-contracts.js +1 -1
- package/dist/sdk/graph/governance.js +1 -1
- package/dist/sdk/graph/hierarchy-integrity.js +1 -1
- package/dist/sdk/graph/lifecycle-coverage.js +1 -1
- package/dist/sdk/graph/mutation-advisory.js +1 -1
- package/dist/sdk/graph/query-contracts.js +1 -1
- package/dist/sdk/graph/remediation.js +1 -1
- package/dist/sdk/graph/run.js +1 -1
- package/dist/sdk/graph/scheduling.js +1 -1
- package/dist/sdk/graph/traversal.js +1 -1
- package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/guide.js +7 -7
- package/dist/sdk/history/append-only-repair.js +4 -4
- package/dist/sdk/history/attestation-command.js +2 -2
- package/dist/sdk/history/attestation-contract.js +1 -1
- package/dist/sdk/history/attestation-scan.js +1 -1
- package/dist/sdk/history/attestation.js +1 -1
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/reanchor-refusal.js +1 -1
- package/dist/sdk/history/reseed.js +1 -1
- package/dist/sdk/history/salvage.js +5 -5
- 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/init-agent-guidance.js +10 -10
- package/dist/sdk/init.js +14 -14
- package/dist/sdk/invocation-author.js +1 -1
- package/dist/sdk/item-children.js +1 -1
- package/dist/sdk/item-metadata-index.js +1 -1
- package/dist/sdk/item-schedule.js +1 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +3 -3
- package/dist/sdk/lifecycle/checkpoint-rollback.js +1 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/cli-input.js +1 -1
- package/dist/sdk/lifecycle/close-many.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/copy.js +1 -1
- package/dist/sdk/lifecycle/core-field-recovery.js +1 -1
- package/dist/sdk/lifecycle/core-item-fields.js +1 -1
- package/dist/sdk/lifecycle/create-deferrals.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/delete.js +1 -1
- package/dist/sdk/lifecycle/dependency-removal.js +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
- package/dist/sdk/lifecycle/focus.js +1 -1
- package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -1
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -1
- package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -1
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/metadata-normalizers.js +1 -1
- package/dist/sdk/lifecycle/mutation-command-options.js +0 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/mutation-option-validation.js +1 -1
- package/dist/sdk/lifecycle/plan-mutation-receipt.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/lifecycle/recurrence-parsers.js +1 -1
- package/dist/sdk/lifecycle/release-handoff.js +1 -1
- package/dist/sdk/lifecycle/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -2
- package/dist/sdk/lifecycle/repeated-terminal-state.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/start-blockers.js +1 -1
- package/dist/sdk/lifecycle/structured-mutation-plan.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -2
- package/dist/sdk/lifecycle/workflow-transition.js +1 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/mcp/apps.js +5 -5
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/executable.js +4 -4
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -3
- package/dist/sdk/mcp/subscriptions.js +1 -1
- package/dist/sdk/mcp/tasks.js +2 -2
- package/dist/sdk/mcp/transport.js +1 -1
- package/dist/sdk/merge/abandoned-receipts.js +1 -1
- package/dist/sdk/merge/driver.js +7 -7
- package/dist/sdk/merge/history-scalar-rebase.js +1 -1
- package/dist/sdk/merge/ignored-artifacts.js +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/indexed-receipt-blobs.js +2 -2
- package/dist/sdk/merge/install.js +6 -6
- package/dist/sdk/merge/receipt-file-boundary.js +1 -1
- package/dist/sdk/merge/receipt-operation.js +1 -1
- package/dist/sdk/merge/receipt-schema.js +1 -1
- package/dist/sdk/merge/receipts.js +4 -4
- package/dist/sdk/merge/reconcile.js +1 -1
- package/dist/sdk/merge/settlement-hook.js +4 -4
- package/dist/sdk/merge/stage.js +1 -1
- package/dist/sdk/merge/three-way.js +9 -9
- package/dist/sdk/merge/worktree-config.js +2 -2
- package/dist/sdk/merge.js +1 -1
- package/dist/sdk/mutation-events.js +1 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/notes.js +1 -1
- package/dist/sdk/output/fit-envelope.js +1 -1
- package/dist/sdk/output/list-envelope.js +1 -1
- package/dist/sdk/output/table-rows.js +1 -1
- package/dist/sdk/output-contracts.js +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/output-token-accounting.js +1 -1
- package/dist/sdk/output.js +2 -2
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/package-migrations.js +1 -1
- package/dist/sdk/package-runtime-options.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/profile.js +5 -5
- package/dist/sdk/provenance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.js +1 -1
- package/dist/sdk/query/aggregate.js +1 -1
- package/dist/sdk/query/calendar.js +4 -4
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query/declared-blockers.js +1 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get-facet-roots.js +1 -1
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +0 -1
- package/dist/sdk/query/light-metadata.js +1 -1
- package/dist/sdk/query/list-filter-shared.js +1 -1
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/multi-value-filters.js +1 -1
- package/dist/sdk/query/next-ranking-policy.js +1 -1
- package/dist/sdk/query/next-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -2
- package/dist/sdk/query/parsers.js +1 -1
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/query/search/corpus.js +2 -2
- package/dist/sdk/query/search/filters.js +1 -1
- package/dist/sdk/query/search/input.js +1 -1
- package/dist/sdk/query/search/lexical.js +1 -1
- package/dist/sdk/query/search/response.js +1 -1
- package/dist/sdk/query/search/semantic.js +3 -3
- package/dist/sdk/query/search/types.js +0 -1
- package/dist/sdk/query/search-contracts.js +1 -1
- package/dist/sdk/query/search-pagination.js +1 -1
- package/dist/sdk/query/search-rendering.js +1 -1
- package/dist/sdk/query/search.js +1 -1
- package/dist/sdk/query/window-pagination.js +1 -1
- package/dist/sdk/query/workspace-contracts.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/extension.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +1 -1
- package/dist/sdk/read-output/provenance.js +1 -1
- package/dist/sdk/read-output/session-result.js +0 -1
- package/dist/sdk/read-output/surfaces.js +1 -1
- package/dist/sdk/read-output/tail-retention.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.js +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/relationship-analytics.js +1 -1
- package/dist/sdk/relationship-context.js +1 -1
- package/dist/sdk/relationship-history.js +6 -6
- package/dist/sdk/relationship-kinds/contract.js +1 -1
- package/dist/sdk/relationships.js +1 -1
- package/dist/sdk/reproducibility/process.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime/context.js +1 -1
- package/dist/sdk/runtime/mutation-admission.js +1 -1
- package/dist/sdk/runtime/mutation-value-validation.js +1 -1
- package/dist/sdk/runtime/schema-preview.js +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-action-aliases.js +1 -1
- package/dist/sdk/runtime-extended-actions.js +1 -1
- package/dist/sdk/runtime-input.d.ts +2 -0
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +0 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.d.ts +5 -3
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema/field-option-collisions.js +2 -0
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/schema.js +7 -7
- package/dist/sdk/search-refresh-worker.js +1 -1
- package/dist/sdk/similarity-scoring.js +1 -1
- package/dist/sdk/similarity.js +1 -1
- package/dist/sdk/start-task-status.js +1 -1
- package/dist/sdk/stats.js +1 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -4
- package/dist/sdk/templates.js +3 -3
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/command-resolution.js +2 -2
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution-receipts.js +2 -2
- package/dist/sdk/test/execution.js +5 -5
- package/dist/sdk/test/json-path.js +1 -1
- package/dist/sdk/test/linked-command-detection.js +1 -1
- package/dist/sdk/test/measurements.js +1 -1
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/prerequisites.js +1 -1
- package/dist/sdk/test/receipt-index-snapshot.js +1 -1
- package/dist/sdk/test/run-phases.js +1 -1
- package/dist/sdk/test/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/update.js +1 -1
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -2
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/transactions/item-finalization.js +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-snapshot.js +5 -5
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +6 -6
- package/dist/types/index.js +1 -1
- package/dist/types.js +1 -1
- package/docs/COMMANDS.md +1 -1
- package/docs/EXTENSIONS.md +1 -1
- package/docs/SDK.md +74 -4
- package/marketplace.json +1 -1
- package/package.json +2 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/scripts/finalize-build.mjs +63 -24
- package/scripts/prepare-build-cache.mjs +28 -1
- package/dist/cli-bundle/chunks/chunk-3W47ZZ5T.js +0 -9
- package/dist/cli-bundle/chunks/chunk-4TB5D6HL.js +0 -125
- package/dist/cli-bundle/chunks/chunk-5ZMVLWE3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6BBDEIKC.js +0 -33
- package/dist/cli-bundle/chunks/chunk-AR4NP5HI.js +0 -3
- package/dist/cli-bundle/chunks/chunk-B4PPFOPY.js +0 -3
- package/dist/cli-bundle/chunks/chunk-CAR2L5NW.js +0 -8
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EIGUKEV6.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GTPCAJMZ.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GYP24M7W.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HC2OPETM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HKUV74K3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HXHYDO2R.js +0 -115
- package/dist/cli-bundle/chunks/chunk-IB7UB5TE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J2LABXBL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J52BEBSS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +0 -3
- package/dist/cli-bundle/chunks/chunk-OJTMGDON.js +0 -31
- package/dist/cli-bundle/chunks/chunk-SPPHDVZE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TC6XLIYO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-U7EL3AYA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-VQFWW4EF.js +0 -6
- package/dist/cli-bundle/chunks/chunk-X6MIWTTT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XC5Q2ZV7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XFHPKXAE.js +0 -71
- package/dist/cli-bundle/chunks/chunk-YHVLVSEZ.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YMUSRWV4.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YR2KEBHP.js +0 -2
- package/dist/cli-bundle/chunks/context-budget-recovery-L2WP5S26.js +0 -2
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-ITTXIN4K.js +0 -4
- package/dist/cli-bundle/chunks/item-transaction-QY3PUHEI.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-FWLYWJ37.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-7ZDCK3G2.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-57AJQWFV.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-RKWST7CU.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-CMI23PC5.js +0 -2
- package/dist/cli-bundle/chunks/settlement-hook-BXN5LEQD.js +0 -7
- package/dist/cli-bundle/chunks/stage-4KDVXC5Z.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZD7275J.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-324AHXJO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3IRCYJI5.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-3V53UBHN.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-3XSWH6QC.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-4JZITIJB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4KTFKSS3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5C5TK3ET.js +0 -78
- package/dist/cli-bundle/focused-chunks/chunk-AKJYOZZP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BRZV7BFV.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-C3O6JJPO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-EGN2HFRU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHQVM6K6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HDEKFSOK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IWOXAUDU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ML3JHCC6.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-OPGOOP25.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RE7ZWT7D.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-RKQNVYGF.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-RQ252B6V.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-SVOOGGAK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-URGHTTT3.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-USPYKWQG.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-UWS3FC4D.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-UXQGFGAT.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-WZWXGDYY.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-YKSLZPLT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZWJTY4ID.js +0 -2
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-5MKOCGY5.js +0 -2
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-AF4U3F3D.js +0 -4
- package/dist/cli-bundle/focused-chunks/item-transaction-GLACUTPL.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-TCYDPUGG.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-LY73EJWM.js +0 -2
- package/dist/cli-bundle/focused-chunks/settlement-hook-ARYCZQY4.js +0 -7
- package/dist/cli-bundle/focused-chunks/stage-DQ7RQQ52.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{isBoxedPrimitive as c}from"node:util/types";import{EXIT_CODE as p}from"./constants.js";import{PmCliError as m}from"./errors.js";const f=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/gu;function $(t){return t.replaceAll(f,"\uFFFD")}function O(t,r,e){return e&&/^\d+$/u.test(r)?`${t}[${r}]`:/^[A-Za-z_$][\w$]*$/u.test(r)?`${t}.${r}`:`${t}[${JSON.stringify(r)}]`}function i(t,r,e){if(typeof t=="string"){const n=t.search(f);return n<0?void 0:{field:r,index:n}}if(!(t===null||typeof t!="object"||e.has(t))){e.add(t);for(const[n,o]of Object.entries(t)){const u=O(r,n,Array.isArray(t)),d=i(n,`${u} (key)`,e)??i(o,u,e);if(d)return d}}}function s(t,r,e){if(t===null||typeof t!="object")return t;if(c(t)||typeof t.toJSON=="function")return JSON.parse(JSON.stringify({[r]:t}))[r];if(e.has(t))return e.get(t);const n=Array.isArray(t)?new Array(t.length):{};e.set(t,n);for(const o of Object.keys(t))Object.defineProperty(n,o,{value:s(t[o],o,e),enumerable:!0,configurable:!0,writable:!0});return n}function a(t){const r=s(t,"",new WeakMap),e=i(r,"$",new WeakSet);return e&&F(e),r}function F(t){throw new m(`Output field ${t.field} contains an unpaired surrogate code unit at index ${t.index}; structured output requires well-formed Unicode.`,p.USAGE,{code:"text_unpaired_surrogate",field:t.field,required:"Well-formed UTF-16 strings and object keys in both JSON and TOON output.",nextSteps:["Repair the producer's text before returning output; use toWellFormedText from @unbrained/pm-cli/sdk when replacement is intended."]})}function y(t){a(t)}export{y as assertWellFormedOutputText,a as prepareWellFormedOutputText,$ as toWellFormedText};
|
|
2
2
|
//# sourceMappingURL=output-unicode.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function u(t){if(typeof t!="string")return null;const r=t.trim();return r.length>0?r:null}function c(t){return u(t)??void 0}function f(t){let r=t.length;for(;r>0&&t.charCodeAt(r-1)===47;)r-=1;return r===t.length?t:t.slice(0,r)}function s(t){return Array.isArray(t)&&t.every(r=>typeof r=="number"&&Number.isFinite(r))}function l(t){if(t instanceof Error){const r=t.message.trim();return r.length>0?r:t.name}return String(t)}function o(t){const r=typeof t=="number"?t:typeof t=="string"&&t.trim().length>0?Number(t.trim()):Number.NaN;return Number.isFinite(r)?r:null}function p(t){const r=o(t);return r===null||r<=0||!Number.isInteger(r)?null:r}function m(t,r,n){const e=o(t);return e===null||e<r||e>n?null:e}function y(t){return typeof t!="object"||t===null||Array.isArray(t)?null:t}function d(t){return typeof t!="object"||t===null?null:t}function i(t){return typeof t!="object"&&typeof t!="function"||t===null?null:t}function g(t){const r=i(t);if(!r)return null;if(typeof r.activate=="function")return r;const n=i(r.default);return typeof n?.activate=="function"?n:null}function b(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)?{...t}:{}}export{i as asPropertyRecord,b as asRecordClone,d as asRecordLoose,y as asRecordOrNull,o as coerceFiniteNumber,m as coerceNumberInRange,p as coercePositiveInteger,s as isFiniteNumberArray,g as resolveActivatablePropertyRecord,l as toErrorMessage,u as toNonEmptyString,c as toNonEmptyStringOrUndefined,f as trimTrailingSlashes};
|
|
2
2
|
//# sourceMappingURL=primitives.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
`)){const
|
|
1
|
+
import{spawn as T}from"node:child_process";import{existsSync as a,readFileSync as g}from"node:fs";import p from"node:path";const m=2e3;function k(t,s){const n=new Map;for(const r of t.split(`
|
|
2
|
+
`)){const e=r.trim().split(/\s+/u);if(e.length!==2)continue;const[l,u]=e.map(Number);if(!Number.isSafeInteger(l)||!Number.isSafeInteger(u)||l<=0)continue;const d=n.get(u);d?d.push(l):n.set(u,[l])}const i=new Set([s]),o=[],c=(n.get(s)??[]).map(r=>({pid:r,parent:s}));for(let r=0;r<c.length;r+=1){const e=c[r];if(!i.has(e.pid)){i.add(e.pid),o.push(e);for(const l of n.get(e.pid)??[])c.push({pid:l,parent:e.pid})}}return o.reverse()}function A(t,s){return k(t,s).map(n=>n.pid)}function f(t,s=w){const n=s(`/proc/${t.pid}/stat`);if(n===void 0)return!a("/proc/self/stat");const i=n.slice(n.lastIndexOf(")")+1).trim().split(/\s+/u);return Number(i[1])===t.parent}function b(t=w,s=process.platform){const n=t("/proc/self/status");if(n===void 0)return s!=="linux"&&!a("/proc/self/status");const i=/^NSpid:\s*(.*)$/mu.exec(n)?.[1]?.trim().split(/\s+/u);return i?.length===1&&Number(i[0])===process.pid}function x(t,s,n,i=f,o=new Map){const c=[];let r=!0;for(let e=t;e!==s;){const l=o.get(e);if(l!==void 0){r=l;break}c.push(e);const u=n.get(e);if(u===void 0||!i({pid:e,parent:u})){r=!1;break}e=u}for(const e of c)o.set(e,r);return r}function w(t){try{return g(t,"utf8")}catch{return}}const y=["/bin/ps","/usr/bin/ps"],P={PATH:"/usr/bin:/bin",LC_ALL:"C"};function I(t=a){return y.find(s=>t(s))}const L="C:\\Windows";function N(t=process.env,s=a){const n=i=>Object.entries(t).find(([o])=>o.toLowerCase()===i)?.[1];return[n("systemroot"),n("windir"),L].find(i=>typeof i=="string"&&/^[A-Za-z]:[\\/]/u.test(i)&&s(p.win32.join(i,"System32","taskkill.exe")))}function S(t){try{process.kill(t,"SIGKILL")}catch{}}function h(t,s,n,i=m){return new Promise(o=>{let c=!1,r="",e;try{e=T(t,s,{stdio:["ignore","pipe","ignore"],windowsHide:!0,...n===void 0?{}:{env:n}})}catch{o(void 0);return}const l=i===null?void 0:setTimeout(()=>{u(void 0),e.stdout?.destroy(),e.kill("SIGKILL"),e.unref()},i);function u(d){c||(c=!0,clearTimeout(l),o(d))}if(e.on("error",()=>u(void 0)),!e.stdout){u(void 0);return}e.stdout.setEncoding("utf8"),e.stdout.on("data",d=>{r+=d}),e.on("close",d=>u({code:d,stdout:r}))})}async function R(t,s={kill:()=>S(t),alive:()=>!0},n={}){if(!(!Number.isInteger(t)||t<=0)){if(process.platform==="win32"){await _(t,s,n.taskkillTimeoutMs===void 0?m:n.taskkillTimeoutMs);return}try{process.kill(-t,"SIGKILL");return}catch{}await E(t,s),s.kill()}}async function _(t,s,n){const i=N();if(i===void 0){s.alive()&&s.kill();return}const o=p.win32.join(i,"System32","taskkill.exe");(await h(o,["/pid",String(t),"/T","/F"],void 0,n))?.code!==0&&s.alive()&&s.kill()}async function E(t,s){const n=I();if(n===void 0||!b())return;const i=await h(n,["-A","-o","pid=","-o","ppid="],P);if(i?.code!==0||!s.alive())return;const o=k(i.stdout,t),c=new Map(o.map(e=>[e.pid,e.parent])),r=new Map;for(const e of o)f(e)&&x(e.parent,t,c,f,r)&&S(e.pid)}export{x as ancestryStillMatches,k as descendantEntriesFromProcessTable,A as descendantsFromProcessTable,R as killProcessTree,f as parentStillMatches,b as processTableSharesNamespace,I as resolveTrustedPs,N as resolveWindowsSystemRoot,h as runTeardownHelper};
|
|
3
3
|
//# sourceMappingURL=process-tree.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
`)){regex.lastIndex=0;let rawFound=!1;for(const match of line.matchAll(regex))rawFound=!0,yield{index:offset+match.index};for(const match of normalizedHomePathMatches(line,regex,rawFound))yield{...match,index:offset};offset+=line.length+1}}const PASSWORD_KEYS="password|passphrase",PASSWORD_QUOTED_PIECES=4,PASSWORD_REPEAT_BOUND=4096,maximalRun=characterClass=>`${characterClass}+(?!${characterClass})`,PASSWORD_QUOTED_SPAN=String.raw`'[^'\r\n]*'|"[^"\\\r\n]*(?:\\.[^"\\\r\n]*){0,${PASSWORD_REPEAT_BOUND}}"`,PASSWORD_REFERENCE=String.raw`\$\{(?:${maximalRun(String.raw`[^{}$'"\\\r\n]`)}|\\[^\r\n]|${PASSWORD_QUOTED_SPAN}|\$(?!\{)|\$\{[^{}\r\n]*\}){0,${PASSWORD_REPEAT_BOUND}}\}`+String.raw`|\$\((?:${maximalRun(String.raw`[^()$'"\\\r\n]`)}|\\[^\r\n]|${PASSWORD_QUOTED_SPAN}|\$(?!\()|\$\([^()\r\n]*\)){0,${PASSWORD_REPEAT_BOUND}}\)`,PASSWORD_PIECE=String.raw`${PASSWORD_REFERENCE}|<[^<>\r\n]*>|${maximalRun(String.raw`[A-Za-z0-9!@#%^&*._+\-=]`)}|\$(?![{(])`,PASSWORD_QUOTED=String.raw`"[^"]*"|'[^']*'`,PASSWORD_QUOTED_PIECE=String.raw`(?:"[^"\s]*"|'[^'\s]*')(?:${PASSWORD_PIECE}){0,${PASSWORD_REPEAT_BOUND}}`,PASSWORD_VALUE=new RegExp(String.raw`(?!config\.auth\.password\s*(?:\|\|\s*(?:''|"")|\?\s*unescape\(encodeURIComponent\(config\.auth\.password\)\)\s*:\s*(?:''|""))(?=[ \t]*(?:\/\*(?:[^*]|\*(?!\/))*\*\/[ \t]*)*(?:;|$|\/\/[^\r\n\u2028\u2029]*(?:\r\n)?$)))`+`((?:${PASSWORD_PIECE}){1,${PASSWORD_REPEAT_BOUND}}(?:${PASSWORD_QUOTED_PIECE}){0,${PASSWORD_QUOTED_PIECES}}|(?:${PASSWORD_QUOTED_PIECE}){1,${PASSWORD_QUOTED_PIECES}}|${PASSWORD_QUOTED})`),PASSWORD_MINIMUM_LITERAL_LENGTH=8,HIGH_ENTROPY_KEYS="token|secret|password|passwd|api[_-]?key",CREDENTIAL_KEYS="(?<![a-z0-9_]|[a-z0-9_]-)(?:(?:[a-z0-9]+_)+(?:password|passphrase)|(?:[a-z0-9]+[_-])*(?:secret|token|(?:api|secret|private|access)[_-]?key|client[_-]?secret|passwd|pwd))",EXCLUSION_REPEAT_BOUND=4096,CREDENTIAL_OPEN=String.raw`"(?=[^"\s]{8}[^"\s]*")|'(?=[^'\s]{8}[^'\s]*')|(?!["'])`,CREDENTIAL_PLAIN=String.raw`(?![<[$/]|~\/|\.\.?\/|[A-Za-z][\w+.-]*:\/\/|%[A-Za-z_]\w*%|[A-Za-z]:[\\/]|(?<=")(?:(?:[A-Za-z_]\w*\.){1,${EXCLUSION_REPEAT_BOUND}}[A-Za-z_]\w*|[A-Za-z]+(?:-[A-Za-z]+){0,${EXCLUSION_REPEAT_BOUND}}|(?:[\w.-]+\/){1,${EXCLUSION_REPEAT_BOUND}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4})"|(?<=')(?:(?:[A-Za-z_]\w*\.){1,${EXCLUSION_REPEAT_BOUND}}[A-Za-z_]\w*|[A-Za-z]+(?:-[A-Za-z]+){0,${EXCLUSION_REPEAT_BOUND}}|(?:[\w.-]+\/){1,${EXCLUSION_REPEAT_BOUND}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4})'|(?<!["'])[A-Za-z]+(?:-[A-Za-z]+){0,${EXCLUSION_REPEAT_BOUND}}(?![\w!@#$%^&*.+\-=/~])|(?<!["'])(?:[A-Za-z_]\w*\.){1,${EXCLUSION_REPEAT_BOUND}}[A-Za-z_]\w*(?![\w!@#$%^&*.+\-=/~])|(?<!["'])(?:[\w.-]+\/){1,${EXCLUSION_REPEAT_BOUND}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4}(?=[\s,;)}\]]|$)|(?<!["'])[\w$.]+\()(?:(?<=")[^\s"]{8}[^\s"]*|(?<=')[^\s']{8}[^\s']*|(?<==)[A-Za-z0-9!@#$%^&*._+\-=/~?:|]{8,}|(?<!["'=])[A-Za-z0-9!@#$%^&*._+\-=/~]{8,})`,CREDENTIAL_LITERAL_VALUE=new RegExp(`(?:${CREDENTIAL_OPEN})(${CREDENTIAL_PLAIN})`,"iy"),CREDENTIAL_MINIMUM_LITERAL_LENGTH=8,CREDENTIAL_RUN=String.raw`[A-Za-z0-9!@#%^*._+\-=/~]`,CREDENTIAL_AMPERSAND=String.raw`&(?!&)`,CREDENTIAL_LEADING_LITERAL=64,CREDENTIAL_REFERENCE_SPAN=String.raw`'[^'\s]*'|"[^"\\\s]*(?:\\\S[^"\\\s]*){0,${PASSWORD_REPEAT_BOUND}}"`,CREDENTIAL_REFERENCE=String.raw`\$\{(?:${maximalRun(String.raw`[^{}$'"\\\s]`)}|\\\S|${CREDENTIAL_REFERENCE_SPAN}|\$(?!\{)|\$\{[^{}\s]*\}){0,${PASSWORD_REPEAT_BOUND}}\}`+String.raw`|\$\((?:${maximalRun(String.raw`[^()$'"\\\s]`)}|\\\S|${CREDENTIAL_REFERENCE_SPAN}|\$(?!\()|\$\([^()\s]*\)){0,${PASSWORD_REPEAT_BOUND}}\)`+String.raw`|<[^<>\s]*>|\$[A-Za-z_]\w*(?!\w)`,credentialPiece=run=>String.raw`${CREDENTIAL_REFERENCE}|${maximalRun(run)}|${CREDENTIAL_AMPERSAND}|\$(?![{(A-Za-z_])`,credentialQuotedPiece=run=>String.raw`(?:"[^"\s]*"|'[^'\s]*')(?:${credentialPiece(run)}){0,${PASSWORD_REPEAT_BOUND}}`,credentialReferenced=run=>String.raw`(?:(?:${run}|${CREDENTIAL_AMPERSAND}){1,${CREDENTIAL_LEADING_LITERAL}}(?=[$<]))?(?:${CREDENTIAL_REFERENCE})`+String.raw`(?:${credentialPiece(run)}){0,${PASSWORD_REPEAT_BOUND}}(?:${credentialQuotedPiece(run)}){0,${PASSWORD_QUOTED_PIECES}}`,credentialConcatenated=run=>String.raw`(?:${credentialQuotedPiece(run)}){1,${PASSWORD_QUOTED_PIECES}}`,credentialUnquoted=build=>String.raw`(?<!["'])(?:${build(CREDENTIAL_RUN)})`,CREDENTIAL_CONCATENATION_CONTINUES=String.raw`(?:[\w@#~]|!(?![.+\-*/%=^!(]))`,CREDENTIAL_CONCATENATION_OPEN=String.raw`(?=(?:"[^"\s]*"|'[^'\s]*')[$<"']`+String.raw`|"(?=[^"\s]*[$<])[^"\s]*"${CREDENTIAL_CONCATENATION_CONTINUES}|'(?=[^'\s]*[$<])[^'\s]*'${CREDENTIAL_CONCATENATION_CONTINUES})`,CREDENTIAL_QUOTED_REFERENCED=String.raw`(?<=")(?=[^"\s]*[$<])[^"\s]+|(?<=')(?=[^'\s]*[$<])[^'\s]+`,CREDENTIAL_VALUE=new RegExp(`(?:${CREDENTIAL_CONCATENATION_OPEN}|${CREDENTIAL_OPEN})((?=["'])(?:${credentialUnquoted(credentialConcatenated)})|${CREDENTIAL_QUOTED_REFERENCED}|${credentialUnquoted(credentialReferenced)}|${CREDENTIAL_PLAIN})`),HIGH_ENTROPY_VALUE=/["']?([A-Za-z0-9+/=_-]{24,})/,SECRET_RULES=[{name:"private-key",mutationRule:"private_key",category:"credential",regex:/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/g},{name:"github-token",mutationRule:"github_token",category:"credential",regex:/\b(?:gh[opsru]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,})\b/g},{name:"npm-token",mutationRule:"npm_token",category:"credential",regex:/\bnpm_[A-Za-z0-9]{20,}\b/g},{name:"aws-access-key",mutationRule:"aws_access_key",category:"credential",regex:/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g},{name:"google-api-key",mutationRule:"google_api_key",category:"credential",regex:/\bAIza[0-9A-Za-z_-]{35}\b/g},{name:"slack-token",mutationRule:"slack_token",category:"credential",regex:/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g},{name:"anthropic-api-key",mutationRule:"anthropic_api_key",category:"credential",regex:/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g},{name:"openai-api-key",mutationRule:"openai_api_key",category:"credential",regex:/\bsk-(?!ant-)[A-Za-z0-9_-]{20,}\b/g},{name:"gitlab-token",mutationRule:"gitlab_token",category:"credential",regex:/\bglpat-[A-Za-z0-9_.-]{20,}\b/g},{name:"jwt-like-token",mutationRule:"jwt_like_token",category:"credential",regex:/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g},{name:"npm-auth-token-assignment",mutationRule:"npm_auth_token_assignment",category:"credential",regex:/_authToken\s*=\s*\S+/g},{name:"sentry-user-token",mutationRule:"sentry_user_token",category:"credential",regex:/\bsntryu_[A-Za-z0-9]{20,}\b/g},{name:"sentry-org-token",mutationRule:"sentry_org_token",category:"credential",regex:/\bsntrys_[A-Za-z0-9_-]{20,}\b/g},{name:"private-ip",mutationRule:"private_ip",category:"network",regex:/\b(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"private-ssh-target",mutationRule:"private_ssh_target",category:"network",regex:/\b(?:ssh|scp|rsync)\s+[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"sshpass-inline-password",mutationRule:"sshpass_inline_password",category:"credential",regex:/\bsshpass\s+-p\s+["'][^"']{6,}["']/g},{name:"password-assignment",mutationRule:"password_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${PASSWORD_KEYS})\s*[:=]\s*`+PASSWORD_VALUE.source,"gi"),structured:{keys:PASSWORD_KEYS,value:PASSWORD_VALUE.source,element:!0},minimumLiteralLength:PASSWORD_MINIMUM_LITERAL_LENGTH},{name:"absolute-home-path",mutationRule:"absolute_home_path",category:"path",regex:PRIVATE_HOME_PATH_PATTERN,excludeFiles:/^(?:tests\/|examples\/)/},{name:"user-at-private-host",mutationRule:"user_at_private_host",category:"network",regex:/(?<![A-Za-z0-9._-])[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g,excludeFiles:/^(?:tests\/|examples\/)/},{name:"high-entropy-assignment",mutationRule:"high_entropy_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${HIGH_ENTROPY_KEYS})\s*[:=]\s*`+HIGH_ENTROPY_VALUE.source,"gi"),structured:{keys:HIGH_ENTROPY_KEYS,value:HIGH_ENTROPY_VALUE.source},mutationOnlyReason:"Generic assignments in source code are not credentials; preserve the existing mutation heuristic without treating source identifiers as secrets.",minimumEntropy:3.5},{name:"credential-key-assignment",mutationRule:"credential_key_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${CREDENTIAL_KEYS})\s*[:=]\s*`+CREDENTIAL_VALUE.source,"gi"),structured:{keys:CREDENTIAL_KEYS,value:CREDENTIAL_VALUE.source,element:!0,elementValue:!0},mutationOnlyReason:"Key-named assignments in source code and test fixtures are identifiers and synthetic data; repository scans keep the token-format rules, which recognize real credentials there.",minimumEntropy:3,minimumLiteralLength:CREDENTIAL_MINIMUM_LITERAL_LENGTH,literalValue:CREDENTIAL_LITERAL_VALUE,baseline:{regex:new RegExp(String.raw`\b(?:${CREDENTIAL_KEYS})\s*[:=]\s*`+CREDENTIAL_LITERAL_VALUE.source,"gi"),value:CREDENTIAL_LITERAL_VALUE.source},rejectValue:/^(?:[\w.-]+\/)*id_(?:rsa|dsa|ecdsa|ed25519)(?:_sk)?(?:\.pub)?$/u,rejectStatementReference:/^[A-Z]+(?:_[A-Z]+)+$/u}];function*findSecretRuleMatches(rule,content){if(rule.mutationRule==="absolute_home_path"){yield*findPrivateHomePathMatches(content,rule.regex);return}for(const reading of ruleReadings(rule))yield*flatMatches(reading,content),reading.structured&&(yield*findStructuredSpellingMatches(reading,reading.structured,content))}const baselineRules=new WeakMap;function ruleReadings(rule){const baseline=rule.baseline;if(baseline===void 0)return[rule];let judged=baselineRules.get(rule);return judged===void 0&&(judged={...rule,regex:baseline.regex,minimumLiteralLength:void 0,literalValue:void 0,baseline:void 0},rule.structured&&(judged.structured={...rule.structured,value:baseline.value}),baselineRules.set(rule,judged)),[rule,judged]}function isParameterName(content,index){const name=content[index-1]==="#"||content[index-1]==="!"?index-1:index;return content[name-1]==="{"&&content[name-2]==="$"}const INNER_SHELL_MATCHES=new WeakSet,INNER_CLOSE_AT=new WeakMap,CUT_REFERENCE_BOUND=4096;function referenceSpans(content,offset,text){const spans=[],open=[],end=offset+text.length;return walkReferences(content,offset,end,open,spans),walkReferences(content,end,Math.min(content.length,end+CUT_REFERENCE_BOUND),open),spans}function walkReferences(content,start,end,open,spans){for(let index=start;index<end&&(spans!==void 0||open.length>0);index+=1){const frame=open.at(-1);if(content[index]==="$"&&(content[index+1]==="{"||content[index+1]==="(")&&frame?.quoted!=="'"){const span={open:index,close:end,command:content[index+1]==="(",quoted:[]};spans?.push(span),open.push({span,closer:content[index+1]==="{"?"}":")"}),index+=1}else frame!==void 0&&(index=referenceStep(content,index,open))}}function referenceStep(text,index,open){const frame=open.at(-1),character=text[index];return character==="\\"&&frame.quoted!=="'"?index+1:(frame.quoted!==void 0?character===frame.quoted&&(frame.span.quoted.push([frame.quoteStart,index]),frame.quoted=void 0):character==="'"||character==='"'?(frame.quoted=character,frame.quoteStart=index):character===frame.closer&&(open.pop().span.close=index),index)}function enclosingCloser(spans){const active=[];let next=0;return position=>{for(;next<spans.length&&spans[next].open<position;next+=1){for(;active.length>0&&active.at(-1).close<spans[next].open;)active.pop();active.push(spans[next])}for(;active.length>0&&active.at(-1).close<position;)active.pop();return active.at(-1)}}function insideQuotedRange(span,position){let low=0,high=span.quoted.length-1;for(;low<=high;){const middle=low+high>>1,[start,end]=span.quoted[middle];if(position<start)high=middle-1;else if(position>end)low=middle+1;else return!0}return!1}const VALUE_REFERENCE=/\$[({A-Za-z_]|</u;function*flatMatches(rule,content){const regex=rule.regex;regex.lastIndex=0;const rescan=rescanDepth(rule);let inner;for(const match of content.matchAll(regex))acceptsSecretMatch(rule,match)?yield{index:match.index}:rescan!==void 0&&VALUE_REFERENCE.test(match[1])&&(inner??=new RegExp(regex),yield*keysInsideRejectedValue(rule,inner,content,match,rescan==="deep"))}function rescanDepth(rule){return rule.minimumLiteralLength===void 0?void 0:rule.minimumEntropy===void 0&&rule.literalValue===void 0&&rule.rejectValue===void 0?"deep":"shallow"}function*keysInsideRejectedValue(rule,inner,content,match,deep){const end=match.index+match[0].length;inner.lastIndex=end-match[1].length;let closerAt;for(let found=inner.exec(content);found!==null&&found.index<end;found=inner.exec(content)){if(isParameterName(content,found.index)){inner.lastIndex=found.index+1;continue}closerAt??=enclosingCloser(referenceSpans(content,end-match[1].length,match[1]));const span=closerAt(found.index);span!==void 0&&(INNER_CLOSE_AT.set(found,span.close),span.command&&!insideQuotedRange(span,found.index)&&INNER_SHELL_MATCHES.add(found)),acceptsSecretMatch(rule,found)?yield{index:found.index}:deep&&VALUE_REFERENCE.test(found[1])&&(inner.lastIndex=found.index+found[0].length-found[1].length)}}const compiledSpellings=new Map,LINE_BREAK=/[\r\n\u2028\u2029]/u;function compileSpelling(spelling){const cacheKey=`${spelling.keys}\0${spelling.value}\0${spelling.element===!0}`;let compiled=compiledSpellings.get(cacheKey);return compiled||(compiled={key:new RegExp(String.raw`\b(?:${spelling.keys})(["']?)\s*[:=]\s*`,"gi"),value:new RegExp(spelling.value,"iyd"),...spelling.element?{element:{open:new RegExp(String.raw`<(?:${spelling.keys})(?:\s[^<>]*)?>`,"gi"),close:new RegExp(String.raw`<\/(?:${spelling.keys})\s*>`,"iy"),span:new RegExp(String.raw`<(?!\/?(?:${spelling.keys})\b)[^<>]*>`,"iy")}}:{}},compiledSpellings.set(cacheKey,compiled)),compiled}function scanQuoted(content,start){const quote=content[start];for(let index=start+1;index<content.length;index+=1){const character=content[index];if(character==="\\")index+=1;else if(character===quote)return{end:index+1,terminated:!0}}return{end:content.length,terminated:!1}}function endOfQuoted(content,start){return scanQuoted(content,start).end}function judgeFor(closers,accepts,acceptsMember){return closers.at(-1)==="}"?acceptsMember:accepts}function walkContainer(content,start,accepts,acceptsMember=accepts){const closers=[];let expectKey=!1;for(let index=start;index<content.length;index+=1){const character=content[index];switch(character){case"[":case"{":closers.push(character==="["?"]":"}"),expectKey=character==="{";break;case"]":case"}":if(closers.pop()!==character||closers.length===0)return{found:!1,end:index+1};expectKey=!1;break;case",":expectKey=closers.at(-1)==="}";break;case":":expectKey=!1;break;case'"':case"'":if(!expectKey&&judgeFor(closers,accepts,acceptsMember)(index))return{found:!0,end:index};index=endOfQuoted(content,index)-1;break;default:break}}return{found:!1,end:content.length}}const ESCAPE_SEQUENCE=/\\(?:U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{2}|[0-7]{1,3}|[\s\S])/gu,SIMPLE_ESCAPES={n:`
|
|
3
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"};function
|
|
4
|
-
`||character==="\r"||character==='"'||character==="'")return"malformed"}return"malformed"}function createValueJudge(rule,value,content,alwaysDecode=!1){const valueMatch=(text,at,decoded)=>{value.lastIndex=at;const match=value.exec(text);if(match===null||LINE_BREAK.test(match[0]))return null;const span=match.indices?.[1];return decoded!==void 0&&span!==void 0&&(match[1]=decoded.original.slice(Math.max(span[0],decoded.bodyStart),Math.min(span[1],decoded.bodyEnd)),DECODED_DATA_MATCHES.add(match)),acceptsSecretMatch(rule,match)?match:null},escapedMatches=at=>{if(content[at]!=='"'&&content[at]!=="'")return;const{end,terminated}=scanQuoted(content,at),literal=content.slice(at,end);if(!alwaysDecode&&!literal.includes("\\"))return;if(LINE_BREAK.test(literal))return[];const decoded=decodeQuotedLiteral(literal,terminated);return(content[at]==="'"?[decoded,{reading:literal,...literalBody(literal,terminated)}]:[decoded]).map(reading=>valueMatch(reading.reading,0,reading)).filter(match=>match!==null)},valuesAt=at=>{const escaped=escapedMatches(at);if(escaped!==void 0)return escaped;const match=valueMatch(content,at);return match===null?[]:[match]};return{direct:at=>valueMatch(content,at)!==null,escaped:at=>(escapedMatches(at)?.length??0)>0,accepts:compact=>at=>valuesAt(at).some(match=>!(compact&&/\s/u.test(compactReading(rule,match))))}}function compactReading(rule,match){return rule.minimumLiteralLength===void 0?match[0]:judgedLiteral(match)}const DECODED_DATA_MATCHES=new WeakSet;function judgedLiteral(match){const word=INNER_SHELL_MATCHES.has(match)&&!isQuote(captureOpener(match))?shellWordPrefix(match[1]):void 0,text=word??match[1],variables=word!==void 0||wordComplete(match);return DECODED_DATA_MATCHES.has(match)||isQuote(captureOpener(match))?expandRuntimeReferences(text,variables):literalAfterReferences(text,variables)}function shellWordPrefix(text){for(let index=0;index<text.length;index+=1){const character=text[index];if(character==="'"||character==='"')index=quotedSpanEnd(text,index);else if(character==="$"&&(text[index+1]==="{"||text[index+1]==="("))index=Math.max(index,referenceEnd(text,index)-1);else if(/[|&;<>]/u.test(character))return text.slice(0,index)}}const STRUCTURE_RUN=/^[;,)}\]]{0,64}/u;function wordComplete(match){const input=match.input,end=match.index+match[0].length,closed=isQuote(captureOpener(match))&&isQuote(input[end])?end+1:isQuote(match[0].at(-1))?end:-1,start=closed===-1?end:closed,structure=STRUCTURE_RUN.exec(input.slice(start,start+WORD_END_BOUND))[0].length,after=start+structure;if(after===input.length||/\s/u.test(input[after])||INNER_CLOSE_AT.get(match)===start||INNER_SHELL_MATCHES.has(match)&&/[|&;<>]/u.test(input[start]))return!0;if(closed===-1||structure===0)return!1;const context=structuredContext(match,closed===end+1),next=input.slice(after,after+40),closedContainer=/[}\]]/u.test(input.slice(start,after));return context!==void 0&&(NEXT_MEMBER.test(next)||(context==="element"||closedContainer)&&BARE_SCALAR_MEMBER.test(next))}function structuredContext(match,openerOutsideCapture){const input=match.input,valueStart=match.index+match[0].length-match[1].length-(openerOutsideCapture?1:0),before=input.slice(Math.max(0,valueStart-STRUCTURED_LOOK_BACK),valueStart);return ARRAY_ELEMENT_BEFORE.test(before)?"element":QUOTED_KEY_BEFORE.test(before)?"key":void 0}const STRUCTURED_LOOK_BACK=512,QUOTED_KEY_BEFORE=/[{,]\s*(["'])[^"'\r\n]{1,256}\1\s*[:=]\s*$/u,ARRAY_ELEMENT_BEFORE=/[[,]\s*$/u,NEXT_MEMBER=/^(?:["'`]|[{[](?:[\s"'`{[\]}]|$|(?:-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null)[\s,\]}]))/u,BARE_SCALAR_MEMBER=/^(?:-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null)[\s,\]}]/u,WORD_END_BOUND=64,CALL_AFTER=/^\s{0,16}\(/u,ASSIGNED_BEFORE=/(?<![=!<>])=[ \t]{0,16}$/u;function captureOpener(match){return match.input[match.index+match[0].length-match[1].length-1]}function isQuote(character){return character==='"'||character==="'"}const SPELLING_SENSITIVE=/[$<"']/u;function isCodeAfterReference(match){if(DECODED_DATA_MATCHES.has(match)||isQuote(captureOpener(match))||!/^[$<]/u.test(match[1]))return!1;const end=match.index+match[0].length,valueStart=end-match[1].length,after=match.input.slice(end,end+18);if(match[1][0]==="<"&&(isTypeAssertion(match[1])||ASSIGNED_BEFORE.test(match.input.slice(Math.max(0,valueStart-18),valueStart))||EXPRESSION_AFTER.test(after)))return!0;const lead=leadingReferencesEnd(match[1]),operator=match[1][lead]==="!"?match[1][lead+1]:match[1][lead];return CODE_OPERATOR.test(operator??"")||CALL_AFTER.test(after)}function leadingReferencesEnd(text){let index=0;for(let next=referenceEnd(text,index);next!==-1;next=referenceEnd(text,index))index=next;return index}function referenceEnd(text,start){const opener=text[start];if(opener==="<")return angleSpanEnd(text,start);if(opener!=="$")return-1;const bracket=text[start+1];if(bracket==="{"||bracket==="(")return bracketedEnd(text,start+1,bracket);VARIABLE_REFERENCE.lastIndex=start;const variable=VARIABLE_REFERENCE.exec(text)?.[0];return variable===void 0?-1:start+variable.length}function angleSpanEnd(text,start){const close=text.indexOf(">",start+1),reopen=text.indexOf("<",start+1);return close!==-1&&(reopen===-1||close<reopen)?close+1:-1}function bracketedEnd(text,start,bracket){const closer=bracket==="{"?"}":")";let depth=0;for(let index=start;index<text.length;index+=1){const character=text[index];if(character==="\\")index+=1;else if(character==="'"||character==='"')index=quotedSpanEnd(text,index);else if(character===bracket)depth+=1;else if(character===closer&&--depth===0)return index+1}return-1}function quotedSpanEnd(text,start){const quote=text[start];for(let index=start+1;index<text.length;index+=1){if(text[index]===quote)return index;quote==='"'&&text[index]==="\\"&&(index+=1)}return text.length}const TYPE_TEXT=/^[\w$.[\]|&,{}:;?]+$/u,LITERAL_TYPE=/^(?:"[^"]*"|'[^']*'|-?\d+(?:\.\d+)?)(?:\|(?:"[^"]*"|'[^']*'|-?\d+(?:\.\d+)?|[A-Za-z_$][\w$.]*))*$/u,PRIMITIVE_TYPE=/\b(?:string|number|boolean|bigint|symbol|any|unknown|object|never|void|undefined|null)\b/u;function isTypeAssertion(value){const type=value.slice(1,value.indexOf(">"));return LITERAL_TYPE.test(type)?!0:TYPE_TEXT.test(type)?PRIMITIVE_TYPE.test(type)||/[.|&[{]/u.test(type)||/^[A-Z][\w$]*$/u.test(type)&&(type.length===1||/[a-z]/u.test(type)):!1}const CODE_OPERATOR=/[.+\-*/%=^&]/u,EXPRESSION_AFTER=/^\s{0,16}(?:\?\.|\?\?|\|\||&&|[([])/u;function literalMatches(grammar,literal,code){if(code)return!1;const body=literal.replaceAll('"',"'");return grammar.lastIndex=0,grammar.exec(`"${body}"`)?.[1]===body}function structuredKeyShape(rule,name){if(!rule.structured)return;const content=`${JSON.stringify(name)}:`,key=compileSpelling(rule.structured).key;key.lastIndex=0;for(let match=key.exec(content);match;match=key.exec(content)){if(match.index+match[0].length!==content.length)continue;const shape=keyShape(content,match.index,match[1]);if(shape!=="malformed")return shape}}function acceptsStructuredValue(rule,value,compact){if(!rule.structured)return!1;const content=JSON.stringify(value).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029");return ruleReadings(rule).some(reading=>createValueJudge(reading,compileSpelling(reading.structured).value,content,!0).accepts(compact)(0))}function*elementMatches(element,content,judge){const open=new RegExp(element.open);for(let match=open.exec(content);match;match=open.exec(content)){const bodyStart=match.index+match[0].length,body=elementBodyEnd(element,content,bodyStart);if(body===void 0){open.lastIndex=match.index+1;continue}judge(content.slice(bodyStart,body.start).trim())&&(yield{index:match.index}),open.lastIndex=body.end}}function elementBodyEnd(element,content,start){for(let index=content.indexOf("<",start);index!==-1;){element.close.lastIndex=index;const close=element.close.exec(content);if(close!==null)return{start:index,end:index+close[0].length};element.span.lastIndex=index;const span=element.span.exec(content);if(span===null)return;index=content.indexOf("<",index+span[0].length)}}function alreadyWalked(walkedEnd,valueStart,compact){return valueStart<walkedEnd.exact||compact&&valueStart<walkedEnd.compact}function scalarFinds(judge,accepts,quote,valueStart){return(quote||judge.escaped(valueStart)&&!judge.direct(valueStart))&&accepts(valueStart)}function*findStructuredSpellingMatches(rule,spelling,content){const compiled=compileSpelling(spelling),judge=createValueJudge(rule,compiled.value,content),key=new RegExp(compiled.key),walkedEnd={exact:0,compact:0};for(let match=key.exec(content);match;match=key.exec(content)){const quote=match[1],shape=keyShape(content,match.index,quote);if(shape==="malformed")continue;const compact=shape==="prefixed",accepts=judge.accepts(compact),valueStart=match.index+match[0].length,opener=content[valueStart];if(opener==="["||opener==="{"){if(alreadyWalked(walkedEnd,valueStart,compact))continue;const walked=walkContainer(content,valueStart,accepts,judge.accepts(!0));walkedEnd[compact?"compact":"exact"]=walked.end,walked.found&&(yield{index:match.index})}else scalarFinds(judge,accepts,quote,valueStart)&&(yield{index:match.index})}compiled.element&&(yield*elementMatches(compiled.element,content,elementValueJudge(rule,spelling,compiled)))}const DEFAULT_ELEMENT_LITERAL_LENGTH=8;function elementValueJudge(rule,spelling,compiled){if(!spelling.elementValue){const minimum=rule.minimumLiteralLength??DEFAULT_ELEMENT_LITERAL_LENGTH;return value=>expandRuntimeReferences(value).length>=minimum}return value=>{const neutral=value.replaceAll('"',"'");compiled.value.lastIndex=0;const match=compiled.value.exec(`"${neutral}"`);return match===null||match[1]!==neutral?!1:(match[1]=value,acceptsSecretMatch(rule,match))}}function isStatementReference(shape,match,value){const end=match.index+match[0].length;return/^[ \t]*;/u.test(match.input.slice(end,end+64))&&!isQuote(captureOpener(match))&&shape.test(value)}function indexOfAngleClose(text,start){for(let index=start+1;index<text.length;index+=1){if(text[index]===">")return index;if(text[index]==="<")return-1}return-1}function appendText(frame,text){frame.raw+=text,frame.literal+=text}function openReference(text,index,frames){const next=text[index+1];if(text[index]!=="$"||next!=="{"&&next!=="(")return-1;const prefix=next==="{"?text.slice(index+2,index+2+defaultedPrefixLength(text,index+2)):"",root=frames[0],opensPiece=frames.length===1&&root.quote!==void 0&&root.literal.length===root.pieceStart;return frames.push({close:next==="{"?"}":")",keep:prefix!=="",raw:`$${next}${prefix}`,literal:"",opensPiece}),index+2+prefix.length}const NAME_START=/[A-Za-z_]/u,NAME_PART=/\w/u,REFERENCE_AFTER_DOLLAR=/[{(A-Za-z_]/u,VARIABLE_REFERENCE=/\$[A-Za-z_]\w*/y,CONSTANT_NAME=/^_*[A-Z][A-Z0-9_]*$/u,BARE_VARIABLE=/^\$[A-Za-z_]\w*$/u,QUOTED_BARE_VARIABLE=/^(["'])\$[A-Za-z_]\w*\1$/u;function variableStep(text,index,frame){VARIABLE_REFERENCE.lastIndex=index;const variable=VARIABLE_REFERENCE.exec(text)?.[0];return variable===void 0?-1:(frame.literal===""&&CONSTANT_NAME.test(variable.slice(1))?frame.raw+=variable:appendText(frame,variable),index+variable.length)}function defaultedPrefixLength(text,start){if(!NAME_START.test(text[start]??""))return 0;let index=start+1;for(;index<text.length&&NAME_PART.test(text[index]);)index+=1;text[index]===":"&&(index+=1);const operator=text[index];return operator==="-"||operator==="="||operator==="+"?index+1-start:0}function closeReference(frames,character){const frame=frames.pop(),parent=frames.at(-1);parent.raw+=`${frame.raw}${character}`,frame.keep&&(parent.literal+=frame.literal)}const PLAIN_RUN=/[^$<"'\\})]+/y,DOUBLE_QUOTE_ESCAPABLE='$`"\\\n';function escapedContribution(next,quote){return next===`
|
|
5
|
-
`?"":
|
|
1
|
+
const A=`[^\\s/\\\\<>"'\\x60()\\[\\]{},;?=:#*]+`,d="[/\\\\]+",Ae="[\\p{L}\\p{N}._@-]+",R=Ae+"(?:"+d+A+")*",w="(?:(?:home|users)"+d+R+"|root"+d+R+")",Re="[/\\\\]"+w,$e="[/\\\\]{2,}"+w,me="/?[a-z]:"+d+"users"+d+R,he=A+"(?: +"+A+")*",x="(?:"+he+d+")?users"+d+R,we="[/\\\\]{2,}"+A+d+x,Se="(?:[a-z]:|volume\\{[a-f0-9-]+\\}|"+A+")",P="[/\\\\]{2}[?.]"+d+"(?:unc"+d+A+d+x+"|"+Se+d+"users"+d+R+")",ye="file:(?:"+P+"|(?:[/\\\\](?![/\\\\])|[/\\\\]{3,}|[/\\\\]{2}localhost"+d+")(?:"+w+"|[a-z]:"+d+"users"+d+R+")|[/\\\\]{2}(?:[a-z]:"+d+"users"+d+R+"|"+A+d+"(?:"+w+"|"+x+")))",Ne=new RegExp("(?:^|[^\\p{L}\\p{N}_./\\\\~])(?:"+Re+"|"+me+"|"+ye+")|(?:^|[^\\p{L}\\p{N}_:./\\\\~])(?:"+$e+"|"+we+"|"+P+")","giu"),Z=4,xe=/%[a-f0-9]{2}|\\(?:u[a-f0-9]{4}|x[a-f0-9]{2}|\/)/iu,Ie=new TextDecoder("utf-8");function Le(e){return e.replace(/(?:%[a-f0-9]{2})+/giu,n=>Ie.decode(Uint8Array.from(n.matchAll(/%([a-f0-9]{2})/giu),t=>Number.parseInt(t[1],16)))).replace(/%(?![a-f0-9]{2})[a-z0-9]{0,2}/giu,"\uFFFD")}function be(e){return e.replace(/\\+(?:u([a-f0-9]{4})|x([a-f0-9]{2})|(\/))?/giu,(n,t,r,s)=>{const i=t??r;return i===void 0?s??n:String.fromCharCode(Number.parseInt(i,16))})}function Te(e){return e.normalize("NFKC").replace(/[\p{Bidi_Control}\u200b-\u200f\u2060-\u206f\ufeff]/gu,"").replace(/[\u2215\u2044]/gu,"/").replace(/[\u043e\u041e]/gu,"o").replace(/[\u0455\u0405]/gu,"s")}function Oe(e,n){for(const[t,r]of[["percent_decode",Le],["json_unescape",be],["unicode_fold",Te]]){const s=r(e);s!==e&&!n.includes(t)&&n.push(t),e=s}return e}function*ke(e,n,t){let r=e;const s=[];for(let i=0;i<Z;i+=1){const o=r;if(r=Oe(r,s),!t){n.lastIndex=0;for(const a of r.matchAll(n))t=!0,yield{index:0,normalizations:[...s]}}if(r===o)break;i===Z-1&&xe.test(r)&&(yield{index:0,normalizations:[...s],normalization_incomplete:!0})}}function*Ce(e,n){let t=0;for(const r of e.split(`
|
|
2
|
+
`)){n.lastIndex=0;let s=!1;for(const i of r.matchAll(n))s=!0,yield{index:t+i.index};for(const i of ke(r,n,s))yield{...i,index:t};t+=r.length+1}}const M="password|passphrase",S=4,g=4096,m=e=>`${e}+(?!${e})`,D=String.raw`'[^'\r\n]*'|"[^"\\\r\n]*(?:\\.[^"\\\r\n]*){0,${g}}"`,ze=String.raw`\$\{(?:${m(String.raw`[^{}$'"\\\r\n]`)}|\\[^\r\n]|${D}|\$(?!\{)|\$\{[^{}\r\n]*\}){0,${g}}\}`+String.raw`|\$\((?:${m(String.raw`[^()$'"\\\r\n]`)}|\\[^\r\n]|${D}|\$(?!\()|\$\([^()\r\n]*\)){0,${g}}\)`,U=String.raw`${ze}|<[^<>\r\n]*>|${m(String.raw`[A-Za-z0-9!@#%^&*._+\-=]`)}|\$(?![{(])`,Pe=String.raw`"[^"]*"|'[^']*'`,v=String.raw`(?:"[^"\s]*"|'[^'\s]*')(?:${U}){0,${g}}`,V=new RegExp(String.raw`(?!config\.auth\.password\s*(?:\|\|\s*(?:''|"")|\?\s*unescape\(encodeURIComponent\(config\.auth\.password\)\)\s*:\s*(?:''|""))(?=[ \t]*(?:\/\*(?:[^*]|\*(?!\/))*\*\/[ \t]*)*(?:;|$|\/\/[^\r\n\u2028\u2029]*(?:\r\n)?$)))`+`((?:${U}){1,${g}}(?:${v}){0,${S}}|(?:${v}){1,${S}}|${Pe})`),Ze=8,F="token|secret|password|passwd|api[_-]?key",I="(?<![a-z0-9_]|[a-z0-9_]-)(?:(?:[a-z0-9]+_)+(?:password|passphrase)|(?:[a-z0-9]+[_-])*(?:secret|token|(?:api|secret|private|access)[_-]?key|client[_-]?secret|passwd|pwd))",E=4096,H=String.raw`"(?=[^"\s]{8}[^"\s]*")|'(?=[^'\s]{8}[^'\s]*')|(?!["'])`,B=String.raw`(?![<[$/]|~\/|\.\.?\/|[A-Za-z][\w+.-]*:\/\/|%[A-Za-z_]\w*%|[A-Za-z]:[\\/]|(?<=")(?:(?:[A-Za-z_]\w*\.){1,${E}}[A-Za-z_]\w*|[A-Za-z]+(?:-[A-Za-z]+){0,${E}}|(?:[\w.-]+\/){1,${E}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4})"|(?<=')(?:(?:[A-Za-z_]\w*\.){1,${E}}[A-Za-z_]\w*|[A-Za-z]+(?:-[A-Za-z]+){0,${E}}|(?:[\w.-]+\/){1,${E}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4})'|(?<!["'])[A-Za-z]+(?:-[A-Za-z]+){0,${E}}(?![\w!@#$%^&*.+\-=/~])|(?<!["'])(?:[A-Za-z_]\w*\.){1,${E}}[A-Za-z_]\w*(?![\w!@#$%^&*.+\-=/~])|(?<!["'])(?:[\w.-]+\/){1,${E}}[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,4}(?=[\s,;)}\]]|$)|(?<!["'])[\w$.]+\()(?:(?<=")[^\s"]{8}[^\s"]*|(?<=')[^\s']{8}[^\s']*|(?<==)[A-Za-z0-9!@#$%^&*._+\-=/~?:|]{8,}|(?<!["'=])[A-Za-z0-9!@#$%^&*._+\-=/~]{8,})`,L=new RegExp(`(?:${H})(${B})`,"iy"),Me=8,De=String.raw`[A-Za-z0-9!@#%^*._+\-=/~]`,q=String.raw`&(?!&)`,Ue=64,W=String.raw`'[^'\s]*'|"[^"\\\s]*(?:\\\S[^"\\\s]*){0,${g}}"`,K=String.raw`\$\{(?:${m(String.raw`[^{}$'"\\\s]`)}|\\\S|${W}|\$(?!\{)|\$\{[^{}\s]*\}){0,${g}}\}`+String.raw`|\$\((?:${m(String.raw`[^()$'"\\\s]`)}|\\\S|${W}|\$(?!\()|\$\([^()\s]*\)){0,${g}}\)`+String.raw`|<[^<>\s]*>|\$[A-Za-z_]\w*(?!\w)`,j=e=>String.raw`${K}|${m(e)}|${q}|\$(?![{(A-Za-z_])`,Q=e=>String.raw`(?:"[^"\s]*"|'[^'\s]*')(?:${j(e)}){0,${g}}`,ve=e=>String.raw`(?:(?:${e}|${q}){1,${Ue}}(?=[$<]))?(?:${K})`+String.raw`(?:${j(e)}){0,${g}}(?:${Q(e)}){0,${S}}`,Ve=e=>String.raw`(?:${Q(e)}){1,${S}}`,G=e=>String.raw`(?<!["'])(?:${e(De)})`,Y=String.raw`(?:[\w@#~]|!(?![.+\-*/%=^!(]))`,Fe=String.raw`(?=(?:"[^"\s]*"|'[^'\s]*')[$<"']`+String.raw`|"(?=[^"\s]*[$<])[^"\s]*"${Y}|'(?=[^'\s]*[$<])[^'\s]*'${Y})`,He=String.raw`(?<=")(?=[^"\s]*[$<])[^"\s]+|(?<=')(?=[^'\s]*[$<])[^'\s]+`,X=new RegExp(`(?:${Fe}|${H})((?=["'])(?:${G(Ve)})|${He}|${G(ve)}|${B})`),J=/["']?([A-Za-z0-9+/=_-]{24,})/,tt=[{name:"private-key",mutationRule:"private_key",category:"credential",regex:/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/g},{name:"github-token",mutationRule:"github_token",category:"credential",regex:/\b(?:gh[opsru]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,})\b/g},{name:"npm-token",mutationRule:"npm_token",category:"credential",regex:/\bnpm_[A-Za-z0-9]{20,}\b/g},{name:"aws-access-key",mutationRule:"aws_access_key",category:"credential",regex:/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g},{name:"google-api-key",mutationRule:"google_api_key",category:"credential",regex:/\bAIza[0-9A-Za-z_-]{35}\b/g},{name:"slack-token",mutationRule:"slack_token",category:"credential",regex:/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g},{name:"anthropic-api-key",mutationRule:"anthropic_api_key",category:"credential",regex:/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g},{name:"openai-api-key",mutationRule:"openai_api_key",category:"credential",regex:/\bsk-(?!ant-)[A-Za-z0-9_-]{20,}\b/g},{name:"gitlab-token",mutationRule:"gitlab_token",category:"credential",regex:/\bglpat-[A-Za-z0-9_.-]{20,}\b/g},{name:"jwt-like-token",mutationRule:"jwt_like_token",category:"credential",regex:/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g},{name:"npm-auth-token-assignment",mutationRule:"npm_auth_token_assignment",category:"credential",regex:/_authToken\s*=\s*\S+/g},{name:"sentry-user-token",mutationRule:"sentry_user_token",category:"credential",regex:/\bsntryu_[A-Za-z0-9]{20,}\b/g},{name:"sentry-org-token",mutationRule:"sentry_org_token",category:"credential",regex:/\bsntrys_[A-Za-z0-9_-]{20,}\b/g},{name:"private-ip",mutationRule:"private_ip",category:"network",regex:/\b(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"private-ssh-target",mutationRule:"private_ssh_target",category:"network",regex:/\b(?:ssh|scp|rsync)\s+[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g},{name:"sshpass-inline-password",mutationRule:"sshpass_inline_password",category:"credential",regex:/\bsshpass\s+-p\s+["'][^"']{6,}["']/g},{name:"password-assignment",mutationRule:"password_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${M})\s*[:=]\s*`+V.source,"gi"),structured:{keys:M,value:V.source,element:!0},minimumLiteralLength:Ze},{name:"absolute-home-path",mutationRule:"absolute_home_path",category:"path",regex:Ne,excludeFiles:/^(?:tests\/|examples\/)/},{name:"user-at-private-host",mutationRule:"user_at_private_host",category:"network",regex:/(?<![A-Za-z0-9._-])[A-Za-z0-9._-]+@(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|172\.(?:1[6-9]|2\d|3[01])\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)|192\.168\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d))\b/g,excludeFiles:/^(?:tests\/|examples\/)/},{name:"high-entropy-assignment",mutationRule:"high_entropy_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${F})\s*[:=]\s*`+J.source,"gi"),structured:{keys:F,value:J.source},mutationOnlyReason:"Generic assignments in source code are not credentials; preserve the existing mutation heuristic without treating source identifiers as secrets.",minimumEntropy:3.5},{name:"credential-key-assignment",mutationRule:"credential_key_assignment",category:"credential",regex:new RegExp(String.raw`\b(?:${I})\s*[:=]\s*`+X.source,"gi"),structured:{keys:I,value:X.source,element:!0,elementValue:!0},mutationOnlyReason:"Key-named assignments in source code and test fixtures are identifiers and synthetic data; repository scans keep the token-format rules, which recognize real credentials there.",minimumEntropy:3,minimumLiteralLength:Me,literalValue:L,baseline:{regex:new RegExp(String.raw`\b(?:${I})\s*[:=]\s*`+L.source,"gi"),value:L.source},rejectValue:/^(?:[\w.-]+\/)*id_(?:rsa|dsa|ecdsa|ed25519)(?:_sk)?(?:\.pub)?$/u,rejectStatementReference:/^[A-Z]+(?:_[A-Z]+)+$/u}];function*rt(e,n){if(e.mutationRule==="absolute_home_path"){yield*Ce(n,e.regex);return}for(const t of ne(e))yield*Ge(t,n),t.structured&&(yield*Pn(t,t.structured,n))}const ee=new WeakMap;function ne(e){const n=e.baseline;if(n===void 0)return[e];let t=ee.get(e);return t===void 0&&(t={...e,regex:n.regex,minimumLiteralLength:void 0,literalValue:void 0,baseline:void 0},e.structured&&(t.structured={...e.structured,value:n.value}),ee.set(e,t)),[e,t]}function Be(e,n){const t=e[n-1]==="#"||e[n-1]==="!"?n-1:n;return e[t-1]==="{"&&e[t-2]==="$"}const b=new WeakSet,te=new WeakMap,qe=4096;function We(e,n,t){const r=[],s=[],i=n+t.length;return re(e,n,i,s,r),re(e,i,Math.min(e.length,i+qe),s),r}function re(e,n,t,r,s){for(let i=n;i<t&&(s!==void 0||r.length>0);i+=1){const o=r.at(-1);if(e[i]==="$"&&(e[i+1]==="{"||e[i+1]==="(")&&o?.quoted!=="'"){const a={open:i,close:t,command:e[i+1]==="(",quoted:[]};s?.push(a),r.push({span:a,closer:e[i+1]==="{"?"}":")"}),i+=1}else o!==void 0&&(i=Ke(e,i,r))}}function Ke(e,n,t){const r=t.at(-1),s=e[n];return s==="\\"&&r.quoted!=="'"?n+1:(r.quoted!==void 0?s===r.quoted&&(r.span.quoted.push([r.quoteStart,n]),r.quoted=void 0):s==="'"||s==='"'?(r.quoted=s,r.quoteStart=n):s===r.closer&&(t.pop().span.close=n),n)}function je(e){const n=[];let t=0;return r=>{for(;t<e.length&&e[t].open<r;t+=1){for(;n.length>0&&n.at(-1).close<e[t].open;)n.pop();n.push(e[t])}for(;n.length>0&&n.at(-1).close<r;)n.pop();return n.at(-1)}}function Qe(e,n){let t=0,r=e.quoted.length-1;for(;t<=r;){const s=t+r>>1,[i,o]=e.quoted[s];if(n<i)r=s-1;else if(n>o)t=s+1;else return!0}return!1}const se=/\$[({A-Za-z_]|</u;function*Ge(e,n){const t=e.regex;t.lastIndex=0;const r=Ye(e);let s;for(const i of n.matchAll(t))N(e,i)?yield{index:i.index}:r!==void 0&&se.test(i[1])&&(s??=new RegExp(t),yield*Xe(e,s,n,i,r==="deep"))}function Ye(e){return e.minimumLiteralLength===void 0?void 0:e.minimumEntropy===void 0&&e.literalValue===void 0&&e.rejectValue===void 0?"deep":"shallow"}function*Xe(e,n,t,r,s){const i=r.index+r[0].length;n.lastIndex=i-r[1].length;let o;for(let a=n.exec(t);a!==null&&a.index<i;a=n.exec(t)){if(Be(t,a.index)){n.lastIndex=a.index+1;continue}o??=je(We(t,i-r[1].length,r[1]));const u=o(a.index);u!==void 0&&(te.set(a,u.close),u.command&&!Qe(u,a.index)&&b.add(a)),N(e,a)?yield{index:a.index}:s&&se.test(a[1])&&(n.lastIndex=a.index+a[0].length-a[1].length)}}const ie=new Map,oe=/[\r\n\u2028\u2029]/u;function T(e){const n=`${e.keys}\0${e.value}\0${e.element===!0}`;let t=ie.get(n);return t||(t={key:new RegExp(String.raw`\b(?:${e.keys})(["']?)\s*[:=]\s*`,"gi"),value:new RegExp(e.value,"iyd"),...e.element?{element:{open:new RegExp(String.raw`<(?:${e.keys})(?:\s[^<>]*)?>`,"gi"),close:new RegExp(String.raw`<\/(?:${e.keys})\s*>`,"iy"),span:new RegExp(String.raw`<(?!\/?(?:${e.keys})\b)[^<>]*>`,"iy")}}:{}},ie.set(n,t)),t}function ae(e,n){const t=e[n];for(let r=n+1;r<e.length;r+=1){const s=e[r];if(s==="\\")r+=1;else if(s===t)return{end:r+1,terminated:!0}}return{end:e.length,terminated:!1}}function Je(e,n){return ae(e,n).end}function en(e,n,t){return e.at(-1)==="}"?t:n}function nn(e,n,t,r=t){const s=[];let i=!1;for(let o=n;o<e.length;o+=1){const a=e[o];switch(a){case"[":case"{":s.push(a==="["?"]":"}"),i=a==="{";break;case"]":case"}":if(s.pop()!==a||s.length===0)return{found:!1,end:o+1};i=!1;break;case",":i=s.at(-1)==="}";break;case":":i=!1;break;case'"':case"'":if(!i&&en(s,t,r)(o))return{found:!0,end:o};o=Je(e,o)-1;break;default:break}}return{found:!1,end:e.length}}const tn=/\\(?:U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{2}|[0-7]{1,3}|[\s\S])/gu,rn={n:`
|
|
3
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"};function sn(e,n){const t=e[0],r=e.slice(1,n?-1:void 0).replaceAll(tn,o=>{const a=o[1];if((a==="u"||a==="x")&&o.length>2)return String.fromCharCode(Number.parseInt(o.slice(2),16));if(/^[0-7]$/u.test(a))return String.fromCharCode(Number.parseInt(o.slice(1),8));if(a==="U"&&o.length===10){const u=Number.parseInt(o.slice(2),16);return u<=1114111?String.fromCodePoint(u):"\uFFFD"}return rn[a]??a}),s=r.replaceAll(t,t==='"'?"'":'"').replaceAll(/[\r\n\u2028\u2029]/gu," "),i=n?t:"";return{reading:`${t}${s}${i}`,...ue(`${t}${r}${i}`,n)}}function ue(e,n){return{original:e,bodyStart:1,bodyEnd:e.length-(n?1:0)}}const on=64;function ce(e,n,t){const r=e[n-1];if(!t)return r!==void 0&&/[\p{L}\p{N}_.-]/u.test(r)?"prefixed":"exact";if(r===t)return"exact";const s=Math.max(0,n-on);for(let i=n-1;i>=s;i-=1){const o=e[i];if(o===t)return"prefixed";if(o===`
|
|
4
|
+
`||o==="\r"||o==='"'||o==="'")return"malformed"}return"malformed"}function le(e,n,t,r=!1){const s=(a,u,c)=>{n.lastIndex=u;const l=n.exec(a);if(l===null||oe.test(l[0]))return null;const f=l.indices?.[1];return c!==void 0&&f!==void 0&&(l[1]=c.original.slice(Math.max(f[0],c.bodyStart),Math.min(f[1],c.bodyEnd)),O.add(l)),N(e,l)?l:null},i=a=>{if(t[a]!=='"'&&t[a]!=="'")return;const{end:u,terminated:c}=ae(t,a),l=t.slice(a,u);if(!r&&!l.includes("\\"))return;if(oe.test(l))return[];const f=sn(l,c);return(t[a]==="'"?[f,{reading:l,...ue(l,c)}]:[f]).map(_=>s(_.reading,0,_)).filter(_=>_!==null)},o=a=>{const u=i(a);if(u!==void 0)return u;const c=s(t,a);return c===null?[]:[c]};return{direct:a=>s(t,a)!==null,escaped:a=>(i(a)?.length??0)>0,accepts:a=>u=>o(u).some(c=>!(a&&/\s/u.test(an(e,c))))}}function an(e,n){return e.minimumLiteralLength===void 0?n[0]:de(n)}const O=new WeakSet;function de(e){const n=b.has(e)&&!$(h(e))?un(e[1]):void 0,t=n??e[1],r=n!==void 0||ln(e);return O.has(e)||$(h(e))?_e(t,r):nt(t,r)}function un(e){for(let n=0;n<e.length;n+=1){const t=e[n];if(t==="'"||t==='"')n=ge(e,n);else if(t==="$"&&(e[n+1]==="{"||e[n+1]==="("))n=Math.max(n,k(e,n)-1);else if(/[|&;<>]/u.test(t))return e.slice(0,n)}}const cn=/^[;,)}\]]{0,64}/u;function ln(e){const n=e.input,t=e.index+e[0].length,r=$(h(e))&&$(n[t])?t+1:$(e[0].at(-1))?t:-1,s=r===-1?t:r,i=cn.exec(n.slice(s,s+An))[0].length,o=s+i;if(o===n.length||/\s/u.test(n[o])||te.get(e)===s||b.has(e)&&/[|&;<>]/u.test(n[s]))return!0;if(r===-1||i===0)return!1;const a=dn(e,r===t+1),u=n.slice(o,o+40),c=/[}\]]/u.test(n.slice(s,o));return a!==void 0&&(pn.test(u)||(a==="element"||c)&&_n.test(u))}function dn(e,n){const t=e.input,r=e.index+e[0].length-e[1].length-(n?1:0),s=t.slice(Math.max(0,r-fn),r);return En.test(s)?"element":gn.test(s)?"key":void 0}const fn=512,gn=/[{,]\s*(["'])[^"'\r\n]{1,256}\1\s*[:=]\s*$/u,En=/[[,]\s*$/u,pn=/^(?:["'`]|[{[](?:[\s"'`{[\]}]|$|(?:-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null)[\s,\]}]))/u,_n=/^(?:-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null)[\s,\]}]/u,An=64,Rn=/^\s{0,16}\(/u,$n=/(?<![=!<>])=[ \t]{0,16}$/u;function h(e){return e.input[e.index+e[0].length-e[1].length-1]}function $(e){return e==='"'||e==="'"}const mn=/[$<"']/u;function hn(e){if(O.has(e)||$(h(e))||!/^[$<]/u.test(e[1]))return!1;const n=e.index+e[0].length,t=n-e[1].length,r=e.input.slice(n,n+18);if(e[1][0]==="<"&&(In(e[1])||$n.test(e.input.slice(Math.max(0,t-18),t))||bn.test(r)))return!0;const s=fe(e[1]),i=e[1][s]==="!"?e[1][s+1]:e[1][s];return Ln.test(i??"")||Rn.test(r)}function fe(e){let n=0;for(let t=k(e,n);t!==-1;t=k(e,n))n=t;return n}function k(e,n){const t=e[n];if(t==="<")return wn(e,n);if(t!=="$")return-1;const r=e[n+1];if(r==="{"||r==="(")return Sn(e,n+1,r);y.lastIndex=n;const s=y.exec(e)?.[0];return s===void 0?-1:n+s.length}function wn(e,n){const t=e.indexOf(">",n+1),r=e.indexOf("<",n+1);return t!==-1&&(r===-1||t<r)?t+1:-1}function Sn(e,n,t){const r=t==="{"?"}":")";let s=0;for(let i=n;i<e.length;i+=1){const o=e[i];if(o==="\\")i+=1;else if(o==="'"||o==='"')i=ge(e,i);else if(o===t)s+=1;else if(o===r&&--s===0)return i+1}return-1}function ge(e,n){const t=e[n];for(let r=n+1;r<e.length;r+=1){if(e[r]===t)return r;t==='"'&&e[r]==="\\"&&(r+=1)}return e.length}const yn=/^[\w$.[\]|&,{}:;?]+$/u,Nn=/^(?:"[^"]*"|'[^']*'|-?\d+(?:\.\d+)?)(?:\|(?:"[^"]*"|'[^']*'|-?\d+(?:\.\d+)?|[A-Za-z_$][\w$.]*))*$/u,xn=/\b(?:string|number|boolean|bigint|symbol|any|unknown|object|never|void|undefined|null)\b/u;function In(e){const n=e.slice(1,e.indexOf(">"));return Nn.test(n)?!0:yn.test(n)?xn.test(n)||/[.|&[{]/u.test(n)||/^[A-Z][\w$]*$/u.test(n)&&(n.length===1||/[a-z]/u.test(n)):!1}const Ln=/[.+\-*/%=^&]/u,bn=/^\s{0,16}(?:\?\.|\?\?|\|\||&&|[([])/u;function Tn(e,n,t){if(t)return!1;const r=n.replaceAll('"',"'");return e.lastIndex=0,e.exec(`"${r}"`)?.[1]===r}function st(e,n){if(!e.structured)return;const t=`${JSON.stringify(n)}:`,r=T(e.structured).key;r.lastIndex=0;for(let s=r.exec(t);s;s=r.exec(t)){if(s.index+s[0].length!==t.length)continue;const i=ce(t,s.index,s[1]);if(i!=="malformed")return i}}function it(e,n,t){if(!e.structured)return!1;const r=JSON.stringify(n).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029");return ne(e).some(s=>le(s,T(s.structured).value,r,!0).accepts(t)(0))}function*On(e,n,t){const r=new RegExp(e.open);for(let s=r.exec(n);s;s=r.exec(n)){const i=s.index+s[0].length,o=kn(e,n,i);if(o===void 0){r.lastIndex=s.index+1;continue}t(n.slice(i,o.start).trim())&&(yield{index:s.index}),r.lastIndex=o.end}}function kn(e,n,t){for(let r=n.indexOf("<",t);r!==-1;){e.close.lastIndex=r;const s=e.close.exec(n);if(s!==null)return{start:r,end:r+s[0].length};e.span.lastIndex=r;const i=e.span.exec(n);if(i===null)return;r=n.indexOf("<",r+i[0].length)}}function Cn(e,n,t){return n<e.exact||t&&n<e.compact}function zn(e,n,t,r){return(t||e.escaped(r)&&!e.direct(r))&&n(r)}function*Pn(e,n,t){const r=T(n),s=le(e,r.value,t),i=new RegExp(r.key),o={exact:0,compact:0};for(let a=i.exec(t);a;a=i.exec(t)){const u=a[1],c=ce(t,a.index,u);if(c==="malformed")continue;const l=c==="prefixed",f=s.accepts(l),p=a.index+a[0].length,_=t[p];if(_==="["||_==="{"){if(Cn(o,p,l))continue;const z=nn(t,p,f,s.accepts(!0));o[l?"compact":"exact"]=z.end,z.found&&(yield{index:a.index})}else zn(s,f,u,p)&&(yield{index:a.index})}r.element&&(yield*On(r.element,t,Mn(e,n,r)))}const Zn=8;function Mn(e,n,t){if(!n.elementValue){const r=e.minimumLiteralLength??Zn;return s=>_e(s).length>=r}return r=>{const s=r.replaceAll('"',"'");t.value.lastIndex=0;const i=t.value.exec(`"${s}"`);return i===null||i[1]!==s?!1:(i[1]=r,N(e,i))}}function Dn(e,n,t){const r=n.index+n[0].length;return/^[ \t]*;/u.test(n.input.slice(r,r+64))&&!$(h(n))&&e.test(t)}function Un(e,n){for(let t=n+1;t<e.length;t+=1){if(e[t]===">")return t;if(e[t]==="<")return-1}return-1}function C(e,n){e.raw+=n,e.literal+=n}function vn(e,n,t){const r=e[n+1];if(e[n]!=="$"||r!=="{"&&r!=="(")return-1;const s=r==="{"?e.slice(n+2,n+2+jn(e,n+2)):"",i=t[0],o=t.length===1&&i.quote!==void 0&&i.literal.length===i.pieceStart;return t.push({close:r==="{"?"}":")",keep:s!=="",raw:`$${r}${s}`,literal:"",opensPiece:o}),n+2+s.length}const Vn=/[A-Za-z_]/u,Fn=/\w/u,Hn=/[{(A-Za-z_]/u,y=/\$[A-Za-z_]\w*/y,Bn=/^_*[A-Z][A-Z0-9_]*$/u,qn=/^\$[A-Za-z_]\w*$/u,Wn=/^(["'])\$[A-Za-z_]\w*\1$/u;function Kn(e,n,t){y.lastIndex=n;const r=y.exec(e)?.[0];return r===void 0?-1:(t.literal===""&&Bn.test(r.slice(1))?t.raw+=r:C(t,r),n+r.length)}function jn(e,n){if(!Vn.test(e[n]??""))return 0;let t=n+1;for(;t<e.length&&Fn.test(e[t]);)t+=1;e[t]===":"&&(t+=1);const r=e[t];return r==="-"||r==="="||r==="+"?t+1-n:0}function Qn(e,n){const t=e.pop(),r=e.at(-1);r.raw+=`${t.raw}${n}`,t.keep&&(r.literal+=t.literal)}const Ee=/[^$<"'\\})]+/y,Gn='$`"\\\n';function Yn(e,n){return e===`
|
|
5
|
+
`?"":n==='"'&&!Gn.includes(e)?`\\${e}`:e}function Xn(e,n,t){const r=e[n],s=t.quote;if(s==='"'&&r==="$"&&Hn.test(e[n+1]??""))return-1;let i=1,o=r;if(r==="\\"&&s!=="'"&&n+1<e.length)i=2,o=Yn(e[n+1],s);else if(s===void 0){if(r!=='"'&&r!=="'")return-1;t.quote=r,o=""}else r===s&&(t.quote=void 0,o="");return t.raw+=e.slice(n,n+i),t.keep&&(t.literal+=o),n+i}function Jn(e,n,t,r,s){const i=t.at(-1);Ee.lastIndex=n;const o=Ee.exec(e)?.[0];if(o!==void 0)return C(i,o),n+o.length;if(t.length>1){const p=Xn(e,n,i);if(p!==-1)return p}else if(r&&et(e[n],i))return n+1;const a=vn(e,n,t);if(a!==-1)return a;const u=t.at(-1),c=e[n],l=s&&c==="$"?Kn(e,n,u):-1;if(l!==-1)return l;if(t.length>1&&c===u.close)return Qn(t,c),n+1;const f=c==="<"?Un(e,n):-1;return f!==-1?(u.raw+=e.slice(n,f+1),f+1):(C(u,c),n+1)}function et(e,n){return e!=='"'&&e!=="'"?!1:n.quote===void 0?(n.quote=e,n.pieceStart=n.literal.length,!0):e!==n.quote?!1:(n.quote=void 0,!0)}function pe(e,n,t){if(t&&(qn.test(e)||n&&Wn.test(e)))return"";const r={close:"}",keep:!0,raw:"",literal:""},s=[r];for(let i=0;i<e.length;)i=Jn(e,i,s,n,t);for(let i=s.length-1;i>0;i-=1){const o=s[i],a=s[i-1];a.raw+=o.raw,n&&i===1&&o.opensPiece===!0||(a.literal+=o.raw)}return r.literal}function _e(e,n=!0){return pe(e,!1,n)}function nt(e,n=!0){return pe(e,!0,n)}function N(e,n){const t=e.minimumLiteralLength===void 0?n[1]:de(n);if(e.minimumLiteralLength!==void 0&&t.length<e.minimumLiteralLength||e.literalValue&&mn.test(n[1])&&!Tn(e.literalValue,t,hn(n))||e.rejectValue?.test(t)===!0||e.rejectStatementReference&&Dn(e.rejectStatementReference,n,t))return!1;if(e.minimumEntropy===void 0)return!0;const r=[...t],s=new Map;for(const o of r)s.set(o,(s.get(o)??0)+1);let i=0;for(const o of s.values()){const a=o/r.length;i-=a*Math.log2(a)}return i>=e.minimumEntropy}const ot={leadingReferencesEnd:fe};export{Ne as PRIVATE_HOME_PATH_PATTERN,tt as SECRET_RULES,ot as _testOnly,N as acceptsSecretMatch,it as acceptsStructuredValue,_e as expandRuntimeReferences,Ce as findPrivateHomePathMatches,rt as findSecretRuleMatches,nt as literalAfterReferences,st as structuredKeyShape};
|
|
6
6
|
//# sourceMappingURL=secret-rules.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function d(){let t=Promise.resolve();const r=new Set;return{async read(i){const o=t;let e;const n=new Promise(s=>{e=s});r.add(n),await o;try{return await i()}finally{r.delete(n),e()}},write(i){const e=Promise.all([t,...r]).then(()=>i());return t=e.then(()=>{},()=>{}),e}}}function a(){let t=Promise.resolve(),r=0;const i=[],o=()=>{if(r!==0)return;const e=i.splice(0);for(const n of e)n()};return{enqueue(e){r++;const n=t.then(()=>e());return t=n.then(()=>{},()=>{}).finally(()=>{r--,o()}),n},idle(){return r===0?Promise.resolve():new Promise(e=>i.push(e))}}}export{d as createAsyncReadWriteGate,a as createSerialQueue};
|
|
2
2
|
//# sourceMappingURL=serial-queue.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import p from"node:crypto";function l(n){if(n===null)return null;if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="bigint")return n.toString();if(n===void 0)return"undefined";if(typeof n=="symbol")return n.toString();if(typeof n=="function")return`[function:${n.name||"anonymous"}]`}function m(n){const e=Object.keys(n).sort(),r={};for(const o of e){const t=n[o];t!==void 0&&(r[o]=i(t))}return r}function i(n){const e=l(n);if(e!==void 0)return e;if(Array.isArray(n))return n.map(o=>i(o));if(n instanceof Date)return n.toISOString();const r=n;if(typeof r.toJSON=="function"){const o=r.toJSON();if(o!==n)return i(o)}return m(n)}function g(n){return JSON.stringify(i(n))}function c(n,e,r,o){for(let t=0;t<e.length;t+=1)if(!r.has(t)&&o(n,e[t]))return r.add(t),!0;return!1}function S(n,e){if(n instanceof RegExp||e instanceof RegExp)return n instanceof RegExp&&e instanceof RegExp&&n.toString()===e.toString()}function b(n,e){if(n instanceof Date||e instanceof Date)return n instanceof Date&&e instanceof Date&&n.getTime()===e.getTime()}function A(n,e){if(!(n instanceof Set||e instanceof Set))return;if(!(n instanceof Set&&e instanceof Set)||n.size!==e.size)return!1;const r=[...e],o=new Set;for(const t of n)if(!c(t,r,o,f))return!1;return!0}function E(n,e){if(!(n instanceof Map||e instanceof Map))return;if(!(n instanceof Map&&e instanceof Map)||n.size!==e.size)return!1;const r=[...e.entries()],o=new Set;for(const[t,s]of n.entries())if(!c([t,s],r,o,([u,a],[y,d])=>f(u,y)&&f(a,d)))return!1;return!0}function O(n,e){if(Array.isArray(n)||Array.isArray(e))return!Array.isArray(n)||!Array.isArray(e)||n.length!==e.length?!1:n.every((r,o)=>f(r,e[o]))}function x(n,e){const r=Object.keys(n).sort((t,s)=>t.localeCompare(s)),o=Object.keys(e).sort((t,s)=>t.localeCompare(s));if(r.length!==o.length)return!1;for(let t=0;t<r.length;t+=1){const s=r[t];if(s!==o[t]||!f(n[s],e[s]))return!1}return!0}const V=[S,b,A,E,O];function f(n,e){if(Object.is(n,e))return!0;if(n===null||e===null||typeof n!="object"||typeof e!="object")return!1;for(const r of V){const o=r(n,e);if(o!==void 0)return o}return x(n,e)}function k(n){return p.createHash("sha256").update(n,"utf8").digest("hex")}function D(n,e){const r={};for(const t of e){const s=n[t];s!==void 0&&(r[t]=s)}const o=Object.keys(n).filter(t=>!e.includes(t)).sort((t,s)=>t.localeCompare(s));for(const t of o){const s=n[t];s!==void 0&&(r[t]=s)}return r}export{D as orderObject,k as sha256Hex,g as stableStringify,f as stableValueEquals};
|
|
2
2
|
//# sourceMappingURL=serialization.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function a(t,e){if(t==null)return[];const u=e?.separators??/,/,n=t.split(u).map(r=>r.trim()).filter(r=>r.length>0),s=e?.unique!==!1?Array.from(new Set(n)):n;return e?.sort===!0?[...s].sort():s}export{a as splitCommaList};
|
|
2
2
|
//# sourceMappingURL=split-comma-list.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
function a(t){return t.trim().toLowerCase().replace(/\s+/g," ")}function x(t,e){const n=t.slice(0,e),r=n.charCodeAt(n.length-1),o=t.charCodeAt(n.length);return r>=55296&&r<=56319&&o>=56320&&o<=57343?n.slice(0,-1):n}const i=240,c=/\u2026\[\+([1-9]\d*) chars\]$/u;function h(t){if(t.length<=i)return t;const e=c.exec(t);if(e!==null&&e.index<=i)return t;const n=x(t,i);return`${n}\u2026[+${t.length-n.length} chars]`}function p(t){const e=c.exec(t.trimEnd());return e?Number(e[1]):void 0}function l(t){return t==="cursor"||t.endsWith("_cursor")}const f=new Set(["get","list","search"]);function m(t,e){return(e==="item"||e==="items")&&t!==void 0&&f.has(t)}function d(t){return t.includes("\u2026")}function C(t){return a(t).split(/[^a-z0-9]+/).filter(e=>e.length>0)}function g(t,e){if(t.length===0&&e.length===0)return 1;if(t.length===0||e.length===0)return 0;const n=new Set(t),r=new Set(e);let o=0;for(const u of n)r.has(u)&&(o+=1);const s=new Set([...n,...r]).size;return o/s}export{i as COMPACTED_STRING_LENGTH,h as compactExplanatoryString,d as isCompactedCursorArgument,l as isContinuationTokenKey,m as isTrackerItemDocumentKey,g as jaccardSimilarity,a as normalizeLowercaseWhitespace,p as readCompactionMarker,C as tokenizeAlphaNumeric,x as unicodeSafePrefix};
|
|
2
2
|
//# sourceMappingURL=text-normalization.js.map
|
package/dist/core/shared/time.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
`||
|
|
1
|
+
import{PmCliError as M}from"./errors.js";import{evictOldestMemoEntries as b}from"./memo.js";import{EXIT_CODE as w}from"./constants.js";import{nextReproducibleTimestamp as y}from"../reproducibility/context.js";const O=/^([+-]?)(\d+)([hdwm])$/i,S=/^[+-]?\d+[hdwm](?:[+-]\d+[hdwm])+$/i,P=/^(\d{4})(\d{2})(\d{2})$/,U=/^(\d{4})(\d{2})(\d{2})(?:[T\s]?)(\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i,F=/^(\d{4}-\d{2}-\d{2})[T\s](\d{2})-(\d{2})(?:-(\d{2}))?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i,v=/^(\d{4}-\d{2}-\d{2})[T\s](\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i,L=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-](\d{2}):(\d{2}))$/i;function q(){return y()??new Date().toISOString()}function K(e){return Number.isFinite(Date.parse(e))}function Y(e){const t=L.exec(e);if(!t||!Number.isFinite(Date.parse(e)))return!1;const[,n,r,d,s,i,a,c,o]=t,[f,u,m,$,l,T]=[n,r,d,s,i,a].map(Number);return u>=1&&u<=12&&m>=1&&m<=A(f,u-1)&&$<=23&&l<=59&&T<=59&&(c===void 0||Number(c)<=23)&&(o===void 0||Number(o)<=59)}function Q(e){const t=/\.(\d+)(?:Z|[+-]\d{2}:\d{2})$/iu.exec(e)?.[1];return Y(e)&&(t===void 0||/^\d{0,3}0*$/u.test(t))}const z=1e4,h=new Map;function x(e){const t=h.get(e);if(t!==void 0)return t;const n=Date.parse(e);return h.size>=z&&b(h),h.set(e,n),n}function p(e,t){const n=x(e),r=x(t);return Number.isFinite(n)&&Number.isFinite(r)&&n!==r?n-r:e.localeCompare(t)}function ee(e,t){return!(t.deadlineBefore&&(!e.deadline||p(e.deadline,t.deadlineBefore)>0)||t.deadlineAfter&&(!e.deadline||p(e.deadline,t.deadlineAfter)<0)||t.updatedAfter&&p(e.updated_at,t.updatedAfter)<0||t.updatedBefore&&p(e.updated_at,t.updatedBefore)>0||t.createdAfter&&p(e.created_at,t.createdAfter)<0||t.createdBefore&&p(e.created_at,t.createdBefore)>0)}function E(e){return e?`.${e.slice(1).padEnd(3,"0").slice(0,3)}`:""}function D(e){if(!e)return"";if(e.toUpperCase()==="Z")return"Z";const t=/^([+-]\d{2})(\d{2})$/.exec(e);return t?`${t[1]}:${t[2]}`:e}function g(e,t,n){n&&n!==t&&(e.includes(n)||e.push(n))}function C(e){const t=[],n=o=>g(t,e,o),r=P.exec(e);if(r){const[,o,f,u]=r;n(`${o}-${f}-${u}`)}const d=U.exec(e);if(d){const[,o,f,u,m,$,l,T,R]=d,_=l?`:${l}`:"";n(`${o}-${f}-${u}T${m}:${$}${_}${E(T)}${D(R)}`)}const s=F.exec(e);if(s){const[,o,f,u,m,$,l]=s,T=m?`:${m}`:"";n(`${o}T${f}:${u}${T}${E($)}${D(l)}`)}const i=v.exec(e);if(i){const[,o,f,u,m,$,l]=i,T=m?`:${m}`:"";n(`${o}T${f}:${u}${T}${E($)}${D(l)}`)}const a=10,c=e.slice(0,a);if(H(c)){let o=a;for(;o<e.length&&N(e[o]);)o+=1;o<e.length&&n(`${c}T${e.slice(o)}`)}return t}function I(e){const t=Date.parse(e);if(Number.isFinite(t))return t;for(const n of C(e)){const r=Date.parse(n);if(Number.isFinite(r))return r}return Number.NaN}function H(e){if(e.length!==10)return!1;for(let t=0;t<e.length;t+=1){const n=e[t];if(t===4||t===7){if(n!=="-")return!1;continue}const r=n.charCodeAt(0);if(r<48||r>57)return!1}return!0}function N(e){return e?e===" "||e===" "||e===`
|
|
2
|
+
`||e==="\r"||e==="\f"||e==="\v":!1}function A(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}const Z=["January","February","March","April","May","June","July","August","September","October","November","December"],B=/^(\d{4})-(\d{2})-(\d{2})/,G=/^(\d{4})(\d{2})(\d{2})(?:[T ]?\d{2}|$)/;function k(e,t,n){const r=B.exec(t)??G.exec(t);if(!r)return;const d=Number.parseInt(r[1],10),s=Number.parseInt(r[2],10),i=Number.parseInt(r[3],10),a=n?.trim()||"deadline";if(s<1||s>12)throw new M(`Invalid ${a} value "${e}". Month "${r[2]}" is out of range \u2014 use a month between 01 and 12.`,w.USAGE,{field:a,value:e});const c=A(d,s-1);if(i<1||i>c)throw new M(`Invalid ${a} value "${e}". ${Z[s-1]} ${d} has ${c} days, so day "${r[3]}" does not exist. Use a real YYYY-MM-DD calendar date.`,w.USAGE,{field:a,value:e})}function J(e,t){const n=new Date(e.getTime()),r=n.getUTCDate(),d=n.getUTCMonth()+t,s=n.getUTCFullYear()+Math.floor(d/12),i=(d%12+12)%12,a=Math.min(r,A(s,i));return n.setUTCFullYear(s,i,a),n}function te(e,t=new Date,n="deadline"){const r=e.trim();if(r.toLowerCase()==="now")return t.toISOString();const d=O.exec(r);if(d){const i=d[1]==="-"?-1:1,a=Number.parseInt(d[2],10)*i,c=d[3].toLowerCase();if(c==="m")return J(t,a).toISOString();const o=c==="h"?3600*1e3:c==="d"?1440*60*1e3:10080*60*1e3;return new Date(t.getTime()+a*o).toISOString()}k(e,r,n);const s=I(r);if(!Number.isFinite(s)){const i=n.trim().length>0?n.trim():"deadline",a=S.test(r)?"Compound relative expressions like +3d+1h are not supported; use a single relative token (for example +3d) or an ISO/date string.":'Use ISO/date string input, "now", or relative +6h/-6h/+1d/-1d/+2w/-2w/+6m/-6m.';throw new M(`Invalid ${i} value "${e}". ${a}`,w.USAGE,{field:i,value:e})}return new Date(s).toISOString()}const ne={normalizeOffset:D,pushTimestampCandidate:g,normalizeTimestampCandidates:C,parseTimestampWithFallbacks:I,isWhitespaceCharacter:N};export{ne as _testOnly,p as compareTimestampStrings,Q as isMillisecondPrecisionRfc3339DateTime,Y as isRfc3339DateTime,K as isTimestampLiteral,ee as matchesTimestampFilters,q as nowIso,te as resolveIsoOrRelative};
|
|
3
3
|
//# sourceMappingURL=time.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{AsyncLocalStorage as x}from"node:async_hooks";import{quoteWindowsCommandArg as A}from"./command-line.js";import{EXIT_CODE as C}from"./constants.js";import{PmCliError as T}from"./errors.js";const p="[redacted]";function L(t,e){if(/[\t\n\r]/u.test(t)||!/(?:^|[^A-Za-z0-9+.-])(?:https?|wss?|ftp)$/iu.test(t.slice(0,e)))return!1;let n=e+1;for(;t[n]==="/"||t[n]==="\\";)n+=1;const r=t.indexOf("/",n)-n;if(r<0)return!1;const i=n+r;return!/[:@%]/u.test(t.slice(n,i))&&!/[:%]|[/\\][/\\]/u.test(t.slice(i))}function u(t){const e=Math.max(t.lastIndexOf("@"),t.toLowerCase().lastIndexOf("%40")),n=t.indexOf(":");if(e<0||n<0||n>e)return;let r=n+1;for(;r<e&&r<n+3&&(t[r]==="/"||t[r]==="\\");)r+=1;return r===e||L(t,n)?void 0:[r,e]}function m(t){const e=u(t);return e?`${t.slice(0,e[0])}${p}${t.slice(e[1])}`:t}function y(t){return m(t)}const I=["author","assignee","claim_principal"];function j(t){const e={...t};for(const n of I)typeof e[n]=="string"&&(e[n]=y(e[n]));return e}function E(t,e){if(!(typeof t!="string"||u(t.trim())===void 0))throw new T(`${e} must not carry URL credentials: an identity is a name, never a credential.`,C.USAGE,{code:"invalid_argument_value",field:e,required:`Set ${e} to a plain name such as agent-a, with no URL userinfo (no user, password or token before the host).`,nextSteps:[`Rerun with ${e} set to a plain name.`],url_credentials_rejected:{source:e}})}function G(t,e){return E(t,e),t}const O=[["comments","author"],["notes","author"],["learnings","author"],["dependencies","author"],["plan_decisions","author"],["plan_discoveries","author"],["plan_steps","owner"],["tests","provenance","author"],["tests","updated_by"]],U=4;function h(t,e,n=0){if(typeof t=="string"){E(t,e);return}if(!(n>=U||typeof t!="object"||t===null))for(const r of Object.values(t))h(r,e,n+1)}function N(t,e){let n=t;for(const r of e){if(typeof n!="object"||n===null||Array.isArray(n))return;n=n[r]}return n}function H(t){const e=t;for(const n of I)h(e[n],n);for(const[n,...r]of O){const i=e[n];Array.isArray(i)&&i.forEach((a,l)=>{h(N(a,r),`${n}[${l}].${r.join(".")}`)})}}function q(t){return typeof t=="string"?y(t):t}const d=6,$=65536,w={carried:!1,fragments:new Set,fragmentLength:d,shortSpellings:[]},g=new x;function S(t){const e=t.toLowerCase();if(e.length===t.length)return e;let n="";for(const r of t){const i=r.toLowerCase();n+=i.length===r.length?i:r}return n}function R(t){return[t,t.replaceAll(/(["\\$`])/gu,"\\$1"),A(`${t}@`).slice(1,-2),JSON.stringify(t).slice(1,-1)]}function D(t){const e=t.indexOf(":");return e>=0&&e<t.length-1?t.slice(e+1):t}function b(t){const e=new Set;let n=!1;for(const s of t){const c=u(s);if(c){n=!0;for(const _ of R(D(s.slice(c[0],c[1]))))e.add(S(_))}}const r=[...e],i=r.reduce((s,c)=>s+Math.max(0,c.length-d+1)+1,0),a=Math.max(1,Math.ceil(i/$)),l=Math.max(d,a),o=new Set,f=new Set;for(const s of r){if(s.length<l){(s.length>=d||/\s/u.test(s))&&f.add(s);continue}for(let c=0;c+l<=s.length;c+=a)o.add(s.slice(c,c+l));o.add(s.slice(-l))}return{carried:n,fragments:o,fragmentLength:l,shortSpellings:[...f]}}function M(t,e){const n=S(t),r=new Uint8Array(t.length);let i=!1;const a=e.fragmentLength;for(let o=0;o+a<=n.length;o+=1)e.fragments.has(n.slice(o,o+a))&&(r.fill(1,o,o+a),i=!0);for(const o of e.shortSpellings)for(let f=n.indexOf(o);f>=0;f=n.indexOf(o,f+1))r.fill(1,f,f+o.length),i=!0;if(!i)return t;let l="";for(let o=0;o<t.length;o+=1)r[o]?(o===0||!r[o-1])&&(l+=p):l+=t[o];return l}function V(t,e){return g.run(b(t),e)}function Y(){return(g.getStore()??w).carried}function X(t){const e=g.getStore()??w,n=e.carried?M(t,e):t;return/@|%40/iu.test(n)?n.replaceAll(/\S+/gu,m):n}export{p as URL_CREDENTIAL_PLACEHOLDER,H as assertIdentityFieldsWithoutUrlCredentials,E as assertIdentityWithoutUrlCredentials,Y as invocationCarriesUrlCredentials,G as parseIdentityOption,y as redactIdentityCredentials,j as redactIdentityFields,q as redactOptionalIdentityCredentials,X as redactUrlCredentialsInText,m as redactUrlCredentialsInToken,V as runWithUrlCredentialInvocation};
|
|
2
2
|
//# sourceMappingURL=url-credentials.js.map
|
package/dist/core/store/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"./item-format-migration.js";export*from"./item-store.js";export*from"./paths.js";export*from"./settings.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import h from"node:fs/promises";import p from"node:path";import{runActiveOnWriteHooks as x}from"../extensions/index.js";import{readFileIfExists as $,removeFileIfExists as z,writeFileAtomic as D}from"../fs/fs-utils.js";import{parseItemDocument as S,serializeItemDocument as C}from"../item/item-format.js";import{TYPE_TO_FOLDER as R}from"../shared/constants.js";import{getItemFormatFromPath as b,getItemPath as q}from"./paths.js";function L(r){return"json_markdown"}function T(r,t){return p.relative(r,t).replaceAll("\\","/")}function M(r){return String(r).replaceAll(/[^a-zA-Z0-9._-]+/g,"_").slice(0,120)}async function W(r,t,l){r!==t&&S(await h.readFile(t,"utf8"),{format:"json_markdown",requireSupportedFormat:!0,schema:l})}async function Q(r,t,l="item_format:migrate",_=R,d){if(t!=="toon")throw new Error("Only toon item-format migration targets are supported. Markdown item files are legacy read-only input.");const g=new Set,y=new Set,s=[];let I=0;const v=L(t),k=Object.entries(_);for(const[c,m]of k){const F=p.join(r,m);let P=[];try{P=await h.readdir(F)}catch{continue}const u=new Map;for(const e of P){const a=p.join(F,e),o=b(a);if(!o)continue;const n=p.extname(e),f=e.slice(0,e.length-n.length).trim();if(f.length===0)continue;const i=u.get(f)??{};i[o]=a,u.set(f,i)}const A=[...u.keys()].sort((e,a)=>e.localeCompare(a));for(const e of A){const a=u.get(e);I+=1;const o=a[v];if(!o)continue;const n=a[t]??o,f=n===a[t]?t:v;try{const i=await h.readFile(n,"utf8"),E=S(i,{format:f,requireSupportedFormat:!0,schema:d,onWarning:O=>s.push(`item_format_migration_parse_warning:${e}:${O}`)});await W(n,o,d);const w=q(r,c,e,t,_),j=C(E,{format:t,schema:d});await $(w)!==j&&(await D(w,j),s.push(...await x({path:w,scope:"project",op:l})),g.add(e)),await z(o),y.add(T(r,o)),s.push(...await x({path:o,scope:"project",op:`${l}:remove`})),g.add(e)}catch(i){s.push(`item_format_migration_skipped:${T(r,n)}:${M(i)}`)}}}return{target_format:t,scanned:I,migrated:[...g].sort((c,m)=>c.localeCompare(m)),removed:[...y].sort((c,m)=>c.localeCompare(m)),warnings:s}}export{Q as migrateItemFilesToFormat};
|
|
2
2
|
//# sourceMappingURL=item-format-migration.js.map
|