@unbrained/pm-cli 2026.9.19 → 2026.9.21

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.
Files changed (149) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +954 -924
  3. package/dist/cli/main.d.ts +10 -76
  4. package/dist/cli/main.js +1 -2
  5. package/dist/cli/register-operations.js +1 -1
  6. package/dist/cli/runtime/activation.d.ts +51 -0
  7. package/dist/cli/runtime/activation.js +2 -0
  8. package/dist/cli/runtime/invocation-options.d.ts +41 -0
  9. package/dist/cli/runtime/invocation-options.js +2 -0
  10. package/dist/cli/runtime/selection.d.ts +29 -0
  11. package/dist/cli/runtime/selection.js +2 -0
  12. package/dist/cli/runtime/telemetry-outcome.d.ts +20 -0
  13. package/dist/cli/runtime/telemetry-outcome.js +2 -0
  14. package/dist/cli-bundle/bundle-manifest.json +150 -150
  15. package/dist/cli-bundle/chunks/{chunk-QA4GUEKJ.js → chunk-2QLXN6HZ.js} +46 -46
  16. package/dist/cli-bundle/chunks/chunk-2UNYUB4A.js +2 -0
  17. package/dist/cli-bundle/chunks/chunk-4SI67A2F.js +8 -0
  18. package/dist/cli-bundle/chunks/chunk-7YUYLYJQ.js +6 -0
  19. package/dist/cli-bundle/chunks/{chunk-7CN53F4S.js → chunk-FBWAECBI.js} +3 -3
  20. package/dist/cli-bundle/chunks/chunk-GRHSNUQO.js +20 -0
  21. package/dist/cli-bundle/chunks/chunk-HAFSMFJK.js +3 -0
  22. package/dist/cli-bundle/chunks/chunk-JBJUOOJI.js +238 -0
  23. package/dist/cli-bundle/chunks/chunk-K7RWRJLT.js +29 -0
  24. package/dist/cli-bundle/chunks/chunk-NHRB3L5T.js +2 -0
  25. package/dist/cli-bundle/chunks/{chunk-CCLWCESZ.js → chunk-QZTS23BV.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-K4VAU4HU.js → chunk-SDLBF4PY.js} +1252 -1252
  27. package/dist/cli-bundle/chunks/{register-list-query-RMZNHSII.js → register-list-query-5V43MYPN.js} +6 -6
  28. package/dist/cli-bundle/chunks/{register-mutation-HJGSGX3H.js → register-mutation-DXES37MA.js} +4 -4
  29. package/dist/cli-bundle/chunks/register-operations-LJU5H2CU.js +2 -0
  30. package/dist/cli-bundle/chunks/register-setup-HJUNGYBB.js +2 -0
  31. package/dist/cli-bundle/focused-chunks/chunk-3XPBKIV6.js +12 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-7Y7PAC56.js → chunk-5BLRMUMK.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-5SZ4JSPZ.js → chunk-6MNKQKT6.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-IKPR4VVN.js → chunk-DPBTIFW7.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-J3GN4SQT.js → chunk-DRNXMOSV.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-P4BA7OX7.js → chunk-FXAZPSU6.js} +7 -7
  37. package/dist/cli-bundle/focused-chunks/{chunk-ARK4FIO4.js → chunk-HYPK5OPA.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-I4WDON3K.js → chunk-IA5CCSBB.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-CJ4QA4RW.js → chunk-ISEOBALS.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-ZI2YBJFH.js → chunk-K5ZCBC6Y.js} +3 -3
  41. package/dist/cli-bundle/focused-chunks/{chunk-V3YMNAO7.js → chunk-L6L4XCLY.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-TDHVROGL.js → chunk-N6KI3LWF.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-PC6ZZVNP.js +20 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-RQL5WLNZ.js +30 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-ZDBKYZFE.js → chunk-U2SB2BMM.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-YDFEWXXZ.js → chunk-UIS5FVHH.js} +53 -53
  47. package/dist/cli-bundle/main.js +26 -27
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +39 -39
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +42 -42
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +8 -8
  58. package/dist/core/diagnostics/remediation.js +1 -1
  59. package/dist/core/extensions/extension-types.d.ts +2 -2
  60. package/dist/core/extensions/loader.d.ts +9 -15
  61. package/dist/core/extensions/loader.js +1 -1
  62. package/dist/core/extensions/manifest-parser.d.ts +5 -0
  63. package/dist/core/extensions/manifest-parser.js +2 -0
  64. package/dist/core/extensions/registration-contracts.d.ts +34 -0
  65. package/dist/core/extensions/registration-contracts.js +2 -0
  66. package/dist/core/governance/issue-codes.d.ts +10 -1
  67. package/dist/core/governance/issue-codes.js +1 -1
  68. package/dist/core/validate/fix-planning.d.ts +3 -3
  69. package/dist/core/validate/fix-planning.js +1 -1
  70. package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
  71. package/dist/sdk/completion/bash.d.ts +3 -0
  72. package/dist/sdk/completion/bash.js +2 -0
  73. package/dist/sdk/completion/fish.d.ts +3 -0
  74. package/dist/sdk/completion/fish.js +1054 -0
  75. package/dist/sdk/completion/shared.d.ts +103 -0
  76. package/dist/sdk/completion/shared.js +2 -0
  77. package/dist/sdk/completion/zsh.d.ts +3 -0
  78. package/dist/sdk/completion/zsh.js +1109 -0
  79. package/dist/sdk/completion.d.ts +5 -30
  80. package/dist/sdk/completion.js +1 -2160
  81. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  82. package/dist/sdk/governance/closure-timestamps.d.ts +32 -0
  83. package/dist/sdk/governance/closure-timestamps.js +2 -0
  84. package/dist/sdk/governance/validate-normalization.d.ts +2 -0
  85. package/dist/sdk/governance/validate-normalization.js +1 -1
  86. package/dist/sdk/governance/validate.js +1 -1
  87. package/dist/sdk/governance.d.ts +1 -0
  88. package/dist/sdk/governance.js +1 -1
  89. package/dist/sdk/public-surface.json +1 -1
  90. package/dist/sdk/query/search/corpus.d.ts +27 -0
  91. package/dist/sdk/query/search/corpus.js +2 -0
  92. package/dist/sdk/query/search/filters.d.ts +27 -0
  93. package/dist/sdk/query/search/filters.js +2 -0
  94. package/dist/sdk/query/search/input.d.ts +28 -0
  95. package/dist/sdk/query/search/input.js +2 -0
  96. package/dist/sdk/query/search/lexical.d.ts +34 -0
  97. package/dist/sdk/query/search/lexical.js +2 -0
  98. package/dist/sdk/query/search/response.d.ts +34 -0
  99. package/dist/sdk/query/search/response.js +2 -0
  100. package/dist/sdk/query/search/semantic.d.ts +229 -0
  101. package/dist/sdk/query/search/semantic.js +3 -0
  102. package/dist/sdk/query/search/types.d.ts +123 -0
  103. package/dist/sdk/query/search/types.js +2 -0
  104. package/dist/sdk/query/search.d.ts +13 -364
  105. package/dist/sdk/query/search.js +1 -2
  106. package/dist/sdk/runtime/actions.d.ts +4 -0
  107. package/dist/sdk/runtime/actions.js +2 -0
  108. package/dist/sdk/runtime/context.d.ts +38 -0
  109. package/dist/sdk/runtime/context.js +2 -0
  110. package/dist/sdk/runtime/schema.d.ts +4 -0
  111. package/dist/sdk/runtime/schema.js +2 -0
  112. package/dist/sdk/runtime.d.ts +90 -95
  113. package/dist/sdk/runtime.js +1 -1
  114. package/docs/ARCHITECTURE.md +68 -0
  115. package/docs/HISTORY_GOVERNANCE_REPAIR.md +66 -0
  116. package/docs/README.md +2 -0
  117. package/docs/VALIDATION_PORTABILITY.md +82 -0
  118. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
  119. package/marketplace.json +2 -2
  120. package/package.json +6 -6
  121. package/packages/pm-beads/package.json +1 -1
  122. package/packages/pm-calendar/package.json +1 -1
  123. package/packages/pm-command-kit/package.json +1 -1
  124. package/packages/pm-digital-twin/package.json +1 -1
  125. package/packages/pm-governance-audit/package.json +1 -1
  126. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +23 -17
  127. package/packages/pm-guide-shell/package.json +1 -1
  128. package/packages/pm-kanban/package.json +1 -1
  129. package/packages/pm-lifecycle-hooks/package.json +1 -1
  130. package/packages/pm-linked-test-adapters/package.json +1 -1
  131. package/packages/pm-search-advanced/package.json +1 -1
  132. package/packages/pm-templates/package.json +1 -1
  133. package/packages/pm-todos/package.json +1 -1
  134. package/packages/pm-vcs/package.json +1 -1
  135. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  136. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  137. package/dist/cli-bundle/chunks/chunk-AACGU5IA.js +0 -3
  138. package/dist/cli-bundle/chunks/chunk-J7NP7QLW.js +0 -6
  139. package/dist/cli-bundle/chunks/chunk-KHN4NMKT.js +0 -238
  140. package/dist/cli-bundle/chunks/chunk-KYG2QKNY.js +0 -29
  141. package/dist/cli-bundle/chunks/chunk-OQS2Y6VN.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-QTHR3LXF.js +0 -20
  143. package/dist/cli-bundle/chunks/chunk-RVMDPIGD.js +0 -2
  144. package/dist/cli-bundle/chunks/chunk-WASMH647.js +0 -8
  145. package/dist/cli-bundle/chunks/register-operations-LBEMFUMM.js +0 -2
  146. package/dist/cli-bundle/chunks/register-setup-MU557JAA.js +0 -2
  147. package/dist/cli-bundle/focused-chunks/chunk-I32L3FWW.js +0 -12
  148. package/dist/cli-bundle/focused-chunks/chunk-OOZHQFBF.js +0 -20
  149. package/dist/cli-bundle/focused-chunks/chunk-QL4MO5M2.js +0 -30
