@unbrained/pm-cli 2026.8.11 → 2026.8.12
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 +52 -21
- package/dist/cli/commander-usage.js +37 -11
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +80 -13
- package/dist/cli/main.js +34 -19
- package/dist/cli/register-annotations.js +56 -3
- package/dist/cli/register-list-query.js +10 -7
- package/dist/cli/register-operations.js +16 -6
- package/dist/cli-bundle/bundle-manifest.json +157 -157
- package/dist/cli-bundle/chunks/{chunk-2OOU2AFH.js → chunk-3PS7X6GS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-WMEZHCFI.js → chunk-BM5YJ2UW.js} +51 -43
- package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +33 -0
- package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +196 -0
- package/dist/cli-bundle/chunks/{chunk-ZU34C3LH.js → chunk-KOQMGCTA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-R76342NV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-IUNRVDAI.js → chunk-VLUQOIDT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A2SJGHSI.js → chunk-WLAHPSOX.js} +2 -2
- package/dist/cli-bundle/chunks/register-list-query-XPCJRUUD.js +10 -0
- package/dist/cli-bundle/chunks/register-mutation-4RJCBKRS.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-NOCOOWQY.js → register-setup-LLHAKP2V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-FPSYO5ZG.js → chunk-ECADZMVC.js} +11 -11
- package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BKPIY34S.js → chunk-GQW4BPUT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UDAZWT25.js → chunk-JAFRIWVF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2DL3MRTD.js → chunk-KHM2CS2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-J5EKAIVD.js → chunk-KPSXVBDV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-23FTGO3W.js → chunk-KTLOKKCQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KDH5OX3D.js → chunk-NBLUKITQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-55BIB6DV.js → chunk-NYLOUPOB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DPO7TEFX.js → chunk-Q4T463SD.js} +28 -28
- package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TL5M2PAY.js → chunk-RWPAWUOT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +17 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4H5IA6AV.js → chunk-YIAXMC3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZMGWAYH7.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 +40 -40
- 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 -2
- package/dist/core/extensions/reserved-host-flags.js +3 -2
- package/dist/core/history/drift-scan.js +13 -8
- package/dist/core/history/history.d.ts +8 -0
- package/dist/core/history/history.js +57 -7
- package/dist/core/history/replay.d.ts +9 -1
- package/dist/core/history/replay.js +48 -13
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +46 -14
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/errors.d.ts +5 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/item-metadata-cache.d.ts +1 -1
- package/dist/core/store/item-metadata-cache.js +14 -7
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +6 -2
- package/dist/sdk/cli-contracts/completeness.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
- package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +8 -6
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +4 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +22 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +7 -4
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/completion.js +16 -7
- package/dist/sdk/context-intent-contracts.js +45 -4
- package/dist/sdk/core.d.ts +1 -0
- package/dist/sdk/core.js +3 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1585 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
- package/dist/sdk/generated-error-code-catalog.js +6 -3140
- package/dist/sdk/governance/assurance-action.js +9 -7
- package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
- package/dist/sdk/governance/assurance-mutation-error.js +35 -0
- package/dist/sdk/governance/assurance-runtime.js +11 -8
- package/dist/sdk/governance/assurance.d.ts +12 -6
- package/dist/sdk/governance/assurance.js +181 -66
- package/dist/sdk/governance/health.d.ts +3 -1
- package/dist/sdk/governance/health.js +21 -4
- package/dist/sdk/governance/validate-item-reader.js +3 -3
- package/dist/sdk/governance/validate.d.ts +2 -0
- package/dist/sdk/governance/validate.js +13 -3
- package/dist/sdk/graph/durable-cache.d.ts +1 -1
- package/dist/sdk/graph/durable-cache.js +98 -29
- package/dist/sdk/graph/governance.d.ts +14 -0
- package/dist/sdk/graph/governance.js +34 -9
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/lifecycle/claim.js +10 -3
- package/dist/sdk/merge/driver.d.ts +2 -2
- package/dist/sdk/merge/driver.js +3 -3
- package/dist/sdk/merge/receipts.d.ts +6 -4
- package/dist/sdk/merge/receipts.js +7 -5
- package/dist/sdk/merge/three-way.d.ts +2 -2
- package/dist/sdk/merge/three-way.js +3 -3
- package/dist/sdk/output-projection.d.ts +9 -1
- package/dist/sdk/output-projection.js +45 -9
- package/dist/sdk/query/activity.d.ts +49 -2
- package/dist/sdk/query/activity.js +183 -37
- package/dist/sdk/query/get.js +19 -2
- package/dist/sdk/read-output-contracts.d.ts +5 -1
- package/dist/sdk/read-output-contracts.js +17 -2
- package/dist/sdk/read-output-session.d.ts +2 -0
- package/dist/sdk/read-output-session.js +12 -5
- package/dist/sdk/runtime-primitives.d.ts +3 -3
- package/dist/sdk/runtime-primitives.js +5 -5
- package/dist/sdk/runtime-stats-options.js +3 -2
- package/dist/sdk/runtime.js +5 -9
- package/dist/sdk/stats.d.ts +36 -3
- package/dist/sdk/stats.js +55 -15
- package/dist/sdk/test/execution.d.ts +4 -0
- package/dist/sdk/test/execution.js +86 -21
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -2
- package/docs/ASSURANCE.md +17 -12
- package/docs/COMMANDS.md +29 -8
- package/docs/CONFIGURATION.md +7 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
- package/docs/MERGE_SAFETY.md +3 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +12 -1
- package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
- package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
- package/marketplace.json +2 -2
- package/package.json +5 -5
- 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 +203 -52
- package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +0 -33
- package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +0 -13
- package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +0 -194
- package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +0 -5
- package/dist/cli-bundle/chunks/register-list-query-HAUXVUPY.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-E3KCL7AY.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +0 -17
package/dist/cli/main.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module cli/main
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
!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]="
|
|
6
|
+
!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]="6eb8f2a6-6096-54af-a3dc-eb15fdbe5999")}catch(e){}}();
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
|
|
9
9
|
import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
|
|
@@ -846,15 +846,29 @@ function activationCommandMatchesProbe(command, probe) {
|
|
|
846
846
|
return false;
|
|
847
847
|
}
|
|
848
848
|
function extensionActivationCommands(extension) {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
849
|
+
const explicitCommands = extension.activation?.commands;
|
|
850
|
+
if (explicitCommands) {
|
|
851
|
+
return explicitCommands;
|
|
852
|
+
}
|
|
853
|
+
const contributions = extension.contributions;
|
|
854
|
+
if (!contributions) {
|
|
855
|
+
return [];
|
|
856
|
+
}
|
|
857
|
+
return [
|
|
858
|
+
...entriesOrEmpty(contributions.commands),
|
|
859
|
+
...entriesOrEmpty(contributions.command_handlers),
|
|
860
|
+
...entriesOrEmpty(contributions.command_overrides),
|
|
861
|
+
...entriesOrEmpty(contributions.flag_commands),
|
|
862
|
+
...entriesOrEmpty(contributions.parser_overrides),
|
|
863
|
+
...ownershipCommands(contributions.preflight_ownership),
|
|
864
|
+
...ownershipCommands(contributions.renderer_ownership),
|
|
865
|
+
];
|
|
866
|
+
}
|
|
867
|
+
function entriesOrEmpty(entries) {
|
|
868
|
+
return entries ?? [];
|
|
869
|
+
}
|
|
870
|
+
function ownershipCommands(entries) {
|
|
871
|
+
return entriesOrEmpty(entries).flatMap((entry) => entry.commands);
|
|
858
872
|
}
|
|
859
873
|
function extensionCapabilities(extension) {
|
|
860
874
|
/* c8 ignore next */
|
|
@@ -917,14 +931,15 @@ function matchesStaticExtensionCommand(commands, probe) {
|
|
|
917
931
|
/** Identify contribution surfaces that participate in global runtime behavior. */
|
|
918
932
|
function hasGlobalExtensionContributions(contributions) {
|
|
919
933
|
const contributionCounts = [
|
|
920
|
-
contributions.hooks
|
|
921
|
-
contributions.preflight_overrides ?? 0
|
|
922
|
-
|
|
923
|
-
contributions.
|
|
924
|
-
contributions.
|
|
925
|
-
contributions.
|
|
926
|
-
(contributions.
|
|
927
|
-
|
|
934
|
+
entriesOrEmpty(contributions.hooks).length,
|
|
935
|
+
(contributions.preflight_overrides ?? 0) -
|
|
936
|
+
entriesOrEmpty(contributions.preflight_ownership).length,
|
|
937
|
+
entriesOrEmpty(contributions.item_types).length,
|
|
938
|
+
entriesOrEmpty(contributions.item_fields).length,
|
|
939
|
+
entriesOrEmpty(contributions.relationship_kinds).length,
|
|
940
|
+
entriesOrEmpty(contributions.service_overrides).length,
|
|
941
|
+
entriesOrEmpty(contributions.renderer_overrides).length -
|
|
942
|
+
entriesOrEmpty(contributions.renderer_ownership).length,
|
|
928
943
|
];
|
|
929
944
|
return contributionCounts.some((count) => count > 0);
|
|
930
945
|
}
|
|
@@ -2459,4 +2474,4 @@ export const _testOnly = {
|
|
|
2459
2474
|
wrapThrownErrorForSentry,
|
|
2460
2475
|
};
|
|
2461
2476
|
//# sourceMappingURL=main.js.map
|
|
2462
|
-
//# debugId=
|
|
2477
|
+
//# debugId=6eb8f2a6-6096-54af-a3dc-eb15fdbe5999
|
|
@@ -1,10 +1,52 @@
|
|
|
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]="616fff4b-f86e-54e5-b569-0b9894da5221")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE, PmCliError, } from "../sdk/runtime-primitives.js";
|
|
4
|
+
import { renderPmCommand } from "../sdk/command-line.js";
|
|
4
5
|
import { runComments } from "./commands/comments.js";
|
|
5
6
|
import { runLearnings } from "./commands/learnings.js";
|
|
6
7
|
import { runNotes } from "./commands/notes.js";
|
|
7
8
|
import { addHiddenOption, getGlobalOptions, invalidateSearchCachesForMutation, printError, printResult, readOptionString, } from "./registration-helpers.js";
|
|
9
|
+
function assertNoTransposedAnnotationAction(collection, id, text, options) {
|
|
10
|
+
if (id.trim().toLowerCase() !== "add" || !text?.trim()) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const suppliedText = readOptionString(options, "add") ??
|
|
14
|
+
readOptionString(options, "note") ??
|
|
15
|
+
readOptionString(options, "body") ??
|
|
16
|
+
readOptionString(options, "comment");
|
|
17
|
+
const file = readOptionString(options, "file");
|
|
18
|
+
const retryArgs = [collection, text.trim()];
|
|
19
|
+
if (suppliedText !== undefined)
|
|
20
|
+
retryArgs.push("--add", suppliedText);
|
|
21
|
+
else if (options.stdin === true)
|
|
22
|
+
retryArgs.push("--stdin");
|
|
23
|
+
else if (file !== undefined)
|
|
24
|
+
retryArgs.push("--file", file);
|
|
25
|
+
else
|
|
26
|
+
retryArgs.push("--add", "-");
|
|
27
|
+
const suggestedRetry = renderPmCommand(retryArgs);
|
|
28
|
+
const stdinRetry = renderPmCommand([
|
|
29
|
+
collection,
|
|
30
|
+
text.trim(),
|
|
31
|
+
"--add",
|
|
32
|
+
"-",
|
|
33
|
+
]);
|
|
34
|
+
throw new PmCliError(`The positional token "add" was parsed as the item id, while "${text.trim()}" was parsed as annotation text. ${collection} does not use an add subcommand.`, EXIT_CODE.USAGE, {
|
|
35
|
+
code: "annotation_transposed_subcommand",
|
|
36
|
+
reason: "noun_verb_object_transposition",
|
|
37
|
+
required: `Place the item id immediately after ${collection}, then use --add for annotation text.`,
|
|
38
|
+
examples: [...new Set([suggestedRetry, stdinRetry])],
|
|
39
|
+
recovery: {
|
|
40
|
+
attempted_command: `pm ${collection} add ${text.trim()}`,
|
|
41
|
+
normalized_args: [collection, "add", text.trim()],
|
|
42
|
+
parsed_positionals: [
|
|
43
|
+
{ role: "transposed_subcommand", value: "add" },
|
|
44
|
+
{ role: "item_id", value: text.trim() },
|
|
45
|
+
],
|
|
46
|
+
suggested_retry: suggestedRetry,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
8
50
|
function resolveCommentSources(text, options) {
|
|
9
51
|
const editIndex = typeof options.edit === "number" ? options.edit : undefined;
|
|
10
52
|
const deleteIndex = typeof options.delete === "number" ? options.delete : undefined;
|
|
@@ -42,7 +84,14 @@ function resolveCommentSources(text, options) {
|
|
|
42
84
|
};
|
|
43
85
|
}
|
|
44
86
|
function resolveSingleTextSource(label, positional, options) {
|
|
45
|
-
const
|
|
87
|
+
const canonicalAdd = readOptionString(options, "add");
|
|
88
|
+
const aliasAdd = label === "note" ? readOptionString(options, "note") : undefined;
|
|
89
|
+
if (canonicalAdd !== undefined &&
|
|
90
|
+
aliasAdd !== undefined &&
|
|
91
|
+
canonicalAdd !== aliasAdd) {
|
|
92
|
+
throw new PmCliError("Specify note text with either --add or --note, not conflicting values for both aliases", EXIT_CODE.USAGE, { code: "annotation_alias_conflict" });
|
|
93
|
+
}
|
|
94
|
+
const addFromOption = canonicalAdd ?? aliasAdd;
|
|
46
95
|
const addFromPositional = typeof positional === "string" ? positional : undefined;
|
|
47
96
|
if (addFromOption !== undefined && addFromPositional !== undefined) {
|
|
48
97
|
throw new PmCliError(`Specify ${label} text either as positional [text] or with --add, not both`, EXIT_CODE.USAGE);
|
|
@@ -52,6 +101,7 @@ function resolveSingleTextSource(label, positional, options) {
|
|
|
52
101
|
async function runCommentsAction(id, text, options, command) {
|
|
53
102
|
const globalOptions = getGlobalOptions(command);
|
|
54
103
|
const startedAt = Date.now();
|
|
104
|
+
assertNoTransposedAnnotationAction("comments", id, text, options);
|
|
55
105
|
const sources = resolveCommentSources(text, options);
|
|
56
106
|
const result = await runComments(id, {
|
|
57
107
|
add: sources.add,
|
|
@@ -74,6 +124,7 @@ async function runCommentsAction(id, text, options, command) {
|
|
|
74
124
|
async function runNotesAction(id, text, options, command) {
|
|
75
125
|
const globalOptions = getGlobalOptions(command);
|
|
76
126
|
const startedAt = Date.now();
|
|
127
|
+
assertNoTransposedAnnotationAction("notes", id, text, options);
|
|
77
128
|
const add = resolveSingleTextSource("note", text, options);
|
|
78
129
|
const result = await runNotes(id, {
|
|
79
130
|
add,
|
|
@@ -105,6 +156,7 @@ async function runNotesAction(id, text, options, command) {
|
|
|
105
156
|
async function runLearningsAction(id, text, options, command) {
|
|
106
157
|
const globalOptions = getGlobalOptions(command);
|
|
107
158
|
const startedAt = Date.now();
|
|
159
|
+
assertNoTransposedAnnotationAction("learnings", id, text, options);
|
|
108
160
|
const add = resolveSingleTextSource("learning", text, options);
|
|
109
161
|
const result = await runLearnings(id, {
|
|
110
162
|
add,
|
|
@@ -159,6 +211,7 @@ export function registerAnnotationCommands(program, parsePositiveInteger) {
|
|
|
159
211
|
.argument("<id>", "Item id")
|
|
160
212
|
.argument("[text]", "Optional note text shorthand (equivalent to --add; use - for stdin)")
|
|
161
213
|
.option("--add <text>", "Add a text note (- reads stdin)")
|
|
214
|
+
.option("--note <text>", "Alias for --add")
|
|
162
215
|
.option("--add-json <json>", "Append a merge-safe JSON event")
|
|
163
216
|
.option("--stdin", "Read note text from stdin")
|
|
164
217
|
.option("--file <path>", "Read note text from a UTF-8 file")
|
|
@@ -192,4 +245,4 @@ export function registerAnnotationCommands(program, parsePositiveInteger) {
|
|
|
192
245
|
.action(runLearningsAction);
|
|
193
246
|
}
|
|
194
247
|
//# sourceMappingURL=register-annotations.js.map
|
|
195
|
-
//# debugId=
|
|
248
|
+
//# debugId=616fff4b-f86e-54e5-b569-0b9894da5221
|
|
@@ -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]="0bcbdc33-3145-54cc-b4b6-10df50aef57a")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE, PmCliError, renderRowsAsCsv, renderRowsAsTable, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { EVAL_QUERY_SET_SCHEMA_ID } from "../sdk/eval.js";
|
|
5
5
|
import { applyContextIntentProjection } from "../sdk/context-intent-contracts.js";
|
|
@@ -372,7 +372,7 @@ async function runGetAction(id, options, command) {
|
|
|
372
372
|
async function runHistoryAction(id, options, command) {
|
|
373
373
|
const globalOptions = getGlobalOptions(command);
|
|
374
374
|
const startedAt = Date.now();
|
|
375
|
-
if ([options.compact, options.full, options.provenance].filter((value) => value === true).length > 1) {
|
|
375
|
+
if ([options.compact, options.raw, options.full, options.provenance].filter((value) => value === true).length > 1) {
|
|
376
376
|
throw new PmCliError("History projection options are mutually exclusive. Use --compact, --provenance, or --full.", EXIT_CODE.USAGE);
|
|
377
377
|
}
|
|
378
378
|
const field = typeof options.field === "string" ? options.field : undefined;
|
|
@@ -472,15 +472,17 @@ async function runEventsAction(options, command) {
|
|
|
472
472
|
async function runActivityAction(options, command) {
|
|
473
473
|
const globalOptions = getGlobalOptions(command);
|
|
474
474
|
const startedAt = Date.now();
|
|
475
|
-
if ([options.compact, options.full, options.provenance].filter((value) => value === true).length > 1) {
|
|
476
|
-
throw new PmCliError("Activity projection options are mutually exclusive. Use --compact, --provenance, or --full.", EXIT_CODE.USAGE);
|
|
475
|
+
if ([options.raw, options.compact, options.full, options.provenance].filter((value) => value === true).length > 1) {
|
|
476
|
+
throw new PmCliError("Activity projection options are mutually exclusive. Use --raw, --compact, --provenance, or --full.", EXIT_CODE.USAGE);
|
|
477
477
|
}
|
|
478
|
-
const normalized = normalizeActivityOptions(options);
|
|
479
|
-
const result = await runActivity(normalized, globalOptions);
|
|
480
478
|
const streamMode = resolveActivityStreamMode(options.stream);
|
|
481
479
|
if (streamMode && !globalOptions.json) {
|
|
482
480
|
throw new PmCliError("--stream requires --json output mode.", EXIT_CODE.USAGE);
|
|
483
481
|
}
|
|
482
|
+
const normalized = normalizeActivityOptions(options);
|
|
483
|
+
const result = await runActivity(streamMode && options.full !== true && options.provenance !== true
|
|
484
|
+
? { ...normalized, raw: true, compact: true }
|
|
485
|
+
: normalized, globalOptions);
|
|
484
486
|
if (streamMode) {
|
|
485
487
|
printActivityJsonStream(result, normalized, globalOptions);
|
|
486
488
|
}
|
|
@@ -795,6 +797,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
795
797
|
.option("--limit <n>", "Return only the latest n activity entries")
|
|
796
798
|
.option("--unbounded", "Explicitly return every matching activity entry (disables the default bound)")
|
|
797
799
|
.option("--compact", "Condensed output: show only id, op, ts, author, msg per entry")
|
|
800
|
+
.option("--raw", "Show the legacy compact per-event stream instead of the item digest")
|
|
798
801
|
.option("--full", "Show full activity entries with JSON Patch payloads")
|
|
799
802
|
.option("--provenance", "Show patch-free author, harness, instance, and extensible provenance")
|
|
800
803
|
.option("--provenance-summary", "Include bounded provenance completeness counts")
|
|
@@ -835,4 +838,4 @@ export const _testOnlyRegisterListQuery = {
|
|
|
835
838
|
parseListFormat,
|
|
836
839
|
};
|
|
837
840
|
//# sourceMappingURL=register-list-query.js.map
|
|
838
|
-
//# debugId=
|
|
841
|
+
//# debugId=0bcbdc33-3145-54cc-b4b6-10df50aef57a
|
|
@@ -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]="7796ea07-0de7-5db8-a3b5-a8021ceebc69")}catch(e){}}();
|
|
3
3
|
import { resolveRuntimeStatusRegistry, setActiveCommandResult, EXIT_CODE, PmCliError, createUnknownSubcommandError, resolveAuthor, resolvePmRoot, readSettings, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { resolveStartTaskInProgressStatus } from "../sdk/start-task-status.js";
|
|
5
5
|
import { parseStatsAnalyticsJson } from "./stats-analytics-json.js";
|
|
@@ -54,6 +54,9 @@ function collectTestMutationValues(options) {
|
|
|
54
54
|
removeValues: Array.isArray(options.remove)
|
|
55
55
|
? options.remove
|
|
56
56
|
: [],
|
|
57
|
+
removeIndexValues: Array.isArray(options.removeIndex)
|
|
58
|
+
? options.removeIndex
|
|
59
|
+
: [],
|
|
57
60
|
};
|
|
58
61
|
}
|
|
59
62
|
function validateBackgroundTestOptions(options, values) {
|
|
@@ -65,8 +68,9 @@ function validateBackgroundTestOptions(options, values) {
|
|
|
65
68
|
}
|
|
66
69
|
if (values.addValues.length > 0 ||
|
|
67
70
|
values.addJsonValues.length > 0 ||
|
|
68
|
-
values.removeValues.length > 0
|
|
69
|
-
|
|
71
|
+
values.removeValues.length > 0 ||
|
|
72
|
+
values.removeIndexValues.length > 0) {
|
|
73
|
+
throw new PmCliError("--background does not support --add/--add-json/--remove/--remove-index; update linked tests first, then run in background", EXIT_CODE.USAGE);
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
async function runBackgroundLinkedTests(id, options, globalOptions, values) {
|
|
@@ -77,6 +81,7 @@ async function runBackgroundLinkedTests(id, options, globalOptions, values) {
|
|
|
77
81
|
add: values.addValues,
|
|
78
82
|
addJson: values.addJsonValues,
|
|
79
83
|
remove: values.removeValues,
|
|
84
|
+
removeIndex: values.removeIndexValues,
|
|
80
85
|
}),
|
|
81
86
|
targetId: id,
|
|
82
87
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
@@ -89,6 +94,7 @@ function buildRunTestOptions(options, values) {
|
|
|
89
94
|
add: values.addValues,
|
|
90
95
|
addJson: values.addJsonValues,
|
|
91
96
|
remove: values.removeValues,
|
|
97
|
+
removeIndex: values.removeIndexValues,
|
|
92
98
|
list: Boolean(options.list),
|
|
93
99
|
run: Boolean(options.run),
|
|
94
100
|
match: typeof options.match === "string" ? options.match : undefined,
|
|
@@ -127,7 +133,8 @@ async function runForegroundLinkedTests(id, options, globalOptions, values) {
|
|
|
127
133
|
if (values.addValues.length > 0 ||
|
|
128
134
|
values.addJsonValues.length > 0 ||
|
|
129
135
|
values.removeValues.length > 0 ||
|
|
130
|
-
options.run === true
|
|
136
|
+
options.run === true ||
|
|
137
|
+
values.removeIndexValues.length > 0) {
|
|
131
138
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
132
139
|
}
|
|
133
140
|
printResult(result, globalOptions);
|
|
@@ -236,6 +243,7 @@ async function runStatsAction(options, command) {
|
|
|
236
243
|
const startedAt = Date.now();
|
|
237
244
|
const analytics = parseStatsAnalyticsJson(readOptionString(options, "analytics"));
|
|
238
245
|
const result = await runStats(globalOptions, {
|
|
246
|
+
includeEmpty: options.includeEmpty === true,
|
|
239
247
|
storage: options.storage === true,
|
|
240
248
|
metadataCoverage: options.metadataCoverage === true,
|
|
241
249
|
byAssignee: options.byAssignee === true,
|
|
@@ -565,7 +573,8 @@ export function registerOperationCommands(program) {
|
|
|
565
573
|
.argument("<id>", "Item id")
|
|
566
574
|
.option("--add <value>", "Add linked test entry (CSV/markdown pairs or - for stdin)", collect)
|
|
567
575
|
.option("--add-json <value>", "Add linked test entry from JSON object/array (or - for stdin)", collect)
|
|
568
|
-
.option("--remove <value>", "Remove linked test entry by command/path (command=<value
|
|
576
|
+
.option("--remove <value>", "Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin)", collect)
|
|
577
|
+
.option("--remove-index <n>", "Remove the 1-based linked-test index from --list order (repeatable)", collect)
|
|
569
578
|
.option("--list", "List linked tests without mutating")
|
|
570
579
|
.option("--run", "Run linked test commands")
|
|
571
580
|
.option("--match <value>", "Run only linked tests whose command/path contains this substring")
|
|
@@ -613,6 +622,7 @@ export function registerOperationCommands(program) {
|
|
|
613
622
|
program
|
|
614
623
|
.command("stats")
|
|
615
624
|
.description("Show project tracker statistics.")
|
|
625
|
+
.option("--include-empty", "Restore zero-count registered item-type and lifecycle-status buckets")
|
|
616
626
|
.option("--storage", "Include aggregate history-stream storage metrics (total streams/lines/bytes, largest + deepest streams, oldest/newest entries)")
|
|
617
627
|
.option("--metadata-coverage", "Include metadata coverage % (acceptance_criteria, estimated_minutes, resolution, tags, parent) overall and by type")
|
|
618
628
|
.option("--by-assignee", "Include a lifecycle-bucketed item breakdown grouped by assignee")
|
|
@@ -863,4 +873,4 @@ function registerSchedulingShortcutCommands(program) {
|
|
|
863
873
|
});
|
|
864
874
|
}
|
|
865
875
|
//# sourceMappingURL=register-operations.js.map
|
|
866
|
-
//# debugId=
|
|
876
|
+
//# debugId=7796ea07-0de7-5db8-a3b5-a8021ceebc69
|