@unbrained/pm-cli 2026.8.17 → 2026.8.19
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/AGENTS.md +4 -3
- package/CHANGELOG.md +51 -5
- package/README.md +3 -3
- package/dist/cli/error-guidance.js +8 -4
- package/dist/cli/help-content.js +32 -13
- package/dist/cli/help-json-payload.d.ts +15 -0
- package/dist/cli/help-json-payload.js +101 -23
- package/dist/cli/main.js +6 -2
- package/dist/cli/register-list-query.js +138 -54
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BHYMXLAE.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
- package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
- package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-OIOKV6NO.js} +58 -54
- package/dist/cli-bundle/chunks/chunk-QXSH7BLM.js +3 -0
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-TOXJM4WA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-YBMRWW4E.js} +44 -44
- package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-I4LUHGVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-BJRYFVSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-EF6ZS5GH.js} +44 -44
- package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-ESISGDAY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EXBCLIBU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-JDOMQ7VQ.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-PRHY2IMX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-US7VEYZG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VXDSU5MC.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-ZBIQQYMI.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -1
- package/dist/cli-bundle/sdk-core.js +28 -28
- 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 +32 -32
- 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 +5 -4
- package/dist/core/config/nested-settings.js +8 -2
- package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
- package/dist/core/extensions/exporter-output-contract.js +67 -0
- package/dist/core/extensions/extension-types.d.ts +36 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +35 -44
- package/dist/core/history/event-index.d.ts +5 -0
- package/dist/core/history/event-index.js +133 -27
- package/dist/core/sentry/helpers.js +3 -3
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/core/store/settings.js +8 -2
- package/dist/mcp/tool-definitions.js +12 -7
- package/dist/sdk/agent/refusal-closure.d.ts +41 -0
- package/dist/sdk/agent/refusal-closure.js +92 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
- package/dist/sdk/agent/refusal-reachability.js +4 -4
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +104 -7
- package/dist/sdk/authoring.d.ts +1 -1
- package/dist/sdk/authoring.js +2 -2
- package/dist/sdk/cli-bootstrap.d.ts +2 -2
- package/dist/sdk/cli-bootstrap.js +4 -4
- package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
- package/dist/sdk/cli-contracts/command-aliases.js +80 -13
- package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
- package/dist/sdk/cli-contracts/commander-types.js +5 -4
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
- package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +84 -13
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +151 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +958 -0
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +33 -5
- package/dist/sdk/cli-contracts/runtime-contracts.js +100 -23
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +7 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +20 -11
- package/dist/sdk/cli-contracts.d.ts +5 -4
- package/dist/sdk/cli-contracts.js +7 -6
- package/dist/sdk/completion.js +13 -15
- package/dist/sdk/compose.d.ts +3 -3
- package/dist/sdk/compose.js +2 -2
- package/dist/sdk/context-intent-contracts.d.ts +2 -2
- package/dist/sdk/context-intent-contracts.js +22 -7
- package/dist/sdk/contracts.d.ts +3 -0
- package/dist/sdk/contracts.js +5 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/environment/host-environment-errors.js +3 -3
- package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
- package/dist/sdk/flag-invocation-contracts.js +218 -9
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +186 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +194 -26
- package/dist/sdk/guide-topics.js +5 -5
- package/dist/sdk/index.d.ts +10 -7
- package/dist/sdk/index.js +10 -7
- package/dist/sdk/init-agent-guidance.js +3 -3
- package/dist/sdk/mutation-events.d.ts +18 -2
- package/dist/sdk/mutation-events.js +59 -16
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/output.d.ts +44 -0
- package/dist/sdk/output.js +28 -2
- package/dist/sdk/query/complete-list.d.ts +94 -0
- package/dist/sdk/query/complete-list.js +173 -0
- package/dist/sdk/query/get.js +25 -6
- package/dist/sdk/query/list.js +19 -2
- package/dist/sdk/query/search-contracts.d.ts +1 -1
- package/dist/sdk/query/search-contracts.js +23 -9
- package/dist/sdk/query/search.js +3 -3
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/read-output/continuation.d.ts +1 -1
- package/dist/sdk/read-output/continuation.js +7 -24
- package/dist/sdk/read-output-contracts.d.ts +2 -2
- package/dist/sdk/read-output-contracts.js +89 -13
- package/dist/sdk/read-output-rows.d.ts +4 -0
- package/dist/sdk/read-output-rows.js +47 -18
- package/dist/sdk/runtime-extended-actions.js +10 -2
- package/dist/sdk/runtime.d.ts +8 -2
- package/dist/sdk/runtime.js +18 -11
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/dist/types.d.ts +5 -0
- package/dist/types.js +2 -2
- package/docs/AGENT_GUIDE.md +25 -9
- package/docs/CLI_GRAMMAR.md +106 -0
- package/docs/COMMANDS.md +39 -27
- package/docs/ONBOARDING.md +4 -4
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +42 -2
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/TESTING.md +14 -1
- package/docs/agent-task-token-baseline.json +5 -5
- package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
- package/marketplace.json +2 -2
- package/package.json +5 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/generate-agent-capability-surfaces.mjs +20 -14
- package/sdk/public-surface.json +1245 -60
- package/dist/cli-bundle/chunks/chunk-2QLOXC3V.js +0 -3
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +0 -35
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +0 -13
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +0 -197
- package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TPXZIBIV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +0 -2
- package/dist/cli-bundle/chunks/register-list-query-Q7KII4G5.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-SSENDH5B.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-267MUUS6.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KGEXTMPG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-XPIC53VA.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +0 -155
|
@@ -1,17 +1,18 @@
|
|
|
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
|
-
export { EXECUTABLE_COMMAND_ALIASES } from "./cli-contracts/command-aliases.js";
|
|
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]="cec9e389-d3ff-57d4-9b9e-505a7dff2970")}catch(e){}}();
|
|
3
|
+
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } from "./cli-contracts/command-aliases.js";
|
|
4
4
|
export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
|
|
5
5
|
export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, } from "./cli-contracts/commander-mutation-options.js";
|
|
6
6
|
// PM_* enum/guard contracts and the bulk tool-parameter property/metadata data
|
|
7
7
|
// tables live in sibling modules and are re-exported here so existing import
|
|
8
8
|
// sites (sdk/index.ts, mcp/server.ts, commands/contracts.ts, completion.ts, …)
|
|
9
9
|
// keep importing everything from "./cli-contracts.js" unchanged.
|
|
10
|
-
export { PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
11
|
-
export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, } from "./cli-contracts/tool-option-contracts.js";
|
|
12
|
-
export {
|
|
10
|
+
export { PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
11
|
+
export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, verifyToolOptionCliParity, } from "./cli-contracts/tool-option-contracts.js";
|
|
12
|
+
export { PM_POSITIONAL_ACTION_CONTRACTS, } from "./cli-contracts/grammar-contracts.js";
|
|
13
|
+
export { withFlagAliasMetadata, compactFlagAliasContracts, resolvePmPositionalActionFlagContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
13
14
|
export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, resolvePmToolCustomFieldCollision, CLOSE_ACTION_OPTION_KEYS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
|
|
14
15
|
export { analyzeSdkCliParameterCompleteness, } from "./cli-contracts/completeness.js";
|
|
15
16
|
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, resolvePmCommandOutputBudget, } from "./cli-contracts/agent-output-contracts.js";
|
|
16
17
|
//# sourceMappingURL=cli-contracts.js.map
|
|
17
|
-
//# debugId=
|
|
18
|
+
//# debugId=cec9e389-d3ff-57d4-9b9e-505a7dff2970
|
package/dist/sdk/completion.js
CHANGED
|
@@ -4,17 +4,18 @@
|
|
|
4
4
|
* Implements the pm completion command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="48da3e98-ab96-54de-8993-7de0c4edf19b")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, PmCliError } from "./runtime-primitives.js";
|
|
9
9
|
import { listPmCommandsForTier } from "./agent-capability-contracts.js";
|
|
10
10
|
import { SCAFFOLD_CAPABILITIES } from "./extension/scaffold.js";
|
|
11
|
-
import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
|
|
11
|
+
import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PM_COMMAND_ALIAS_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
|
|
12
12
|
import { BUILTIN_ITEM_TYPE_VALUES, STATUS_VALUES } from "../types/index.js";
|
|
13
13
|
import { listGuideTopicIds } from "./guide-topics.js";
|
|
14
14
|
const VALID_SHELLS = ["bash", "zsh", "fish"];
|
|
15
15
|
const DEFAULT_ITEM_TYPES = [...BUILTIN_ITEM_TYPE_VALUES];
|
|
16
16
|
const DEFAULT_STATUS_VALUES = [...STATUS_VALUES];
|
|
17
|
-
const
|
|
17
|
+
const HIDDEN_COMMAND_ALIASES = new Set(PM_COMMAND_ALIAS_CONTRACTS.filter((contract) => contract.hidden).map((contract) => contract.alias));
|
|
18
|
+
const ALL_COMMANDS = listPmCommandsForTier("full").filter((command) => !HIDDEN_COMMAND_ALIASES.has(command));
|
|
18
19
|
const LIST_FLAGS = toCompletionFlagString(LIST_FILTER_FLAG_CONTRACTS);
|
|
19
20
|
const AGGREGATE_FLAGS = toCompletionFlagString(AGGREGATE_FLAG_CONTRACTS);
|
|
20
21
|
const APPEND_FLAGS = toCompletionFlagString(APPEND_FLAG_CONTRACTS);
|
|
@@ -65,13 +66,6 @@ const COMMAND_COMPLETION_DESCRIPTIONS = [
|
|
|
65
66
|
["copy", "Copy an existing item to a new ID"],
|
|
66
67
|
["focus", "Set/clear/show the session focused parent for new items"],
|
|
67
68
|
["list", "List active items with optional filters"],
|
|
68
|
-
["list-all", "List all items with optional filters"],
|
|
69
|
-
["list-draft", "List draft items with optional filters"],
|
|
70
|
-
["list-open", "List open items with optional filters"],
|
|
71
|
-
["list-in-progress", "List in-progress items with optional filters"],
|
|
72
|
-
["list-blocked", "List blocked items with optional filters"],
|
|
73
|
-
["list-closed", "List closed items with optional filters"],
|
|
74
|
-
["list-canceled", "List canceled items with optional filters"],
|
|
75
69
|
[
|
|
76
70
|
"aggregate",
|
|
77
71
|
"Aggregate grouped item counts and numeric stats for governance queries",
|
|
@@ -546,7 +540,7 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
546
540
|
' local cmd="${COMP_WORDS[1]}"',
|
|
547
541
|
"",
|
|
548
542
|
' case "$cmd" in',
|
|
549
|
-
" list
|
|
543
|
+
" list)",
|
|
550
544
|
` COMPREPLY=(${compgen(listFlags)})`,
|
|
551
545
|
" ;;",
|
|
552
546
|
" aggregate)",
|
|
@@ -805,8 +799,10 @@ _pm() {
|
|
|
805
799
|
case $state in
|
|
806
800
|
args)
|
|
807
801
|
case $line[1] in
|
|
808
|
-
list
|
|
802
|
+
list)
|
|
809
803
|
_arguments \\
|
|
804
|
+
'*--status[Filter by status; repeatable, comma-separated, or all]:(${statusChoices})' \\
|
|
805
|
+
'--all[Include every lifecycle status]' \\
|
|
810
806
|
'--type[Filter by item type]:(${typeChoices})' \\
|
|
811
807
|
'--tag[Filter by tag]:(${zshTagChoices})' \\
|
|
812
808
|
'--tags[Alias for --tag]:(${zshTagChoices})' \\
|
|
@@ -827,7 +823,6 @@ ${zshPresenceFilterFlags}
|
|
|
827
823
|
'--limit[Limit returned item count]:number' \\
|
|
828
824
|
'--offset[Skip the first n matching rows before limit]:number' \\
|
|
829
825
|
'--no-truncate[Return every matched row, overriding --limit]' \\
|
|
830
|
-
'--all[Alias for --no-truncate]' \\
|
|
831
826
|
'--include-body[Include item body in each returned list row]' \\
|
|
832
827
|
'--compact[Render compact list projection fields]' \\
|
|
833
828
|
'--fields[Render custom comma-separated list fields]:fields' \\
|
|
@@ -1331,6 +1326,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1331
1326
|
'--availability-only[Return action availability only]' \\
|
|
1332
1327
|
'--runtime-only[Include only actions invocable in the current runtime]' \\
|
|
1333
1328
|
'--active-only[Alias for --runtime-only]' \\
|
|
1329
|
+
'--full[Include complete command and schema contract details]' \\
|
|
1334
1330
|
'--json[Output JSON]' \\
|
|
1335
1331
|
'--quiet[Suppress stdout]'
|
|
1336
1332
|
;;
|
|
@@ -1851,6 +1847,8 @@ ${renderFishCommandDescriptions()}
|
|
|
1851
1847
|
|
|
1852
1848
|
# list* flags
|
|
1853
1849
|
for list_cmd in ${listCmds}
|
|
1850
|
+
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l status -d 'Filter by status' -r -a '${statusChoices}'
|
|
1851
|
+
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l all -d 'Include every lifecycle status'
|
|
1854
1852
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l type -d 'Filter by item type' -r -a '${typeChoices}'
|
|
1855
1853
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
|
|
1856
1854
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l tags -d 'Alias for --tag' -r -a ${fishTagChoices}
|
|
@@ -1862,7 +1860,6 @@ for list_cmd in ${listCmds}
|
|
|
1862
1860
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l limit -d 'Limit returned item count' -r
|
|
1863
1861
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l offset -d 'Skip the first n matching rows before limit' -r
|
|
1864
1862
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l no-truncate -d 'Return every matched row, overriding --limit'
|
|
1865
|
-
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l all -d 'Alias for --no-truncate'
|
|
1866
1863
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l include-body -d 'Include item body in each returned list row'
|
|
1867
1864
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l compact -d 'Render compact list projection fields'
|
|
1868
1865
|
complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l fields -d 'Render custom comma-separated list fields' -r
|
|
@@ -2398,6 +2395,7 @@ complete -c pm -n '__fish_seen_subcommand_from contracts' -l flags-only -d 'Retu
|
|
|
2398
2395
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l availability-only -d 'Return action availability only'
|
|
2399
2396
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l runtime-only -d 'Include only actions invocable in the current runtime'
|
|
2400
2397
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l active-only -d 'Alias for --runtime-only'
|
|
2398
|
+
complete -c pm -n '__fish_seen_subcommand_from contracts' -l full -d 'Include complete command and schema contract details'
|
|
2401
2399
|
complete -c pm -n '__fish_seen_subcommand_from deps' -l format -d 'Output format' -r -a 'tree graph context'
|
|
2402
2400
|
complete -c pm -n '__fish_seen_subcommand_from deps' -l max-depth -d 'Maximum traversal depth (0 keeps root only)' -r
|
|
2403
2401
|
complete -c pm -n '__fish_seen_subcommand_from deps' -l collapse -d 'Collapse mode' -r -a 'none repeated'
|
|
@@ -2769,4 +2767,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
|
|
|
2769
2767
|
};
|
|
2770
2768
|
}
|
|
2771
2769
|
//# sourceMappingURL=completion.js.map
|
|
2772
|
-
//# debugId=
|
|
2770
|
+
//# debugId=48da3e98-ab96-54de-8993-7de0c4edf19b
|
package/dist/sdk/compose.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* declarative (`composeExtension`) authoring styles live together. Both are
|
|
26
26
|
* re-exported from the SDK barrel, so the public API is unchanged.
|
|
27
27
|
*/
|
|
28
|
-
import type { AfterCommandHook, BeforeCommandHook, BeforeMutationHook, CommandDefinition, CommandOverride, ExtensionApi, ExtensionCapability, ExtensionManifest, ExtensionServiceName, Exporter, FlagDefinition, ImportExportRegistrationOptions, Importer, OnIndexHook, OnReadHook, OnWriteHook, OutputRendererFormat, ParserOverride, PreflightOverride, ScopedPreflightOverrideDefinition, RendererOverride, ScopedRendererOverrideDefinition, SchemaFieldDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SearchProviderDefinition, ServiceOverride, VectorStoreAdapterDefinition, AssuranceMeasurementProviderDefinition } from "../core/extensions/loader.js";
|
|
28
|
+
import type { AfterCommandHook, BeforeCommandHook, BeforeMutationHook, CommandDefinition, CommandOverride, ExtensionApi, ExtensionCapability, ExtensionManifest, ExtensionServiceName, Exporter, ExporterRegistrationOptions, FlagDefinition, ImportExportRegistrationOptions, Importer, OnIndexHook, OnReadHook, OnWriteHook, OutputRendererFormat, ParserOverride, PreflightOverride, ScopedPreflightOverrideDefinition, RendererOverride, ScopedRendererOverrideDefinition, SchemaFieldDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SearchProviderDefinition, ServiceOverride, VectorStoreAdapterDefinition, AssuranceMeasurementProviderDefinition } from "../core/extensions/loader.js";
|
|
29
29
|
import type { ExtensionActivationSummary } from "../core/extensions/activation-summary.js";
|
|
30
30
|
import type { ProjectProfileRegistrationInput } from "../core/profile/profile-presets.js";
|
|
31
31
|
import type { PmMaxVersionExceededMode } from "../core/extensions/extension-types.js";
|
|
@@ -85,8 +85,8 @@ export interface ExtensionBlueprintExporter {
|
|
|
85
85
|
name: string;
|
|
86
86
|
/** The exporter handler that bridges the pm context graph out to an external system. */
|
|
87
87
|
exporter: Exporter;
|
|
88
|
-
/** Optional command metadata
|
|
89
|
-
options?:
|
|
88
|
+
/** Optional command metadata and artifact-output delivery policy for the derived command. */
|
|
89
|
+
options?: ExporterRegistrationOptions;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* The lifecycle hooks an {@link ExtensionBlueprint} can register, one array per
|
package/dist/sdk/compose.js
CHANGED
|
@@ -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]="bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e")}catch(e){}}();
|
|
3
3
|
import { normalizeKnownExtensionCapability, resolveLegacyExtensionCapabilityAlias, } from "../core/extensions/extension-capability-aliases.js";
|
|
4
4
|
import { normalizeCommandName } from "../core/extensions/extension-runtime-helpers.js";
|
|
5
5
|
import { RESERVED_ITEM_FIELD_NAMES } from "../core/extensions/item-fields.js";
|
|
@@ -1101,4 +1101,4 @@ export function preflightExtension(blueprint, options = {}) {
|
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
1103
|
//# sourceMappingURL=compose.js.map
|
|
1104
|
-
//# debugId=
|
|
1104
|
+
//# debugId=bbc8dcd1-7dde-54f5-bebf-6d95ea0aaa1e
|
|
@@ -66,9 +66,9 @@ export declare function runWithContextIntentContracts<T>(layers: PmContextIntent
|
|
|
66
66
|
/** Validate and compose core, package, and workspace intent declarations. Later layers override earlier layers by command and intent. */
|
|
67
67
|
export declare function composeContextIntentContracts(workspaceContracts?: readonly PmContextIntentContract[], packageContracts?: readonly PmContextIntentContract[]): PmContextIntentContract[];
|
|
68
68
|
/** Resolve one intent declaration or fail with the nearest command-local intent. */
|
|
69
|
-
export declare function resolveContextIntentContract(command: string, intent: string, contracts?: readonly PmContextIntentContract[]): PmContextIntentContract | undefined;
|
|
69
|
+
export declare function resolveContextIntentContract(command: string, intent: string, contracts?: readonly PmContextIntentContract[], positionalArguments?: readonly string[]): PmContextIntentContract | undefined;
|
|
70
70
|
/** Apply one declared read intent's defaults while preserving explicit caller options. */
|
|
71
|
-
export declare function applyContextIntentProjection(command: "context" | "get" | "list" | "next" | "search", options: Record<string, unknown
|
|
71
|
+
export declare function applyContextIntentProjection(command: "context" | "get" | "list" | "next" | "search", options: Record<string, unknown>, positionalArguments?: readonly string[]): Record<string, unknown>;
|
|
72
72
|
interface ContextIntentCursorEnvelope {
|
|
73
73
|
fingerprint: string;
|
|
74
74
|
after_index: number;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* workspace configuration, and packages.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!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]="
|
|
8
|
+
!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]="86db3dad-99b9-5c48-be52-990f110ac81f")}catch(e){}}();
|
|
9
9
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
|
+
import { renderPmCommand } from "./command-line.js";
|
|
10
11
|
import { attachOutputOmissionReceipt } from "./output-projection.js";
|
|
11
12
|
import { encodeQueryCursor } from "./pagination.js";
|
|
12
13
|
import { applyReadOutputDimensions, stabilizeReadOutputReceiptEstimates, } from "./read-output-contracts.js";
|
|
@@ -153,7 +154,7 @@ export function composeContextIntentContracts(workspaceContracts = [], packageCo
|
|
|
153
154
|
left.intent.localeCompare(right.intent));
|
|
154
155
|
}
|
|
155
156
|
/** Resolve one intent declaration or fail with the nearest command-local intent. */
|
|
156
|
-
export function resolveContextIntentContract(command, intent, contracts = getActiveContextIntentContracts()) {
|
|
157
|
+
export function resolveContextIntentContract(command, intent, contracts = getActiveContextIntentContracts(), positionalArguments = []) {
|
|
157
158
|
const normalizedCommand = command.trim().toLowerCase();
|
|
158
159
|
const normalizedIntent = intent.trim().toLowerCase();
|
|
159
160
|
const exact = contracts.find((entry) => entry.command === normalizedCommand && entry.intent === normalizedIntent);
|
|
@@ -184,7 +185,19 @@ export function resolveContextIntentContract(command, intent, contracts = getAct
|
|
|
184
185
|
})
|
|
185
186
|
.sort((left, right) => left.distance - right.distance ||
|
|
186
187
|
left.candidate.localeCompare(right.candidate))[0].candidate;
|
|
187
|
-
const
|
|
188
|
+
const attemptedArguments = [
|
|
189
|
+
normalizedCommand,
|
|
190
|
+
...positionalArguments,
|
|
191
|
+
"--for",
|
|
192
|
+
normalizedIntent,
|
|
193
|
+
];
|
|
194
|
+
const suggestedRetryArguments = [
|
|
195
|
+
normalizedCommand,
|
|
196
|
+
...positionalArguments,
|
|
197
|
+
"--for",
|
|
198
|
+
suggestion,
|
|
199
|
+
];
|
|
200
|
+
const suggestedCommand = renderPmCommand(suggestedRetryArguments);
|
|
188
201
|
throw new PmCliError(`Unknown context intent "${normalizedIntent}" for ${normalizedCommand}. Did you mean "${suggestion}"?`, EXIT_CODE.USAGE, {
|
|
189
202
|
code: "unknown_context_intent",
|
|
190
203
|
reason: "unknown_intent",
|
|
@@ -194,8 +207,10 @@ export function resolveContextIntentContract(command, intent, contracts = getAct
|
|
|
194
207
|
nextSteps: [suggestedCommand],
|
|
195
208
|
recovery: {
|
|
196
209
|
recovery_mode: "compact",
|
|
197
|
-
attempted_command:
|
|
210
|
+
attempted_command: renderPmCommand(attemptedArguments),
|
|
211
|
+
allowed_values: [...candidates].sort(),
|
|
198
212
|
suggested_retry: suggestedCommand,
|
|
213
|
+
suggested_retry_args: suggestedRetryArguments,
|
|
199
214
|
},
|
|
200
215
|
});
|
|
201
216
|
}
|
|
@@ -266,7 +281,7 @@ const CONTEXT_INTENT_DEFAULT_APPLIERS = {
|
|
|
266
281
|
},
|
|
267
282
|
};
|
|
268
283
|
/** Apply one declared read intent's defaults while preserving explicit caller options. */
|
|
269
|
-
export function applyContextIntentProjection(command, options) {
|
|
284
|
+
export function applyContextIntentProjection(command, options, positionalArguments = []) {
|
|
270
285
|
const tokenBudget = options.tokenBudget ?? options.token_budget;
|
|
271
286
|
if (typeof options.for !== "string") {
|
|
272
287
|
if (tokenBudget !== undefined &&
|
|
@@ -289,7 +304,7 @@ export function applyContextIntentProjection(command, options) {
|
|
|
289
304
|
delete projected.token_budget;
|
|
290
305
|
return projected;
|
|
291
306
|
}
|
|
292
|
-
const contract = resolveContextIntentContract(command, options.for);
|
|
307
|
+
const contract = resolveContextIntentContract(command, options.for, undefined, positionalArguments);
|
|
293
308
|
const explicitTokenBudget = parsePositiveIntentTokenBudget(tokenBudget) !== undefined;
|
|
294
309
|
const projected = { ...options };
|
|
295
310
|
if (projected.tokenBudget === undefined && tokenBudget !== undefined) {
|
|
@@ -686,4 +701,4 @@ export function attachReadOutputContracts(command, options, result) {
|
|
|
686
701
|
return stabilizeSuppressedRowContractReceipts(Object.fromEntries(Object.entries(projected).filter(([key]) => key !== "row_contract")), options);
|
|
687
702
|
}
|
|
688
703
|
//# sourceMappingURL=context-intent-contracts.js.map
|
|
689
|
-
//# debugId=
|
|
704
|
+
//# debugId=86db3dad-99b9-5c48-be52-990f110ac81f
|
package/dist/sdk/contracts.d.ts
CHANGED
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
* Exposes command and action contract data without loading SDK runtime code.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./cli-contracts.js";
|
|
7
|
+
export * from "./cli-contracts/grammar-contracts.js";
|
|
7
8
|
export * from "./cli-contracts/command-exit-contracts.js";
|
|
8
9
|
export * from "./context-intent-contracts.js";
|
|
9
10
|
export * from "./error-code-catalog.js";
|
|
10
11
|
export * from "./generated-error-code-catalog.js";
|
|
11
12
|
export * from "./flag-invocation-contracts.js";
|
|
13
|
+
export * from "./cli-contracts/flag-lexicon-contracts.js";
|
|
12
14
|
export * from "./output-token-accounting.js";
|
|
13
15
|
export * from "./output-contracts.js";
|
|
14
16
|
export * from "./read-output-contracts.js";
|
|
17
|
+
export * from "./agent/refusal-closure.js";
|
|
15
18
|
export type { PmReadOutputSessionReceipt, PmReadOutputSessionState, } from "./read-output-session.js";
|
package/dist/sdk/contracts.js
CHANGED
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
* Exposes command and action contract data without loading SDK runtime code.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c3e3b1f2-1898-5773-8b3f-55fa39f6c4e7")}catch(e){}}();
|
|
8
8
|
export * from "./cli-contracts.js";
|
|
9
|
+
export * from "./cli-contracts/grammar-contracts.js";
|
|
9
10
|
export * from "./cli-contracts/command-exit-contracts.js";
|
|
10
11
|
export * from "./context-intent-contracts.js";
|
|
11
12
|
export * from "./error-code-catalog.js";
|
|
12
13
|
export * from "./generated-error-code-catalog.js";
|
|
13
14
|
export * from "./flag-invocation-contracts.js";
|
|
15
|
+
export * from "./cli-contracts/flag-lexicon-contracts.js";
|
|
14
16
|
export * from "./output-token-accounting.js";
|
|
15
17
|
export * from "./output-contracts.js";
|
|
16
18
|
export * from "./read-output-contracts.js";
|
|
19
|
+
export * from "./agent/refusal-closure.js";
|
|
17
20
|
//# sourceMappingURL=contracts.js.map
|
|
18
|
-
//# debugId=
|
|
21
|
+
//# debugId=c3e3b1f2-1898-5773-8b3f-55fa39f6c4e7
|
package/dist/sdk/core.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides the stable item lifecycle client and universal project data types.
|
|
5
5
|
*/
|
|
6
|
-
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, canonicalDocument, classifyItemFormatVersion, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, isPmCliExpectedError, normalizeItemFormatVersion, normalizeItemId, normalizeStatusInput, nowIso, runAction, serializeItemDocument, aggregate, append, claim, claimNext, close, comments, context, copy, create, deleteItem, deps, docs, files, filesDiscover, focus, get, graph, learnings, list, next, notes, release, restore, search, update, type AggregateOptions, type AggregateResult, type AggregateRow, type AssuranceActionInput, type AssuranceActionResult, type AppendCommandOptions, type AppendResult, type ClaimNextOptions, type ClaimResult, type CloseResult, type CommentsCommandOptions, type CommentsResult, type ContextOptions, type ContextResult, type CopyResult, type CreateResult, type Dependency, type DeleteResult, type DepsCommandOptions, type DepsResult, type DocsCommandOptions, type DocsResult, type FilesCommandOptions, type FilesDiscoverOptions, type FilesDiscoverResult, type FilesResult, type FocusResult, type GetOptions, type GetResult, type ItemFormatVersionScanEntry, type ItemFormatVersionScanResult, type ItemFormatVersionStatus, type LearningsCommandOptions, type LearningsResult, type ListOptions, type ListResult, type NextOptions, type NextResult, type NotesCommandOptions, type NotesResult, type PmActionInput, type PmActionName, type PmActionOptions, type PmClientOptions, type ReleaseResult, type RestoreResult, type SearchOptions, type SearchResult, type UpdateResult, } from "./runtime.js";
|
|
6
|
+
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, canonicalDocument, classifyItemFormatVersion, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, isPmCliExpectedError, normalizeItemFormatVersion, normalizeItemId, normalizeStatusInput, nowIso, runAction, serializeItemDocument, aggregate, append, claim, claimNext, close, comments, context, copy, create, deleteItem, deps, docs, files, filesDiscover, focus, get, graph, learnings, list, next, notes, release, restore, search, update, type AggregateOptions, type AggregateResult, type AggregateRow, type AssuranceActionInput, type AssuranceActionResult, type AppendCommandOptions, type AppendResult, type ClaimNextOptions, type ClaimResult, type CloseResult, type CommentsCommandOptions, type CommentsResult, type ContextOptions, type ContextResult, type CopyResult, type CreateResult, type Dependency, type DeleteResult, type DepsCommandOptions, type DepsResult, type DocsCommandOptions, type DocsResult, type FilesCommandOptions, type FilesDiscoverOptions, type FilesDiscoverResult, type FilesResult, type FocusResult, type GetOptions, type GetResult, type ItemFormatVersionScanEntry, type ItemFormatVersionScanResult, type ItemFormatVersionStatus, type LearningsCommandOptions, type LearningsResult, type ListOptions, type ListResult, listAllComplete, type PmCompleteListOptions, type PmCompleteListResult, type NextOptions, type NextResult, type NotesCommandOptions, type NotesResult, type PmActionInput, type PmActionName, type PmActionOptions, type PmClientOptions, type ReleaseResult, type RestoreResult, type SearchOptions, type SearchResult, type UpdateResult, } from "./runtime.js";
|
|
7
7
|
export * from "./core-governance.js";
|
|
8
8
|
export * from "./agent-session-context.js";
|
|
9
9
|
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
package/dist/sdk/core.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Provides the stable item lifecycle client and universal project data types.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
-
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, canonicalDocument, classifyItemFormatVersion, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, isPmCliExpectedError, normalizeItemFormatVersion, normalizeItemId, normalizeStatusInput, nowIso, runAction, serializeItemDocument, aggregate, append, claim, claimNext, close, comments, context, copy, create, deleteItem, deps, docs, files, filesDiscover, focus, get, graph, learnings, list, next, notes, release, restore, search, update, } from "./runtime.js";
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3b27abec-8da3-531a-9bbc-71e97b8b65c5")}catch(e){}}();
|
|
8
|
+
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, canonicalDocument, classifyItemFormatVersion, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, isPmCliExpectedError, normalizeItemFormatVersion, normalizeItemId, normalizeStatusInput, nowIso, runAction, serializeItemDocument, aggregate, append, claim, claimNext, close, comments, context, copy, create, deleteItem, deps, docs, files, filesDiscover, focus, get, graph, learnings, list, next, notes, release, restore, search, update, listAllComplete, } from "./runtime.js";
|
|
9
9
|
export * from "./core-governance.js";
|
|
10
10
|
export * from "./agent-session-context.js";
|
|
11
11
|
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
|
12
12
|
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, decodeReadOutputContinuationCursor, encodeReadOutputContinuationCursor, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
13
13
|
export { applyReadOutputSessionReferences, attachReadOutputSessionReceipt, parseReadOutputSession, readOutputSessionRemainingTokens, } from "./read-output-session.js";
|
|
14
14
|
//# sourceMappingURL=core.js.map
|
|
15
|
-
//# debugId=
|
|
15
|
+
//# debugId=3b27abec-8da3-531a-9bbc-71e97b8b65c5
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* leaking local paths or swallowing genuine implementation defects.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!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]="
|
|
8
|
+
!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]="1c74b5a9-67b8-597c-98de-a4487691081f")}catch(e){}}();
|
|
9
9
|
import { constants as osConstants } from "node:os";
|
|
10
10
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
11
11
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
@@ -85,7 +85,7 @@ const HOST_ENVIRONMENT_ERRNO_NAMES = new Map([
|
|
|
85
85
|
[osConstants.errno.ENOSPC, "ENOSPC"],
|
|
86
86
|
[osConstants.errno.EPERM, "EPERM"],
|
|
87
87
|
[osConstants.errno.EROFS, "EROFS"],
|
|
88
|
-
]);
|
|
88
|
+
].filter(([errno]) => Number.isInteger(errno)));
|
|
89
89
|
const HOST_ENVIRONMENT_FAULT_CODES = {
|
|
90
90
|
capacity: { code: "host_environment_capacity_fault" },
|
|
91
91
|
permission: { code: "host_environment_permission_fault" },
|
|
@@ -139,4 +139,4 @@ export async function withHostEnvironmentBoundary(operation, run, options = {})
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
//# sourceMappingURL=host-environment-errors.js.map
|
|
142
|
-
//# debugId=
|
|
142
|
+
//# debugId=1c74b5a9-67b8-597c-98de-a4487691081f
|
|
@@ -25,7 +25,44 @@ export interface CliFlagInvocationContract extends CliFlagContract {
|
|
|
25
25
|
/** Sentinel that redirects the argv value to stdin. */
|
|
26
26
|
stdin_token?: "-";
|
|
27
27
|
}
|
|
28
|
+
/** Executable option arity observed from the registered Commander program. */
|
|
29
|
+
export interface CliFlagArityObservation {
|
|
30
|
+
/** Canonical command path owning the option. */
|
|
31
|
+
command: string;
|
|
32
|
+
/** Long option spelling. */
|
|
33
|
+
flag: string;
|
|
34
|
+
/** Whether the option consumes a value token. */
|
|
35
|
+
takes_value: boolean;
|
|
36
|
+
/** Whether the consumed value is mandatory. */
|
|
37
|
+
value_required: boolean;
|
|
38
|
+
/** Whether repeated values accumulate. */
|
|
39
|
+
repeatable: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** One machine-readable mismatch between declared and executable flag arity. */
|
|
42
|
+
export interface CliFlagInvocationParityFinding {
|
|
43
|
+
/** Stable finding code. */
|
|
44
|
+
code: "duplicate_observation" | "missing_observation" | "takes_value_mismatch" | "value_required_mismatch" | "repeatable_mismatch" | "undeclared_observation";
|
|
45
|
+
/** Canonical command path. */
|
|
46
|
+
command: string;
|
|
47
|
+
/** Long option spelling. */
|
|
48
|
+
flag: string;
|
|
49
|
+
/** Human-readable mismatch detail. */
|
|
50
|
+
detail: string;
|
|
51
|
+
}
|
|
52
|
+
/** Complete parity receipt for one command's declared and executable flags. */
|
|
53
|
+
export interface CliFlagInvocationParityReport {
|
|
54
|
+
/** Whether the two surfaces agree exactly. */
|
|
55
|
+
ok: boolean;
|
|
56
|
+
/** Number of declared invocation rows. */
|
|
57
|
+
declared_count: number;
|
|
58
|
+
/** Number of executable observations. */
|
|
59
|
+
observed_count: number;
|
|
60
|
+
/** Stable mismatch list. */
|
|
61
|
+
findings: CliFlagInvocationParityFinding[];
|
|
62
|
+
}
|
|
28
63
|
/** Enrich one vocabulary row with deterministic invocation and input-channel metadata. */
|
|
29
64
|
export declare function enrichCliFlagInvocationContract(command: string, contract: CliFlagContract): CliFlagInvocationContract;
|
|
30
65
|
/** Enrich a complete command flag table without mutating package-owned rows. */
|
|
31
66
|
export declare function enrichCliFlagInvocationContracts(command: string, contracts: readonly CliFlagContract[]): CliFlagInvocationContract[];
|
|
67
|
+
/** Compare generated invocation rows with independently observed executable arity. */
|
|
68
|
+
export declare function verifyCliFlagInvocationParity(command: string, declarations: readonly CliFlagInvocationContract[], observations: readonly CliFlagArityObservation[]): CliFlagInvocationParityReport;
|