@unbrained/pm-cli 2026.8.23 → 2026.8.24
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 +14 -1
- package/dist/cli/description-stdin.js +5 -4
- package/dist/cli/extension-command-help.d.ts +5 -0
- package/dist/cli/extension-command-help.js +6 -2
- package/dist/cli/help-content.d.ts +5 -0
- package/dist/cli/help-content.js +56 -3
- package/dist/cli/help-json-payload.d.ts +5 -2
- package/dist/cli/help-json-payload.js +57 -17
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +28 -3
- package/dist/cli/register-annotations.js +5 -5
- package/dist/cli/register-mutation.js +73 -27
- package/dist/cli-bundle/bundle-manifest.json +152 -152
- package/dist/cli-bundle/chunks/{chunk-JB4KZWBF.js → chunk-AGUL3HUT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EG6CLDZT.js → chunk-DJNJBWAQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-F3AI2JFL.js → chunk-I5Q7QSZX.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IW72J5FW.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-KXPMB2YL.js → chunk-L22NP5MA.js} +55 -55
- package/dist/cli-bundle/chunks/chunk-MKE6MD2K.js +36 -0
- package/dist/cli-bundle/chunks/{chunk-QDVHNHAQ.js → chunk-NXBFO63A.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TEQDR5KI.js +202 -0
- package/dist/cli-bundle/chunks/{chunk-KPH73XXJ.js → chunk-X7WWQDYQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TFI5V5N2.js → chunk-YOLLRCLY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HWZ6CELB.js → chunk-ZAVCS2GH.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-UJB5FMV2.js → register-list-query-37A4P6O4.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-TBJDHYIT.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-RXIJIYXC.js → register-operations-WRZNEBUM.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-GFUZEKRE.js → register-setup-H4PDLACD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-AUFH5H35.js → chunk-4WP7LNE3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LYVSW5VM.js → chunk-6MUTDXMP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-6Z24ZMU3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OGLQBL46.js → chunk-BFA6KKCI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QGFNI65N.js → chunk-CWCN5RLO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UYRFYCDQ.js → chunk-FCTT4CZU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IFLWKY2R.js → chunk-GJR6YEMR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-37Z4OEAP.js → chunk-IMWTYKII.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-R27IDGHD.js → chunk-IZNRRCU3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JOWDB2MH.js → chunk-MNPECIRL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OFVUGTLJ.js → chunk-O4ZXNJMT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q63PSLO4.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QBP5FSBX.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OY7QAV4Y.js → chunk-QV5UP27O.js} +46 -46
- package/dist/cli-bundle/focused-chunks/{chunk-3UPTYG44.js → chunk-RASVBJX5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5S7E72FY.js → chunk-RPRLENVA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TOFVXBWA.js +19 -0
- package/dist/cli-bundle/focused-chunks/{chunk-FZS4H32O.js → chunk-WZLSSGEU.js} +2 -2
- package/dist/cli-bundle/main.js +18 -17
- 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 +41 -41
- 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 +33 -33
- 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 +6 -5
- package/dist/core/extensions/command-metadata-contract.d.ts +10 -0
- package/dist/core/extensions/command-metadata-contract.js +23 -0
- package/dist/core/extensions/command-visibility-tier.js +12 -2
- package/dist/core/extensions/extension-types.d.ts +6 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +4 -3
- package/dist/core/io/body-file.js +7 -2
- package/dist/core/io/bulk-ids-input.d.ts +24 -0
- package/dist/core/io/bulk-ids-input.js +113 -0
- package/dist/core/item/parse.d.ts +22 -2
- package/dist/core/item/parse.js +97 -4
- package/dist/mcp/server.d.ts +3 -2
- package/dist/mcp/server.js +16 -9
- package/dist/sdk/agent/refusal-closure-census.d.ts +66 -0
- package/dist/sdk/agent/refusal-closure-census.js +144 -0
- package/dist/sdk/agent-capability-contracts.d.ts +34 -1
- package/dist/sdk/agent-capability-contracts.js +104 -6
- package/dist/sdk/annotations.d.ts +2 -0
- package/dist/sdk/annotations.js +25 -7
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
- package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +4 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.js +2 -2
- package/dist/sdk/comments.js +15 -7
- package/dist/sdk/flag-invocation-contracts.d.ts +2 -0
- package/dist/sdk/flag-invocation-contracts.js +28 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +71 -38
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +38 -2
- package/dist/sdk/guide-topics.d.ts +0 -5
- package/dist/sdk/guide-topics.js +28 -2
- package/dist/sdk/history-compact.d.ts +2 -1
- package/dist/sdk/history-compact.js +24 -5
- package/dist/sdk/history-mcp.js +11 -10
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/item-transaction.js +19 -12
- package/dist/sdk/lifecycle/append.js +4 -4
- package/dist/sdk/lifecycle/close-many.js +16 -7
- package/dist/sdk/lifecycle/create.js +29 -21
- package/dist/sdk/lifecycle/plan.js +24 -6
- package/dist/sdk/lifecycle/update-many.js +15 -8
- package/dist/sdk/lifecycle/update.d.ts +2 -0
- package/dist/sdk/lifecycle/update.js +34 -24
- package/dist/sdk/runtime-extended-actions.js +5 -3
- package/dist/sdk/runtime-input.d.ts +4 -0
- package/dist/sdk/runtime-input.js +98 -23
- package/dist/sdk/runtime-primitives.d.ts +2 -1
- package/dist/sdk/runtime-primitives.js +4 -3
- package/dist/sdk/runtime.js +7 -20
- package/dist/sdk/scheduling-shortcuts.js +5 -3
- package/dist/sdk/structured-mutations.js +10 -3
- package/dist/sdk/workspace-contracts.d.ts +3 -0
- package/dist/sdk/workspace-contracts.js +3 -2
- package/docs/README.md +2 -0
- package/docs/RELEASING.md +40 -21
- package/docs/SCRIPTING.md +62 -3
- package/docs/SDK.md +8 -0
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +17 -0
- package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +355 -0
- package/marketplace.json +2 -2
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/README.md +9 -11
- package/packages/pm-command-kit/extensions/command-kit/index.ts +3 -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/extensions/guide-shell/index.ts +10 -0
- 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/scripts/generate-agent-capability-surfaces.mjs +27 -1
- package/sdk/public-surface.json +215 -11
- package/dist/cli-bundle/chunks/chunk-3ENVHX6C.js +0 -36
- package/dist/cli-bundle/chunks/chunk-DW2CGEMU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HZBMLSZI.js +0 -201
- package/dist/cli-bundle/chunks/register-mutation-NX5XE4VX.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-E7X25GC3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-FQCSTBWE.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-MRCNF3U6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZHVA42R5.js +0 -18
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Implements the pm append 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]="b4b1f63b-12f9-574c-8e92-a5cc9c6178c1")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
|
-
import { EXIT_CODE, PmCliError, resolveAuthor, toItemRecord, createStdinTokenResolver, mutateItem, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
9
|
+
import { EXIT_CODE, PmCliError, resolveAuthor, toItemRecord, createStdinTokenResolver, shouldResolveMutationStdinTokenField, mutateItem, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
10
10
|
/** Implements run append for the public runtime surface of this module. */
|
|
11
11
|
export async function runAppend(id, options, global) {
|
|
12
12
|
if (options.body === undefined) {
|
|
@@ -18,7 +18,7 @@ export async function runAppend(id, options, global) {
|
|
|
18
18
|
const settings = await readSettings(pmRoot);
|
|
19
19
|
const author = resolveAuthor(options.author, settings.author_default);
|
|
20
20
|
// options.body is guaranteed defined by the guard above, so resolveValue returns a defined string.
|
|
21
|
-
const bodyInput = await stdinResolver.resolveValue(options.body, "--body");
|
|
21
|
+
const bodyInput = await stdinResolver.resolveValue(options.body, "--body", shouldResolveMutationStdinTokenField(options, "body"));
|
|
22
22
|
const appended = bodyInput.trim();
|
|
23
23
|
if (appended.length === 0) {
|
|
24
24
|
throw new PmCliError("--body text cannot be empty; append requires non-blank content and empty appends would only rewrite updated_at.", EXIT_CODE.USAGE, {
|
|
@@ -51,4 +51,4 @@ export async function runAppend(id, options, global) {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=append.js.map
|
|
54
|
-
//# debugId=
|
|
54
|
+
//# debugId=b4b1f63b-12f9-574c-8e92-a5cc9c6178c1
|
|
@@ -4,7 +4,7 @@
|
|
|
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]="a97a3cf0-beef-5967-8f5b-2372a6c9f2f7")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
9
|
import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, resolveAuthor, nowIso, listAllItemMetadataLight, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
10
10
|
import { runClose } from "./close.js";
|
|
@@ -280,7 +280,14 @@ async function buildCloseManyPlanContext(params) {
|
|
|
280
280
|
.map((entry) => entry.trim())
|
|
281
281
|
.filter((entry) => entry.length > 0)),
|
|
282
282
|
];
|
|
283
|
-
const
|
|
283
|
+
const existenceItems = requestedIds.length === 0
|
|
284
|
+
? []
|
|
285
|
+
: (await runList(undefined, {
|
|
286
|
+
ids: requestedIds.join(","),
|
|
287
|
+
noTruncate: true,
|
|
288
|
+
full: true,
|
|
289
|
+
}, params.global)).items;
|
|
290
|
+
const existingIds = new Set(existenceItems.map((item) => item.id));
|
|
284
291
|
const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);
|
|
285
292
|
return {
|
|
286
293
|
pmRoot: params.pmRoot,
|
|
@@ -291,7 +298,9 @@ async function buildCloseManyPlanContext(params) {
|
|
|
291
298
|
force,
|
|
292
299
|
listed,
|
|
293
300
|
matched,
|
|
294
|
-
unmatchedIds: requestedIds.
|
|
301
|
+
unmatchedIds: requestedIds.length === 0
|
|
302
|
+
? undefined
|
|
303
|
+
: requestedIds.filter((id) => !existingIds.has(id)),
|
|
295
304
|
planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),
|
|
296
305
|
};
|
|
297
306
|
}
|
|
@@ -309,7 +318,7 @@ function buildCloseManyDryRunResult(context) {
|
|
|
309
318
|
: {}),
|
|
310
319
|
item_plans: context.planRows,
|
|
311
320
|
ids: [],
|
|
312
|
-
...(context.unmatchedIds
|
|
321
|
+
...(context.unmatchedIds !== undefined
|
|
313
322
|
? {
|
|
314
323
|
unmatched_ids: context.unmatchedIds,
|
|
315
324
|
unmatched_count: context.unmatchedIds.length,
|
|
@@ -392,7 +401,7 @@ export async function runCloseMany(options, global) {
|
|
|
392
401
|
applied: closedCount,
|
|
393
402
|
skipped: skippedCount,
|
|
394
403
|
failed: failedCount,
|
|
395
|
-
unmatched: context.unmatchedIds
|
|
404
|
+
unmatched: context.unmatchedIds?.length ?? 0,
|
|
396
405
|
}),
|
|
397
406
|
mode: "apply",
|
|
398
407
|
matched_count: context.matched.length,
|
|
@@ -408,7 +417,7 @@ export async function runCloseMany(options, global) {
|
|
|
408
417
|
failed_count: failedCount,
|
|
409
418
|
rows,
|
|
410
419
|
ids: closedIds,
|
|
411
|
-
...(context.unmatchedIds
|
|
420
|
+
...(context.unmatchedIds !== undefined
|
|
412
421
|
? {
|
|
413
422
|
unmatched_ids: context.unmatchedIds,
|
|
414
423
|
unmatched_count: context.unmatchedIds.length,
|
|
@@ -427,4 +436,4 @@ export const _testOnly = {
|
|
|
427
436
|
resolveReason,
|
|
428
437
|
};
|
|
429
438
|
//# sourceMappingURL=close-many.js.map
|
|
430
|
-
//# debugId=
|
|
439
|
+
//# debugId=a97a3cf0-beef-5967-8f5b-2372a6c9f2f7
|
|
@@ -4,9 +4,10 @@
|
|
|
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]="02c41ea1-8d4e-5239-b95a-a07210b63d7f")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
|
-
import {
|
|
9
|
+
import { resolveMutationStdinTokenFields } from "../../core/item/parse.js";
|
|
10
|
+
import { removeFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, generateItemId, normalizeItemId, canonicalDocument, normalizeItemMetadata, serializeItemDocument, assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, assertNoUnknownCsvKeys, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, shouldResolveMutationStdinTokens, transferMutationStdinTokenPolicy, resolvePriority, getFocusedItem, normalizeStatusInput, isTerminalStatus, 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, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
10
11
|
import { requireTerminalReasonWithRecovery } from "../lifecycle-policy.js";
|
|
11
12
|
import { evaluateSimilarityGovernance, similarityAdvisoryWarnings, } from "../similarity.js";
|
|
12
13
|
import { acquireItemMetadataDerivedIndexLock, refreshItemMetadataDerivedIndex, } from "../item-metadata-index.js";
|
|
@@ -134,7 +135,7 @@ function normalizeLegacyNoneCreateOptions(options) {
|
|
|
134
135
|
normalized[optionKey] = undefined;
|
|
135
136
|
/* c8 ignore stop */
|
|
136
137
|
}
|
|
137
|
-
return applyLegacyNoneCollectionNormalizers(normalized, CREATE_LEGACY_NONE_COLLECTION_NORMALIZERS);
|
|
138
|
+
return transferMutationStdinTokenPolicy(options, applyLegacyNoneCollectionNormalizers(normalized, CREATE_LEGACY_NONE_COLLECTION_NORMALIZERS));
|
|
138
139
|
}
|
|
139
140
|
function parseOptionalString(value) {
|
|
140
141
|
if (value === undefined)
|
|
@@ -544,22 +545,29 @@ function parseTypeOptions(raw) {
|
|
|
544
545
|
};
|
|
545
546
|
}
|
|
546
547
|
async function resolveCreateStdinInputs(options) {
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
548
|
+
const scalarFields = [
|
|
549
|
+
["body", "--body"],
|
|
550
|
+
["description", "--description"],
|
|
551
|
+
];
|
|
552
|
+
const listFields = [
|
|
553
|
+
["dep", "--dep"],
|
|
554
|
+
["comment", "--comment"],
|
|
555
|
+
["note", "--note"],
|
|
556
|
+
["learning", "--learning"],
|
|
557
|
+
["file", "--file"],
|
|
558
|
+
["test", "--test"],
|
|
559
|
+
["doc", "--doc"],
|
|
560
|
+
["reminder", "--reminder"],
|
|
561
|
+
["event", "--event"],
|
|
562
|
+
["typeOption", "--type-option"],
|
|
563
|
+
["field", "--field"],
|
|
564
|
+
];
|
|
565
|
+
return await resolveMutationStdinTokenFields(options, scalarFields, listFields);
|
|
566
|
+
}
|
|
567
|
+
async function resolveCreateTransportInputs(options) {
|
|
568
|
+
return shouldResolveMutationStdinTokens(options)
|
|
569
|
+
? await resolveCreateStdinInputs(options)
|
|
570
|
+
: options;
|
|
563
571
|
}
|
|
564
572
|
function resolveCreateMode(createMode, defaultMode) {
|
|
565
573
|
if (createMode === undefined) {
|
|
@@ -1584,7 +1592,7 @@ async function writeCreatedItem(params) {
|
|
|
1584
1592
|
}
|
|
1585
1593
|
/** Implements run create for the public runtime surface of this module. */
|
|
1586
1594
|
export async function runCreate(options, global) {
|
|
1587
|
-
let resolvedOptions = normalizeLegacyNoneCreateOptions(await
|
|
1595
|
+
let resolvedOptions = normalizeLegacyNoneCreateOptions(await resolveCreateTransportInputs(options));
|
|
1588
1596
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
1589
1597
|
await ensureInitHasRun(pmRoot);
|
|
1590
1598
|
const settings = await readSettings(pmRoot);
|
|
@@ -1918,4 +1926,4 @@ export const _testOnlyCreateCommand = {
|
|
|
1918
1926
|
typeOptionExampleValue,
|
|
1919
1927
|
};
|
|
1920
1928
|
//# sourceMappingURL=create.js.map
|
|
1921
|
-
//# debugId=
|
|
1929
|
+
//# debugId=02c41ea1-8d4e-5239-b95a-a07210b63d7f
|
|
@@ -4,9 +4,9 @@
|
|
|
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]="f7e870b6-fd80-5742-bc81-826d8f102d30")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
|
-
import { getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, resolveTypeName, EXIT_CODE, PmCliError, splitCommaList, nowIso, locateItem, mutateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, isTerminalPlanMode, } from "../runtime-primitives.js";
|
|
9
|
+
import { getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, resolveTypeName, EXIT_CODE, PmCliError, splitCommaList, nowIso, locateItem, mutateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, isTerminalPlanMode, preserveMutationStdinTokenFields, transferMutationStdinTokenPolicy, } from "../runtime-primitives.js";
|
|
10
10
|
import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
|
|
11
11
|
import { runCreate, } from "./create.js";
|
|
12
12
|
import { createUnknownSubcommandError } from "../agent/subcommand-recovery.js";
|
|
@@ -692,6 +692,12 @@ function buildInitialSteps(options) {
|
|
|
692
692
|
hasPerStepDetailOptions: hasDetailOptions,
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
|
+
function preservePlanCreateStdinPolicy(source, createOptions, derivedLiteralFields = []) {
|
|
696
|
+
transferMutationStdinTokenPolicy(source, createOptions);
|
|
697
|
+
if (derivedLiteralFields.length > 0) {
|
|
698
|
+
preserveMutationStdinTokenFields(createOptions, derivedLiteralFields);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
695
701
|
async function planCreate(options, global, ctx) {
|
|
696
702
|
const title = options.title?.trim();
|
|
697
703
|
if (!title) {
|
|
@@ -738,6 +744,7 @@ async function planCreate(options, global, ctx) {
|
|
|
738
744
|
message: options.message ??
|
|
739
745
|
(fromSearch ? `plan create (search: ${fromSearch})` : `plan create`),
|
|
740
746
|
};
|
|
747
|
+
preservePlanCreateStdinPolicy(options, createOptions);
|
|
741
748
|
const createResult = await runCreate(createOptions, global);
|
|
742
749
|
// Seed every Plan-specific field before assigning the requested owner so
|
|
743
750
|
// cross-owner creation cannot reject a follow-up enrichment and leave a
|
|
@@ -1380,7 +1387,7 @@ async function createMaterializedStepItems(params) {
|
|
|
1380
1387
|
materializeFields[fieldKey] = value;
|
|
1381
1388
|
}
|
|
1382
1389
|
for (const step of params.targets) {
|
|
1383
|
-
const
|
|
1390
|
+
const createOptions = {
|
|
1384
1391
|
...materializeFields,
|
|
1385
1392
|
title: step.title,
|
|
1386
1393
|
description: step.body?.trim() || step.title,
|
|
@@ -1391,7 +1398,15 @@ async function createMaterializedStepItems(params) {
|
|
|
1391
1398
|
message: params.options.message ??
|
|
1392
1399
|
`materialized from plan ${params.planItemId} step ${step.id}`,
|
|
1393
1400
|
dep: buildMaterializeDependencies(params.parent, params.planItemId, step),
|
|
1394
|
-
}
|
|
1401
|
+
};
|
|
1402
|
+
preservePlanCreateStdinPolicy(params.options, createOptions, [
|
|
1403
|
+
"description",
|
|
1404
|
+
...Object.keys(materializeFields),
|
|
1405
|
+
]);
|
|
1406
|
+
const created = await runCreate(createOptions, {
|
|
1407
|
+
...{},
|
|
1408
|
+
path: params.pmRoot,
|
|
1409
|
+
});
|
|
1395
1410
|
materialized.push({
|
|
1396
1411
|
id: created.item.id,
|
|
1397
1412
|
title: created.item.title,
|
|
@@ -1489,7 +1504,10 @@ function normalizePlanStepAliasInput(input) {
|
|
|
1489
1504
|
if (stepValues.length === 1 && !input.options.stepTitle?.trim()) {
|
|
1490
1505
|
return {
|
|
1491
1506
|
...input,
|
|
1492
|
-
options:
|
|
1507
|
+
options: transferMutationStdinTokenPolicy(input.options, {
|
|
1508
|
+
...input.options,
|
|
1509
|
+
stepTitle: stepValues[0],
|
|
1510
|
+
}),
|
|
1493
1511
|
};
|
|
1494
1512
|
}
|
|
1495
1513
|
return input;
|
|
@@ -1586,4 +1604,4 @@ export const _testOnlyPlanCommand = {
|
|
|
1586
1604
|
changedPlanMetadataFields,
|
|
1587
1605
|
};
|
|
1588
1606
|
//# sourceMappingURL=plan.js.map
|
|
1589
|
-
//# debugId=
|
|
1607
|
+
//# debugId=f7e870b6-fd80-5742-bc81-826d8f102d30
|
|
@@ -4,15 +4,15 @@
|
|
|
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]="fada7a33-ad1d-54f1-ae03-c5f8e4568d75")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
|
-
import { 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, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
|
+
import { 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, preserveMutationStdinTokenLiterals, resolveIsoOrRelative, getActiveExtensionRegistrations, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
10
10
|
import { assertDependencyTargetsResolvable } from "../dependency-flag-validation.js";
|
|
11
11
|
import { parseStatusFilterCsv } from "../../core/item/status-filter.js";
|
|
12
12
|
import { hasListFilters } from "../query/list-filter-shared.js";
|
|
13
13
|
import { runList, } from "../query/list.js";
|
|
14
14
|
import { runRestore } from "./restore.js";
|
|
15
|
-
import { assertUpdateMutationOptionCombinations, parseDependencyAdditions, runUpdate, } from "./update.js";
|
|
15
|
+
import { assertUpdateMutationOptionCombinations, parseDependencyAdditions, resolveUpdateTransportOptions, runUpdate, } from "./update.js";
|
|
16
16
|
import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
|
|
17
17
|
const UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
18
18
|
const UPDATE_MANY_CHECKPOINT_SUBDIR = "update-many";
|
|
@@ -703,11 +703,12 @@ const applyUpdateManyRows = async (params) => {
|
|
|
703
703
|
continue;
|
|
704
704
|
}
|
|
705
705
|
try {
|
|
706
|
-
const
|
|
706
|
+
const rowUpdateOptions = preserveMutationStdinTokenLiterals({
|
|
707
707
|
...params.options.update,
|
|
708
708
|
message: updateMessage,
|
|
709
709
|
runtimeFieldCommands: ["update_many"],
|
|
710
|
-
}
|
|
710
|
+
});
|
|
711
|
+
const result = await runUpdate(item.id, rowUpdateOptions, params.global);
|
|
711
712
|
rows.push({
|
|
712
713
|
id: item.id,
|
|
713
714
|
status: "updated",
|
|
@@ -786,6 +787,12 @@ const applyUpdateManyPlan = async (params) => {
|
|
|
786
787
|
export const runUpdateMany = async (options, global) => {
|
|
787
788
|
const runtime = await loadUpdateManyRuntimeContext(global);
|
|
788
789
|
const rollbackId = typeof options.rollback === "string" ? options.rollback : undefined;
|
|
790
|
+
if (rollbackId === undefined) {
|
|
791
|
+
options = {
|
|
792
|
+
...options,
|
|
793
|
+
update: preserveMutationStdinTokenLiterals(await resolveUpdateTransportOptions(options.update)),
|
|
794
|
+
};
|
|
795
|
+
}
|
|
789
796
|
const updateSummary = sanitizeUpdateOptionsForSummary(options.update);
|
|
790
797
|
rejectBlankIdsFilter(options.list);
|
|
791
798
|
if (rollbackId !== undefined) {
|
|
@@ -797,8 +804,8 @@ export const runUpdateMany = async (options, global) => {
|
|
|
797
804
|
updateSummary,
|
|
798
805
|
});
|
|
799
806
|
}
|
|
800
|
-
if (!hasAnyUpdateMutationInput(options.update)) {
|
|
801
|
-
throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`, EXIT_CODE.USAGE);
|
|
807
|
+
if (!hasAnyUpdateMutationInput(options.update) && options.dryRun !== true) {
|
|
808
|
+
throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}), or pass --dry-run for a filter-only preview.`, EXIT_CODE.USAGE);
|
|
802
809
|
}
|
|
803
810
|
assertPlannedUpdateValuesValid(options.update, runtime.settings, runtime.statusRegistry, runtime.pmRoot);
|
|
804
811
|
assertUpdateMutationOptionCombinations(options.update);
|
|
@@ -852,4 +859,4 @@ export const _testOnlyUpdateManyCommand = {
|
|
|
852
859
|
toComparablePreviewValue,
|
|
853
860
|
};
|
|
854
861
|
//# sourceMappingURL=update-many.js.map
|
|
855
|
-
//# debugId=
|
|
862
|
+
//# debugId=fada7a33-ad1d-54f1-ae03-c5f8e4568d75
|
|
@@ -159,6 +159,8 @@ interface UpdateMutationContext {
|
|
|
159
159
|
author: string;
|
|
160
160
|
pmRoot: string;
|
|
161
161
|
}
|
|
162
|
+
/** Resolve update stdin tokens once while preserving transport-marked literals. */
|
|
163
|
+
export declare function resolveUpdateTransportOptions(options: UpdateCommandOptions): Promise<UpdateCommandOptions>;
|
|
162
164
|
/** Validate mutually exclusive and required update mutation option combinations. */
|
|
163
165
|
export declare function assertUpdateMutationOptionCombinations(options: UpdateCommandOptions): void;
|
|
164
166
|
type UpdateStatusMutationContext = Pick<UpdateMutationContext, "options" | "statusRegistry" | "clearItemMetadataKeys" | "nowIso">;
|
|
@@ -4,9 +4,10 @@
|
|
|
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]="6865ca88-7ca1-52fd-86fb-2a3439abeafa")}catch(e){}}();
|
|
8
8
|
import { assertInitializedTracker } from "../environment/tracker-preflight.js";
|
|
9
|
-
import {
|
|
9
|
+
import { resolveMutationStdinTokenFields } from "../../core/item/parse.js";
|
|
10
|
+
import { COMMON_MUTATION_COMMAND_OPTION_KEYS, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, normalizeItemId, toItemRecord, buildInvalidTypeError, assertParentReferenceIsNotSelf, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, applyAcceptanceCriteriaMutations, applyTagRemovals, assertNoUnknownCsvKeys, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, shouldResolveMutationStdinTokens, transferMutationStdinTokenPolicy, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, isTerminalStatus, collectRuntimeUpdateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, describeAllowedTransitions, evaluateTransition, resolveTypeWorkflows, EXIT_CODE, PmCliError, stableValueEquals, resolveIsoOrRelative, getActiveExtensionRegistrations, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, buildItemNotFoundError, listAllItemMetadataLight, locateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
10
11
|
import { mutateItemWithHistoryContextResolver } from "../../core/store/item-store.js";
|
|
11
12
|
import { runClose } from "./close.js";
|
|
12
13
|
import { normalizeRiskInput, normalizeSeverityInput, parseConfidenceInput, parseRegressionInput, } from "./metadata-normalizers.js";
|
|
@@ -108,7 +109,7 @@ function normalizeLegacyNoneUpdateOptions(options) {
|
|
|
108
109
|
normalized[optionKey] = undefined;
|
|
109
110
|
/* c8 ignore stop */
|
|
110
111
|
}
|
|
111
|
-
return applyLegacyNoneCollectionNormalizers(normalized, UPDATE_LEGACY_NONE_COLLECTION_NORMALIZERS);
|
|
112
|
+
return transferMutationStdinTokenPolicy(options, applyLegacyNoneCollectionNormalizers(normalized, UPDATE_LEGACY_NONE_COLLECTION_NORMALIZERS));
|
|
112
113
|
}
|
|
113
114
|
function parseUpdateUnsetTargets(raw, runtimeFieldRegistry, extensionFieldNames = []) {
|
|
114
115
|
return parseCommandUnsetTargets({
|
|
@@ -858,23 +859,31 @@ function applyUpdateScalarMutations(definitions, options, context) {
|
|
|
858
859
|
}
|
|
859
860
|
}
|
|
860
861
|
async function resolveStdinUpdateOptions(options) {
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
862
|
+
const scalarFields = [
|
|
863
|
+
["body", "--body"],
|
|
864
|
+
["description", "--description"],
|
|
865
|
+
];
|
|
866
|
+
const listFields = [
|
|
867
|
+
["dep", "--dep"],
|
|
868
|
+
["depRemove", "--dep-remove"],
|
|
869
|
+
["comment", "--comment"],
|
|
870
|
+
["note", "--note"],
|
|
871
|
+
["learning", "--learning"],
|
|
872
|
+
["file", "--file"],
|
|
873
|
+
["test", "--test"],
|
|
874
|
+
["doc", "--doc"],
|
|
875
|
+
["reminder", "--reminder"],
|
|
876
|
+
["event", "--event"],
|
|
877
|
+
["typeOption", "--type-option"],
|
|
878
|
+
["field", "--field"],
|
|
879
|
+
];
|
|
880
|
+
return normalizeLegacyNoneUpdateOptions(await resolveMutationStdinTokenFields(options, scalarFields, listFields));
|
|
881
|
+
}
|
|
882
|
+
/** Resolve update stdin tokens once while preserving transport-marked literals. */
|
|
883
|
+
export async function resolveUpdateTransportOptions(options) {
|
|
884
|
+
return shouldResolveMutationStdinTokens(options)
|
|
885
|
+
? await resolveStdinUpdateOptions(options)
|
|
886
|
+
: normalizeLegacyNoneUpdateOptions(options);
|
|
878
887
|
}
|
|
879
888
|
function buildClearCollectionDefinitions(options) {
|
|
880
889
|
return [
|
|
@@ -1220,12 +1229,13 @@ async function routeCloseStatusUpdate(context) {
|
|
|
1220
1229
|
const routeWarnings = [];
|
|
1221
1230
|
let preChangedFields = [];
|
|
1222
1231
|
if (otherFieldKeys.length > 0) {
|
|
1223
|
-
const
|
|
1232
|
+
const preUpdateOptions = transferMutationStdinTokenPolicy(context.options, {
|
|
1224
1233
|
...context.options,
|
|
1225
1234
|
status: undefined,
|
|
1226
1235
|
closeReason: undefined,
|
|
1227
1236
|
message: undefined,
|
|
1228
|
-
}
|
|
1237
|
+
});
|
|
1238
|
+
const preUpdate = await runUpdate(context.id, preUpdateOptions, context.global);
|
|
1229
1239
|
preChangedFields = preUpdate.changed_fields;
|
|
1230
1240
|
routeWarnings.push(...preUpdate.warnings);
|
|
1231
1241
|
}
|
|
@@ -1804,7 +1814,7 @@ function mutateUpdateDocument(document, context) {
|
|
|
1804
1814
|
}
|
|
1805
1815
|
/** Implements run update for the public runtime surface of this module. */
|
|
1806
1816
|
async function runUpdateWithContext(id, options, global, execution = {}) {
|
|
1807
|
-
options = await
|
|
1817
|
+
options = await resolveUpdateTransportOptions(options);
|
|
1808
1818
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
1809
1819
|
await assertUpdateTrackerInitialized(pmRoot);
|
|
1810
1820
|
const settings = await readSettings(pmRoot);
|
|
@@ -2111,4 +2121,4 @@ export const _testOnlyUpdateCommand = {
|
|
|
2111
2121
|
resolveRuntimeUnsetDefinition: (token, registry) => resolveRuntimeUnsetFieldDefinition(token, "update", registry),
|
|
2112
2122
|
};
|
|
2113
2123
|
//# sourceMappingURL=update.js.map
|
|
2114
|
-
//# debugId=
|
|
2124
|
+
//# debugId=6865ca88-7ca1-52fd-86fb-2a3439abeafa
|
|
@@ -1,7 +1,8 @@
|
|
|
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]="8a3a82a1-9e3d-555f-9111-3c3e19887f75")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
4
4
|
import { PmCliError } from "../core/shared/errors.js";
|
|
5
|
+
import { transferMutationStdinTokenPolicy, } from "./runtime-primitives.js";
|
|
5
6
|
import { createUnknownSubcommandError } from "./agent/subcommand-recovery.js";
|
|
6
7
|
import { resolvePmRoot } from "../core/store/paths.js";
|
|
7
8
|
import { runEval } from "./eval.js";
|
|
@@ -14,7 +15,8 @@ import { parseRuntimeInteger, readRuntimeString, readRuntimeStringArray, } from
|
|
|
14
15
|
import { runEvent, runMeet, runRemind, } from "./scheduling-shortcuts.js";
|
|
15
16
|
import { createWorkspaceSnapshot, deleteWorkspaceSnapshot, inspectWorkspaceSnapshot, listWorkspaceSnapshots, planWorkspaceSnapshotRestore, restoreWorkspaceSnapshotWithRecovery, } from "./workspace-snapshot.js";
|
|
16
17
|
function mergedInput(context) {
|
|
17
|
-
|
|
18
|
+
const input = { ...context.args, ...context.options };
|
|
19
|
+
return transferMutationStdinTokenPolicy(context.options, input);
|
|
18
20
|
}
|
|
19
21
|
function requiredString(input, key) {
|
|
20
22
|
const value = readRuntimeString(input, key);
|
|
@@ -169,4 +171,4 @@ export function runRuntimeSchedulingAction(context) {
|
|
|
169
171
|
return runRemind(title, input, context.global);
|
|
170
172
|
}
|
|
171
173
|
//# sourceMappingURL=runtime-extended-actions.js.map
|
|
172
|
-
//# debugId=
|
|
174
|
+
//# debugId=8a3a82a1-9e3d-555f-9111-3c3e19887f75
|
|
@@ -3,6 +3,10 @@ import type { CloseManyCommandOptions } from "./lifecycle/close-many.js";
|
|
|
3
3
|
import type { UpdateManyCommandOptions } from "./lifecycle/update-many.js";
|
|
4
4
|
import type { GraphCommandOptions } from "./graph/run.js";
|
|
5
5
|
import type { ListOptions } from "./query/list.js";
|
|
6
|
+
/** Mark an action object decoded from the MCP JSON-RPC transport. */
|
|
7
|
+
export declare function markMcpMutationTransportInput<T extends object>(input: T): T;
|
|
8
|
+
/** Clone mutation options with overrides while retaining stdin provenance. */
|
|
9
|
+
export declare function mutationOptionsWithOverrides<Source extends object, Overrides extends object>(source: Source, overrides: Overrides, omittedKeys?: readonly PropertyKey[]): Source & Overrides;
|
|
6
10
|
/** Read a non-empty string without altering its caller-provided whitespace. */
|
|
7
11
|
export declare function readRuntimeString(args: Record<string, unknown>, key: string): string | undefined;
|
|
8
12
|
/** Normalize a non-empty string or finite number into a scalar string. */
|