@unbrained/pm-cli 2026.8.7 → 2026.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +54 -0
- package/dist/cli/main.js +4 -3
- package/dist/cli/register-annotations.d.ts +11 -0
- package/dist/cli/register-annotations.js +195 -0
- package/dist/cli/register-history-author.js +7 -30
- package/dist/cli/register-mutation.js +25 -206
- package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
- package/dist/cli/runtime-compatibility-boundary.js +43 -0
- package/dist/cli-bundle/bundle-manifest.json +158 -694
- package/dist/cli-bundle/chunks/chunk-2DTCZXSD.js +13 -0
- package/dist/cli-bundle/chunks/chunk-5JO6R4BS.js +3 -0
- package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +194 -0
- package/dist/cli-bundle/chunks/chunk-EF43KODO.js +2 -0
- package/dist/cli-bundle/chunks/chunk-GMX5YOI3.js +77 -0
- package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +28 -0
- package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +2 -0
- package/dist/cli-bundle/chunks/chunk-PYO5GZU6.js +5 -0
- package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
- package/dist/cli-bundle/chunks/chunk-RJC7TPF4.js +8 -0
- package/dist/cli-bundle/chunks/chunk-YC3UF2IO.js +2068 -0
- package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-BUE7PTCU.js} +8 -8
- package/dist/cli-bundle/chunks/register-mutation-FC3XLVIK.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-UQDTNTLJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +153 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-3GSFUDAI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3WVHTUAW.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-54TZJ4BM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-6DO4YQWZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-73FIJONU.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-C3GCHDSQ.js} +29 -27
- package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-KNEHLPBF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-MRWVJ3ZG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-P6BBIQRG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-PZAGVQNN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +14 -0
- package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-U46GQJNY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-VRXJSGIT.js} +6 -6
- package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-XC2ZW3CJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZG54B4XG.js +2 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +38 -38
- 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 +1 -1
- 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 +2 -1
- package/dist/cli.js +14 -4
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/history/history.js +13 -4
- package/dist/core/item/actionability.d.ts +7 -1
- package/dist/core/item/actionability.js +71 -15
- package/dist/core/output/output.js +9 -2
- package/dist/core/sentry/helpers.d.ts +10 -0
- package/dist/core/sentry/helpers.js +59 -4
- package/dist/core/shared/author.d.ts +25 -0
- package/dist/core/shared/author.js +114 -9
- package/dist/core/shared/constants.d.ts +2 -0
- package/dist/core/shared/constants.js +4 -2
- package/dist/sdk/actionability.d.ts +1 -1
- package/dist/sdk/actionability.js +3 -3
- package/dist/sdk/annotations.d.ts +40 -0
- package/dist/sdk/annotations.js +61 -9
- package/dist/sdk/author-attribution.d.ts +12 -0
- package/dist/sdk/author-attribution.js +73 -11
- package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
- package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
- package/dist/sdk/cli-contracts/completeness.js +5 -3
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +19 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +44 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +6 -3
- package/dist/sdk/comments.d.ts +7 -0
- package/dist/sdk/comments.js +2 -2
- package/dist/sdk/completion.js +9 -5
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/core-governance.d.ts +1 -1
- package/dist/sdk/core-governance.js +3 -3
- package/dist/sdk/dependencies.d.ts +2 -0
- package/dist/sdk/dependencies.js +7 -6
- package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
- package/dist/sdk/environment/host-environment-errors.js +124 -0
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
- package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
- package/dist/sdk/environment/source-context.d.ts +23 -0
- package/dist/sdk/environment/source-context.js +29 -0
- package/dist/sdk/error-code-catalog.d.ts +6 -0
- package/dist/sdk/error-code-catalog.js +62 -8
- package/dist/sdk/extension/bundled-catalog.js +19 -6
- package/dist/sdk/generated-error-code-catalog.js +665 -3
- package/dist/sdk/governance/health.d.ts +11 -3
- package/dist/sdk/governance/health.js +32 -13
- package/dist/sdk/governance/provenance-health.d.ts +26 -0
- package/dist/sdk/governance/provenance-health.js +139 -0
- package/dist/sdk/governance/validate.js +13 -8
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +3 -2
- package/dist/sdk/graph/assembly.d.ts +4 -0
- package/dist/sdk/graph/assembly.js +22 -2
- package/dist/sdk/graph/run.d.ts +2 -0
- package/dist/sdk/graph/run.js +3 -2
- package/dist/sdk/index.d.ts +7 -3
- package/dist/sdk/index.js +9 -5
- package/dist/sdk/learnings.d.ts +15 -0
- package/dist/sdk/learnings.js +2 -2
- package/dist/sdk/lifecycle/close-many.d.ts +6 -1
- package/dist/sdk/lifecycle/close-many.js +43 -5
- package/dist/sdk/lifecycle/close.js +13 -8
- package/dist/sdk/lifecycle/create.js +6 -12
- package/dist/sdk/lifecycle/plan.js +6 -3
- package/dist/sdk/lifecycle/update-many.d.ts +2 -1
- package/dist/sdk/lifecycle/update-many.js +29 -5
- package/dist/sdk/lifecycle/update.js +6 -20
- package/dist/sdk/merge/driver.d.ts +2 -1
- package/dist/sdk/merge/driver.js +7 -4
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/install.d.ts +21 -0
- package/dist/sdk/merge/install.js +51 -21
- package/dist/sdk/merge/receipts.d.ts +14 -1
- package/dist/sdk/merge/receipts.js +36 -8
- package/dist/sdk/merge/reconcile.js +21 -4
- package/dist/sdk/merge/three-way.d.ts +6 -2
- package/dist/sdk/merge/three-way.js +24 -10
- package/dist/sdk/notes.d.ts +7 -0
- package/dist/sdk/notes.js +2 -2
- package/dist/sdk/query/get.d.ts +11 -0
- package/dist/sdk/query/get.js +37 -3
- package/dist/sdk/read-output-contracts.d.ts +1 -1
- package/dist/sdk/read-output-contracts.js +103 -5
- package/dist/sdk/relationship-kinds/contract.d.ts +48 -0
- package/dist/sdk/relationship-kinds/contract.js +22 -0
- package/dist/sdk/relationships.d.ts +6 -41
- package/dist/sdk/relationships.js +12 -126
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +9 -25
- package/dist/sdk/similarity.d.ts +5 -0
- package/dist/sdk/similarity.js +40 -10
- package/dist/sdk/structured-mutations.js +5 -2
- package/dist/sdk/test/execution.js +4 -2
- package/dist/sdk/test/linked-command-detection.d.ts +2 -7
- package/dist/sdk/test/linked-command-detection.js +22 -9
- package/dist/sdk/test/parsers.js +5 -2
- package/dist/sdk/workspace-snapshot.d.ts +9 -0
- package/dist/sdk/workspace-snapshot.js +48 -16
- package/docs/AGENT_GUIDE.md +2 -1
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
- package/docs/COMMANDS.md +19 -1
- package/docs/DEPENDENCY_KIND_CONTRACT.md +29 -0
- package/docs/ITEM_READ_PROJECTIONS.md +26 -0
- package/docs/MERGE_SAFETY.md +10 -3
- package/docs/README.md +1 -0
- package/docs/RELATIONSHIP_GRAPH.md +1 -1
- package/docs/RELEASING.md +27 -2
- package/docs/SCRIPTING.md +27 -1
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +35 -2
- package/docs/SDK_CONTEXT_INTEGRITY.md +81 -0
- package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
- package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
- package/docs/SENTRY_CONTRACT_EPOCHS.md +20 -0
- package/docs/TESTING.md +17 -0
- package/docs/agent-task-token-baseline.json +2 -2
- package/marketplace.json +2 -2
- package/package.json +5 -3
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +756 -57
- package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
- package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
- package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
- package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
- package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
- package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
- package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
- package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
- package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
- package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
- package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
- package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
- package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
- package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
- package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
- package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
- package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
- package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
- package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
- package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
- package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
- package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
- package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
- package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
- package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
- package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
- package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
- package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
- package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
- package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
- package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
- package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
- package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
- package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
- package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
- package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
- package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
- package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-3K4XV2BF.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-CIXVQPB7.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
- package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MHMTKV5V.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MOTJFQ3F.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-RW5IYD4J.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-VZFU2R4M.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
package/dist/sdk/index.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Index.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ae84c7af-bfa7-577d-b9f3-2bd9450d5755")}catch(e){}}();
|
|
8
8
|
export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOURCE_CONTRACTS, PM_MCP_TOOL_COMMAND_CONTRACTS, listPmCommandsForTier, listPmMcpToolsForProfile, renderPmCommandVisibilityMarkdown, resolvePmCommandVisibilityTier, } from "./agent-capability-contracts.js";
|
|
9
9
|
export * from "./agent-session-context.js";
|
|
10
|
-
export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
|
|
11
|
-
export { acknowledgeUnknownAuthorHistoryEvents, inspectHistoryAuthorStream, scanHistoryAuthorAttribution, } from "./author-attribution.js";
|
|
10
|
+
export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, normalizeAnnotationTransportOptions, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
|
|
11
|
+
export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, } from "./author-attribution.js";
|
|
12
12
|
export { BUILTIN_CORPUS_SHAPES, PM_CORPUS_SHAPE_SCHEMA, buildCorpusShapeItemPlan, createCorpusShapeMeasurement, defineCorpusShape, listBuiltinCorpusShapes, measureCorpusShapePlan, resolveBuiltinCorpusShape, } from "./corpus-shape.js";
|
|
13
13
|
export * from "./core-governance.js";
|
|
14
14
|
export { createPmCliProgram } from "./cli-program.js";
|
|
@@ -30,7 +30,7 @@ export { runEvent, runMeet, runRemind, } from "./scheduling-shortcuts.js";
|
|
|
30
30
|
export { createExtensionCommandSdk } from "./extension-command-context.js";
|
|
31
31
|
export { isRuntimeRecord } from "./runtime-input.js";
|
|
32
32
|
export { resolveStartTaskInProgressStatus } from "./start-task-status.js";
|
|
33
|
-
export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveProjectMergeTypeFolders, runMergeInstall, } from "./merge/install.js";
|
|
33
|
+
export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, resolveProjectMergeTypeFolders, runMergeInstall, } from "./merge/install.js";
|
|
34
34
|
export { deriveSchemaEvolutionMigrationId, formatSchemaEvolutionMigrationHuman, planSchemaEvolutionMigration, runSchemaEvolutionMigration, } from "./schema-migration.js";
|
|
35
35
|
export { runWithActiveExtensions, } from "./runtime.js";
|
|
36
36
|
export { applyInvocationAuthorOverride } from "./invocation-author.js";
|
|
@@ -50,6 +50,10 @@ export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, coll
|
|
|
50
50
|
export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
|
|
51
51
|
export * from "./compose.js";
|
|
52
52
|
export * from "./compile-cache.js";
|
|
53
|
+
export * from "./environment/project-runtime-compatibility.js";
|
|
54
|
+
export * from "./environment/source-context.js";
|
|
55
|
+
export * from "./environment/host-environment-errors.js";
|
|
56
|
+
export * from "./cli-contracts/command-exit-contracts.js";
|
|
53
57
|
export * from "./context-relevance.js";
|
|
54
58
|
export * from "./context-intent-contracts.js";
|
|
55
59
|
export * from "./context-intent-runtime.js";
|
|
@@ -137,4 +141,4 @@ export * from "./governance.js";
|
|
|
137
141
|
export * from "./query.js";
|
|
138
142
|
export * from "./testing.js";
|
|
139
143
|
//# sourceMappingURL=index.js.map
|
|
140
|
-
//# debugId=
|
|
144
|
+
//# debugId=ae84c7af-bfa7-577d-b9f3-2bd9450d5755
|
package/dist/sdk/learnings.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type GlobalOptions } from "./runtime-primitives.js";
|
|
7
7
|
import type { LogNote } from "../types/index.js";
|
|
8
|
+
import { type AnnotationMutationReceipt, type AnnotationOmissionReceipt } from "./annotations.js";
|
|
8
9
|
/** Documents the learnings command options payload exchanged by command, SDK, and package integrations. */
|
|
9
10
|
export interface LearningsCommandOptions {
|
|
10
11
|
/** Value that configures or reports add for this contract. */
|
|
@@ -19,6 +20,8 @@ export interface LearningsCommandOptions {
|
|
|
19
20
|
delete?: number;
|
|
20
21
|
/** Value that configures or reports limit for this contract. */
|
|
21
22
|
limit?: string;
|
|
23
|
+
/** Return complete learning history after a mutation instead of a bounded receipt. */
|
|
24
|
+
fullHistory?: boolean;
|
|
22
25
|
/** Value that configures or reports author for this contract. */
|
|
23
26
|
author?: string;
|
|
24
27
|
/** Human-readable explanation suitable for logs and agent-facing output. */
|
|
@@ -34,6 +37,18 @@ export interface LearningsResult {
|
|
|
34
37
|
learnings: LogNote[];
|
|
35
38
|
/** Value that configures or reports count for this contract. */
|
|
36
39
|
count: number;
|
|
40
|
+
/** Total learning count after the mutation. */
|
|
41
|
+
total_count?: number;
|
|
42
|
+
/** Number of learning entries returned in this projection. */
|
|
43
|
+
returned_count?: number;
|
|
44
|
+
/** Whether additional stored learning entries were withheld. */
|
|
45
|
+
has_more?: boolean;
|
|
46
|
+
/** Applied read limit when one was requested. */
|
|
47
|
+
limit?: number;
|
|
48
|
+
/** Mutation identity when this result changed the collection. */
|
|
49
|
+
mutation_receipt?: AnnotationMutationReceipt;
|
|
50
|
+
/** Declares whether older learnings were withheld from a mutation response. */
|
|
51
|
+
omission_receipt?: AnnotationOmissionReceipt;
|
|
37
52
|
}
|
|
38
53
|
/** Implements run learnings for the public runtime surface of this module. */
|
|
39
54
|
export declare function runLearnings(id: string, options: LearningsCommandOptions, global: GlobalOptions): Promise<LearningsResult>;
|
package/dist/sdk/learnings.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="93184f29-f215-5413-9628-fb5b34523995")}catch(e){}}();
|
|
3
3
|
import { parseAnnotationTextInput, resolveAnnotationInput, runAnnotationCommand, } from "./annotations.js";
|
|
4
4
|
/** Implements run learnings for the public runtime surface of this module. */
|
|
5
5
|
export async function runLearnings(id, options, global) {
|
|
@@ -24,4 +24,4 @@ export async function runLearnings(id, options, global) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=learnings.js.map
|
|
27
|
-
//# debugId=
|
|
27
|
+
//# debugId=93184f29-f215-5413-9628-fb5b34523995
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type GlobalOptions, readSettings } from "../runtime-primitives.js";
|
|
7
7
|
import { type ListOptions } from "../query/list.js";
|
|
8
|
+
import { type PmCommandEffectReceipt } from "../cli-contracts/command-exit-contracts.js";
|
|
8
9
|
/** Documents the close many command options payload exchanged by command, SDK, and package integrations. */
|
|
9
10
|
export interface CloseManyCommandOptions {
|
|
10
11
|
/** Lifecycle state reported for status. */
|
|
@@ -55,7 +56,7 @@ interface CloseManyApplyRow {
|
|
|
55
56
|
error?: string;
|
|
56
57
|
}
|
|
57
58
|
/** Documents the close many result payload exchanged by command, SDK, and package integrations. */
|
|
58
|
-
export interface CloseManyResult {
|
|
59
|
+
export interface CloseManyResult extends PmCommandEffectReceipt {
|
|
59
60
|
/** Value that configures or reports mode for this contract. */
|
|
60
61
|
mode: "dry_run" | "apply" | "rollback";
|
|
61
62
|
/** Number of matched entries represented by this result. */
|
|
@@ -97,6 +98,10 @@ export interface CloseManyResult {
|
|
|
97
98
|
}>;
|
|
98
99
|
/** Value that configures or reports ids for this contract. */
|
|
99
100
|
ids: string[];
|
|
101
|
+
/** Explicitly requested --ids values that matched no selected item. */
|
|
102
|
+
unmatched_ids?: string[];
|
|
103
|
+
/** Number of explicitly requested --ids values that matched no selected item. */
|
|
104
|
+
unmatched_count?: number;
|
|
100
105
|
}
|
|
101
106
|
declare function hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean;
|
|
102
107
|
declare function hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean;
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* Implements the pm close many command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4da07a98-855e-59cf-a6a4-2f59a8b3c0bd")}catch(e){}}();
|
|
8
8
|
import { pathExists, createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, resolveAuthor, nowIso, listAllItemMetadataLight, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
9
9
|
import { runClose } from "./close.js";
|
|
10
10
|
import { hasListFilters } from "../query/list-filter-shared.js";
|
|
11
11
|
import { runList } from "../query/list.js";
|
|
12
12
|
import { runRestore } from "./restore.js";
|
|
13
|
+
import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
|
|
13
14
|
const CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
14
15
|
const CLOSE_MANY_CHECKPOINT_SUBDIR = "close-many";
|
|
15
16
|
const CLOSE_MANY_FILTER_GUIDANCE = [
|
|
@@ -139,6 +140,12 @@ async function runCloseManyRollback(params) {
|
|
|
139
140
|
const restoreMessage = params.options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;
|
|
140
141
|
const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) => runRestore(id, targetUpdatedAt, { author: params.options.author, message: restoreMessage, force: true }, params.global));
|
|
141
142
|
return {
|
|
143
|
+
...derivePmBulkMutationEffect({
|
|
144
|
+
applied: rollback.restored_ids.length,
|
|
145
|
+
skipped: 0,
|
|
146
|
+
failed: rollback.failed_count,
|
|
147
|
+
unmatched: 0,
|
|
148
|
+
}),
|
|
142
149
|
mode: "rollback",
|
|
143
150
|
matched_count: checkpoint.items.length,
|
|
144
151
|
dry_run: false,
|
|
@@ -266,6 +273,13 @@ async function buildCloseManyPlanContext(params) {
|
|
|
266
273
|
const listed = await runList(params.options.status, activeListOptions(params.options.list), params.global);
|
|
267
274
|
const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(params.pmRoot, params.settings);
|
|
268
275
|
const matched = sortCloseManyMatchedItems(listed.items, parentByChild);
|
|
276
|
+
const requestedIds = [
|
|
277
|
+
...new Set(String(params.options.list?.ids ?? "")
|
|
278
|
+
.split(",")
|
|
279
|
+
.map((entry) => entry.trim())
|
|
280
|
+
.filter((entry) => entry.length > 0)),
|
|
281
|
+
];
|
|
282
|
+
const matchedIds = new Set(matched.map((item) => item.id));
|
|
269
283
|
const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);
|
|
270
284
|
return {
|
|
271
285
|
pmRoot: params.pmRoot,
|
|
@@ -276,11 +290,14 @@ async function buildCloseManyPlanContext(params) {
|
|
|
276
290
|
force,
|
|
277
291
|
listed,
|
|
278
292
|
matched,
|
|
293
|
+
unmatchedIds: requestedIds.filter((id) => !matchedIds.has(id)),
|
|
279
294
|
planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),
|
|
280
295
|
};
|
|
281
296
|
}
|
|
282
297
|
function buildCloseManyDryRunResult(context) {
|
|
283
298
|
return {
|
|
299
|
+
outcome: "effect",
|
|
300
|
+
exit_code: EXIT_CODE.SUCCESS,
|
|
284
301
|
mode: "dry_run",
|
|
285
302
|
matched_count: context.matched.length,
|
|
286
303
|
dry_run: true,
|
|
@@ -291,6 +308,12 @@ function buildCloseManyDryRunResult(context) {
|
|
|
291
308
|
: {}),
|
|
292
309
|
item_plans: context.planRows,
|
|
293
310
|
ids: [],
|
|
311
|
+
...(context.unmatchedIds.length > 0
|
|
312
|
+
? {
|
|
313
|
+
unmatched_ids: context.unmatchedIds,
|
|
314
|
+
unmatched_count: context.unmatchedIds.length,
|
|
315
|
+
}
|
|
316
|
+
: {}),
|
|
294
317
|
};
|
|
295
318
|
}
|
|
296
319
|
async function resolveCloseManyCheckpointInfo(params) {
|
|
@@ -362,7 +385,16 @@ export async function runCloseMany(options, global) {
|
|
|
362
385
|
closeOptions,
|
|
363
386
|
global,
|
|
364
387
|
});
|
|
388
|
+
const closedCount = rows.filter((row) => row.status === "closed").length;
|
|
389
|
+
const skippedCount = rows.filter((row) => row.status === "skipped").length;
|
|
390
|
+
const failedCount = rows.filter((row) => row.status === "failed").length;
|
|
365
391
|
return {
|
|
392
|
+
...derivePmBulkMutationEffect({
|
|
393
|
+
applied: closedCount,
|
|
394
|
+
skipped: skippedCount,
|
|
395
|
+
failed: failedCount,
|
|
396
|
+
unmatched: context.unmatchedIds.length,
|
|
397
|
+
}),
|
|
366
398
|
mode: "apply",
|
|
367
399
|
matched_count: context.matched.length,
|
|
368
400
|
dry_run: false,
|
|
@@ -372,11 +404,17 @@ export async function runCloseMany(options, global) {
|
|
|
372
404
|
? { validate_close: context.validateCloseMode }
|
|
373
405
|
: {}),
|
|
374
406
|
...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
|
|
375
|
-
closed_count:
|
|
376
|
-
skipped_count:
|
|
377
|
-
failed_count:
|
|
407
|
+
closed_count: closedCount,
|
|
408
|
+
skipped_count: skippedCount,
|
|
409
|
+
failed_count: failedCount,
|
|
378
410
|
rows,
|
|
379
411
|
ids: closedIds,
|
|
412
|
+
...(context.unmatchedIds.length > 0
|
|
413
|
+
? {
|
|
414
|
+
unmatched_ids: context.unmatchedIds,
|
|
415
|
+
unmatched_count: context.unmatchedIds.length,
|
|
416
|
+
}
|
|
417
|
+
: {}),
|
|
380
418
|
};
|
|
381
419
|
}
|
|
382
420
|
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
@@ -390,4 +428,4 @@ export const _testOnly = {
|
|
|
390
428
|
resolveReason,
|
|
391
429
|
};
|
|
392
430
|
//# sourceMappingURL=close-many.js.map
|
|
393
|
-
//# debugId=
|
|
431
|
+
//# debugId=4da07a98-855e-59cf-a6a4-2f59a8b3c0bd
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Implements the pm close command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e39a90e-8a26-5789-9de6-288900b6b418")}catch(e){}}();
|
|
8
8
|
import { pathExists, toItemRecord, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, buildItemNotFoundError, listAllItemMetadataLight, locateItem, mutateItem, readLocatedItem, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, resolveIsoOrRelative, shouldCompletePlanOnClose, getActiveExtensionRegistrations, } from "../runtime-primitives.js";
|
|
9
|
-
import { collectBlockedByIds } from "../actionability.js";
|
|
9
|
+
import { collectBlockedByIds, indexBlockedByIds, } from "../actionability.js";
|
|
10
10
|
import { applyTerminalOrderingPolicy, requireTerminalReason, } from "../lifecycle-policy.js";
|
|
11
11
|
import { renderPmCommand } from "../command-line.js";
|
|
12
12
|
const CLOSE_VALIDATION_FIELDS = [
|
|
@@ -137,14 +137,19 @@ function findActiveChildIds(items, parentId, statusRegistry) {
|
|
|
137
137
|
.sort((left, right) => left.localeCompare(right));
|
|
138
138
|
}
|
|
139
139
|
function findAutoUnblockCandidates(items, closedId, statusRegistry) {
|
|
140
|
-
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
140
|
+
const itemsById = new Map(items.map((item) => [item.id.trim().toLowerCase(), item]));
|
|
141
|
+
const blockerIdsByItem = indexBlockedByIds(items);
|
|
142
|
+
const normalizedClosedId = closedId.trim().toLowerCase();
|
|
141
143
|
const blockedStatuses = statusRegistry.blocked_statuses;
|
|
142
144
|
return items
|
|
143
145
|
.filter((item) => blockedStatuses.has(item.status))
|
|
144
|
-
.map((item) => ({
|
|
145
|
-
|
|
146
|
+
.map((item) => ({
|
|
147
|
+
item,
|
|
148
|
+
blockerIds: blockerIdsByItem.get(item.id.trim().toLowerCase()),
|
|
149
|
+
}))
|
|
150
|
+
.filter(({ blockerIds }) => blockerIds.includes(normalizedClosedId))
|
|
146
151
|
.filter(({ blockerIds }) => blockerIds.every((blockerId) => {
|
|
147
|
-
if (blockerId ===
|
|
152
|
+
if (blockerId === normalizedClosedId) {
|
|
148
153
|
return true;
|
|
149
154
|
}
|
|
150
155
|
const blocker = itemsById.get(blockerId);
|
|
@@ -171,7 +176,7 @@ async function autoUnblockResolvedDependents(pmRoot, settings, items, closedId,
|
|
|
171
176
|
const dependencies = document.metadata.dependencies ?? [];
|
|
172
177
|
/* c8 ignore stop */
|
|
173
178
|
const remainingDependencies = dependencies.filter((dependency) => {
|
|
174
|
-
const dependencyId = dependency.id.trim();
|
|
179
|
+
const dependencyId = dependency.id.trim().toLowerCase();
|
|
175
180
|
return (dependency.kind !== "blocked_by" ||
|
|
176
181
|
!candidate.blocker_ids.includes(dependencyId));
|
|
177
182
|
});
|
|
@@ -450,4 +455,4 @@ export function runClose(id, closeReasonText, options, global) {
|
|
|
450
455
|
return closeItem(id, closeReasonText, options, global);
|
|
451
456
|
}
|
|
452
457
|
//# sourceMappingURL=close.js.map
|
|
453
|
-
//# debugId=
|
|
458
|
+
//# debugId=6e39a90e-8a26-5789-9de6-288900b6b418
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm create command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="af455a7c-354f-54be-99e0-833c9f2710c5")}catch(e){}}();
|
|
8
8
|
import { pathExists, removeFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, generateItemId, normalizeItemId, canonicalDocument, normalizeItemMetadata, serializeItemDocument, assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, resolvePriority, getFocusedItem, normalizeStatusInput, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, acquireLock, printError, buildInvalidTypeError, resolveTypeSynonym, collectRuntimeCreateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, PmCliError, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveCommandHandler, runActiveBeforeMutationHooks, runActiveOnWriteHooks, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, listAllItemMetadataLight, locateItem, createMutationGuardSdk, getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { requireTerminalReasonWithRecovery } from "../lifecycle-policy.js";
|
|
10
10
|
import { evaluateSimilarityGovernance, similarityAdvisoryWarnings, } from "../similarity.js";
|
|
@@ -19,6 +19,7 @@ import { COMMON_UNSET_FIELD_DEFINITIONS_AFTER_AUTHOR, COMMON_UNSET_FIELD_DEFINIT
|
|
|
19
19
|
import { ensureEnumValue } from "./recurrence-parsers.js";
|
|
20
20
|
import { assertDependencyEdgesAllowed, assertValidBareDependencyFlagValue, } from "../dependency-flag-validation.js";
|
|
21
21
|
import { normalizeDependencySeedId, normalizeDependencySourceKind, } from "../dependency-provenance.js";
|
|
22
|
+
import { resolveCanonicalRelationshipKind } from "../relationships.js";
|
|
22
23
|
import { parseEventEntries, parseReminderEntries, parseTypeOptionEntries, } from "./repeatable-metadata-parsers.js";
|
|
23
24
|
import { DEPENDENCY_KIND_VALUES, ISSUE_SEVERITY_VALUES, RISK_VALUES, SCOPE_VALUES, } from "../../types/index.js";
|
|
24
25
|
const CREATE_MODE_VALUES = ["strict", "progressive"];
|
|
@@ -188,17 +189,10 @@ function parseDependencies(raw, nowValue, prefix, fallbackAuthor) {
|
|
|
188
189
|
});
|
|
189
190
|
return { values, explicitEmpty: false };
|
|
190
191
|
}
|
|
191
|
-
const DEPENDENCY_KIND_INPUT_ALIASES = {
|
|
192
|
-
"blocked-by": "blocked_by",
|
|
193
|
-
depends_on: "blocked_by",
|
|
194
|
-
"depends-on": "blocked_by",
|
|
195
|
-
};
|
|
196
192
|
function normalizeDependencyKindInput(raw) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
const alias = DEPENDENCY_KIND_INPUT_ALIASES[raw.toLowerCase()];
|
|
201
|
-
return alias ?? raw;
|
|
193
|
+
return typeof raw === "string"
|
|
194
|
+
? (resolveCanonicalRelationshipKind(raw) ?? raw.trim())
|
|
195
|
+
: raw;
|
|
202
196
|
}
|
|
203
197
|
function looksLikeStructuredEntry(raw, keys) {
|
|
204
198
|
if (raw.startsWith("```") || raw.includes("\n")) {
|
|
@@ -1841,4 +1835,4 @@ export const _testOnlyCreateCommand = {
|
|
|
1841
1835
|
typeOptionExampleValue,
|
|
1842
1836
|
};
|
|
1843
1837
|
//# sourceMappingURL=create.js.map
|
|
1844
|
-
//# debugId=
|
|
1838
|
+
//# debugId=af455a7c-354f-54be-99e0-833c9f2710c5
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm plan command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dc87393e-61e3-5d43-a756-d5f156faf29e")}catch(e){}}();
|
|
8
8
|
import { pathExists, getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, resolveTypeName, EXIT_CODE, PmCliError, splitCommaList, nowIso, locateItem, mutateItem, readLocatedItem, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, isTerminalPlanMode, } from "../runtime-primitives.js";
|
|
9
9
|
import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
|
|
10
10
|
import { runCreate, } from "./create.js";
|
|
@@ -522,7 +522,10 @@ function nextActionsFor(planId, plan) {
|
|
|
522
522
|
tips.push(`pm plan approve ${planId} --message "ready to execute"`);
|
|
523
523
|
}
|
|
524
524
|
if (plan.steps_summary.completed === plan.steps_summary.total &&
|
|
525
|
-
plan.steps_summary.total > 0
|
|
525
|
+
plan.steps_summary.total > 0 &&
|
|
526
|
+
!isTerminalPlanMode(plan.mode) &&
|
|
527
|
+
plan.status !== "closed" &&
|
|
528
|
+
plan.status !== "canceled") {
|
|
526
529
|
tips.push(`pm close ${planId} "plan complete"`);
|
|
527
530
|
}
|
|
528
531
|
return tips;
|
|
@@ -1579,4 +1582,4 @@ export const _testOnlyPlanCommand = {
|
|
|
1579
1582
|
changedPlanMetadataFields,
|
|
1580
1583
|
};
|
|
1581
1584
|
//# sourceMappingURL=plan.js.map
|
|
1582
|
-
//# debugId=
|
|
1585
|
+
//# debugId=dc87393e-61e3-5d43-a756-d5f156faf29e
|
|
@@ -8,6 +8,7 @@ import type { ItemStatus, PmSettings } from "../../types/index.js";
|
|
|
8
8
|
import { hasListFilters } from "../query/list-filter-shared.js";
|
|
9
9
|
import { type ListOptions, type ListedItem } from "../query/list.js";
|
|
10
10
|
import { type UpdateCommandOptions } from "./update.js";
|
|
11
|
+
import { type PmCommandEffectReceipt } from "../cli-contracts/command-exit-contracts.js";
|
|
11
12
|
/** Documents the update many command options payload exchanged by command, SDK, and package integrations. */
|
|
12
13
|
export interface UpdateManyCommandOptions {
|
|
13
14
|
/** Lifecycle state reported for status. */
|
|
@@ -50,7 +51,7 @@ interface UpdateManyRollbackResultRow {
|
|
|
50
51
|
error?: string;
|
|
51
52
|
}
|
|
52
53
|
/** Documents the update many result payload exchanged by command, SDK, and package integrations. */
|
|
53
|
-
export interface UpdateManyResult {
|
|
54
|
+
export interface UpdateManyResult extends PmCommandEffectReceipt {
|
|
54
55
|
/** Value that configures or reports mode for this contract. */
|
|
55
56
|
mode: "dry_run" | "apply" | "rollback";
|
|
56
57
|
/** Number of matched entries represented by this result. */
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Implements the pm update many command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="67f8958d-60d5-5657-93ce-9803859acd9e")}catch(e){}}();
|
|
8
8
|
import { pathExists, createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, toItemRecord, applyAcceptanceCriteriaMutations, applyTagRemovals, mergeAdditiveTags, parseOptionalNonNegativeInteger, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, resolveItemTypeRegistry, resolveTypeName, collectRuntimeUpdateFieldValues, buildInvalidTypeError, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, stableValueEquals, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { parseStatusFilterCsv } from "../../core/item/status-filter.js";
|
|
10
10
|
import { hasListFilters } from "../query/list-filter-shared.js";
|
|
11
11
|
import { runList, } from "../query/list.js";
|
|
12
12
|
import { runRestore } from "./restore.js";
|
|
13
13
|
import { runUpdate } from "./update.js";
|
|
14
|
+
import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
|
|
14
15
|
const UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
15
16
|
const UPDATE_MANY_CHECKPOINT_SUBDIR = "update-many";
|
|
16
17
|
const NON_MUTATION_UPDATE_OPTION_KEYS = new Set([
|
|
@@ -519,6 +520,12 @@ const runUpdateManyRollback = async (params) => {
|
|
|
519
520
|
force: params.options.update?.force ?? true,
|
|
520
521
|
}, params.global));
|
|
521
522
|
return {
|
|
523
|
+
...derivePmBulkMutationEffect({
|
|
524
|
+
applied: rollback.restored_ids.length,
|
|
525
|
+
skipped: 0,
|
|
526
|
+
failed: rollback.failed_count,
|
|
527
|
+
unmatched: 0,
|
|
528
|
+
}),
|
|
522
529
|
mode: "rollback",
|
|
523
530
|
matched_count: checkpoint.items.length,
|
|
524
531
|
dry_run: false,
|
|
@@ -642,6 +649,8 @@ const buildUpdateManyPlan = async (params) => {
|
|
|
642
649
|
};
|
|
643
650
|
/** Builds the non-mutating preview response for a prepared update-many plan. */
|
|
644
651
|
const buildUpdateManyDryRunResult = (plan) => ({
|
|
652
|
+
outcome: "effect",
|
|
653
|
+
exit_code: EXIT_CODE.SUCCESS,
|
|
645
654
|
mode: "dry_run",
|
|
646
655
|
matched_count: plan.listed.items.length,
|
|
647
656
|
dry_run: true,
|
|
@@ -653,6 +662,12 @@ const buildUpdateManyDryRunResult = (plan) => ({
|
|
|
653
662
|
});
|
|
654
663
|
/** Builds the apply response for a plan whose rows are all already current. */
|
|
655
664
|
const buildUpdateManyNoopResult = (plan) => ({
|
|
665
|
+
...derivePmBulkMutationEffect({
|
|
666
|
+
applied: 0,
|
|
667
|
+
skipped: plan.listed.items.length,
|
|
668
|
+
failed: 0,
|
|
669
|
+
unmatched: plan.unmatchedIds?.length ?? 0,
|
|
670
|
+
}),
|
|
656
671
|
mode: "apply",
|
|
657
672
|
matched_count: plan.listed.items.length,
|
|
658
673
|
dry_run: false,
|
|
@@ -742,16 +757,25 @@ const applyUpdateManyPlan = async (params) => {
|
|
|
742
757
|
});
|
|
743
758
|
/** Counts apply rows with one terminal status. */
|
|
744
759
|
const countStatus = (status) => applied.rows.filter((row) => row.status === status).length;
|
|
760
|
+
const updatedCount = countStatus("updated");
|
|
761
|
+
const skippedCount = countStatus("skipped");
|
|
762
|
+
const failedCount = countStatus("failed");
|
|
745
763
|
return {
|
|
764
|
+
...derivePmBulkMutationEffect({
|
|
765
|
+
applied: updatedCount,
|
|
766
|
+
skipped: skippedCount,
|
|
767
|
+
failed: failedCount,
|
|
768
|
+
unmatched: params.plan.unmatchedIds?.length ?? 0,
|
|
769
|
+
}),
|
|
746
770
|
mode: "apply",
|
|
747
771
|
matched_count: params.plan.listed.items.length,
|
|
748
772
|
dry_run: false,
|
|
749
773
|
filters: params.plan.listed.filters,
|
|
750
774
|
planned_update_options: params.plan.updateSummary,
|
|
751
775
|
...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
|
|
752
|
-
updated_count:
|
|
753
|
-
skipped_count:
|
|
754
|
-
failed_count:
|
|
776
|
+
updated_count: updatedCount,
|
|
777
|
+
skipped_count: skippedCount,
|
|
778
|
+
failed_count: failedCount,
|
|
755
779
|
rows: applied.rows,
|
|
756
780
|
ids: applied.updatedIds,
|
|
757
781
|
...buildUnmatchedIdFields(params.plan),
|
|
@@ -804,4 +828,4 @@ export const _testOnlyUpdateManyCommand = {
|
|
|
804
828
|
toComparablePreviewValue,
|
|
805
829
|
};
|
|
806
830
|
//# sourceMappingURL=update-many.js.map
|
|
807
|
-
//# debugId=
|
|
831
|
+
//# debugId=67f8958d-60d5-5657-93ce-9803859acd9e
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm update command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="233df258-47b7-571a-b445-9eab0c811702")}catch(e){}}();
|
|
8
8
|
import { pathExists, COMMON_MUTATION_COMMAND_OPTION_KEYS, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, normalizeItemId, toItemRecord, buildInvalidTypeError, assertParentReferenceIsNotSelf, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, applyAcceptanceCriteriaMutations, applyTagRemovals, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, isTerminalStatus, collectRuntimeUpdateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, describeAllowedTransitions, evaluateTransition, resolveTypeWorkflows, EXIT_CODE, PmCliError, stableValueEquals, resolveIsoOrRelative, getActiveExtensionRegistrations, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, buildItemNotFoundError, listAllItemMetadataLight, locateItem, mutateItem, readLocatedItem, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { runClose } from "./close.js";
|
|
10
10
|
import { normalizeRiskInput, normalizeSeverityInput, parseConfidenceInput, parseRegressionInput, } from "./metadata-normalizers.js";
|
|
@@ -13,6 +13,7 @@ import { ensureEnumValue as ensureEnum } from "./recurrence-parsers.js";
|
|
|
13
13
|
import { parseEventEntries, parseReminderEntries, parseTypeOptionEntries, } from "./repeatable-metadata-parsers.js";
|
|
14
14
|
import { assertDependencyEdgesAllowed, assertValidBareDependencyFlagValue, } from "../dependency-flag-validation.js";
|
|
15
15
|
import { normalizeDependencySeedId, normalizeDependencySourceKind, } from "../dependency-provenance.js";
|
|
16
|
+
import { resolveCanonicalRelationshipKind } from "../relationships.js";
|
|
16
17
|
import { collectNewOrderingCycleWarnings } from "../graph/mutation-advisory.js";
|
|
17
18
|
import { DEPENDENCY_KIND_VALUES, ISSUE_SEVERITY_VALUES, RISK_VALUES, } from "../../types/index.js";
|
|
18
19
|
import { parseDocs, parseFiles, parseLogSeed, parseTests, requireStringOption, } from "./create.js";
|
|
@@ -386,25 +387,10 @@ function looksLikeStructuredDependencyEntry(raw) {
|
|
|
386
387
|
// key is rejected rather than swallowed as a bare item id (GH-258).
|
|
387
388
|
return looksLikeGenericKeyValueEntry(raw);
|
|
388
389
|
}
|
|
389
|
-
// pm-fl0c #4 (2026-05-28): `pm plan` accepts `depends_on` as a link kind
|
|
390
|
-
// (`PLAN_STEP_LINK_KIND_VALUES`) but `pm update --dep kind=depends_on` rejected
|
|
391
|
-
// it because `DEPENDENCY_KIND_VALUES` only lists `blocked_by`. The two terms
|
|
392
|
-
// are semantically identical from this side ("X depends on Y" === "X blocked
|
|
393
|
-
// by Y"), so we normalize input here rather than expanding the persisted enum
|
|
394
|
-
// — the stored kind stays canonical (`blocked_by`) and downstream consumers
|
|
395
|
-
// (closing logic, dependency graphs, blockers views) keep working unchanged.
|
|
396
|
-
const DEPENDENCY_KIND_INPUT_ALIASES = {
|
|
397
|
-
"blocked-by": "blocked_by",
|
|
398
|
-
depends_on: "blocked_by",
|
|
399
|
-
"depends-on": "blocked_by",
|
|
400
|
-
};
|
|
401
390
|
function normalizeDependencyKindInput(raw) {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const trimmed = raw.trim();
|
|
406
|
-
const alias = DEPENDENCY_KIND_INPUT_ALIASES[trimmed.toLowerCase()];
|
|
407
|
-
return alias ?? trimmed;
|
|
391
|
+
return typeof raw === "string"
|
|
392
|
+
? (resolveCanonicalRelationshipKind(raw) ?? raw.trim())
|
|
393
|
+
: raw;
|
|
408
394
|
}
|
|
409
395
|
function parseDependencyAdditions(raw, prefix, nowIso, fallbackAuthor) {
|
|
410
396
|
if (!raw) {
|
|
@@ -1874,4 +1860,4 @@ export const _testOnlyUpdateCommand = {
|
|
|
1874
1860
|
resolveRuntimeUnsetDefinition: (token, registry) => resolveRuntimeUnsetFieldDefinition(token, "update", registry),
|
|
1875
1861
|
};
|
|
1876
1862
|
//# sourceMappingURL=update.js.map
|
|
1877
|
-
//# debugId=
|
|
1863
|
+
//# debugId=233df258-47b7-571a-b445-9eab0c811702
|
|
@@ -30,7 +30,7 @@ export interface MergeDriverResult {
|
|
|
30
30
|
artifact: MergeDriverArtifact;
|
|
31
31
|
/** Path the merged content was written to. */
|
|
32
32
|
output_path: string;
|
|
33
|
-
/**
|
|
33
|
+
/** Invocation-side preference retained for non-item artifact compatibility. */
|
|
34
34
|
preferred: MergePreferredSide;
|
|
35
35
|
/** Unresolvable conflict labels: metadata field names (item), dotted key paths (json). Empty for history merges. */
|
|
36
36
|
conflicts: string[];
|
|
@@ -56,6 +56,7 @@ export interface MergeDriverResult {
|
|
|
56
56
|
item?: {
|
|
57
57
|
fields_from_theirs: string[];
|
|
58
58
|
union_fields: string[];
|
|
59
|
+
conflict_resolution: "stable_value_order";
|
|
59
60
|
};
|
|
60
61
|
/** JSON-merge key accounting; present only for the json artifact. */
|
|
61
62
|
json?: {
|
package/dist/sdk/merge/driver.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* merge never corrupts tracker storage the way raw conflict markers do.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
12
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e739a603-35c5-5df9-8d4b-3bbc0fe3e4fd")}catch(e){}}();
|
|
13
13
|
import { readFile, writeFile } from "node:fs/promises";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { getActiveExtensionRegistrations } from "../../core/extensions/index.js";
|
|
@@ -127,18 +127,21 @@ export async function runMergeDriver(options, global) {
|
|
|
127
127
|
schema: settings?.schema,
|
|
128
128
|
extensionFieldNames: collectRegisteredItemFieldNames(getActiveExtensionRegistrations()),
|
|
129
129
|
preferred,
|
|
130
|
+
conflictResolution: "stable_value_order",
|
|
130
131
|
});
|
|
131
132
|
merged = itemMerge.merged;
|
|
132
133
|
conflicts.push(...itemMerge.conflict_fields);
|
|
133
134
|
result.item = {
|
|
134
135
|
fields_from_theirs: itemMerge.fields_from_theirs,
|
|
135
136
|
union_fields: itemMerge.union_fields,
|
|
137
|
+
conflict_resolution: "stable_value_order",
|
|
136
138
|
};
|
|
137
139
|
if (options.itemPath !== undefined) {
|
|
138
140
|
receiptInput = {
|
|
139
141
|
cwd: process.cwd(),
|
|
140
142
|
itemPath: options.itemPath,
|
|
141
143
|
preferred,
|
|
144
|
+
conflictResolution: "stable_value_order",
|
|
142
145
|
fieldsFromTheirs: itemMerge.fields_from_theirs,
|
|
143
146
|
unionFields: itemMerge.union_fields,
|
|
144
147
|
decisions: itemMerge.conflict_decisions,
|
|
@@ -167,10 +170,10 @@ export async function runMergeDriver(options, global) {
|
|
|
167
170
|
const receiptGuidance = result.receipt === undefined
|
|
168
171
|
? 'Run "pm merge report" to inspect clone-local merge evidence.'
|
|
169
172
|
: `Run "pm merge report" and correlate receipt ${result.receipt.receipt_id} with item ${result.receipt.item_id}; clone-local discarded values are never copied into this result.`;
|
|
170
|
-
guidance.push(`Both branches changed ${conflicts.join(", ")}; the
|
|
173
|
+
guidance.push(`Both branches changed ${conflicts.join(", ")}; the item driver kept the direction-independent stable value. ${receiptGuidance} Review the merged file, re-apply the discarded change if needed, then "git add" it.`);
|
|
171
174
|
}
|
|
172
175
|
if (artifact === "history" && result.history?.reanchored) {
|
|
173
|
-
guidance.push('The merged history chain was re-anchored. Run "pm
|
|
176
|
+
guidance.push('The merged history chain was re-anchored. Run "pm merge reconcile --dry-run" to inspect the complete post-merge repair, then "pm merge reconcile" to apply it; use --force only after explicitly accepting reported discards.');
|
|
174
177
|
}
|
|
175
178
|
return {
|
|
176
179
|
ok: conflicts.length === 0,
|
|
@@ -184,4 +187,4 @@ export async function runMergeDriver(options, global) {
|
|
|
184
187
|
};
|
|
185
188
|
}
|
|
186
189
|
//# sourceMappingURL=driver.js.map
|
|
187
|
-
//# debugId=
|
|
190
|
+
//# debugId=e739a603-35c5-5df9-8d4b-3bbc0fe3e4fd
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
export { ITEM_LATEST_TIMESTAMP_FIELDS, ITEM_UNION_COLLECTION_FIELDS, mergeHistoryStreams, mergeItemDocuments, mergeJsonDocuments, mergeRelationshipEventStreams, type HistoryMergeResult, type HistoryMergeStrategy, type ItemDocumentMergeResult, type JsonDocumentMergeResult, type ItemMergeConflictDecision, type MergePreferredSide, type RelationshipStreamMergeResult, } from "./three-way.js";
|
|
10
10
|
export { listMergeReceipts, markMergeReceiptReconciled, runMergeReceiptReport, summarizeMergeReceipt, type MergeDecisionReceipt, type MergeDecisionReceiptSummary, type MergeReceiptReport, } from "./receipts.js";
|
|
11
11
|
export { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, type MergeDriverArtifact, type MergeDriverOptions, type MergeDriverResult, } from "./driver.js";
|
|
12
|
-
export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, runMergeInstall, type MergeFenceAuditResult, type MergeDriverConfigurationAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallResult, } from "./install.js";
|
|
12
|
+
export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, runMergeInstall, type MergeFenceAuditResult, type MergeDriverConfigurationAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallContextResolution, type MergeInstallResult, } from "./install.js";
|
|
13
13
|
export { runMergeReconcile, type MergeReconcileOptions, type MergeReconcileResult, } from "./reconcile.js";
|
package/dist/sdk/merge/index.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* this module so packages and hosts can reuse the same merge behavior.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
10
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a8072065-092c-564b-a84f-cf687f795a92")}catch(e){}}();
|
|
11
11
|
export { ITEM_LATEST_TIMESTAMP_FIELDS, ITEM_UNION_COLLECTION_FIELDS, mergeHistoryStreams, mergeItemDocuments, mergeJsonDocuments, mergeRelationshipEventStreams, } from "./three-way.js";
|
|
12
12
|
export { listMergeReceipts, markMergeReceiptReconciled, runMergeReceiptReport, summarizeMergeReceipt, } from "./receipts.js";
|
|
13
13
|
export { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, } from "./driver.js";
|
|
14
|
-
export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, runMergeInstall, } from "./install.js";
|
|
14
|
+
export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, runMergeInstall, } from "./install.js";
|
|
15
15
|
export { runMergeReconcile, } from "./reconcile.js";
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
17
|
-
//# debugId=
|
|
17
|
+
//# debugId=a8072065-092c-564b-a84f-cf687f795a92
|