@unbrained/pm-cli 2026.5.28 → 2026.5.30
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/CHANGELOG.md +127 -93
- package/dist/cli/bootstrap-args.d.ts +1 -1
- package/dist/cli/bootstrap-args.js +59 -9
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +8 -8
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +4 -4
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.js +4 -3
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.d.ts +8 -0
- package/dist/cli/commands/calendar.js +15 -4
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close.js +4 -4
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +36 -4
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +11 -1
- package/dist/cli/commands/config.js +68 -6
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +55 -6
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/deps.js +4 -4
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.js +4 -3
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +1 -0
- package/dist/cli/commands/extension/install-sources.js +20 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.js +26 -5
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/get.js +6 -3
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +3 -11
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.js +5 -4
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/list.js +25 -6
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/plan.js +5 -4
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/search.js +45 -2
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.js +4 -4
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/test-all.js +4 -4
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/update-many.js +35 -6
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +38 -6
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/help-json-payload.d.ts +1 -11
- package/dist/cli/help-json-payload.js +12 -12
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +39 -11
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +3 -3
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +20 -8
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +2 -6
- package/dist/cli/registration-helpers.js +9 -6
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js +164 -0
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js +682 -0
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +13864 -0
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +7 -0
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +24225 -0
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js +223 -0
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +7 -0
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js +702 -0
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js +355 -0
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js +237 -0
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +7 -0
- package/dist/cli-bundle/main.js +6896 -0
- package/dist/cli-bundle/main.js.map +7 -0
- package/dist/cli.js +1 -1
- package/dist/core/config/nested-settings.d.ts +88 -0
- package/dist/core/config/nested-settings.js +273 -0
- package/dist/core/config/nested-settings.js.map +1 -0
- package/dist/core/item/parse.d.ts +19 -0
- package/dist/core/item/parse.js +76 -2
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/item/priority.d.ts +2 -1
- package/dist/core/item/priority.js +12 -2
- package/dist/core/item/priority.js.map +1 -1
- package/dist/core/item/type-synonyms.d.ts +20 -0
- package/dist/core/item/type-synonyms.js +42 -0
- package/dist/core/item/type-synonyms.js.map +1 -0
- package/dist/core/search/cache.js +46 -4
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/providers.js +25 -5
- package/dist/core/search/providers.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +73 -32
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/staleness.d.ts +23 -0
- package/dist/core/search/staleness.js +34 -0
- package/dist/core/search/staleness.js.map +1 -0
- package/dist/core/search/vector-stores.js +12 -3
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.d.ts +1 -1
- package/dist/core/sentry/helpers.js +4 -4
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/html-entity-decode.d.ts +22 -0
- package/dist/core/shared/html-entity-decode.js +127 -0
- package/dist/core/shared/html-entity-decode.js.map +1 -0
- package/dist/core/shared/split-comma-list.d.ts +20 -0
- package/dist/core/shared/split-comma-list.js +29 -0
- package/dist/core/shared/split-comma-list.js.map +1 -0
- package/dist/core/shared/time.js +52 -2
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +24 -0
- package/dist/core/store/front-matter-cache.js +119 -8
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.d.ts +7 -0
- package/dist/core/store/item-store.js +13 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +1 -0
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +19 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/mcp/server.js +11 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +47 -11
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +5 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +12 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.js +28 -7
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +3 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +7 -0
- package/docs/COMMANDS.md +17 -0
- package/docs/CONFIGURATION.md +66 -0
- package/docs/QUICKSTART.md +3 -0
- package/package.json +7 -4
- package/packages/pm-calendar/extensions/calendar/index.js +27 -2
- package/packages/pm-calendar/extensions/calendar/index.ts +28 -2
- package/packages/pm-calendar/extensions/calendar/runtime.js +5 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +6 -0
- package/scripts/bundle-cli.mjs +39 -0
|
@@ -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]="d3eeb72e-9b81-59a6-8541-cca40d98fab5")}catch(e){}}();
|
|
3
3
|
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
4
4
|
import { toItemRecord } from "../../core/item/item-record.js";
|
|
5
5
|
import { isTerminalStatus } from "../../core/item/status.js";
|
|
@@ -7,7 +7,7 @@ import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
|
|
|
7
7
|
import { resolveRuntimeStatusRegistry } from "../../core/schema/runtime-schema.js";
|
|
8
8
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
9
9
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
10
|
-
import {
|
|
10
|
+
import { listAllFrontMatterLight, mutateItem } from "../../core/store/item-store.js";
|
|
11
11
|
import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
|
|
12
12
|
import { readSettings } from "../../core/store/settings.js";
|
|
13
13
|
function toAuthor(candidate, defaultAuthor) {
|
|
@@ -55,7 +55,7 @@ function findMissingCloseValidationFields(frontMatter) {
|
|
|
55
55
|
}
|
|
56
56
|
async function findActiveChildIds(pmRoot, settings, parentId, statusRegistry) {
|
|
57
57
|
const typeRegistry = resolveItemTypeRegistry(settings);
|
|
58
|
-
const items = await
|
|
58
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
|
|
59
59
|
return items
|
|
60
60
|
.filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))
|
|
61
61
|
.map((item) => item.id)
|
|
@@ -182,4 +182,4 @@ export async function runClose(id, closeReasonText, options, global) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
//# sourceMappingURL=close.js.map
|
|
185
|
-
//# debugId=
|
|
185
|
+
//# debugId=d3eeb72e-9b81-59a6-8541-cca40d98fab5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close.js","sources":["cli/commands/close.ts"],"sourceRoot":"/","sourcesContent":["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { listAllFrontMatter, mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n}\n\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction ensureCloseReason(reasonText: string): string {\n const reason = reasonText.trim();\n if (reason.length === 0) {\n throw new PmCliError(\"Close reason text must not be empty\", EXIT_CODE.USAGE);\n }\n return reason;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatter(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nexport async function runClose(\n id: string,\n closeReasonText: string,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n const closeReason = ensureCloseReason(closeReasonText);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (isTerminalStatus(document.metadata.status, statusRegistry) && !options.force) {\n throw new PmCliError(`Item ${document.metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const mutationWarnings: string[] = [];\n // pm-fl0c #11: apply inline closure fields BEFORE the validation pass so\n // a single `pm close <id> \"reason\" --resolution \"...\"` call satisfies\n // strict validation without a prior pm update. Only meaningful trimmed\n // text writes; an empty/whitespace value is a no-op rather than a clear.\n const inlineCloseFields: Array<{ option: string | undefined; key: \"resolution\" | \"expected_result\" | \"actual_result\" }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") continue;\n const trimmed = option.trim();\n if (trimmed.length === 0) continue;\n document.metadata[key] = trimmed;\n }\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(document.metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n } else if (activeChildIds.length > 0) {\n // C3: minimal governance (validate-close off) should still tell the\n // agent it just closed a parent with open children, without blocking.\n mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n\n document.metadata.status = statusRegistry.close_status;\n document.metadata.close_reason = closeReason;\n\n const changedFields = [\"status\", \"close_reason\"];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option === \"string\" && option.trim().length > 0) {\n changedFields.push(key);\n }\n }\n if (document.metadata.assignee !== undefined) {\n delete document.metadata.assignee;\n changedFields.push(\"assignee\");\n }\n\n // C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active\n // blocker signal independently — scalar blocked_by, blocked_reason, and the\n // blocked_by dependency edges (kept consistent with the kyd6 invariant) —\n // even if only some are present (e.g. an orphaned edge or a stale\n // blocked_reason left by manual edits), so closed work stops surfacing in\n // blockers views, and annotate the cleanup.\n const previousBlockedBy =\n typeof document.metadata.blocked_by === \"string\" ? document.metadata.blocked_by.trim() : \"\";\n const existingDeps = document.metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = document.metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {\n if (previousBlockedBy.length > 0) {\n delete document.metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete document.metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n document.metadata.dependencies = remainingDeps;\n } else {\n delete document.metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id || \"unknown\";\n mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);\n }\n\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: result.warnings,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAA8B,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAuB5D,SAAS,QAAQ,CAAC,SAA6B,EAAE,aAAqB;IACpE,MAAM,QAAQ,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,aA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;yBAAM,CAAC;wBACN,OAAO,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACxC,CAAC;oBACD,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACrC,CAAC;gBACD,MAAM,eAAe,GAAG,iBAAiB,IAAI,aAAa,EAAE,EAAE,IAAI,SAAS,CAAC;gBAC5E,gBAAgB,CAAC,IAAI,CAAC,6BAA6B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,eAAe,EAAE,CAAC,CAAC;YAChG,CAAC;YAED,OAAO;gBACL,aAAa;gBACb,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC","debugId":"610305d5-0069-57e6-aea6-0e9973eac456"}
|
|
1
|
+
{"version":3,"file":"close.js","sources":["cli/commands/close.ts"],"sourceRoot":"/","sourcesContent":["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { listAllFrontMatterLight, mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n}\n\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction ensureCloseReason(reasonText: string): string {\n const reason = reasonText.trim();\n if (reason.length === 0) {\n throw new PmCliError(\"Close reason text must not be empty\", EXIT_CODE.USAGE);\n }\n return reason;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nexport async function runClose(\n id: string,\n closeReasonText: string,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n const closeReason = ensureCloseReason(closeReasonText);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (isTerminalStatus(document.metadata.status, statusRegistry) && !options.force) {\n throw new PmCliError(`Item ${document.metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const mutationWarnings: string[] = [];\n // pm-fl0c #11: apply inline closure fields BEFORE the validation pass so\n // a single `pm close <id> \"reason\" --resolution \"...\"` call satisfies\n // strict validation without a prior pm update. Only meaningful trimmed\n // text writes; an empty/whitespace value is a no-op rather than a clear.\n const inlineCloseFields: Array<{ option: string | undefined; key: \"resolution\" | \"expected_result\" | \"actual_result\" }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") continue;\n const trimmed = option.trim();\n if (trimmed.length === 0) continue;\n document.metadata[key] = trimmed;\n }\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(document.metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n } else if (activeChildIds.length > 0) {\n // C3: minimal governance (validate-close off) should still tell the\n // agent it just closed a parent with open children, without blocking.\n mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n\n document.metadata.status = statusRegistry.close_status;\n document.metadata.close_reason = closeReason;\n\n const changedFields = [\"status\", \"close_reason\"];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option === \"string\" && option.trim().length > 0) {\n changedFields.push(key);\n }\n }\n if (document.metadata.assignee !== undefined) {\n delete document.metadata.assignee;\n changedFields.push(\"assignee\");\n }\n\n // C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active\n // blocker signal independently — scalar blocked_by, blocked_reason, and the\n // blocked_by dependency edges (kept consistent with the kyd6 invariant) —\n // even if only some are present (e.g. an orphaned edge or a stale\n // blocked_reason left by manual edits), so closed work stops surfacing in\n // blockers views, and annotate the cleanup.\n const previousBlockedBy =\n typeof document.metadata.blocked_by === \"string\" ? document.metadata.blocked_by.trim() : \"\";\n const existingDeps = document.metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = document.metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {\n if (previousBlockedBy.length > 0) {\n delete document.metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete document.metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n document.metadata.dependencies = remainingDeps;\n } else {\n delete document.metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id || \"unknown\";\n mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);\n }\n\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: result.warnings,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAA8B,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,M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CAAC,cAAc,CAAC;oBACxC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBACvC,CAAC;gBACD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBAChC,MAAM,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;oBAC9E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAC7B,QAAQ,CAAC,QAAQ,CAAC,YAAY,GAAG,aAAa,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACN,OAAO,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACxC,CAAC;oBACD,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACrC,CAAC;gBACD,MAAM,eAAe,GAAG,iBAAiB,IAAI,aAAa,EAAE,EAAE,IAAI,SAAS,CAAC;gBAC5E,gBAAgB,CAAC,IAAI,CAAC,6BAA6B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,eAAe,EAAE,CAAC,CAAC;YAChG,CAAC;YAED,OAAO;gBACL,aAAa;gBACb,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC","debugId":"d3eeb72e-9b81-59a6-8541-cca40d98fab5"}
|
|
@@ -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]="56ca52a0-bad8-57a6-af37-8b54538f07fa")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
4
4
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
5
5
|
import { ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, SEARCH_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "../../sdk/cli-contracts.js";
|
|
@@ -473,6 +473,7 @@ ${zshListRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
473
473
|
'(-s --status)'{-s,--status}'[Item status]:(${statusChoices})' \\
|
|
474
474
|
'(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
|
|
475
475
|
'--tags[Comma-separated tags]:tags' \\
|
|
476
|
+
'--add-tags[Add tags additively without replacing existing]:tags' \\
|
|
476
477
|
'(-b --body)'{-b,--body}'[Item body]:body' \\
|
|
477
478
|
'--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
|
|
478
479
|
'--estimate[Estimated minutes]:minutes' \\
|
|
@@ -509,6 +510,10 @@ ${zshCreateRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
509
510
|
'(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
|
|
510
511
|
'--type[Item type]:(${typeChoices})' \\
|
|
511
512
|
'--tags[Comma-separated tags]:tags' \\
|
|
513
|
+
'--add-tags[Add tags additively without replacing existing]:tags' \\
|
|
514
|
+
'--remove-tags[Remove tags from the existing list]:tags' \\
|
|
515
|
+
'--expected[Short alias for --expected-result]:expected_result' \\
|
|
516
|
+
'--actual[Short alias for --actual-result]:actual_result' \\
|
|
512
517
|
'--comment[Comment seed author=<value>,created_at=<iso|now>,text=<value>]:comment' \\
|
|
513
518
|
'--note[Note seed author=<value>,created_at=<iso|now>,text=<value>]:note' \\
|
|
514
519
|
'--learning[Learning seed author=<value>,created_at=<iso|now>,text=<value>]:learning' \\
|
|
@@ -560,6 +565,8 @@ ${zshUpdateRuntimeFieldFlags} '--allow-audit-update[Allow non-owner m
|
|
|
560
565
|
'(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
|
|
561
566
|
'--type[Item type]:(${typeChoices})' \\
|
|
562
567
|
'--tags[Comma-separated tags]:tags' \\
|
|
568
|
+
'--add-tags[Add tags additively without replacing existing]:tags' \\
|
|
569
|
+
'--remove-tags[Remove tags from the existing list]:tags' \\
|
|
563
570
|
'--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
|
|
564
571
|
'--estimate[Estimated minutes]:minutes' \\
|
|
565
572
|
'--acceptance-criteria[Acceptance criteria]:criteria' \\
|
|
@@ -583,6 +590,8 @@ ${zshUpdateRuntimeFieldFlags} '--allow-audit-update[Allow non-owner m
|
|
|
583
590
|
'--resolution[Issue resolution summary]:resolution' \\
|
|
584
591
|
'--expected-result[Issue expected behavior]:expected_result' \\
|
|
585
592
|
'--actual-result[Issue observed behavior]:actual_result' \\
|
|
593
|
+
'--expected[Short alias for --expected-result]:expected_result' \\
|
|
594
|
+
'--actual[Short alias for --actual-result]:actual_result' \\
|
|
586
595
|
'--affected-version[Affected version identifier]:affected_version' \\
|
|
587
596
|
'--fixed-version[Fixed version identifier]:fixed_version' \\
|
|
588
597
|
'--component[Issue component ownership]:component' \\
|
|
@@ -725,7 +734,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
725
734
|
;;
|
|
726
735
|
get)
|
|
727
736
|
_arguments \\
|
|
728
|
-
'--depth[Detail depth]:(brief standard deep)' \\
|
|
737
|
+
'--depth[Detail depth]:(brief standard deep full)' \\
|
|
729
738
|
'--full[Explicit full item read]' \\
|
|
730
739
|
'--fields[Render custom comma-separated item fields]:fields' \\
|
|
731
740
|
'--json[Output JSON]' \\
|
|
@@ -964,9 +973,16 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
964
973
|
;;
|
|
965
974
|
close)
|
|
966
975
|
_arguments \\
|
|
976
|
+
'--reason[Closure reason]:reason' \\
|
|
977
|
+
'--close-reason[Alias for --reason]:close_reason' \\
|
|
967
978
|
'--author[Mutation author]:author' \\
|
|
968
979
|
'--message[History message]:message' \\
|
|
969
980
|
'--validate-close[Validate closure metadata mode]:(off warn strict)' \\
|
|
981
|
+
'--resolution[Closure resolution summary]:resolution' \\
|
|
982
|
+
'--expected-result[Expected behavior note]:expected_result' \\
|
|
983
|
+
'--actual-result[Observed behavior note]:actual_result' \\
|
|
984
|
+
'--expected[Short alias for --expected-result]:expected_result' \\
|
|
985
|
+
'--actual[Short alias for --actual-result]:actual_result' \\
|
|
970
986
|
'--force[Force override]' \\
|
|
971
987
|
'--json[Output JSON]' \\
|
|
972
988
|
'--quiet[Suppress stdout]'
|
|
@@ -1301,6 +1317,7 @@ complete -c pm -n '__fish_seen_subcommand_from create' -l schedule-preset
|
|
|
1301
1317
|
complete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a '${statusChoices}'
|
|
1302
1318
|
complete -c pm -n '__fish_seen_subcommand_from create' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
|
|
1303
1319
|
complete -c pm -n '__fish_seen_subcommand_from create' -l tags -d 'Comma-separated tags' -r
|
|
1320
|
+
complete -c pm -n '__fish_seen_subcommand_from create' -l add-tags -d 'Add tags additively without replacing existing' -r
|
|
1304
1321
|
complete -c pm -n '__fish_seen_subcommand_from create' -s b -l body -d 'Item body' -r
|
|
1305
1322
|
complete -c pm -n '__fish_seen_subcommand_from create' -l deadline -d 'Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)' -r
|
|
1306
1323
|
complete -c pm -n '__fish_seen_subcommand_from create' -l estimate -d 'Estimated minutes' -r
|
|
@@ -1332,6 +1349,10 @@ complete -c pm -n '__fish_seen_subcommand_from update' -s s -l status
|
|
|
1332
1349
|
complete -c pm -n '__fish_seen_subcommand_from update' -l close-reason -d 'Set close reason' -r
|
|
1333
1350
|
complete -c pm -n '__fish_seen_subcommand_from update' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
|
|
1334
1351
|
complete -c pm -n '__fish_seen_subcommand_from update' -l type -d 'Item type' -r -a '${typeChoices}'
|
|
1352
|
+
complete -c pm -n '__fish_seen_subcommand_from update' -l add-tags -d 'Add tags additively without replacing existing' -r
|
|
1353
|
+
complete -c pm -n '__fish_seen_subcommand_from update' -l remove-tags -d 'Remove tags from the existing list' -r
|
|
1354
|
+
complete -c pm -n '__fish_seen_subcommand_from update' -l expected -d 'Short alias for --expected-result' -r
|
|
1355
|
+
complete -c pm -n '__fish_seen_subcommand_from update' -l actual -d 'Short alias for --actual-result' -r
|
|
1335
1356
|
complete -c pm -n '__fish_seen_subcommand_from update' -l comment -d 'Comment seed author=<value>,created_at=<iso|now>,text=<value>' -r
|
|
1336
1357
|
complete -c pm -n '__fish_seen_subcommand_from update' -l note -d 'Note seed author=<value>,created_at=<iso|now>,text=<value>' -r
|
|
1337
1358
|
complete -c pm -n '__fish_seen_subcommand_from update' -l learning -d 'Learning seed author=<value>,created_at=<iso|now>,text=<value>' -r
|
|
@@ -1383,6 +1404,8 @@ complete -c pm -n '__fish_seen_subcommand_from update-many' -s b -l body
|
|
|
1383
1404
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
|
|
1384
1405
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l type -d 'Item type' -r -a '${typeChoices}'
|
|
1385
1406
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l tags -d 'Comma-separated tags' -r
|
|
1407
|
+
complete -c pm -n '__fish_seen_subcommand_from update-many' -l add-tags -d 'Add tags additively without replacing existing' -r
|
|
1408
|
+
complete -c pm -n '__fish_seen_subcommand_from update-many' -l remove-tags -d 'Remove tags from the existing list' -r
|
|
1386
1409
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l deadline -d 'Deadline (ISO/date string or relative)' -r
|
|
1387
1410
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l estimate -d 'Estimated minutes' -r
|
|
1388
1411
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l acceptance-criteria -d 'Acceptance criteria' -r
|
|
@@ -1406,6 +1429,8 @@ complete -c pm -n '__fish_seen_subcommand_from update-many' -l repro-steps
|
|
|
1406
1429
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l resolution -d 'Issue resolution summary' -r
|
|
1407
1430
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l expected-result -d 'Issue expected behavior' -r
|
|
1408
1431
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l actual-result -d 'Issue observed behavior' -r
|
|
1432
|
+
complete -c pm -n '__fish_seen_subcommand_from update-many' -l expected -d 'Short alias for --expected-result' -r
|
|
1433
|
+
complete -c pm -n '__fish_seen_subcommand_from update-many' -l actual -d 'Short alias for --actual-result' -r
|
|
1409
1434
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l affected-version -d 'Affected version identifier' -r
|
|
1410
1435
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l fixed-version -d 'Fixed version identifier' -r
|
|
1411
1436
|
complete -c pm -n '__fish_seen_subcommand_from update-many' -l component -d 'Issue component ownership' -r
|
|
@@ -1521,7 +1546,7 @@ complete -c pm -n '__fish_seen_subcommand_from reindex' -l mode -d 'Reindex mode
|
|
|
1521
1546
|
complete -c pm -n '__fish_seen_subcommand_from reindex' -l progress -d 'Emit progress updates to stderr'
|
|
1522
1547
|
|
|
1523
1548
|
# get flags
|
|
1524
|
-
complete -c pm -n '__fish_seen_subcommand_from get' -l depth -d 'Detail depth' -r -a 'brief standard deep'
|
|
1549
|
+
complete -c pm -n '__fish_seen_subcommand_from get' -l depth -d 'Detail depth' -r -a 'brief standard deep full'
|
|
1525
1550
|
complete -c pm -n '__fish_seen_subcommand_from get' -l full -d 'Explicit full item read'
|
|
1526
1551
|
complete -c pm -n '__fish_seen_subcommand_from get' -l fields -d 'Render custom comma-separated item fields' -r
|
|
1527
1552
|
|
|
@@ -1667,6 +1692,13 @@ complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-ta
|
|
|
1667
1692
|
complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l message -d 'History message' -r
|
|
1668
1693
|
complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l force -d 'Force override'
|
|
1669
1694
|
complete -c pm -n '__fish_seen_subcommand_from close close-task' -l validate-close -d 'Validate closure metadata mode' -r -a 'off warn strict'
|
|
1695
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l reason -d 'Closure reason' -r
|
|
1696
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l close-reason -d 'Alias for --reason' -r
|
|
1697
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l resolution -d 'Closure resolution summary' -r
|
|
1698
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l expected-result -d 'Expected behavior note' -r
|
|
1699
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l actual-result -d 'Observed behavior note' -r
|
|
1700
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l expected -d 'Short alias for --expected-result' -r
|
|
1701
|
+
complete -c pm -n '__fish_seen_subcommand_from close' -l actual -d 'Short alias for --actual-result' -r
|
|
1670
1702
|
complete -c pm -n '__fish_seen_subcommand_from release' -l allow-audit-release -d 'Allow non-owner release handoffs without requiring --force'
|
|
1671
1703
|
complete -c pm -n '__fish_seen_subcommand_from delete' -l dry-run -d 'Preview the item file that would be deleted without mutating'
|
|
1672
1704
|
|
|
@@ -1782,4 +1814,4 @@ export function runCompletion(shell, itemTypes = DEFAULT_ITEM_TYPES, tags = [],
|
|
|
1782
1814
|
};
|
|
1783
1815
|
}
|
|
1784
1816
|
//# sourceMappingURL=completion.js.map
|
|
1785
|
-
//# debugId=
|
|
1817
|
+
//# debugId=56ca52a0-bad8-57a6-af37-8b54538f07fa
|