@unbrained/pm-cli 2026.8.12 → 2026.8.14
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 +162 -111
- package/dist/cli/error-guidance.js +4 -8
- package/dist/cli/main.js +40 -3
- package/dist/cli/register-assurance.js +28 -17
- package/dist/cli-bundle/bundle-manifest.json +141 -173
- package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +197 -0
- package/dist/cli-bundle/chunks/chunk-BFALV3YP.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-WLAHPSOX.js → chunk-FIW4P64F.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BM5YJ2UW.js → chunk-G5JUB66K.js} +52 -52
- package/dist/cli-bundle/chunks/chunk-SBRKH6OR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TMJ7URWS.js +13 -0
- package/dist/cli-bundle/chunks/chunk-TXMEUUUY.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-KOQMGCTA.js → chunk-XAVMOK6B.js} +50 -50
- package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +34 -0
- package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-XPCJRUUD.js → register-list-query-T3EHHNNV.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4RJCBKRS.js → register-mutation-E27WCLSZ.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-LLHAKP2V.js → register-setup-3YXZ444E.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JAFRIWVF.js → chunk-4DQ2YERC.js} +4 -4
- package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-K7RWWOAG.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-KFSZ3BP6.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KHM2CS2C.js → chunk-KSEDUWVZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZMGWAYH7.js → chunk-LZ4MV3RH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RWPAWUOT.js → chunk-PPFGQDSI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +46 -0
- package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GQW4BPUT.js → chunk-WCVE2NIG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XDNAW5OI.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YIAXMC3T.js → chunk-YOOI3UZX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.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 +45 -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 +109 -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/checkpoint/checkpoint-gc.js +7 -12
- package/dist/core/extensions/activation-summary-markdown.js +5 -4
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +6 -2
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +4 -3
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +6 -2
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-types.d.ts +83 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/loader.d.ts +2 -8
- package/dist/core/extensions/loader.js +53 -144
- package/dist/core/extensions/registration-values.d.ts +43 -0
- package/dist/core/extensions/registration-values.js +210 -0
- package/dist/core/extensions/runtime-registrations.d.ts +3 -1
- package/dist/core/extensions/runtime-registrations.js +12 -2
- package/dist/core/fs/fs-utils.d.ts +2 -0
- package/dist/core/fs/fs-utils.js +7 -3
- package/dist/core/history/drift-cache.js +4 -3
- package/dist/core/history/drift-scan.d.ts +6 -0
- package/dist/core/history/drift-scan.js +76 -58
- package/dist/core/history/workspace-history.d.ts +59 -0
- package/dist/core/history/workspace-history.js +197 -10
- package/dist/core/lock/lock-gc.js +8 -13
- package/dist/core/lock/lock.js +5 -4
- package/dist/core/output/output.js +12 -4
- package/dist/core/search/vector-stores.js +6 -11
- package/dist/core/store/item-metadata-cache.js +4 -4
- package/dist/core/telemetry/runtime.d.ts +6 -0
- package/dist/core/telemetry/runtime.js +101 -30
- package/dist/sdk/agent/command-recovery.d.ts +2 -0
- package/dist/sdk/agent/command-recovery.js +10 -2
- package/dist/sdk/annotations.js +4 -4
- package/dist/sdk/cli-contracts/completeness.js +9 -3
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +6 -3
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +6 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +155 -60
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +32 -0
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +25 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +35 -5
- package/dist/sdk/cli-contracts/tool-schema.js +17 -2
- package/dist/sdk/cli-program.js +3 -3
- package/dist/sdk/comments.js +4 -3
- package/dist/sdk/compile-cache.js +4 -3
- package/dist/sdk/compose.d.ts +3 -1
- package/dist/sdk/compose.js +16 -2
- package/dist/sdk/context-relevance.js +12 -4
- package/dist/sdk/context-signal-store.js +4 -3
- package/dist/sdk/extension/install-runtime.js +4 -4
- package/dist/sdk/extension/managed-state.js +4 -3
- package/dist/sdk/extension-contracts.d.ts +1 -1
- package/dist/sdk/flag-invocation-contracts.js +5 -6
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +14 -2
- package/dist/sdk/governance/assurance-action.d.ts +27 -3
- package/dist/sdk/governance/assurance-action.js +112 -28
- package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
- package/dist/sdk/governance/assurance-mutation-error.js +25 -2
- package/dist/sdk/governance/assurance-presets.d.ts +54 -0
- package/dist/sdk/governance/assurance-presets.js +136 -0
- package/dist/sdk/governance/assurance-runtime.d.ts +4 -0
- package/dist/sdk/governance/assurance-runtime.js +109 -8
- package/dist/sdk/governance/assurance.d.ts +39 -0
- package/dist/sdk/governance/assurance.js +145 -6
- package/dist/sdk/governance/gc.js +5 -11
- package/dist/sdk/governance/health.js +18 -6
- package/dist/sdk/governance/validate-history-drift.d.ts +7 -0
- package/dist/sdk/governance/validate-history-drift.js +68 -0
- package/dist/sdk/governance/validate.js +6 -48
- package/dist/sdk/graph/assembly.d.ts +23 -0
- package/dist/sdk/graph/assembly.js +54 -2
- package/dist/sdk/graph/durable-cache.js +91 -3
- package/dist/sdk/graph/governance-contracts.d.ts +12 -0
- package/dist/sdk/graph/governance-contracts.js +29 -0
- package/dist/sdk/graph/governance.d.ts +51 -3
- package/dist/sdk/graph/governance.js +216 -35
- package/dist/sdk/graph/index.d.ts +2 -2
- package/dist/sdk/graph/index.js +4 -4
- package/dist/sdk/graph/mutation-advisory.js +15 -7
- package/dist/sdk/graph/remediation.js +12 -2
- package/dist/sdk/guide.js +4 -4
- package/dist/sdk/history-read.d.ts +8 -0
- package/dist/sdk/history-read.js +2 -2
- package/dist/sdk/index.d.ts +3 -2
- package/dist/sdk/index.js +5 -4
- package/dist/sdk/linked-artifacts.d.ts +2 -0
- package/dist/sdk/linked-artifacts.js +29 -4
- package/dist/sdk/merge/install.js +5 -4
- package/dist/sdk/query/activity.js +4 -3
- package/dist/sdk/query/history.js +20 -3
- package/dist/sdk/read-output-budget.d.ts +2 -0
- package/dist/sdk/read-output-budget.js +12 -5
- package/dist/sdk/read-output-contracts.d.ts +61 -5
- package/dist/sdk/read-output-contracts.js +210 -28
- package/dist/sdk/read-output-rows.d.ts +11 -0
- package/dist/sdk/read-output-rows.js +47 -2
- package/dist/sdk/relationship-history.js +5 -5
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.js +5 -3
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/test/execution.js +4 -4
- package/dist/sdk/workspace-memory.js +4 -4
- package/dist/sdk/workspace-snapshot.js +8 -14
- package/dist/sdk/workspace-transaction-gc.js +4 -9
- package/dist/sdk/workspace-transaction.js +4 -4
- package/dist/sdk/workspace.js +4 -3
- package/docs/ASSURANCE.md +163 -3
- package/docs/COMMANDS.md +31 -2
- package/docs/CONFIGURATION.md +2 -0
- package/docs/EXTENSIONS.md +11 -12
- package/docs/READ_OUTPUT_CONTRACTS.md +44 -8
- package/docs/RELATIONSHIP_GRAPH.md +34 -4
- package/docs/SDK.md +29 -8
- package/docs/SDK_CONTEXT_INTEGRITY.md +32 -1
- package/docs/TESTING.md +47 -16
- package/docs/performance/sdk-entrypoint-import-costs.md +20 -13
- package/marketplace.json +2 -2
- package/package.json +6 -6
- package/packages/pm-beads/extensions/beads/index.ts +1 -0
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +1 -0
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/extensions/digital-twin/index.ts +7 -0
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +4 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +5 -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/extensions/linked-test-adapters/index.ts +6 -0
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -0
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +4 -0
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +2 -0
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/extensions/vcs/index.ts +7 -0
- 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/bundle-cli.mjs +17 -4
- package/sdk/public-surface.json +390 -60
- package/dist/cli-bundle/chunks/chunk-3PS7X6GS.js +0 -8
- package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +0 -13
- package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +0 -33
- package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +0 -196
- package/dist/cli-bundle/chunks/chunk-R76342NV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-VLUQOIDT.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ECADZMVC.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KPSXVBDV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KTLOKKCQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-NBLUKITQ.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-NYLOUPOB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q4T463SD.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +0 -17
|
@@ -1,5 +1,6 @@
|
|
|
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]="9ec35c35-f2dc-5f86-a166-cf0c80eab1bd")}catch(e){}}();
|
|
3
|
+
import { resolveRecoveryCommandName } from "../sdk/agent/command-recovery.js";
|
|
3
4
|
import { renderPmCommand } from "./argv-utils.js";
|
|
4
5
|
import { discoverNearbyPmRoot } from "../sdk/tracker-root-discovery.js";
|
|
5
6
|
/** Compact an error envelope to fields that change the caller's next action. */
|
|
@@ -341,12 +342,7 @@ function dedupeStrings(values) {
|
|
|
341
342
|
return result;
|
|
342
343
|
}
|
|
343
344
|
function inferCommandNameFromRecovery(recovery) {
|
|
344
|
-
|
|
345
|
-
if (!Array.isArray(args) || args.length === 0) {
|
|
346
|
-
return undefined;
|
|
347
|
-
}
|
|
348
|
-
const firstCommandArg = args.find((arg) => arg.trim().length > 0 && !arg.startsWith("-"));
|
|
349
|
-
return firstCommandArg?.trim();
|
|
345
|
+
return resolveRecoveryCommandName(recovery?.normalized_args);
|
|
350
346
|
}
|
|
351
347
|
function inferAllowedValuesFromMessage(message) {
|
|
352
348
|
const match = message.match(/\bmust be one of:?\s+([A-Za-z0-9_.|,\- ]+)/i);
|
|
@@ -1201,4 +1197,4 @@ export const _testOnly = {
|
|
|
1201
1197
|
resolveKnownPackageCommandHint,
|
|
1202
1198
|
};
|
|
1203
1199
|
//# sourceMappingURL=error-guidance.js.map
|
|
1204
|
-
//# debugId=
|
|
1200
|
+
//# debugId=9ec35c35-f2dc-5f86-a166-cf0c80eab1bd
|
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]="c8924d43-556d-5041-9fe3-7c5c944531ae")}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";
|
|
@@ -27,7 +27,7 @@ import { loadExtensionRecoveryFailures, loadUnknownCommandRecoveryFailures } fro
|
|
|
27
27
|
import { maybeRenderBootstrapJsonHelp, attachCreateUpdatePolicyHelpText } from "./help-json-payload.js";
|
|
28
28
|
import { attachOutputTokenAccounting } from "../sdk/output-token-accounting.js";
|
|
29
29
|
import { runWithDiscoveredContextIntentContracts } from "../sdk/context-intent-runtime.js";
|
|
30
|
-
import { validateReadOutputOptions } from "../sdk/read-output-contracts.js";
|
|
30
|
+
import { applyReadOutputIncludeModes, validateReadOutputOptions } from "../sdk/read-output-contracts.js";
|
|
31
31
|
import { loadContextIntentSnapshotForInvocation } from "./context-intent-invocation.js";
|
|
32
32
|
import { isPmSuccessfulExitCode } from "../sdk/cli-contracts/command-exit-contracts.js";
|
|
33
33
|
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
@@ -499,6 +499,40 @@ async function handleGenericRunPmCliError(params) {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* Hand canonical `--output-include` projection modes to the command that owns
|
|
504
|
+
* them, leaving only field selectors for post-execution projection.
|
|
505
|
+
*
|
|
506
|
+
* `--output-include brief` must be the exact behaviour of `--brief`, which the
|
|
507
|
+
* emitted migration hint promises; a mode can only be honoured before the
|
|
508
|
+
* command computes its rows, so it cannot be resolved by the output layer.
|
|
509
|
+
*/
|
|
510
|
+
function forwardReadOutputIncludeModes(actionCommand, commandPath, globalOptions, commandOptions) {
|
|
511
|
+
const requested = globalOptions.outputInclude;
|
|
512
|
+
if (requested === undefined)
|
|
513
|
+
return;
|
|
514
|
+
const modeOptions = {};
|
|
515
|
+
const { selectors, modes } = applyReadOutputIncludeModes(commandPath, requested, modeOptions);
|
|
516
|
+
if (modes.length === 0)
|
|
517
|
+
return;
|
|
518
|
+
for (const [key, value] of Object.entries(modeOptions)) {
|
|
519
|
+
commandOptions[key] = value;
|
|
520
|
+
actionCommand.setOptionValueWithSource(key, value, "cli");
|
|
521
|
+
}
|
|
522
|
+
const residual = selectors.length > 0 ? selectors.join(",") : undefined;
|
|
523
|
+
if (residual === undefined) {
|
|
524
|
+
delete globalOptions.outputInclude;
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
globalOptions.outputInclude = residual;
|
|
528
|
+
}
|
|
529
|
+
// The resolved-global cache is cleared and re-read from Commander before the
|
|
530
|
+
// handler runs, so the consumed modes have to leave the parsed option too.
|
|
531
|
+
for (let scope = actionCommand; scope; scope = scope.parent) {
|
|
532
|
+
scope.setOptionValueWithSource("outputInclude", residual, "cli");
|
|
533
|
+
}
|
|
534
|
+
setResolvedGlobalOptions(actionCommand, globalOptions);
|
|
535
|
+
}
|
|
502
536
|
function extractCommandScopedOptions(command, commandArgs, extensionFlagDefinitions = []) {
|
|
503
537
|
const allOptions = command.optsWithGlobals();
|
|
504
538
|
const scoped = { ...allOptions };
|
|
@@ -938,6 +972,7 @@ function hasGlobalExtensionContributions(contributions) {
|
|
|
938
972
|
entriesOrEmpty(contributions.item_fields).length,
|
|
939
973
|
entriesOrEmpty(contributions.relationship_kinds).length,
|
|
940
974
|
entriesOrEmpty(contributions.service_overrides).length,
|
|
975
|
+
entriesOrEmpty(contributions.assurance_providers).length,
|
|
941
976
|
entriesOrEmpty(contributions.renderer_overrides).length -
|
|
942
977
|
entriesOrEmpty(contributions.renderer_ownership).length,
|
|
943
978
|
];
|
|
@@ -1564,6 +1599,7 @@ function attachProgramLifecycleHooks(rootProgram) {
|
|
|
1564
1599
|
outputFormat: rawGlobalOptions.outputFormat,
|
|
1565
1600
|
outputSession: rawGlobalOptions.outputSession,
|
|
1566
1601
|
});
|
|
1602
|
+
forwardReadOutputIncludeModes(actionCommand, commandPath, globalOptions, commandOptions);
|
|
1567
1603
|
await maybeRunFirstUseTelemetryPrompt(commandPath, globalOptions);
|
|
1568
1604
|
const fallbackPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
|
|
1569
1605
|
const runtimeExtensions = await maybeLoadRuntimeExtensions(actionCommand);
|
|
@@ -1601,6 +1637,7 @@ function attachProgramLifecycleHooks(rootProgram) {
|
|
|
1601
1637
|
setActiveExtensionRegistrations(runtimeExtensions.registrations);
|
|
1602
1638
|
const extensionFlagDefinitions = collectExtensionFlagDefinitionsForInvocation(runtimeExtensions.registrations, commandPath, commandArgs);
|
|
1603
1639
|
commandOptions = extractCommandScopedOptions(actionCommand, commandArgs, extensionFlagDefinitions);
|
|
1640
|
+
forwardReadOutputIncludeModes(actionCommand, commandPath, globalOptions, commandOptions);
|
|
1604
1641
|
const parserOverride = await runActiveParserOverride({
|
|
1605
1642
|
command: commandPath,
|
|
1606
1643
|
args: commandArgs,
|
|
@@ -2474,4 +2511,4 @@ export const _testOnly = {
|
|
|
2474
2511
|
wrapThrownErrorForSentry,
|
|
2475
2512
|
};
|
|
2476
2513
|
//# sourceMappingURL=main.js.map
|
|
2477
|
-
//# debugId=
|
|
2514
|
+
//# debugId=c8924d43-556d-5041-9fe3-7c5c944531ae
|
|
@@ -1,16 +1,21 @@
|
|
|
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]="
|
|
3
|
-
import {
|
|
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]="41d01430-1e95-5f09-9a2f-7e7f8fad8184")}catch(e){}}();
|
|
3
|
+
import { runAssuranceAction } from "../sdk/governance/assurance-action.js";
|
|
4
4
|
import { printResult } from "../sdk/runtime-primitives.js";
|
|
5
5
|
import { getGlobalOptions, readOptionString } from "./registration-helpers.js";
|
|
6
6
|
async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
|
|
7
7
|
const global = getGlobalOptions(command);
|
|
8
8
|
const isRun = action === "run";
|
|
9
9
|
const isVerdicts = action === "verdicts";
|
|
10
|
+
const isPresetAction = action === "presets" || action === "apply";
|
|
11
|
+
const isPromote = action === "promote";
|
|
10
12
|
const result = await runAssuranceAction({
|
|
11
13
|
action,
|
|
12
|
-
...(isRun || isVerdicts
|
|
13
|
-
|
|
14
|
+
...(isRun || isVerdicts || isPresetAction || isPromote
|
|
15
|
+
? {}
|
|
16
|
+
: { kind: kindOrGate }),
|
|
17
|
+
id: isRun || isVerdicts || isPromote ? (id ?? kindOrGate) : id,
|
|
18
|
+
preset: isPresetAction ? (id ?? kindOrGate) : undefined,
|
|
14
19
|
definition: readOptionString(options, "definition"),
|
|
15
20
|
trigger: readOptionString(options, "trigger"),
|
|
16
21
|
tree: readOptionString(options, "tree"),
|
|
@@ -21,6 +26,9 @@ async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
|
|
|
21
26
|
idOnly: global.idOnly,
|
|
22
27
|
author: readOptionString(options, "author"),
|
|
23
28
|
message: readOptionString(options, "message"),
|
|
29
|
+
owner: readOptionString(options, "owner"),
|
|
30
|
+
apply: options.apply === true,
|
|
31
|
+
enforcement: readOptionString(options, "enforcement"),
|
|
24
32
|
}, global);
|
|
25
33
|
printResult(result, global);
|
|
26
34
|
if (typeof result === "object" &&
|
|
@@ -34,19 +42,22 @@ async function runAssuranceCliAction(action, kindOrGate, id, options, command) {
|
|
|
34
42
|
export function registerAssuranceCommand(program) {
|
|
35
43
|
program
|
|
36
44
|
.command("assurance")
|
|
37
|
-
.argument("<action>",
|
|
38
|
-
.argument("[kind]",
|
|
39
|
-
.argument("[id]", "Declaration
|
|
40
|
-
.description("
|
|
41
|
-
.option("--definition <json>", "
|
|
42
|
-
.option("--trigger <value>", "Gate
|
|
43
|
-
.option("--tree <value>", "
|
|
44
|
-
.option("--gate <id>", "
|
|
45
|
-
.option("--limit <number>", "
|
|
46
|
-
.option("--dry-run", "Evaluate
|
|
47
|
-
.option("--author <value>", "Mutation author
|
|
48
|
-
.option("--message <value>", "
|
|
45
|
+
.argument("<action>", "Action; inspect `pm contracts --command assurance`")
|
|
46
|
+
.argument("[kind]", "Declaration kind or run gate id")
|
|
47
|
+
.argument("[id]", "Declaration/gate id")
|
|
48
|
+
.description("Manage SDK-owned assurance contracts.")
|
|
49
|
+
.option("--definition <json>", "Put declaration JSON")
|
|
50
|
+
.option("--trigger <value>", "Gate trigger")
|
|
51
|
+
.option("--tree <value>", "Revision identity")
|
|
52
|
+
.option("--gate <id>", "Verdict gate filter")
|
|
53
|
+
.option("--limit <number>", "Verdict limit")
|
|
54
|
+
.option("--dry-run", "Evaluate without recording")
|
|
55
|
+
.option("--author <value>", "Mutation author")
|
|
56
|
+
.option("--message <value>", "Mutation rationale")
|
|
57
|
+
.option("--owner <item-id>", "Preset/derivation owner")
|
|
58
|
+
.option("--apply", "Persist derived proposals")
|
|
59
|
+
.option("--enforcement <level>", "Promote to warn or block")
|
|
49
60
|
.action(runAssuranceCliAction);
|
|
50
61
|
}
|
|
51
62
|
//# sourceMappingURL=register-assurance.js.map
|
|
52
|
-
//# debugId=
|
|
63
|
+
//# debugId=41d01430-1e95-5f09-9a2f-7e7f8fad8184
|