@unbrained/pm-cli 2026.8.8 → 2026.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +59 -0
- package/dist/cli/commander-usage.js +17 -12
- package/dist/cli/help-json-payload.js +51 -16
- package/dist/cli/main.js +7 -6
- package/dist/cli-bundle/bundle-manifest.json +162 -162
- package/dist/cli-bundle/chunks/chunk-2QYH4QMI.js +30 -0
- package/dist/cli-bundle/chunks/{chunk-2ZMXX3Q6.js → chunk-EBO7OUUE.js} +70 -70
- package/dist/cli-bundle/chunks/{chunk-NUXRRNAB.js → chunk-ETML5C6H.js} +48 -48
- package/dist/cli-bundle/chunks/chunk-JUDU4RO4.js +194 -0
- package/dist/cli-bundle/chunks/chunk-JZSNADRR.js +5 -0
- package/dist/cli-bundle/chunks/chunk-MENWVGJW.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-ALDHXLPS.js → chunk-S4EITGLA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TIGKWVLA.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-CBLA33YK.js → chunk-TRWXF476.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TSLDTJLQ.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-WFZAMJHZ.js → register-list-query-OJ6ZXKV4.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-SOKKOTHQ.js → register-mutation-DKI7QC7O.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-P5OGMT6I.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-2HL5ZHMK.js → register-setup-S3KT2LTH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ANTMGYLI.js → chunk-2COZ67XT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2EXI2DKR.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YSAHYUXX.js → chunk-34SX654S.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-36FTZ2NT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3CQECMKR.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-75774JWP.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-7UN6BHHO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TCSAPH33.js → chunk-CHIBMEZR.js} +6 -6
- package/dist/cli-bundle/focused-chunks/chunk-DZGAHZZV.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-FF4MNAYB.js +153 -0
- package/dist/cli-bundle/focused-chunks/chunk-GHTN2ILR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-I4YM2I7S.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IMDTEN7K.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IW43E4XL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-JMVA4HKR.js +5 -0
- package/dist/cli-bundle/focused-chunks/{chunk-PL2EYDJK.js → chunk-KR5RVXLQ.js} +31 -29
- package/dist/cli-bundle/focused-chunks/chunk-KSNJG4KI.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-M6RPIXKC.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MXYSIQ56.js +18 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIIN5V4N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RKWSCYYN.js +2 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +38 -38
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +1 -1
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +2 -2
- package/dist/core/diagnostics/remediation.js +19 -9
- package/dist/core/fs/fs-utils.d.ts +10 -0
- package/dist/core/fs/fs-utils.js +16 -4
- package/dist/core/history/history.js +13 -4
- package/dist/core/item/actionability.d.ts +7 -1
- package/dist/core/item/actionability.js +71 -15
- package/dist/core/item/item-format.js +3 -32
- package/dist/core/schema/fields-file.d.ts +1 -2
- package/dist/core/schema/fields-file.js +4 -11
- package/dist/core/schema/runtime-schema.js +3 -10
- package/dist/core/schema/status-defs-file.d.ts +1 -2
- package/dist/core/schema/status-defs-file.js +4 -32
- package/dist/core/schema/status-token.d.ts +2 -0
- package/dist/core/schema/status-token.js +32 -0
- package/dist/core/schema/type-workflows.d.ts +1 -2
- package/dist/core/schema/type-workflows.js +4 -11
- package/dist/core/shared/author.d.ts +25 -0
- package/dist/core/shared/author.js +128 -10
- package/dist/core/shared/errors.d.ts +4 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/text-normalization.d.ts +1 -1
- package/dist/core/shared/text-normalization.js +2 -2
- package/dist/sdk/actionability.d.ts +1 -1
- package/dist/sdk/actionability.js +3 -3
- package/dist/sdk/agent/command-recovery.d.ts +4 -0
- package/dist/sdk/agent/command-recovery.js +52 -0
- package/dist/sdk/agent/command-suggestions.d.ts +4 -0
- package/dist/sdk/agent/command-suggestions.js +67 -0
- package/dist/sdk/agent/create-option-policy.d.ts +12 -0
- package/dist/sdk/agent/create-option-policy.js +32 -0
- package/dist/sdk/agent/item-addressing.d.ts +19 -0
- package/dist/sdk/agent/item-addressing.js +208 -0
- package/dist/sdk/cli-bootstrap.d.ts +1 -1
- package/dist/sdk/cli-bootstrap.js +20 -5
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -4
- package/dist/sdk/cli-contracts/flag-contracts.js +62 -21
- package/dist/sdk/cli-contracts/registration-helpers.js +10 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +8 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +20 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +6 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +19 -4
- package/dist/sdk/cli-contracts/tool-schema.js +17 -4
- package/dist/sdk/context-intent-runtime.js +8 -5
- package/dist/sdk/context-signal-store.d.ts +34 -0
- package/dist/sdk/context-signal-store.js +24 -2
- package/dist/sdk/core-governance.d.ts +1 -1
- package/dist/sdk/core-governance.js +3 -3
- package/dist/sdk/dependencies.d.ts +2 -0
- package/dist/sdk/dependencies.js +7 -6
- package/dist/sdk/dependency-flag-validation.d.ts +15 -1
- package/dist/sdk/dependency-flag-validation.js +54 -2
- package/dist/sdk/extension/bundled-catalog.js +19 -6
- package/dist/sdk/generated-error-code-catalog.js +110 -2
- package/dist/sdk/governance/health.js +38 -12
- package/dist/sdk/governance/provenance-health.d.ts +39 -0
- package/dist/sdk/governance/provenance-health.js +185 -0
- package/dist/sdk/governance/validate-item-reader.d.ts +13 -0
- package/dist/sdk/governance/validate-item-reader.js +18 -0
- package/dist/sdk/governance/validate.d.ts +2 -2
- package/dist/sdk/governance/validate.js +25 -11
- package/dist/sdk/governance.d.ts +1 -0
- package/dist/sdk/governance.js +3 -2
- package/dist/sdk/graph/assembly.d.ts +4 -0
- package/dist/sdk/graph/assembly.js +22 -2
- package/dist/sdk/graph/run.d.ts +2 -0
- package/dist/sdk/graph/run.js +3 -2
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +6 -2
- package/dist/sdk/lifecycle/close.js +27 -19
- package/dist/sdk/lifecycle/create.d.ts +2 -0
- package/dist/sdk/lifecycle/create.js +66 -19
- package/dist/sdk/lifecycle/plan.js +6 -3
- package/dist/sdk/lifecycle/update-many.js +39 -27
- package/dist/sdk/lifecycle/update.d.ts +6 -1
- package/dist/sdk/lifecycle/update.js +51 -28
- package/dist/sdk/merge/driver.d.ts +2 -1
- package/dist/sdk/merge/driver.js +7 -4
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/install.d.ts +4 -0
- package/dist/sdk/merge/install.js +29 -17
- package/dist/sdk/merge/receipts.d.ts +17 -1
- package/dist/sdk/merge/receipts.js +112 -20
- package/dist/sdk/merge/reconcile.js +21 -4
- package/dist/sdk/merge/three-way.d.ts +6 -2
- package/dist/sdk/merge/three-way.js +24 -10
- package/dist/sdk/output-projection.js +24 -4
- package/dist/sdk/query/context.d.ts +2 -0
- package/dist/sdk/query/context.js +7 -4
- package/dist/sdk/query/get.d.ts +11 -0
- package/dist/sdk/query/get.js +37 -3
- package/dist/sdk/query/light-metadata.d.ts +3 -0
- package/dist/sdk/query/light-metadata.js +19 -0
- package/dist/sdk/read-output-contracts.d.ts +1 -1
- package/dist/sdk/read-output-contracts.js +23 -4
- package/dist/sdk/relationship-kinds/contract.d.ts +48 -0
- package/dist/sdk/relationship-kinds/contract.js +22 -0
- package/dist/sdk/relationships.d.ts +6 -41
- package/dist/sdk/relationships.js +12 -126
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.d.ts +4 -1
- package/dist/sdk/runtime.js +8 -3
- package/dist/sdk/schema-migration.js +7 -9
- package/dist/sdk/similarity-scoring.d.ts +1 -2
- package/dist/sdk/similarity-scoring.js +4 -16
- package/dist/sdk/similarity.d.ts +5 -0
- package/dist/sdk/similarity.js +40 -10
- package/dist/sdk/structured-mutations.js +5 -2
- package/dist/sdk/test/linked-command-detection.d.ts +2 -7
- package/dist/sdk/test/linked-command-detection.js +22 -9
- package/dist/sdk/workspace-snapshot.d.ts +4 -0
- package/dist/sdk/workspace-snapshot.js +24 -11
- package/docs/AGENT_GUIDE.md +5 -2
- package/docs/COMMANDS.md +27 -6
- package/docs/DEPENDENCY_KIND_CONTRACT.md +29 -0
- package/docs/ITEM_READ_PROJECTIONS.md +26 -0
- package/docs/MERGE_SAFETY.md +17 -8
- package/docs/README.md +2 -5
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -2
- package/docs/RELATIONSHIP_GRAPH.md +1 -1
- package/docs/SDK.md +33 -8
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +36 -2
- package/docs/SDK_CONTEXT.md +97 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +33 -3
- package/docs/SENTRY_CONTRACT_EPOCHS.md +20 -0
- package/docs/agent-task-token-baseline.json +2 -2
- package/marketplace.json +2 -2
- package/package.json +5 -4
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +415 -43
- package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +0 -5
- package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +0 -26
- package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +0 -13
- package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +0 -194
- package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5FLBTZJQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +0 -14
- package/dist/cli-bundle/focused-chunks/chunk-DMKOMTTY.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-F5B3HBEZ.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-FI6DWU2M.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-FNOKJG6N.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-FPDYXZBK.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-GWI6YIKJ.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-HCUC62AB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HGNKPSCB.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-IAS7PMLG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZOLDTUU7.js +0 -2
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Implements the pm contracts 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]="081c3d07-0cf1-5bad-80ff-2d37be8ee887")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, SETTINGS_DEFAULTS, PmCliError, activateExtensions, getActiveExtensionRegistrations, loadExtensions, pathExists, commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
9
9
|
import { buildMcpToolContracts, } from "../../mcp/tool-definitions.js";
|
|
10
|
-
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
10
|
+
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
11
11
|
import { GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES, GOVERNANCE_CREATE_MODE_DEFAULT_VALUES, GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES, GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES, } from "../../types.js";
|
|
12
12
|
import { BRIEF_LIST_FIELDS, DEFAULT_COMPACT_LIST_FIELDS, LIST_COMMAND_DEFAULT_PROJECTIONS, } from "../query/list.js";
|
|
13
13
|
import { getActiveContextIntentContracts, } from "../context-intent-contracts.js";
|
|
@@ -17,6 +17,7 @@ import { resolvePmCommandVisibilityTier, } from "../agent-capability-contracts.j
|
|
|
17
17
|
import { PM_ERROR_CODE_CATALOG } from "../generated-error-code-catalog.js";
|
|
18
18
|
import { resolvePmCommandOutputEnvelope, } from "../output-contracts.js";
|
|
19
19
|
import { PM_COMMAND_EXIT_OUTCOME_CONTRACTS, resolvePmCommandExitContract, } from "./command-exit-contracts.js";
|
|
20
|
+
import { BUILTIN_RELATIONSHIP_KINDS } from "../relationship-kinds/contract.js";
|
|
20
21
|
const AGENT_BOOTSTRAP_FLAGS = new Map([
|
|
21
22
|
[
|
|
22
23
|
"claim",
|
|
@@ -307,6 +308,8 @@ const CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
|
307
308
|
["create", CREATE_FLAG_CONTRACTS],
|
|
308
309
|
["item mutate", ITEM_MUTATE_FLAG_CONTRACTS],
|
|
309
310
|
["item complete", ITEM_COMPLETE_FLAG_CONTRACTS],
|
|
311
|
+
["copy", COPY_FLAG_CONTRACTS],
|
|
312
|
+
["focus", FOCUS_FLAG_CONTRACTS],
|
|
310
313
|
["update", UPDATE_FLAG_CONTRACTS],
|
|
311
314
|
["update-many", UPDATE_MANY_FLAG_CONTRACTS],
|
|
312
315
|
["upgrade", UPGRADE_FLAG_CONTRACTS],
|
|
@@ -1718,6 +1721,20 @@ function attachRuntimeContractsResult(result, runtime) {
|
|
|
1718
1721
|
close_validation_modes: [...GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES],
|
|
1719
1722
|
workflow_enforcement_modes: [...GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES],
|
|
1720
1723
|
};
|
|
1724
|
+
result.relationship_kind_contracts = [
|
|
1725
|
+
...BUILTIN_RELATIONSHIP_KINDS,
|
|
1726
|
+
...(runtime.runtimeProbe.registrations?.relationship_kinds ?? []).flatMap((registration) => registration.definitions),
|
|
1727
|
+
]
|
|
1728
|
+
.sort((left, right) => left.kind.localeCompare(right.kind))
|
|
1729
|
+
.map((definition) => ({
|
|
1730
|
+
canonical: definition.kind,
|
|
1731
|
+
aliases: [...(definition.aliases ?? [])],
|
|
1732
|
+
...(definition.inverse === undefined
|
|
1733
|
+
? {}
|
|
1734
|
+
: { inverse: definition.inverse }),
|
|
1735
|
+
ordering: definition.ordering,
|
|
1736
|
+
hierarchy: definition.hierarchy,
|
|
1737
|
+
}));
|
|
1721
1738
|
}
|
|
1722
1739
|
function attachSchemaContractsResult(result, selection, schemaContext, extensionCommandContracts) {
|
|
1723
1740
|
if (selection.flagsOnly || selection.availabilityOnly) {
|
|
@@ -1854,4 +1871,4 @@ export const _testOnlyContractsCommand = {
|
|
|
1854
1871
|
toRuntimeShortFlagToken,
|
|
1855
1872
|
};
|
|
1856
1873
|
//# sourceMappingURL=runtime-contracts.js.map
|
|
1857
|
-
//# debugId=
|
|
1874
|
+
//# debugId=081c3d07-0cf1-5bad-80ff-2d37be8ee887
|
|
@@ -170,6 +170,9 @@ export declare const TOOL_CREATE_OPTION_CONTRACT_SOURCE: readonly [{
|
|
|
170
170
|
}, {
|
|
171
171
|
readonly param: "allowMissingParent";
|
|
172
172
|
readonly flag: "--allow-missing-parent";
|
|
173
|
+
}, {
|
|
174
|
+
readonly param: "allowUnresolvedDeps";
|
|
175
|
+
readonly flag: "--allow-unresolved-deps";
|
|
173
176
|
}, {
|
|
174
177
|
readonly param: "allowDuplicate";
|
|
175
178
|
readonly flag: "--allow-duplicate";
|
|
@@ -325,6 +328,9 @@ export declare const TOOL_UPDATE_OPTION_CONTRACT_SOURCE: readonly [{
|
|
|
325
328
|
}, {
|
|
326
329
|
readonly param: "allowMissingParent";
|
|
327
330
|
readonly flag: "--allow-missing-parent";
|
|
331
|
+
}, {
|
|
332
|
+
readonly param: "allowUnresolvedDeps";
|
|
333
|
+
readonly flag: "--allow-unresolved-deps";
|
|
328
334
|
}, {
|
|
329
335
|
readonly param: "dep";
|
|
330
336
|
readonly flag: "--dep";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Returns fresh option contract objects so exported arrays cannot share mutable entries. */
|
|
2
2
|
|
|
3
|
-
!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
|
+
!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]="26955ae3-1aca-503e-9492-46652285d17a")}catch(e){}}();
|
|
4
4
|
function cloneOptionContracts(contracts) {
|
|
5
5
|
return contracts.map((contract) => ({ ...contract }));
|
|
6
6
|
}
|
|
@@ -183,6 +183,7 @@ export const TOOL_CREATE_OPTION_CONTRACT_SOURCE = [
|
|
|
183
183
|
{ param: "message", flag: "--message", allowEmpty: true },
|
|
184
184
|
{ param: "assignee", flag: "--assignee" },
|
|
185
185
|
{ param: "allowMissingParent", flag: "--allow-missing-parent" },
|
|
186
|
+
{ param: "allowUnresolvedDeps", flag: "--allow-unresolved-deps" },
|
|
186
187
|
{ param: "allowDuplicate", flag: "--allow-duplicate", booleanish: true },
|
|
187
188
|
{ param: "reminder", flag: "--reminder", repeatable: true },
|
|
188
189
|
{ param: "event", flag: "--event", repeatable: true },
|
|
@@ -235,6 +236,7 @@ export const TOOL_UPDATE_OPTION_CONTRACT_SOURCE = [
|
|
|
235
236
|
{ param: "message", flag: "--message", allowEmpty: true },
|
|
236
237
|
{ param: "assignee", flag: "--assignee" },
|
|
237
238
|
{ param: "allowMissingParent", flag: "--allow-missing-parent" },
|
|
239
|
+
{ param: "allowUnresolvedDeps", flag: "--allow-unresolved-deps" },
|
|
238
240
|
{ param: "dep", flag: "--dep", repeatable: true },
|
|
239
241
|
{ param: "depRemove", flag: "--dep-remove", repeatable: true },
|
|
240
242
|
{ param: "replaceDeps", flag: "--replace-deps" },
|
|
@@ -421,4 +423,4 @@ export const TOOL_GRAPH_OPTION_CONTRACTS = [
|
|
|
421
423
|
{ param: "summary", flag: "--summary" },
|
|
422
424
|
];
|
|
423
425
|
//# sourceMappingURL=tool-option-contracts.js.map
|
|
424
|
-
//# debugId=
|
|
426
|
+
//# debugId=26955ae3-1aca-503e-9492-46652285d17a
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines SDK command-contract metadata for Tool Parameter Tables.
|
|
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]="6e0b4ff7-5aca-562b-b36c-c0c53987138d")}catch(e){}}();
|
|
8
8
|
import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
|
|
9
9
|
import { PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS } from "../read-output-session.js";
|
|
10
10
|
/** Public contract for pm tool parameter properties, shared by SDK and presentation-layer consumers. */
|
|
@@ -164,6 +164,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
164
164
|
},
|
|
165
165
|
idOnly: { type: "boolean" },
|
|
166
166
|
allowMissingParent: { type: "boolean" },
|
|
167
|
+
allowUnresolvedDeps: { type: "boolean" },
|
|
167
168
|
allowDuplicate: { type: "boolean" },
|
|
168
169
|
duplicateOf: { type: "string" },
|
|
169
170
|
configAction: { type: "string", enum: ["get", "set", "list", "export"] },
|
|
@@ -979,6 +980,10 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
979
980
|
allowDuplicate: {
|
|
980
981
|
description: "Explicitly proceed when strict similarity governance finds likely duplicate items.",
|
|
981
982
|
},
|
|
983
|
+
allowUnresolvedDeps: {
|
|
984
|
+
description: "Permit unresolved local dependency targets while returning dependency_target_unresolved warning receipts. Cross-workspace references should use source_kind=external instead.",
|
|
985
|
+
examples: [true],
|
|
986
|
+
},
|
|
982
987
|
requiredTypes: {
|
|
983
988
|
description: "Restrict a custom field's requirement to specific item types (schema add-field).",
|
|
984
989
|
examples: [["Bug"], ["Story", "Spike"]],
|
|
@@ -1074,7 +1079,7 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1074
1079
|
examples: [["error path covered by a regression test"]],
|
|
1075
1080
|
},
|
|
1076
1081
|
removeAc: {
|
|
1077
|
-
description: "Acceptance criteria removed individually by exact text match (one criterion per entry).",
|
|
1082
|
+
description: "Acceptance criteria removed individually by exact text match; the mutation fails atomically if any selector is unmatched (one criterion per entry).",
|
|
1078
1083
|
examples: [["superseded manual QA step"]],
|
|
1079
1084
|
},
|
|
1080
1085
|
removeTags: {
|
|
@@ -1106,7 +1111,7 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1106
1111
|
examples: [60, "120"],
|
|
1107
1112
|
},
|
|
1108
1113
|
acceptanceCriteria: {
|
|
1109
|
-
description: "
|
|
1114
|
+
description: "Complete acceptance-criteria text supplied while creating or replacing an item field.",
|
|
1110
1115
|
},
|
|
1111
1116
|
author: {
|
|
1112
1117
|
description: "Intentional mutation-author override. Agent harness identity is automatic when omitted.",
|
|
@@ -1764,6 +1769,16 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1764
1769
|
* because its single `name` property must cover every action at once.
|
|
1765
1770
|
*/
|
|
1766
1771
|
export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
1772
|
+
update: {
|
|
1773
|
+
acceptanceCriteria: {
|
|
1774
|
+
description: "Complete acceptance-criteria replacement text. Use removeAc plus addAc together for an atomic one-entry repair that preserves unrelated criteria.",
|
|
1775
|
+
},
|
|
1776
|
+
},
|
|
1777
|
+
"update-many": {
|
|
1778
|
+
acceptanceCriteria: {
|
|
1779
|
+
description: "Complete acceptance-criteria replacement text. Use removeAc plus addAc together for an atomic one-entry repair that preserves unrelated criteria.",
|
|
1780
|
+
},
|
|
1781
|
+
},
|
|
1767
1782
|
stats: {
|
|
1768
1783
|
since: {
|
|
1769
1784
|
description: "Inclusive ISO 8601 timestamp or negative duration lower bound for provenance and fleet analytics.",
|
|
@@ -1907,4 +1922,4 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
|
1907
1922
|
},
|
|
1908
1923
|
};
|
|
1909
1924
|
//# sourceMappingURL=tool-parameter-tables.js.map
|
|
1910
|
-
//# debugId=
|
|
1925
|
+
//# debugId=6e0b4ff7-5aca-562b-b36c-c0c53987138d
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* consumers from a single source of truth.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!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]="
|
|
10
|
+
!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]="4ce3417b-2ccc-5304-8275-30f6eb749db8")}catch(e){}}();
|
|
11
11
|
import { normalizeUniqueStringList } from "./string-lists.js";
|
|
12
12
|
import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
|
|
13
13
|
import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, } from "./tool-option-contracts.js";
|
|
@@ -784,8 +784,21 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
784
784
|
required: ["id", "target"],
|
|
785
785
|
optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
|
|
786
786
|
},
|
|
787
|
-
update: {
|
|
788
|
-
|
|
787
|
+
update: {
|
|
788
|
+
required: ["id"],
|
|
789
|
+
optional: UPDATE_CONTRACT_PARAMETER_KEYS,
|
|
790
|
+
mutuallyExclusive: [
|
|
791
|
+
["acceptanceCriteria", "addAc"],
|
|
792
|
+
["acceptanceCriteria", "removeAc"],
|
|
793
|
+
],
|
|
794
|
+
},
|
|
795
|
+
"update-many": {
|
|
796
|
+
optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS,
|
|
797
|
+
mutuallyExclusive: [
|
|
798
|
+
["acceptanceCriteria", "addAc"],
|
|
799
|
+
["acceptanceCriteria", "removeAc"],
|
|
800
|
+
],
|
|
801
|
+
},
|
|
789
802
|
close: {
|
|
790
803
|
required: ["id"],
|
|
791
804
|
optional: [
|
|
@@ -1512,4 +1525,4 @@ export const _testOnlyCliContracts = {
|
|
|
1512
1525
|
withFlagAliasMetadata,
|
|
1513
1526
|
};
|
|
1514
1527
|
//# sourceMappingURL=tool-schema.js.map
|
|
1515
|
-
//# debugId=
|
|
1528
|
+
//# debugId=4ce3417b-2ccc-5304-8275-30f6eb749db8
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* SDK entrypoint.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!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]="
|
|
9
|
+
!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]="7ba0243e-98d1-5aef-bd47-54f0b630be58")}catch(e){}}();
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
|
+
import { isFileAbsentError } from "../core/fs/fs-utils.js";
|
|
12
13
|
import { runWithContextIntentContracts, } from "./context-intent-contracts.js";
|
|
13
14
|
/** Conventional workspace declaration file relative to the tracker root. */
|
|
14
15
|
export const PM_CONTEXT_INTENTS_FILE = "context-intents.json";
|
|
@@ -56,9 +57,11 @@ export async function readWorkspaceContextIntentContracts(pmRoot) {
|
|
|
56
57
|
source = await readFile(declarationPath, "utf8");
|
|
57
58
|
}
|
|
58
59
|
catch (error) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
// Absent declarations are the norm. `ENOTDIR` counts as absent too: when
|
|
61
|
+
// the tracker root is a regular file the declaration cannot exist, and the
|
|
62
|
+
// authoritative root guard downstream owns that refusal — this optional
|
|
63
|
+
// read must not pre-empt it with a raw runtime fault.
|
|
64
|
+
if (isFileAbsentError(error)) {
|
|
62
65
|
return [];
|
|
63
66
|
}
|
|
64
67
|
throw error;
|
|
@@ -107,4 +110,4 @@ export async function runWithDiscoveredContextIntentContracts(options, run) {
|
|
|
107
110
|
return await runWithContextIntentContracts(layers, run);
|
|
108
111
|
}
|
|
109
112
|
//# sourceMappingURL=context-intent-runtime.js.map
|
|
110
|
-
//# debugId=
|
|
113
|
+
//# debugId=7ba0243e-98d1-5aef-bd47-54f0b630be58
|
|
@@ -52,7 +52,41 @@ export interface ContextSignalStoreReadResult {
|
|
|
52
52
|
cache_status: "fresh" | "rebuilt";
|
|
53
53
|
/** Non-fatal recovery diagnostics. */
|
|
54
54
|
warnings: readonly string[];
|
|
55
|
+
/** Actionable meanings and executable recovery commands for every warning. */
|
|
56
|
+
warning_details?: readonly ContextSignalStoreWarningDetail[];
|
|
55
57
|
}
|
|
58
|
+
/** Stable recovery contract for one context signal-store warning. */
|
|
59
|
+
export interface ContextSignalStoreWarningDetail {
|
|
60
|
+
/** Machine-readable warning code also present in `warnings`. */
|
|
61
|
+
code: "context_signal_store_invalid" | "context_signal_store_stale" | "context_signal_store_write_failed";
|
|
62
|
+
/** Bounded explanation of the observed derived-state condition. */
|
|
63
|
+
meaning: string;
|
|
64
|
+
/** Safe executable command that retries or confirms recovery. */
|
|
65
|
+
recovery_command: "pm context";
|
|
66
|
+
/** Expected observable effect of the recovery command. */
|
|
67
|
+
recovery_effect: string;
|
|
68
|
+
}
|
|
69
|
+
/** Canonical actionable contracts shared by CLI, SDK, MCP, and package hosts. */
|
|
70
|
+
export declare const CONTEXT_SIGNAL_STORE_WARNING_DETAILS: {
|
|
71
|
+
readonly context_signal_store_invalid: {
|
|
72
|
+
readonly code: "context_signal_store_invalid";
|
|
73
|
+
readonly meaning: "The persisted context-signal snapshot was unreadable or invalid and was rebuilt from authoritative items.";
|
|
74
|
+
readonly recovery_command: "pm context";
|
|
75
|
+
readonly recovery_effect: "Re-read context and confirm the rebuilt snapshot can be loaded without the warning.";
|
|
76
|
+
};
|
|
77
|
+
readonly context_signal_store_stale: {
|
|
78
|
+
readonly code: "context_signal_store_stale";
|
|
79
|
+
readonly meaning: "The persisted context-signal snapshot did not match the authoritative cursor or item corpus and was rebuilt.";
|
|
80
|
+
readonly recovery_command: "pm context";
|
|
81
|
+
readonly recovery_effect: "Re-read context and confirm the rebuilt snapshot is now fresh.";
|
|
82
|
+
};
|
|
83
|
+
readonly context_signal_store_write_failed: {
|
|
84
|
+
readonly code: "context_signal_store_write_failed";
|
|
85
|
+
readonly meaning: "Context signals were rebuilt in memory, but the derived snapshot could not be persisted.";
|
|
86
|
+
readonly recovery_command: "pm context";
|
|
87
|
+
readonly recovery_effect: "Retry the derived snapshot write and confirm the warning clears after storage access is restored.";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
56
90
|
/** Workspace-bound feature-store options used by CLI, MCP, and SDK readers. */
|
|
57
91
|
export interface ReadWorkspaceContextSignalsOptions extends BuildItemContextRelevanceCandidatesOptions {
|
|
58
92
|
/** Tracker root containing rebuildable runtime state. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* history, while stale, absent, or corrupt snapshots rebuild transparently.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!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]="
|
|
9
|
+
!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]="2a0f64cf-f6a4-5304-921d-c83b98d3a31f")}catch(e){}}();
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -24,6 +24,27 @@ const STORED_CONTEXT_SIGNAL_NAMES = [
|
|
|
24
24
|
"risk_pressure",
|
|
25
25
|
"knowledge_density",
|
|
26
26
|
];
|
|
27
|
+
/** Canonical actionable contracts shared by CLI, SDK, MCP, and package hosts. */
|
|
28
|
+
export const CONTEXT_SIGNAL_STORE_WARNING_DETAILS = {
|
|
29
|
+
context_signal_store_invalid: {
|
|
30
|
+
code: "context_signal_store_invalid",
|
|
31
|
+
meaning: "The persisted context-signal snapshot was unreadable or invalid and was rebuilt from authoritative items.",
|
|
32
|
+
recovery_command: "pm context",
|
|
33
|
+
recovery_effect: "Re-read context and confirm the rebuilt snapshot can be loaded without the warning.",
|
|
34
|
+
},
|
|
35
|
+
context_signal_store_stale: {
|
|
36
|
+
code: "context_signal_store_stale",
|
|
37
|
+
meaning: "The persisted context-signal snapshot did not match the authoritative cursor or item corpus and was rebuilt.",
|
|
38
|
+
recovery_command: "pm context",
|
|
39
|
+
recovery_effect: "Re-read context and confirm the rebuilt snapshot is now fresh.",
|
|
40
|
+
},
|
|
41
|
+
context_signal_store_write_failed: {
|
|
42
|
+
code: "context_signal_store_write_failed",
|
|
43
|
+
meaning: "Context signals were rebuilt in memory, but the derived snapshot could not be persisted.",
|
|
44
|
+
recovery_command: "pm context",
|
|
45
|
+
recovery_effect: "Retry the derived snapshot write and confirm the warning clears after storage access is restored.",
|
|
46
|
+
},
|
|
47
|
+
};
|
|
27
48
|
function isRecord(value) {
|
|
28
49
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29
50
|
}
|
|
@@ -245,6 +266,7 @@ export class ContextSignalStore {
|
|
|
245
266
|
})),
|
|
246
267
|
cache_status: fresh ? "fresh" : "rebuilt",
|
|
247
268
|
warnings,
|
|
269
|
+
warning_details: warnings.map((warning) => CONTEXT_SIGNAL_STORE_WARNING_DETAILS[warning]),
|
|
248
270
|
};
|
|
249
271
|
}
|
|
250
272
|
}
|
|
@@ -288,4 +310,4 @@ export async function readWorkspaceContextSignals(items, options) {
|
|
|
288
310
|
return store.readOrRebuild(items, { ...options, sourceCursor, source });
|
|
289
311
|
}
|
|
290
312
|
//# sourceMappingURL=context-signal-store.js.map
|
|
291
|
-
//# debugId=
|
|
313
|
+
//# debugId=2a0f64cf-f6a4-5304-921d-c83b98d3a31f
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Defines the shared agent-provenance and CLI-completeness governance surface
|
|
5
5
|
* exposed by both the focused core entrypoint and the complete SDK barrel.
|
|
6
6
|
*/
|
|
7
|
-
export { AGENT_PROVENANCE_DIMENSIONS, BUILTIN_HARNESS_SIGNAL_DESCRIPTORS, detectAgentIdentity, detectHarnessIdentity, readAuthorEnvironment, registerHarnessSignalDescriptors, resolveAuthorIdentity, runWithHarnessDetectionSignals, runWithWorkspaceHarnessSignalDescriptors, writeAuthorEnvironment, type AgentClientInfo, type AgentModelSource, type AgentProvenance, type AgentProvenanceObservation, type AuthorSource, type DetectedAgentIdentity, type HarnessDetectionSignals, type HarnessSignalDescriptor, type ResolvedAuthorIdentity, } from "../core/shared/author.js";
|
|
7
|
+
export { AGENT_PROVENANCE_DIMENSIONS, BUILTIN_HARNESS_SIGNAL_DESCRIPTORS, diagnoseAgentIdentity, detectAgentIdentity, detectHarnessIdentity, readAuthorEnvironment, registerHarnessSignalDescriptors, resolveAuthorIdentity, runWithHarnessDetectionSignals, runWithWorkspaceHarnessSignalDescriptors, writeAuthorEnvironment, type AgentClientInfo, type AgentModelSource, type AgentProvenance, type AgentProvenanceAbsenceReason, type AgentProvenanceObservation, type AgentProvenanceOutcome, type AuthorSource, type DetectedAgentIdentity, type DiagnosedAgentIdentity, type HarnessDetectionSignals, type HarnessSignalDescriptor, type ResolvedAuthorIdentity, } from "../core/shared/author.js";
|
|
8
8
|
export { analyzeAgentProvenanceDescriptorCoverage, groupHistoryByEpisode, resolveHistoryEpisodeGroupIdentity, summarizeAgentProvenance, summarizeAgentModelProvenance, type AgentEpisodeGroup, type AgentModelProvenanceCoverage, type AgentProvenanceDimensionCoverage, type AgentProvenanceDescriptorCoverage, } from "./provenance.js";
|
|
9
9
|
export { analyzeSdkCliParameterCompleteness, type SdkCliActionParameterCoverage, type SdkCliCompletenessContractSource, type SdkCliParameterCoverageEntry, type SdkCliParameterDisposition, } from "./cli-contracts.js";
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* exposed by both the focused core entrypoint and the complete SDK barrel.
|
|
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]="
|
|
9
|
-
export { AGENT_PROVENANCE_DIMENSIONS, BUILTIN_HARNESS_SIGNAL_DESCRIPTORS, detectAgentIdentity, detectHarnessIdentity, readAuthorEnvironment, registerHarnessSignalDescriptors, resolveAuthorIdentity, runWithHarnessDetectionSignals, runWithWorkspaceHarnessSignalDescriptors, writeAuthorEnvironment, } from "../core/shared/author.js";
|
|
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]="7442357d-52b9-5461-9ac4-3acd898334da")}catch(e){}}();
|
|
9
|
+
export { AGENT_PROVENANCE_DIMENSIONS, BUILTIN_HARNESS_SIGNAL_DESCRIPTORS, diagnoseAgentIdentity, detectAgentIdentity, detectHarnessIdentity, readAuthorEnvironment, registerHarnessSignalDescriptors, resolveAuthorIdentity, runWithHarnessDetectionSignals, runWithWorkspaceHarnessSignalDescriptors, writeAuthorEnvironment, } from "../core/shared/author.js";
|
|
10
10
|
export { analyzeAgentProvenanceDescriptorCoverage, groupHistoryByEpisode, resolveHistoryEpisodeGroupIdentity, summarizeAgentProvenance, summarizeAgentModelProvenance, } from "./provenance.js";
|
|
11
11
|
export { analyzeSdkCliParameterCompleteness, } from "./cli-contracts.js";
|
|
12
12
|
//# sourceMappingURL=core-governance.js.map
|
|
13
|
-
//# debugId=
|
|
13
|
+
//# debugId=7442357d-52b9-5461-9ac4-3acd898334da
|
|
@@ -109,6 +109,8 @@ export interface DepsResult {
|
|
|
109
109
|
edge_count: number;
|
|
110
110
|
/** Counting convention used by edge_count. */
|
|
111
111
|
edge_basis: "deduplicated_directed";
|
|
112
|
+
/** Stored legacy relationship aliases grouped by spelling across the workspace. */
|
|
113
|
+
legacy_alias_counts?: Record<string, number>;
|
|
112
114
|
/**
|
|
113
115
|
* Number of missing entries represented by this result.
|
|
114
116
|
*
|
package/dist/sdk/dependencies.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm deps 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]="ee0547d9-ae0f-5762-8bff-e25f0a3cd4d5")}catch(e){}}();
|
|
8
8
|
import { getActiveExtensionRegistrations } from "../core/extensions/index.js";
|
|
9
9
|
import { pathExists } from "../core/fs/fs-utils.js";
|
|
10
10
|
import { resolveItemTypeRegistry } from "../core/item/type-registry.js";
|
|
@@ -637,7 +637,7 @@ function buildTreeOrGraphDepsResult(id, format, options, index, maxDepth, collap
|
|
|
637
637
|
budget.reasons.add("token_budget");
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
function attachDepsProjection(result, summaryOnly) {
|
|
640
|
+
function attachDepsProjection(result, summaryOnly, legacyAliasCounts = {}) {
|
|
641
641
|
const group = {
|
|
642
642
|
name: result.format === "tree"
|
|
643
643
|
? "dependency_tree"
|
|
@@ -648,6 +648,7 @@ function attachDepsProjection(result, summaryOnly) {
|
|
|
648
648
|
};
|
|
649
649
|
return {
|
|
650
650
|
...result,
|
|
651
|
+
legacy_alias_counts: legacyAliasCounts,
|
|
651
652
|
projection: {
|
|
652
653
|
mode: summaryOnly ? "summary" : "full",
|
|
653
654
|
declared_field_groups: [group],
|
|
@@ -705,16 +706,16 @@ export async function runDeps(id, options, global) {
|
|
|
705
706
|
rootEvidence,
|
|
706
707
|
summaryOnly,
|
|
707
708
|
outputFormat: global.json === true ? "json" : "toon",
|
|
708
|
-
}), summaryOnly);
|
|
709
|
+
}), summaryOnly, lookup.assembly.legacyAliasCounts);
|
|
709
710
|
}
|
|
710
711
|
if (summaryOnly) {
|
|
711
712
|
return attachDepsProjection({
|
|
712
713
|
id,
|
|
713
714
|
format,
|
|
714
715
|
...countDependencyGraph(id, index, maxDepth),
|
|
715
|
-
}, true);
|
|
716
|
+
}, true, Object.fromEntries(Object.entries(assembleWorkspaceRelationshipGraph(items, (status) => isTerminalStatus(status, statusRegistry)).legacyAliasCounts)));
|
|
716
717
|
}
|
|
717
|
-
return attachDepsProjection(buildTreeOrGraphDepsResult(id, format, options, index, maxDepth, collapse, global.json === true ? "json" : "toon"), false);
|
|
718
|
+
return attachDepsProjection(buildTreeOrGraphDepsResult(id, format, options, index, maxDepth, collapse, global.json === true ? "json" : "toon"), false, Object.fromEntries(Object.entries(assembleWorkspaceRelationshipGraph(items, (status) => isTerminalStatus(status, statusRegistry)).legacyAliasCounts)));
|
|
718
719
|
}
|
|
719
720
|
//# sourceMappingURL=dependencies.js.map
|
|
720
|
-
//# debugId=
|
|
721
|
+
//# debugId=ee0547d9-ae0f-5762-8bff-e25f0a3cd4d5
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Dependency } from "../types/index.js";
|
|
1
|
+
import type { Dependency, ItemFormat } from "../types/index.js";
|
|
2
2
|
import { type RelationshipKindRegistry } from "./relationships.js";
|
|
3
3
|
/** Reject malformed shorthand before item-id prefix normalization can create a dangling graph node. */
|
|
4
4
|
export declare function assertValidBareDependencyFlagValue(value: string, structured: boolean): void;
|
|
@@ -7,3 +7,17 @@ export declare function assertValidBareDependencyFlagValue(value: string, struct
|
|
|
7
7
|
* ontology before a create or update mutation writes item or history state.
|
|
8
8
|
*/
|
|
9
9
|
export declare function assertDependencyEdgesAllowed(holderId: string, dependencies: readonly Dependency[] | undefined, registry?: RelationshipKindRegistry): void;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve every newly supplied local dependency before a mutation commits.
|
|
12
|
+
* Explicit external provenance bypasses workspace lookup, while the opt-in
|
|
13
|
+
* unresolved mode returns durable warning tokens instead of pretending that
|
|
14
|
+
* the graph edge resolved successfully.
|
|
15
|
+
*/
|
|
16
|
+
export declare function assertDependencyTargetsResolvable(params: {
|
|
17
|
+
pmRoot: string;
|
|
18
|
+
dependencies: readonly Dependency[] | undefined;
|
|
19
|
+
idPrefix: string;
|
|
20
|
+
itemFormat: ItemFormat;
|
|
21
|
+
typeToFolder: Record<string, string>;
|
|
22
|
+
allowUnresolved?: boolean;
|
|
23
|
+
}): Promise<string[]>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/** @module cli/commands/dependency-flag-validation */
|
|
2
2
|
|
|
3
|
-
!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
|
+
!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]="e7cd6092-ed18-52ea-94a0-03bed42eb858")}catch(e){}}();
|
|
4
4
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
5
5
|
import { PmCliError } from "../core/shared/errors.js";
|
|
6
6
|
import { toErrorMessage } from "../core/shared/primitives.js";
|
|
7
|
+
import { locateItem } from "../core/store/item-store.js";
|
|
8
|
+
import { isExternalDependencySourceKind } from "./dependency-provenance.js";
|
|
7
9
|
import { resolveWorkspaceRelationshipKindRegistry } from "./graph/assembly.js";
|
|
8
10
|
import { assertRelationshipEdgeAllowed, } from "./relationships.js";
|
|
9
11
|
/** Reject malformed shorthand before item-id prefix normalization can create a dangling graph node. */
|
|
@@ -29,5 +31,55 @@ export function assertDependencyEdgesAllowed(holderId, dependencies, registry =
|
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve every newly supplied local dependency before a mutation commits.
|
|
36
|
+
* Explicit external provenance bypasses workspace lookup, while the opt-in
|
|
37
|
+
* unresolved mode returns durable warning tokens instead of pretending that
|
|
38
|
+
* the graph edge resolved successfully.
|
|
39
|
+
*/
|
|
40
|
+
export async function assertDependencyTargetsResolvable(params) {
|
|
41
|
+
const localTargets = [
|
|
42
|
+
...new Set((params.dependencies ?? [])
|
|
43
|
+
.filter((dependency) => !isExternalDependencySourceKind(dependency.source_kind))
|
|
44
|
+
.map((dependency) => dependency.id)),
|
|
45
|
+
];
|
|
46
|
+
const resolutions = await Promise.all(localTargets.map(async (target) => ({
|
|
47
|
+
target,
|
|
48
|
+
located: await locateItem(params.pmRoot, target, params.idPrefix, params.itemFormat, params.typeToFolder),
|
|
49
|
+
})));
|
|
50
|
+
const targets = resolutions
|
|
51
|
+
.filter(({ located }) => located === null)
|
|
52
|
+
.map(({ target }) => target)
|
|
53
|
+
.sort((left, right) => (left < right ? -1 : 1));
|
|
54
|
+
if (targets.length === 0) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
if (params.allowUnresolved === true) {
|
|
58
|
+
return targets.map((target) => `dependency_target_unresolved:${target}`);
|
|
59
|
+
}
|
|
60
|
+
throw new PmCliError(`Dependency target${targets.length === 1 ? "" : "s"} not found: ${targets.join(", ")}`, EXIT_CODE.NOT_FOUND, {
|
|
61
|
+
code: "dependency_target_not_found",
|
|
62
|
+
reason: "unresolved_local_dependency",
|
|
63
|
+
required: "Every local dependency target must exist before the edge is committed.",
|
|
64
|
+
why: "Fail-fast target resolution prevents dangling graph nodes and preserves reliable traversal semantics.",
|
|
65
|
+
unresolved_targets: targets,
|
|
66
|
+
examples: [
|
|
67
|
+
"--dep id=<existing-item-id>,kind=related",
|
|
68
|
+
"--dep id=<external-id>,kind=related,source_kind=external",
|
|
69
|
+
"--allow-unresolved-deps --dep id=<future-item-id>,kind=related",
|
|
70
|
+
],
|
|
71
|
+
nextSteps: [
|
|
72
|
+
`Create or correct ${targets.length === 1 ? "the target" : "the targets"}, then retry the mutation.`,
|
|
73
|
+
"Use source_kind=external for a cross-workspace reference.",
|
|
74
|
+
"Use --allow-unresolved-deps only when the dangling local edge is intentional.",
|
|
75
|
+
],
|
|
76
|
+
recovery: {
|
|
77
|
+
recovery_mode: "compact",
|
|
78
|
+
missing: targets,
|
|
79
|
+
suggested_flags: ["--allow-unresolved-deps"],
|
|
80
|
+
suggested_retry: `pm search "${targets[0]}" --limit 10`,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
32
84
|
//# sourceMappingURL=dependency-flag-validation.js.map
|
|
33
|
-
//# debugId=
|
|
85
|
+
//# debugId=e7cd6092-ed18-52ea-94a0-03bed42eb858
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Bundled Catalog.
|
|
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]="259656b0-09b7-52c5-8f54-52ac29eec607")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest, } from "../../core/packages/manifest.js";
|
|
@@ -187,7 +187,7 @@ function buildBundledCatalogLinks(manifest) {
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
/** Build one bundled-package catalog entry from its manifest, marking it `installed` when the managed state for `scope` already records the package by built-in alias or resolved location, and projecting the metadata-only resource kinds (everything except installable `extensions`) that the package ships. */
|
|
190
|
-
function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations) {
|
|
190
|
+
function buildBundledCatalogPackageEntry(manifest, bundledEntry, aliases, scope, installedBuiltinAliases, installedLocations) {
|
|
191
191
|
const installScopeFlag = scope === "global" ? "--global" : "--project";
|
|
192
192
|
const metadataOnlyResources = Object.fromEntries(PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== "extensions")
|
|
193
193
|
.map((resourceKind) => [
|
|
@@ -197,9 +197,10 @@ function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installe
|
|
|
197
197
|
.filter(([, entries]) => Array.isArray(entries) && entries.length > 0));
|
|
198
198
|
return {
|
|
199
199
|
alias: bundledEntry.alias,
|
|
200
|
+
aliases,
|
|
200
201
|
bundled: true,
|
|
201
202
|
available: true,
|
|
202
|
-
installed: installedBuiltinAliases.has(
|
|
203
|
+
installed: aliases.some((alias) => installedBuiltinAliases.has(alias)) ||
|
|
203
204
|
installedLocations.has(path.resolve(bundledEntry.package_root)),
|
|
204
205
|
install_target: bundledEntry.alias,
|
|
205
206
|
install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,
|
|
@@ -240,9 +241,20 @@ export async function buildBundledPackageCatalog(scope, global, options = {}) {
|
|
|
240
241
|
.filter((value) => typeof value === "string" && value.trim().length > 0)
|
|
241
242
|
.map((value) => value.trim().toLowerCase()));
|
|
242
243
|
const packages = [];
|
|
243
|
-
|
|
244
|
+
const bundledEntriesByRoot = new Map();
|
|
245
|
+
for (const entry of await collectBundledPackageEntries()) {
|
|
246
|
+
const packageRoot = path.resolve(entry.package_root);
|
|
247
|
+
const groupedEntries = bundledEntriesByRoot.get(packageRoot) ?? [];
|
|
248
|
+
groupedEntries.push(entry);
|
|
249
|
+
bundledEntriesByRoot.set(packageRoot, groupedEntries);
|
|
250
|
+
}
|
|
251
|
+
for (const bundledEntries of bundledEntriesByRoot.values()) {
|
|
252
|
+
const bundledEntry = bundledEntries[0];
|
|
253
|
+
const aliases = bundledEntries
|
|
254
|
+
.map((entry) => entry.alias)
|
|
255
|
+
.sort((left, right) => left.localeCompare(right));
|
|
244
256
|
const manifest = await readPmPackageManifest(bundledEntry.package_root);
|
|
245
|
-
packages.push(buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations));
|
|
257
|
+
packages.push(buildBundledCatalogPackageEntry(manifest, bundledEntry, aliases, scope, installedBuiltinAliases, installedLocations));
|
|
246
258
|
}
|
|
247
259
|
const fields = parsePackageCatalogFields(options.fields);
|
|
248
260
|
const outputPackages = fields
|
|
@@ -258,6 +270,7 @@ export async function buildBundledPackageCatalog(scope, global, options = {}) {
|
|
|
258
270
|
}
|
|
259
271
|
const PACKAGE_CATALOG_FIELD_KEYS = new Set([
|
|
260
272
|
"alias",
|
|
273
|
+
"aliases",
|
|
261
274
|
"bundled",
|
|
262
275
|
"available",
|
|
263
276
|
"installed",
|
|
@@ -317,4 +330,4 @@ export const _testOnlyBundledCatalog = {
|
|
|
317
330
|
projectPackageCatalogEntry,
|
|
318
331
|
};
|
|
319
332
|
//# sourceMappingURL=bundled-catalog.js.map
|
|
320
|
-
//# debugId=
|
|
333
|
+
//# debugId=259656b0-09b7-52c5-8f54-52ac29eec607
|