@@ -0,0 +1,103 @@
1
+ /** Shell dialects supported by the SDK completion generators. */
2
+ export type CompletionShell = "bash" | "zsh" | "fish";
3
+ /** Documents the completion result payload exchanged by command, SDK, and package integrations. */
4
+ export interface CompletionResult {
5
+ /** Value that configures or reports shell for this contract. */
6
+ shell: CompletionShell;
7
+ /** Value that configures or reports script for this contract. */
8
+ script: string;
9
+ /** Value that configures or reports setup hint for this contract. */
10
+ setup_hint: string;
11
+ }
12
+ type CompletionFlagCommand = "list" | "create" | "update" | "update-many" | "search" | "calendar" | "context";
13
+ /** Documents the completion runtime config payload exchanged by command, SDK, and package integrations. */
14
+ export interface CompletionRuntimeConfig {
15
+ /** Active package command paths whose namespace facets may be advertised. Legacy aliases are accepted. */
16
+ namespace_commands?: readonly string[];
17
+ /** Value that configures or reports item types for this contract. */
18
+ item_types?: string[];
19
+ /** Value that configures or reports statuses for this contract. */
20
+ statuses?: string[];
21
+ /** Value that configures or reports command flags for this contract. */
22
+ command_flags?: Partial<Record<CompletionFlagCommand, string[]>>;
23
+ }
24
+ declare const HIDDEN_COMMAND_ALIASES: Set<string>;
25
+ declare const ALL_COMMANDS: string[];
26
+ declare const LIST_FLAGS: string;
27
+ declare const AGGREGATE_FLAGS: string;
28
+ declare const APPEND_FLAGS: string;
29
+ declare const COPY_FLAGS: string;
30
+ declare const RESTORE_INVOCATIONS: import("../flag-invocation-contracts.js").CliFlagInvocationContract[];
31
+ declare const ATTEST_INVOCATIONS: import("../flag-invocation-contracts.js").CliFlagInvocationContract[];
32
+ declare const FOCUS_FLAGS: string;
33
+ declare const MEET_FLAGS: string;
34
+ declare const REMIND_FLAGS: string;
35
+ declare const CREATE_FLAGS: string;
36
+ declare const GET_FLAGS: string;
37
+ declare const UPDATE_FLAGS: string;
38
+ declare const UPDATE_MANY_FLAGS: string;
39
+ declare const CLOSE_MANY_FLAGS: string;
40
+ declare const NAMESPACE_NOUNS: string[];
41
+ declare const NAMESPACE_PREFIXES: string[];
42
+ declare const HISTORY_LEAVES: string;
43
+ /** Advertise core namespace leaves plus facets supplied by the active package registry. */
44
+ declare function completionNamespaceLeaves(runtime: CompletionRuntimeConfig): Record<string, string>;
45
+ declare const HISTORY_OPERATION_FLAGS: {
46
+ flags: string;
47
+ alias: string;
48
+ canonical: string;
49
+ canonical_argv: readonly string[];
50
+ lifecycle: import("../cli-contracts.js").PmCommandAliasLifecycle;
51
+ hidden: boolean;
52
+ registration: import("../cli-contracts.js").PmCommandAliasRegistration;
53
+ owner: string;
54
+ }[];
55
+ declare const HISTORY_FLAGS: string;
56
+ declare const HISTORY_AUTHOR_ACKNOWLEDGE_FLAGS: string;
57
+ declare const EVENTS_FLAGS: string;
58
+ declare const CALENDAR_FLAGS: string;
59
+ declare const CONTEXT_FLAGS: string;
60
+ declare const NEXT_FLAGS: string;
61
+ declare const DEPS_FLAGS: string;
62
+ declare const DUPLICATES_FLAGS: string;
63
+ declare const GRAPH_FLAGS: string;
64
+ declare const GUIDE_FLAGS: string;
65
+ declare const SEARCH_FLAGS: string;
66
+ declare const STATS_FLAGS: string;
67
+ declare const HEALTH_FLAGS: string;
68
+ declare const INIT_FLAGS: string;
69
+ declare const CONTRACTS_FLAGS: string;
70
+ declare const PLAN_FLAGS: string;
71
+ declare const SCHEMA_SUBCOMMAND_CHOICES: string;
72
+ declare const PLAN_SUBCOMMANDS_LIST = "create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize";
73
+ declare const COMPLETION_SHELL_CHOICES: string;
74
+ declare const GUIDE_TOPIC_CHOICES: string;
75
+ declare const EXTENSION_LIFECYCLE_ACTIONS = "init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate migrate";
76
+ declare const PACKAGE_LIFECYCLE_ACTIONS = "init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate migrate upgrade";
77
+ declare const EXTENSION_LIFECYCLE_FLAGS: string;
78
+ declare const PACKAGE_LIFECYCLE_FLAGS: string;
79
+ declare const UPGRADE_FLAGS: string;
80
+ declare const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
81
+ declare const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
82
+ declare const CLOSE_MUTATION_FLAGS: string;
83
+ declare const CLOSE_TASK_MUTATION_FLAGS: string;
84
+ declare const RELEASE_MUTATION_FLAGS: string;
85
+ declare const CLAIM_MUTATION_FLAGS: string;
86
+ declare const COMMAND_COMPLETION_DESCRIPTIONS: readonly [readonly ["init", "Initialize pm storage for the current workspace"], readonly ["config", "Read or update pm settings"], readonly ["package", "Manage package lifecycle operations"], readonly ["packages", "Alias for package"], readonly ["create", "Create a new project management item"], readonly ["item", "Manage item evidence, links, tests, and duplication"], readonly ["copy", "Copy an existing item to a new ID"], readonly ["focus", "Set/clear/show the session focused parent for new items"], readonly ["list", "List active items with optional filters"], readonly ["aggregate", "Aggregate grouped item counts and numeric stats for governance queries"], readonly ["duplicates", "Find bounded duplicate clusters across lifecycle statuses"], readonly ["guide", "Browse local progressive-disclosure guides"], readonly ["calendar", "Show calendar views for deadlines and reminders"], readonly ["cal", "Alias for calendar"], readonly ["context", "Show a token-efficient project context snapshot"], readonly ["ctx", "Alias for context"], readonly ["get", "Show item details by ID"], readonly ["next", "Recommend the next actionable (unblocked, ready) work item"], readonly ["search", "Search items with keyword, semantic, or hybrid modes"], readonly ["reindex", "Rebuild search artifacts"], readonly ["history", "Show item history entries"], readonly ["history-compact", "Compact history streams into a synthetic baseline + retained tail"], readonly ["history-redact", "Redact sensitive literals/patterns and recompute history hashes"], readonly ["history-repair", "Re-anchor a drifted history chain so pm health/validate report ok"], readonly ["schema", "Manage custom item types and statuses in .agents/pm/schema/*.json"], readonly ["profile", "List, show, apply, and lint project profiles (archetype schema/config/template/package bundles)"], readonly ["plan", "Agent-optimized Plan item workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)"], readonly ["activity", "Show recent activity across items"], readonly ["restore", "Restore an item to an earlier state"], readonly ["update", "Update item fields and metadata"], readonly ["update-many", "Bulk-update matched items with dry-run and rollback checkpoints"], readonly ["close", "Close an item (reason requirement follows governance settings)"], readonly ["close-many", "Bulk-close matched items with an optional shared reason and rollback checkpoint"], readonly ["delete", "Delete an item and record the change"], readonly ["append", "Append text to an item body"], readonly ["comments", "List or add comments for an item"], readonly ["notes", "List or add notes for an item"], readonly ["learnings", "List or add learnings for an item"], readonly ["files", "Manage linked files"], readonly ["docs", "Manage linked docs"], readonly ["deps", "Show dependency relationships for an item"], readonly ["graph", "Bounded graph traversal, analytics, and governance-audit queries"], readonly ["test", "Manage linked tests and optionally run them"], readonly ["test-all", "Run linked tests across matching items"], readonly ["test-runs", "Manage background linked-test runs"], readonly ["stats", "Show project tracker statistics"], readonly ["health", "Show project tracker health checks"], readonly ["validate", "Run standalone validation checks"], readonly ["gc", "Clean optional cache artifacts"], readonly ["contracts", "Show machine-readable command and schema contracts"], readonly ["claim", "Claim an item for active work"], readonly ["release", "Release the active claim for an item"], readonly ["start-task", "Lifecycle alias to claim and set in_progress"], readonly ["pause-task", "Lifecycle alias to reopen and release claim"], readonly ["close-task", "Lifecycle alias to close and release claim"], readonly ["meet", "Shortcut to create a Meeting with scheduling defaults"], readonly ["event", "Shortcut to create an Event with scheduling defaults"], readonly ["remind", "Shortcut to create a Reminder from a point in time"], readonly ["templates", "Manage reusable create templates"], readonly ["completion", "Generate shell completion"], readonly ["help", "Display help for a command"]];
87
+ declare const GLOBAL_FLAGS: string;
88
+ declare const GLOBAL_COMPLETION_VALUE_PATTERNS: string;
89
+ declare const GLOBAL_COMPLETION_INLINE_PATTERNS: string;
90
+ declare const GLOBAL_COMPLETION_SWITCH_PATTERNS: string;
91
+ /** Deduplicate, sort and join non-empty completion choices for deterministic output. */
92
+ declare function joinCompletionValues(values: string[]): string;
93
+ /** Escape shell interpolation characters before embedding a value in a double-quoted resolver fallback. */
94
+ declare function shellDoubleQuote(value: string): string;
95
+ /** Choose explicit, runtime or built-in item types while retaining their configured order. */
96
+ declare function completionTypeValues(itemTypes: string[], runtime: CompletionRuntimeConfig): string;
97
+ /** Choose runtime or built-in statuses and normalize them into deterministic completion choices. */
98
+ declare function completionStatusValues(runtime: CompletionRuntimeConfig): string;
99
+ /** Merge contract-derived flags with runtime schema flags without duplicates. */
100
+ declare function mergeFlagStrings(baseFlags: string, runtimeFlags: string[] | undefined): string;
101
+ /** Normalize contributed long flags to dashed completion spellings and stable order. */
102
+ declare function normalizeRuntimeCompletionFlags(runtimeFlags: string[] | undefined): string[];
103
+ export { AGGREGATE_FLAGS, ALL_COMMANDS, APPEND_FLAGS, ATTEST_INVOCATIONS, CALENDAR_FLAGS, CLAIM_MUTATION_FLAGS, CLOSE_MANY_FLAGS, CLOSE_MUTATION_FLAGS, CLOSE_TASK_MUTATION_FLAGS, COMMAND_COMPLETION_DESCRIPTIONS, COMPLETION_SHELL_CHOICES, CONTEXT_FLAGS, CONTRACTS_FLAGS, COPY_FLAGS, CREATE_FLAGS, DELETE_MUTATION_FLAGS, DEPS_FLAGS, DUPLICATES_FLAGS, EVENTS_FLAGS, EXTENSION_LIFECYCLE_ACTIONS, EXTENSION_LIFECYCLE_FLAGS, FOCUS_FLAGS, GET_FLAGS, GLOBAL_COMPLETION_INLINE_PATTERNS, GLOBAL_COMPLETION_SWITCH_PATTERNS, GLOBAL_COMPLETION_VALUE_PATTERNS, GLOBAL_FLAGS, GRAPH_FLAGS, GUIDE_FLAGS, GUIDE_TOPIC_CHOICES, HEALTH_FLAGS, HIDDEN_COMMAND_ALIASES, HISTORY_AUTHOR_ACKNOWLEDGE_FLAGS, HISTORY_FLAGS, HISTORY_LEAVES, HISTORY_OPERATION_FLAGS, INIT_FLAGS, LIST_FLAGS, MEET_FLAGS, MUTATION_FLAGS, NAMESPACE_NOUNS, NAMESPACE_PREFIXES, NEXT_FLAGS, PACKAGE_LIFECYCLE_ACTIONS, PACKAGE_LIFECYCLE_FLAGS, PLAN_FLAGS, PLAN_SUBCOMMANDS_LIST, RELEASE_MUTATION_FLAGS, REMIND_FLAGS, RESTORE_INVOCATIONS, SCHEMA_SUBCOMMAND_CHOICES, SEARCH_FLAGS, STATS_FLAGS, UPDATE_FLAGS, UPDATE_MANY_FLAGS, UPGRADE_FLAGS, completionNamespaceLeaves, completionStatusValues, completionTypeValues, joinCompletionValues, mergeFlagStrings, normalizeRuntimeCompletionFlags, shellDoubleQuote };
@@ -0,0 +1,2 @@
1
+ !(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]="033b7bbd-f219-583f-a43c-42ffdf535d9d")}catch(e2){}})();import{BUILTIN_ITEM_TYPE_VALUES,STATUS_VALUES}from"../../types/index.js";import{listPmCommandsForTier,resolvePmCommandVisibilityTier}from"../agent-capability-contracts.js";import{AGGREGATE_FLAG_CONTRACTS,APPEND_FLAG_CONTRACTS,CALENDAR_FLAG_CONTRACTS,CLOSE_MANY_FLAG_CONTRACTS,COMPLETION_FLAG_CONTRACTS,CONTEXT_FLAG_CONTRACTS,CONTRACTS_FLAG_CONTRACTS,COPY_FLAG_CONTRACTS,CREATE_FLAG_CONTRACTS,DEPS_FLAG_CONTRACTS,DUPLICATES_FLAG_CONTRACTS,EVENTS_FLAG_CONTRACTS,EXTENSION_FLAG_CONTRACTS,FOCUS_FLAG_CONTRACTS,GET_FLAG_CONTRACTS,GLOBAL_FLAG_CONTRACTS,GRAPH_FLAG_CONTRACTS,GUIDE_FLAG_CONTRACTS,HEALTH_FLAG_CONTRACTS,HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,HISTORY_FLAG_CONTRACTS,INIT_FLAG_CONTRACTS,LIST_FILTER_FLAG_CONTRACTS,MEET_FLAG_CONTRACTS,NEXT_FLAG_CONTRACTS,PACKAGE_FLAG_CONTRACTS,PLAN_FLAG_CONTRACTS,PM_COMMAND_ALIAS_CONTRACTS,PM_NAMESPACED_COMMAND_ALIASES,REMIND_FLAG_CONTRACTS,SEARCH_FLAG_CONTRACTS,STATS_FLAG_CONTRACTS,UPDATE_FLAG_CONTRACTS,UPDATE_MANY_FLAG_CONTRACTS,UPGRADE_FLAG_CONTRACTS,resolvePmCommandOperation,resolveSubcommandFlagContractsForCommand,toCompletionFlagString}from"../cli-contracts.js";import{GLOBAL_VALUE_CONSUMING_FLAGS}from"../cli-contracts/bootstrap-command-scanner.js";import{WORKFLOW_POLICY_ACTIONS}from"../cli-contracts/enum-contracts.js";import{PM_COMMAND_DESTINATION_CONTRACTS}from"../cli-contracts/grammar-contracts.js";import{enrichCliFlagInvocationContracts}from"../flag-invocation-contracts.js";import{listGuideTopicIds}from"../guide-topics.js";const DEFAULT_ITEM_TYPES=[...BUILTIN_ITEM_TYPE_VALUES];const DEFAULT_STATUS_VALUES=[...STATUS_VALUES];const HIDDEN_COMMAND_ALIASES=new Set(PM_COMMAND_ALIAS_CONTRACTS.filter(contract=>contract.hidden).map(contract=>contract.alias));const ALL_COMMANDS=listPmCommandsForTier("full").filter(command=>!command.includes(" ")&&!HIDDEN_COMMAND_ALIASES.has(command));const LIST_FLAGS=toCompletionFlagString(LIST_FILTER_FLAG_CONTRACTS);const AGGREGATE_FLAGS=toCompletionFlagString(AGGREGATE_FLAG_CONTRACTS);const APPEND_FLAGS=toCompletionFlagString(APPEND_FLAG_CONTRACTS);const COPY_FLAGS=toCompletionFlagString(COPY_FLAG_CONTRACTS);const RESTORE_INVOCATIONS=enrichCliFlagInvocationContracts("restore",resolveSubcommandFlagContractsForCommand("restore"));const ATTEST_INVOCATIONS=enrichCliFlagInvocationContracts("history-attest",resolveSubcommandFlagContractsForCommand("history-attest"));const FOCUS_FLAGS=toCompletionFlagString(FOCUS_FLAG_CONTRACTS);const MEET_FLAGS=toCompletionFlagString(MEET_FLAG_CONTRACTS);const REMIND_FLAGS=toCompletionFlagString(REMIND_FLAG_CONTRACTS);const CREATE_FLAGS=toCompletionFlagString(CREATE_FLAG_CONTRACTS);const GET_FLAGS=toCompletionFlagString(GET_FLAG_CONTRACTS);const UPDATE_FLAGS=toCompletionFlagString(UPDATE_FLAG_CONTRACTS);const UPDATE_MANY_FLAGS=toCompletionFlagString(UPDATE_MANY_FLAG_CONTRACTS);const CLOSE_MANY_FLAGS=toCompletionFlagString(CLOSE_MANY_FLAG_CONTRACTS);const NAMESPACE_NOUNS=[...new Set(PM_NAMESPACED_COMMAND_ALIASES.map(entry=>entry.canonical_argv[0]))];const NAMESPACE_PREFIXES=[...new Set(PM_NAMESPACED_COMMAND_ALIASES.flatMap(entry=>entry.canonical_argv.slice(0,-1).map((_,index)=>entry.canonical_argv.slice(0,index+1).join(" "))))];const PACKAGE_NAMESPACE_OPERATIONS=new Set(PM_COMMAND_DESTINATION_CONTRACTS.filter(entry=>entry.disposition==="package_owned").map(entry=>resolvePmCommandOperation(entry.command)));const HISTORY_COMPLETION_ALIASES=PM_NAMESPACED_COMMAND_ALIASES.filter(entry=>entry.canonical_argv[0]==="history");const HISTORY_LEAVES=HISTORY_COMPLETION_ALIASES.map(entry=>entry.canonical_argv[1]).join(" ");function completionNamespaceLeaves(runtime){const available=new Set((runtime.namespace_commands??[]).map(resolvePmCommandOperation));const aliases=PM_NAMESPACED_COMMAND_ALIASES.filter(entry=>resolvePmCommandVisibilityTier(entry.canonical)!=="internal"&&(!PACKAGE_NAMESPACE_OPERATIONS.has(entry.alias)||available.has(entry.alias)));return Object.fromEntries(NAMESPACE_PREFIXES.map(prefix=>[prefix,[...new Set(aliases.filter(entry=>entry.canonical.startsWith(`${prefix} `)).map(entry=>entry.canonical_argv[prefix.split(" ").length]))].join(" ")]))}const HISTORY_OPERATION_FLAGS=HISTORY_COMPLETION_ALIASES.map(entry=>({...entry,flags:toCompletionFlagString(resolveSubcommandFlagContractsForCommand(entry.alias))}));const HISTORY_FLAGS=toCompletionFlagString(HISTORY_FLAG_CONTRACTS);const HISTORY_AUTHOR_ACKNOWLEDGE_FLAGS=toCompletionFlagString(HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,false);const EVENTS_FLAGS=toCompletionFlagString(EVENTS_FLAG_CONTRACTS);const CALENDAR_FLAGS=toCompletionFlagString(CALENDAR_FLAG_CONTRACTS);const CONTEXT_FLAGS=toCompletionFlagString(CONTEXT_FLAG_CONTRACTS);const NEXT_FLAGS=toCompletionFlagString(NEXT_FLAG_CONTRACTS);const DEPS_FLAGS=toCompletionFlagString(DEPS_FLAG_CONTRACTS);const DUPLICATES_FLAGS=toCompletionFlagString(DUPLICATES_FLAG_CONTRACTS);const GRAPH_FLAGS=toCompletionFlagString(GRAPH_FLAG_CONTRACTS);const GUIDE_FLAGS=toCompletionFlagString(GUIDE_FLAG_CONTRACTS);const SEARCH_FLAGS=toCompletionFlagString(SEARCH_FLAG_CONTRACTS);const STATS_FLAGS=toCompletionFlagString(STATS_FLAG_CONTRACTS);const HEALTH_FLAGS=toCompletionFlagString(HEALTH_FLAG_CONTRACTS);const INIT_FLAGS=toCompletionFlagString(INIT_FLAG_CONTRACTS);const CONTRACTS_FLAGS=toCompletionFlagString(CONTRACTS_FLAG_CONTRACTS);const PLAN_FLAGS=toCompletionFlagString(PLAN_FLAG_CONTRACTS);const SCHEMA_SUBCOMMAND_CHOICES=`${WORKFLOW_POLICY_ACTIONS.join(" ")} list show show-status add-type remove-type add-status remove-status add-field remove-field list-fields show-field apply-preset rename-type rename-field remap-status`;const PLAN_SUBCOMMANDS_LIST="create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize";const COMPLETION_FLAGS=toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);const COMPLETION_SHELL_CHOICES=`${COMPLETION_FLAGS} bash zsh fish`;const GUIDE_TOPIC_CHOICES=joinCompletionValues(listGuideTopicIds());const EXTENSION_LIFECYCLE_ACTIONS="init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate migrate";const PACKAGE_LIFECYCLE_ACTIONS=`${EXTENSION_LIFECYCLE_ACTIONS} upgrade`;const EXTENSION_LIFECYCLE_FLAGS=toCompletionFlagString(EXTENSION_FLAG_CONTRACTS);const PACKAGE_LIFECYCLE_FLAGS=toCompletionFlagString(PACKAGE_FLAG_CONTRACTS);const UPGRADE_FLAGS=toCompletionFlagString(UPGRADE_FLAG_CONTRACTS);const MUTATION_FLAGS="--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";const DELETE_MUTATION_FLAGS="--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";const CLOSE_MUTATION_FLAGS=toCompletionFlagString(resolveSubcommandFlagContractsForCommand("close"));const CLOSE_TASK_MUTATION_FLAGS=toCompletionFlagString(resolveSubcommandFlagContractsForCommand("close-task"));const RELEASE_MUTATION_FLAGS=toCompletionFlagString(resolveSubcommandFlagContractsForCommand("release"));const CLAIM_MUTATION_FLAGS=toCompletionFlagString(resolveSubcommandFlagContractsForCommand("claim"));const COMMAND_COMPLETION_DESCRIPTIONS=[["init","Initialize pm storage for the current workspace"],["config","Read or update pm settings"],["package","Manage package lifecycle operations"],["packages","Alias for package"],["create","Create a new project management item"],["item","Manage item evidence, links, tests, and duplication"],["copy","Copy an existing item to a new ID"],["focus","Set/clear/show the session focused parent for new items"],["list","List active items with optional filters"],["aggregate","Aggregate grouped item counts and numeric stats for governance queries"],["duplicates","Find bounded duplicate clusters across lifecycle statuses"],["guide","Browse local progressive-disclosure guides"],["calendar","Show calendar views for deadlines and reminders"],["cal","Alias for calendar"],["context","Show a token-efficient project context snapshot"],["ctx","Alias for context"],["get","Show item details by ID"],["next","Recommend the next actionable (unblocked, ready) work item"],["search","Search items with keyword, semantic, or hybrid modes"],["reindex","Rebuild search artifacts"],["history","Show item history entries"],["history-compact","Compact history streams into a synthetic baseline + retained tail"],["history-redact","Redact sensitive literals/patterns and recompute history hashes"],["history-repair","Re-anchor a drifted history chain so pm health/validate report ok"],["schema","Manage custom item types and statuses in .agents/pm/schema/*.json"],["profile","List, show, apply, and lint project profiles (archetype schema/config/template/package bundles)"],["plan","Agent-optimized Plan item workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)"],["activity","Show recent activity across items"],["restore","Restore an item to an earlier state"],["update","Update item fields and metadata"],["update-many","Bulk-update matched items with dry-run and rollback checkpoints"],["close","Close an item (reason requirement follows governance settings)"],["close-many","Bulk-close matched items with an optional shared reason and rollback checkpoint"],["delete","Delete an item and record the change"],["append","Append text to an item body"],["comments","List or add comments for an item"],["notes","List or add notes for an item"],["learnings","List or add learnings for an item"],["files","Manage linked files"],["docs","Manage linked docs"],["deps","Show dependency relationships for an item"],["graph","Bounded graph traversal, analytics, and governance-audit queries"],["test","Manage linked tests and optionally run them"],["test-all","Run linked tests across matching items"],["test-runs","Manage background linked-test runs"],["stats","Show project tracker statistics"],["health","Show project tracker health checks"],["validate","Run standalone validation checks"],["gc","Clean optional cache artifacts"],["contracts","Show machine-readable command and schema contracts"],["claim","Claim an item for active work"],["release","Release the active claim for an item"],["start-task","Lifecycle alias to claim and set in_progress"],["pause-task","Lifecycle alias to reopen and release claim"],["close-task","Lifecycle alias to close and release claim"],["meet","Shortcut to create a Meeting with scheduling defaults"],["event","Shortcut to create an Event with scheduling defaults"],["remind","Shortcut to create a Reminder from a point in time"],["templates","Manage reusable create templates"],["completion","Generate shell completion"],["help","Display help for a command"]];const GLOBAL_FLAGS=GLOBAL_FLAG_CONTRACTS.flatMap(entry=>[entry.short,entry.flag,...entry.aliases??[]]).filter(value=>Boolean(value)).join(" ");const GLOBAL_COMPLETION_VALUE_PATTERNS=[...GLOBAL_VALUE_CONSUMING_FLAGS].join("|");const GLOBAL_COMPLETION_INLINE_PATTERNS=[...GLOBAL_VALUE_CONSUMING_FLAGS].map(flag=>`${flag}=*`).join("|");const GLOBAL_COMPLETION_SWITCH_PATTERNS=[...GLOBAL_FLAGS.split(" ").filter(flag=>!GLOBAL_VALUE_CONSUMING_FLAGS.has(flag)),"-h","-V"].join("|");function joinCompletionValues(values){return[...new Set(values.map(value=>value.trim()).filter(value=>value.length>0))].sort((left,right)=>left.localeCompare(right)).join(" ")}function joinCompletionValuesInOrder(values){return[...new Set(values.map(value=>value.trim()).filter(value=>value.length>0))].join(" ")}function shellDoubleQuote(value){return value.replaceAll("\\","\\\\").replaceAll('"','\\"').replaceAll("$","\\$").replaceAll("`","\\`")}function completionTypeValues(itemTypes,runtime){return joinCompletionValuesInOrder(itemTypes.length>0?itemTypes:runtime.item_types??DEFAULT_ITEM_TYPES)}function completionStatusValues(runtime){return joinCompletionValues(runtime.statuses??DEFAULT_STATUS_VALUES)}function mergeFlagStrings(baseFlags,runtimeFlags){const merged=[...baseFlags.split(/\s+/u).filter(value=>value.length>0),...runtimeFlags??[]];return joinCompletionValues(merged)}function normalizeRuntimeCompletionFlags(runtimeFlags){const normalized=(runtimeFlags??[]).map(value=>value.trim()).filter(value=>value.startsWith("--")&&value.length>2).map(value=>`--${value.slice(2).replaceAll("_","-")}`);return[...new Set(normalized)].sort((left,right)=>left.localeCompare(right))}export{AGGREGATE_FLAGS,ALL_COMMANDS,APPEND_FLAGS,ATTEST_INVOCATIONS,CALENDAR_FLAGS,CLAIM_MUTATION_FLAGS,CLOSE_MANY_FLAGS,CLOSE_MUTATION_FLAGS,CLOSE_TASK_MUTATION_FLAGS,COMMAND_COMPLETION_DESCRIPTIONS,COMPLETION_SHELL_CHOICES,CONTEXT_FLAGS,CONTRACTS_FLAGS,COPY_FLAGS,CREATE_FLAGS,DELETE_MUTATION_FLAGS,DEPS_FLAGS,DUPLICATES_FLAGS,EVENTS_FLAGS,EXTENSION_LIFECYCLE_ACTIONS,EXTENSION_LIFECYCLE_FLAGS,FOCUS_FLAGS,GET_FLAGS,GLOBAL_COMPLETION_INLINE_PATTERNS,GLOBAL_COMPLETION_SWITCH_PATTERNS,GLOBAL_COMPLETION_VALUE_PATTERNS,GLOBAL_FLAGS,GRAPH_FLAGS,GUIDE_FLAGS,GUIDE_TOPIC_CHOICES,HEALTH_FLAGS,HIDDEN_COMMAND_ALIASES,HISTORY_AUTHOR_ACKNOWLEDGE_FLAGS,HISTORY_FLAGS,HISTORY_LEAVES,HISTORY_OPERATION_FLAGS,INIT_FLAGS,LIST_FLAGS,MEET_FLAGS,MUTATION_FLAGS,NAMESPACE_NOUNS,NAMESPACE_PREFIXES,NEXT_FLAGS,PACKAGE_LIFECYCLE_ACTIONS,PACKAGE_LIFECYCLE_FLAGS,PLAN_FLAGS,PLAN_SUBCOMMANDS_LIST,RELEASE_MUTATION_FLAGS,REMIND_FLAGS,RESTORE_INVOCATIONS,SCHEMA_SUBCOMMAND_CHOICES,SEARCH_FLAGS,STATS_FLAGS,UPDATE_FLAGS,UPDATE_MANY_FLAGS,UPGRADE_FLAGS,completionNamespaceLeaves,completionStatusValues,completionTypeValues,joinCompletionValues,mergeFlagStrings,normalizeRuntimeCompletionFlags,shellDoubleQuote};
2
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1,3 @@
1
+ import type { CompletionRuntimeConfig } from "./shared.js";
2
+ /** Implements generate zsh script for the public runtime surface of this module. */
3
+ export declare function generateZshScript(itemTypes?: string[], tags?: string[], eagerTagExpansion?: boolean, runtime?: CompletionRuntimeConfig): string;