@unbrained/pm-cli 2026.8.11 → 2026.8.13
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 +74 -21
- package/dist/cli/commander-usage.js +37 -11
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +82 -19
- package/dist/cli/main.js +35 -19
- package/dist/cli/register-annotations.js +56 -3
- package/dist/cli/register-assurance.js +28 -17
- package/dist/cli/register-list-query.js +10 -7
- package/dist/cli/register-operations.js +16 -6
- package/dist/cli-bundle/bundle-manifest.json +163 -163
- package/dist/cli-bundle/chunks/chunk-3ZMOWAFM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-DEDU3DG7.js +196 -0
- package/dist/cli-bundle/chunks/chunk-DL5M5J3V.js +13 -0
- package/dist/cli-bundle/chunks/chunk-F7FJYGK3.js +8 -0
- package/dist/cli-bundle/chunks/chunk-HIUZVCMN.js +5 -0
- package/dist/cli-bundle/chunks/chunk-IMGIN7R6.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-A2SJGHSI.js → chunk-Q47C67TQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WMEZHCFI.js → chunk-QGTUPEU5.js} +62 -54
- package/dist/cli-bundle/chunks/chunk-TF3TPKPR.js +34 -0
- package/dist/cli-bundle/chunks/{chunk-ZU34C3LH.js → chunk-YLBAPY22.js} +50 -50
- package/dist/cli-bundle/chunks/register-list-query-4HIZ7EA3.js +10 -0
- package/dist/cli-bundle/chunks/register-mutation-W64FZ5HN.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-C44ET7R5.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-NOCOOWQY.js → register-setup-634MFRXU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-27N23W6M.js +31 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4H5IA6AV.js → chunk-2JP7W7GO.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2RI2FESN.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-3BNVU6LC.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-2DL3MRTD.js → chunk-3DJSGWVB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-6MLIRBLV.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-6XYLENDV.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-CP4K4WFS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TL5M2PAY.js → chunk-E3AVJ655.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EBTNSFYE.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J5EKAIVD.js → chunk-HC2OL2H2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BKPIY34S.js → chunk-I75MANL7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-IIS2FRKL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-NFHFZH2Z.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OGC4XSBC.js +17 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UDAZWT25.js → chunk-OOYYKQWX.js} +4 -4
- package/dist/cli-bundle/focused-chunks/{chunk-23FTGO3W.js → chunk-PKPOZXLL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QDZUABWL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QQX5TDFT.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-55BIB6DV.js → chunk-TEZIXMTH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-WEH6NSL6.js +18 -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 +42 -41
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +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/checkpoint/checkpoint-gc.js +7 -12
- package/dist/core/extensions/activation-summary-markdown.js +5 -4
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +6 -2
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +4 -3
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +6 -2
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-types.d.ts +83 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/loader.d.ts +2 -8
- package/dist/core/extensions/loader.js +53 -144
- package/dist/core/extensions/registration-values.d.ts +43 -0
- package/dist/core/extensions/registration-values.js +210 -0
- package/dist/core/extensions/reserved-host-flags.js +3 -2
- package/dist/core/extensions/runtime-registrations.d.ts +3 -1
- package/dist/core/extensions/runtime-registrations.js +12 -2
- package/dist/core/fs/fs-utils.d.ts +2 -0
- package/dist/core/fs/fs-utils.js +7 -3
- package/dist/core/history/drift-cache.js +4 -3
- package/dist/core/history/drift-scan.js +16 -17
- package/dist/core/history/history.d.ts +8 -0
- package/dist/core/history/history.js +57 -7
- package/dist/core/history/replay.d.ts +9 -1
- package/dist/core/history/replay.js +48 -13
- package/dist/core/lock/lock-gc.js +8 -13
- package/dist/core/lock/lock.js +5 -4
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +46 -14
- package/dist/core/search/vector-stores.js +6 -11
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/errors.d.ts +5 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/item-metadata-cache.d.ts +1 -1
- package/dist/core/store/item-metadata-cache.js +16 -9
- package/dist/core/telemetry/runtime.d.ts +6 -0
- package/dist/core/telemetry/runtime.js +101 -30
- package/dist/sdk/agent/command-recovery.d.ts +2 -0
- package/dist/sdk/agent/command-recovery.js +10 -2
- package/dist/sdk/annotations.js +4 -4
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +6 -2
- package/dist/sdk/cli-contracts/completeness.js +10 -3
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +9 -3
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
- package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +40 -6
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +27 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +55 -5
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +22 -4
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/comments.js +4 -3
- package/dist/sdk/compile-cache.js +4 -3
- package/dist/sdk/completion.js +16 -7
- package/dist/sdk/compose.d.ts +3 -1
- package/dist/sdk/compose.js +16 -2
- package/dist/sdk/context-intent-contracts.js +45 -4
- package/dist/sdk/context-signal-store.js +4 -3
- package/dist/sdk/core.d.ts +1 -0
- package/dist/sdk/core.js +3 -2
- package/dist/sdk/extension/install-runtime.js +4 -4
- package/dist/sdk/extension/managed-state.js +4 -3
- package/dist/sdk/extension-contracts.d.ts +1 -1
- package/dist/sdk/flag-invocation-contracts.js +5 -6
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1597 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
- package/dist/sdk/generated-error-code-catalog.js +6 -3140
- package/dist/sdk/governance/assurance-action.d.ts +27 -3
- package/dist/sdk/governance/assurance-action.js +117 -31
- package/dist/sdk/governance/assurance-mutation-error.d.ts +14 -0
- package/dist/sdk/governance/assurance-mutation-error.js +58 -0
- package/dist/sdk/governance/assurance-presets.d.ts +54 -0
- package/dist/sdk/governance/assurance-presets.js +136 -0
- package/dist/sdk/governance/assurance-runtime.d.ts +4 -0
- package/dist/sdk/governance/assurance-runtime.js +118 -14
- package/dist/sdk/governance/assurance.d.ts +51 -6
- package/dist/sdk/governance/assurance.js +321 -67
- package/dist/sdk/governance/gc.js +5 -11
- package/dist/sdk/governance/health.d.ts +3 -1
- package/dist/sdk/governance/health.js +24 -7
- package/dist/sdk/governance/validate-item-reader.js +3 -3
- package/dist/sdk/governance/validate.d.ts +2 -0
- package/dist/sdk/governance/validate.js +15 -5
- package/dist/sdk/graph/durable-cache.d.ts +1 -1
- package/dist/sdk/graph/durable-cache.js +156 -29
- package/dist/sdk/graph/governance-contracts.d.ts +12 -0
- package/dist/sdk/graph/governance-contracts.js +27 -0
- package/dist/sdk/graph/governance.d.ts +44 -2
- package/dist/sdk/graph/governance.js +156 -12
- package/dist/sdk/guide.js +4 -4
- package/dist/sdk/index.d.ts +3 -2
- package/dist/sdk/index.js +5 -4
- package/dist/sdk/lifecycle/claim.js +10 -3
- package/dist/sdk/linked-artifacts.d.ts +2 -0
- package/dist/sdk/linked-artifacts.js +29 -4
- package/dist/sdk/merge/driver.d.ts +2 -2
- package/dist/sdk/merge/driver.js +3 -3
- package/dist/sdk/merge/install.js +5 -4
- package/dist/sdk/merge/receipts.d.ts +6 -4
- package/dist/sdk/merge/receipts.js +7 -5
- package/dist/sdk/merge/three-way.d.ts +2 -2
- package/dist/sdk/merge/three-way.js +3 -3
- package/dist/sdk/output-projection.d.ts +9 -1
- package/dist/sdk/output-projection.js +45 -9
- package/dist/sdk/query/activity.d.ts +49 -2
- package/dist/sdk/query/activity.js +185 -38
- package/dist/sdk/query/get.js +19 -2
- package/dist/sdk/read-output-contracts.d.ts +5 -1
- package/dist/sdk/read-output-contracts.js +17 -2
- package/dist/sdk/read-output-session.d.ts +2 -0
- package/dist/sdk/read-output-session.js +12 -5
- package/dist/sdk/relationship-history.js +5 -5
- package/dist/sdk/runtime-primitives.d.ts +3 -3
- package/dist/sdk/runtime-primitives.js +5 -5
- package/dist/sdk/runtime-stats-options.js +3 -2
- package/dist/sdk/runtime.js +5 -9
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/stats.d.ts +36 -3
- package/dist/sdk/stats.js +55 -15
- package/dist/sdk/test/execution.d.ts +4 -0
- package/dist/sdk/test/execution.js +88 -23
- package/dist/sdk/workspace-memory.js +4 -4
- package/dist/sdk/workspace-snapshot.js +8 -14
- package/dist/sdk/workspace-transaction-gc.js +4 -9
- package/dist/sdk/workspace-transaction.js +4 -4
- package/dist/sdk/workspace.js +4 -3
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -2
- package/docs/ASSURANCE.md +170 -14
- package/docs/COMMANDS.md +29 -8
- package/docs/CONFIGURATION.md +9 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
- package/docs/EXTENSIONS.md +11 -12
- package/docs/MERGE_SAFETY.md +3 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
- package/docs/RELATIONSHIP_GRAPH.md +15 -0
- package/docs/SDK.md +17 -3
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +12 -1
- package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
- package/docs/TESTING.md +24 -15
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
- package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
- package/marketplace.json +2 -2
- package/package.json +6 -6
- 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 +384 -83
- package/dist/cli-bundle/chunks/chunk-2OOU2AFH.js +0 -8
- package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +0 -33
- package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +0 -13
- package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +0 -194
- package/dist/cli-bundle/chunks/chunk-IUNRVDAI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +0 -5
- package/dist/cli-bundle/chunks/register-list-query-HAUXVUPY.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DPO7TEFX.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-E3KCL7AY.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-FPSYO5ZG.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-KDH5OX3D.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +0 -17
package/dist/sdk/completion.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
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]="fca471b1-155a-5fc4-9aa9-d45e5f1315dd")}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_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_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_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";
|
|
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"];
|
|
@@ -38,6 +38,7 @@ const DUPLICATES_FLAGS = toCompletionFlagString(DUPLICATES_FLAG_CONTRACTS);
|
|
|
38
38
|
const GRAPH_FLAGS = toCompletionFlagString(GRAPH_FLAG_CONTRACTS);
|
|
39
39
|
const GUIDE_FLAGS = toCompletionFlagString(GUIDE_FLAG_CONTRACTS);
|
|
40
40
|
const SEARCH_FLAGS = toCompletionFlagString(SEARCH_FLAG_CONTRACTS);
|
|
41
|
+
const STATS_FLAGS = toCompletionFlagString(STATS_FLAG_CONTRACTS);
|
|
41
42
|
const HEALTH_FLAGS = toCompletionFlagString(HEALTH_FLAG_CONTRACTS);
|
|
42
43
|
const INIT_FLAGS = toCompletionFlagString(INIT_FLAG_CONTRACTS);
|
|
43
44
|
const CONTRACTS_FLAGS = toCompletionFlagString(CONTRACTS_FLAG_CONTRACTS);
|
|
@@ -623,7 +624,7 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
623
624
|
` COMPREPLY=(${compgen(`ancestors descendants predecessors successors paths impact analyze audit communities redundancy dominators slack centrality articulation plan index ${GRAPH_FLAGS}`)})`,
|
|
624
625
|
" ;;",
|
|
625
626
|
" test)",
|
|
626
|
-
` COMPREPLY=(${compgen("--add --add-json --remove --list --run --match --only-index --only-last --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
627
|
+
` COMPREPLY=(${compgen("--add --add-json --remove --remove-index --list --run --match --only-index --only-last --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
627
628
|
" ;;",
|
|
628
629
|
" test-all)",
|
|
629
630
|
` COMPREPLY=(${compgen("--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
@@ -677,7 +678,7 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
677
678
|
` COMPREPLY=(${compgen("--dry-run --scope --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
678
679
|
" ;;",
|
|
679
680
|
" stats)",
|
|
680
|
-
` COMPREPLY=(${compgen(
|
|
681
|
+
` COMPREPLY=(${compgen(STATS_FLAGS)})`,
|
|
681
682
|
" ;;",
|
|
682
683
|
" close|close-task)",
|
|
683
684
|
` COMPREPLY=(${compgen(CLOSE_MUTATION_FLAGS)})`,
|
|
@@ -788,6 +789,7 @@ _pm() {
|
|
|
788
789
|
'--output-budget[Set the universal estimated-token ceiling]:tokens' \\
|
|
789
790
|
'--output-format[Select the universal read encoding]:(toon json)' \\
|
|
790
791
|
'--output-session[Carry cross-call read budget and served-item state]:state' \\
|
|
792
|
+
'--output-row-contract[Include row schema metadata in read output]' \\
|
|
791
793
|
'--no-changed-fields[Omit changed_fields array from mutation output]' \\
|
|
792
794
|
'--pm-path[Explicit tracker storage path for this command]:path:_files -/' \\
|
|
793
795
|
'--path[Compatibility alias for --pm-path]:path:_files -/' \\
|
|
@@ -1304,13 +1306,14 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1304
1306
|
'--to[Upper timestamp bound (ISO/date string or relative)]:date' \\
|
|
1305
1307
|
'--limit[Max entries]:number' \\
|
|
1306
1308
|
'--compact[Condensed activity projection]' \\
|
|
1309
|
+
'--raw[Emit raw compact per-event activity output]' \\
|
|
1307
1310
|
'--full[Show full activity entries]' \\
|
|
1308
1311
|
'--provenance[Patch-free identity and agent provenance projection]' \\
|
|
1309
1312
|
'--provenance-summary[Include bounded provenance completeness counts]' \\
|
|
1310
1313
|
'*--harness[Filter by recorded or vocabulary-resolved harness]:harness' \\
|
|
1311
1314
|
'*--agent-instance[Filter by privacy-safe agent instance]:instance' \\
|
|
1312
1315
|
'*--provenance-filter[Filter by exact declared provenance value]:dimension=value' \\
|
|
1313
|
-
'--stream[Emit line-delimited JSON rows]:mode' \\
|
|
1316
|
+
'--stream[Emit line-delimited JSON rows (requires --json)]:mode' \\
|
|
1314
1317
|
'--json[Output JSON]' \\
|
|
1315
1318
|
'--quiet[Suppress stdout]'
|
|
1316
1319
|
;;
|
|
@@ -1336,6 +1339,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1336
1339
|
;;
|
|
1337
1340
|
stats)
|
|
1338
1341
|
_arguments \\
|
|
1342
|
+
'--include-empty[Include registered zero-count type and status buckets]' \\
|
|
1339
1343
|
'--storage[Include aggregate history-stream storage metrics]' \\
|
|
1340
1344
|
'--metadata-coverage[Include metadata coverage percentages overall and by type]' \\
|
|
1341
1345
|
'--field-utilization[Include content-field utilization rates across all items]' \\
|
|
@@ -1460,6 +1464,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1460
1464
|
'--add[Add linked test entry]:entry' \\
|
|
1461
1465
|
'--add-json[Add linked test entry from JSON object/array]:json' \\
|
|
1462
1466
|
'--remove[Remove linked test entry by command/path]:entry' \\
|
|
1467
|
+
'--remove-index[Remove linked test entry by 1-based index]:index' \\
|
|
1463
1468
|
'--list[List linked tests without mutating]' \\
|
|
1464
1469
|
'--run[Run linked tests]' \\
|
|
1465
1470
|
'--match[Run linked tests whose command/path contains substring]:substring' \\
|
|
@@ -1819,6 +1824,7 @@ complete -c pm -l output-limit -d 'Set the universal read row ceiling' -r
|
|
|
1819
1824
|
complete -c pm -l output-budget -d 'Set the universal estimated-token ceiling' -r
|
|
1820
1825
|
complete -c pm -l output-format -d 'Select the universal read encoding' -r -a 'toon json'
|
|
1821
1826
|
complete -c pm -l output-session -d 'Carry cross-call read budget and served-item state' -r
|
|
1827
|
+
complete -c pm -l output-row-contract -d 'Include row schema metadata in read output'
|
|
1822
1828
|
complete -c pm -l no-changed-fields -d 'Omit changed_fields array from mutation output'
|
|
1823
1829
|
complete -c pm -l id-only -d 'Print only id and status for single-item mutation output'
|
|
1824
1830
|
complete -c pm -l pm-path -d 'Explicit tracker storage path for this command' -r
|
|
@@ -2369,13 +2375,14 @@ complete -c pm -n '__fish_seen_subcommand_from activity' -l from -d 'Lower times
|
|
|
2369
2375
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l to -d 'Upper timestamp bound (ISO/date string or relative)' -r
|
|
2370
2376
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l limit -d 'Max activity entries' -r
|
|
2371
2377
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l compact -d 'Condensed activity projection'
|
|
2378
|
+
complete -c pm -n '__fish_seen_subcommand_from activity' -l raw -d 'Emit raw compact per-event activity output'
|
|
2372
2379
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l full -d 'Show full activity entries'
|
|
2373
2380
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance -d 'Patch-free identity and agent provenance projection'
|
|
2374
2381
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance-summary -d 'Include bounded provenance completeness counts'
|
|
2375
2382
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l harness -d 'Filter by recorded or vocabulary-resolved harness' -r
|
|
2376
2383
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l agent-instance -d 'Filter by privacy-safe agent instance' -r
|
|
2377
2384
|
complete -c pm -n '__fish_seen_subcommand_from activity' -l provenance-filter -d 'Filter by exact declared provenance value' -r
|
|
2378
|
-
complete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows'
|
|
2385
|
+
complete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows (requires --json)'
|
|
2379
2386
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l action -d 'Filter schema by tool action' -r
|
|
2380
2387
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l command -d 'Scope output to one command (narrow-by-default)' -r
|
|
2381
2388
|
complete -c pm -n '__fish_seen_subcommand_from contracts' -l summary -d 'Return compact command intent summary'
|
|
@@ -2433,6 +2440,7 @@ complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l forc
|
|
|
2433
2440
|
complete -c pm -n '__fish_seen_subcommand_from test' -l add -d 'Add linked test entry' -r
|
|
2434
2441
|
complete -c pm -n '__fish_seen_subcommand_from test' -l add-json -d 'Add linked test entry from JSON object/array' -r
|
|
2435
2442
|
complete -c pm -n '__fish_seen_subcommand_from test' -l remove -d 'Remove linked test entry' -r
|
|
2443
|
+
complete -c pm -n '__fish_seen_subcommand_from test' -l remove-index -d 'Remove linked test entry by 1-based index' -r
|
|
2436
2444
|
complete -c pm -n '__fish_seen_subcommand_from test' -l list -d 'List linked tests without mutating'
|
|
2437
2445
|
complete -c pm -n '__fish_seen_subcommand_from test' -l run -d 'Run linked tests'
|
|
2438
2446
|
complete -c pm -n '__fish_seen_subcommand_from test' -l match -d 'Run linked tests whose command/path contains substring' -r
|
|
@@ -2489,6 +2497,7 @@ complete -c pm -n '__fish_seen_subcommand_from gc' -l dry-run -d 'Preview cleanu
|
|
|
2489
2497
|
complete -c pm -n '__fish_seen_subcommand_from gc' -l scope -d 'Limit cleanup to index/embeddings/runtime/locks scopes' -r
|
|
2490
2498
|
|
|
2491
2499
|
# stats flags
|
|
2500
|
+
complete -c pm -n '__fish_seen_subcommand_from stats' -l include-empty -d 'Include registered zero-count type and status buckets'
|
|
2492
2501
|
complete -c pm -n '__fish_seen_subcommand_from stats' -l storage -d 'Include aggregate history-stream storage metrics'
|
|
2493
2502
|
complete -c pm -n '__fish_seen_subcommand_from stats' -l metadata-coverage -d 'Include metadata coverage percentages overall and by type'
|
|
2494
2503
|
complete -c pm -n '__fish_seen_subcommand_from stats' -l field-utilization -d 'Include content-field utilization rates across all items'
|
|
@@ -2753,4 +2762,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
|
|
|
2753
2762
|
};
|
|
2754
2763
|
}
|
|
2755
2764
|
//# sourceMappingURL=completion.js.map
|
|
2756
|
-
//# debugId=
|
|
2765
|
+
//# debugId=fca471b1-155a-5fc4-9aa9-d45e5f1315dd
|
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 } from "../core/extensions/loader.js";
|
|
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";
|
|
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";
|
|
@@ -152,6 +152,8 @@ export interface ExtensionBlueprint {
|
|
|
152
152
|
searchProviders?: SearchProviderDefinition[];
|
|
153
153
|
/** Vector store adapters registered via `api.registerVectorStoreAdapter(adapter)`. */
|
|
154
154
|
vectorStoreAdapters?: VectorStoreAdapterDefinition[];
|
|
155
|
+
/** Assurance measurement providers registered via `api.registerAssuranceMeasurementProvider(provider)`. */
|
|
156
|
+
assuranceProviders?: AssuranceMeasurementProviderDefinition[];
|
|
155
157
|
/** Importers registered via `api.registerImporter(name, importer, options?)`. */
|
|
156
158
|
importers?: ExtensionBlueprintImporter[];
|
|
157
159
|
/** Exporters registered via `api.registerExporter(name, exporter, options?)`. */
|
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]="fb438c6a-1927-54c3-98dd-dd7423df6722")}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";
|
|
@@ -100,6 +100,9 @@ function registerBlueprintRetrievalSurfaces(api, blueprint) {
|
|
|
100
100
|
for (const adapter of blueprint.vectorStoreAdapters ?? []) {
|
|
101
101
|
api.registerVectorStoreAdapter(adapter);
|
|
102
102
|
}
|
|
103
|
+
for (const provider of blueprint.assuranceProviders ?? []) {
|
|
104
|
+
api.registerAssuranceMeasurementProvider(provider);
|
|
105
|
+
}
|
|
103
106
|
for (const entry of blueprint.importers ?? []) {
|
|
104
107
|
api.registerImporter(entry.name, entry.importer, entry.options);
|
|
105
108
|
}
|
|
@@ -281,6 +284,7 @@ export function mergeExtensionBlueprints(...blueprints) {
|
|
|
281
284
|
assign("profiles", mergeArraySurface(blueprints.map((blueprint) => blueprint.profiles)));
|
|
282
285
|
assign("searchProviders", mergeArraySurface(blueprints.map((blueprint) => blueprint.searchProviders)));
|
|
283
286
|
assign("vectorStoreAdapters", mergeArraySurface(blueprints.map((blueprint) => blueprint.vectorStoreAdapters)));
|
|
287
|
+
assign("assuranceProviders", mergeArraySurface(blueprints.map((blueprint) => blueprint.assuranceProviders)));
|
|
284
288
|
assign("importers", mergeArraySurface(blueprints.map((blueprint) => blueprint.importers)));
|
|
285
289
|
assign("exporters", mergeArraySurface(blueprints.map((blueprint) => blueprint.exporters)));
|
|
286
290
|
assign("hooks", mergeHookSurfaces(blueprints.map((blueprint) => blueprint.hooks)));
|
|
@@ -357,6 +361,7 @@ const BLUEPRINT_FIELD_CAPABILITIES = [
|
|
|
357
361
|
["preflights", "preflight"],
|
|
358
362
|
["searchProviders", "search"],
|
|
359
363
|
["vectorStoreAdapters", "search"],
|
|
364
|
+
["assuranceProviders", "services"],
|
|
360
365
|
["importers", "importers"],
|
|
361
366
|
["exporters", "importers"],
|
|
362
367
|
];
|
|
@@ -509,6 +514,13 @@ function collectBlueprintRendererOwnership(renderers) {
|
|
|
509
514
|
.sort((left, right) => left.format.localeCompare(right.format));
|
|
510
515
|
return ownership.length > 0 ? { renderer_ownership: ownership } : {};
|
|
511
516
|
}
|
|
517
|
+
function collectBlueprintAssuranceProviders(providers) {
|
|
518
|
+
if (!providers || providers.length === 0)
|
|
519
|
+
return {};
|
|
520
|
+
return {
|
|
521
|
+
assurance_providers: sortUnique(providers.map((provider) => provider.id)),
|
|
522
|
+
};
|
|
523
|
+
}
|
|
512
524
|
function collectBlueprintSurfaceSummary(blueprint, importers, exporters) {
|
|
513
525
|
return {
|
|
514
526
|
item_types: sortUnique((blueprint.itemTypes ?? []).map((type) => type.name)),
|
|
@@ -526,6 +538,7 @@ function collectBlueprintSurfaceSummary(blueprint, importers, exporters) {
|
|
|
526
538
|
exporters: sortUnique(exporters.map((entry) => normalizeCommandName(entry.name))),
|
|
527
539
|
search_providers: sortUnique((blueprint.searchProviders ?? []).map((provider) => provider.name)),
|
|
528
540
|
vector_store_adapters: sortUnique((blueprint.vectorStoreAdapters ?? []).map((adapter) => adapter.name)),
|
|
541
|
+
...collectBlueprintAssuranceProviders(blueprint.assuranceProviders),
|
|
529
542
|
parser_overrides: sortUnique(Object.keys(blueprint.parsers ?? {}).map((command) => normalizeCommandName(command))),
|
|
530
543
|
service_overrides: sortUnique(Object.keys(blueprint.services ?? {}).map((service) => String(service).trim().toLowerCase())),
|
|
531
544
|
renderer_overrides: sortUnique(Object.keys(blueprint.renderers ?? {}).map((format) => String(format).trim().toLowerCase())),
|
|
@@ -612,6 +625,7 @@ const BLUEPRINT_LINTABLE_SURFACE_FIELDS = [
|
|
|
612
625
|
"profiles",
|
|
613
626
|
"searchProviders",
|
|
614
627
|
"vectorStoreAdapters",
|
|
628
|
+
"assuranceProviders",
|
|
615
629
|
"importers",
|
|
616
630
|
"exporters",
|
|
617
631
|
];
|
|
@@ -1057,4 +1071,4 @@ export function preflightExtension(blueprint, options = {}) {
|
|
|
1057
1071
|
};
|
|
1058
1072
|
}
|
|
1059
1073
|
//# sourceMappingURL=compose.js.map
|
|
1060
|
-
//# debugId=
|
|
1074
|
+
//# debugId=fb438c6a-1927-54c3-98dd-dd7423df6722
|
|
@@ -5,11 +5,11 @@
|
|
|
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]="fa03d543-ff0d-5556-8558-9bed82838a58")}catch(e){}}();
|
|
9
9
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
10
|
import { attachOutputOmissionReceipt } from "./output-projection.js";
|
|
11
11
|
import { encodeQueryCursor } from "./pagination.js";
|
|
12
|
-
import { applyReadOutputDimensions } from "./read-output-contracts.js";
|
|
12
|
+
import { applyReadOutputDimensions, stabilizeReadOutputReceiptEstimates, } from "./read-output-contracts.js";
|
|
13
13
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
14
14
|
import { PmCliError } from "../core/shared/errors.js";
|
|
15
15
|
/** Built-in intent projections shared by CLI, SDK, MCP, and package authors. */
|
|
@@ -590,14 +590,55 @@ function collapseContinuationMetadata(options, result) {
|
|
|
590
590
|
};
|
|
591
591
|
return projected;
|
|
592
592
|
}
|
|
593
|
+
/** Return whether one projected value is a mutable output record. */
|
|
594
|
+
function isOutputRecord(value) {
|
|
595
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
596
|
+
}
|
|
597
|
+
/** Read one numeric fixed-point estimate from an optional receipt. */
|
|
598
|
+
function receiptEstimate(value, field) {
|
|
599
|
+
if (!isOutputRecord(value))
|
|
600
|
+
return undefined;
|
|
601
|
+
return typeof value[field] === "number" ? value[field] : undefined;
|
|
602
|
+
}
|
|
603
|
+
/** Stabilize every token receipt after suppressing discovery-only metadata. */
|
|
604
|
+
function stabilizeSuppressedRowContractReceipts(result, options) {
|
|
605
|
+
let finalized = result;
|
|
606
|
+
for (let iteration = 0; iteration < 8; iteration += 1) {
|
|
607
|
+
const previousContextEstimate = receiptEstimate(finalized.context_intent, "estimated_tokens");
|
|
608
|
+
const previousReadEstimate = receiptEstimate(finalized.read_output, "estimated_tokens");
|
|
609
|
+
const previousSessionEstimate = receiptEstimate(finalized.read_session, "spent_this_call_tokens");
|
|
610
|
+
if (isOutputRecord(finalized.context_intent)) {
|
|
611
|
+
updateContextIntentEstimate(finalized, finalized.context_intent);
|
|
612
|
+
}
|
|
613
|
+
finalized = stabilizeReadOutputReceiptEstimates(finalized, options);
|
|
614
|
+
if (receiptEstimate(finalized.context_intent, "estimated_tokens") ===
|
|
615
|
+
previousContextEstimate &&
|
|
616
|
+
receiptEstimate(finalized.read_output, "estimated_tokens") ===
|
|
617
|
+
previousReadEstimate &&
|
|
618
|
+
receiptEstimate(finalized.read_session, "spent_this_call_tokens") ===
|
|
619
|
+
previousSessionEstimate) {
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return finalized;
|
|
624
|
+
}
|
|
593
625
|
/** Attach universal row, omission, and optional intent-budget contracts in rendering order. */
|
|
594
626
|
export function attachReadOutputContracts(command, options, result) {
|
|
595
627
|
const disclosedResult = attachOutputOmissionReceipt(command, result);
|
|
596
|
-
|
|
628
|
+
const projected = typeof disclosedResult === "object" &&
|
|
597
629
|
disclosedResult !== null &&
|
|
598
630
|
!Array.isArray(disclosedResult)
|
|
599
631
|
? applyReadOutputDimensions(command ?? "", options, collapseContinuationMetadata(options, attachContextIntentReceipt(command ?? "", options, disclosedResult)))
|
|
600
632
|
: disclosedResult;
|
|
633
|
+
if (options.outputRowContract === true ||
|
|
634
|
+
options.output_row_contract === true ||
|
|
635
|
+
typeof projected !== "object" ||
|
|
636
|
+
projected === null ||
|
|
637
|
+
Array.isArray(projected) ||
|
|
638
|
+
!Object.hasOwn(projected, "row_contract")) {
|
|
639
|
+
return projected;
|
|
640
|
+
}
|
|
641
|
+
return stabilizeSuppressedRowContractReceipts(Object.fromEntries(Object.entries(projected).filter(([key]) => key !== "row_contract")), options);
|
|
601
642
|
}
|
|
602
643
|
//# sourceMappingURL=context-intent-contracts.js.map
|
|
603
|
-
//# debugId=
|
|
644
|
+
//# debugId=fa03d543-ff0d-5556-8558-9bed82838a58
|
|
@@ -6,7 +6,8 @@
|
|
|
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]="3d0a558b-6a01-5bca-a2f7-21766be6d67c")}catch(e){}}();
|
|
10
|
+
import { isFileAbsentError } from "../core/fs/fs-utils.js";
|
|
10
11
|
import fs from "node:fs/promises";
|
|
11
12
|
import path from "node:path";
|
|
12
13
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -187,7 +188,7 @@ export class JsonFileContextSignalStoreAdapter {
|
|
|
187
188
|
return JSON.parse(await fs.readFile(this.filePath, "utf8"));
|
|
188
189
|
}
|
|
189
190
|
catch (error) {
|
|
190
|
-
if (isRecord(error) && error
|
|
191
|
+
if (isRecord(error) && isFileAbsentError(error)) {
|
|
191
192
|
return null;
|
|
192
193
|
}
|
|
193
194
|
throw error;
|
|
@@ -310,4 +311,4 @@ export async function readWorkspaceContextSignals(items, options) {
|
|
|
310
311
|
return store.readOrRebuild(items, { ...options, sourceCursor, source });
|
|
311
312
|
}
|
|
312
313
|
//# sourceMappingURL=context-signal-store.js.map
|
|
313
|
-
//# debugId=
|
|
314
|
+
//# debugId=3d0a558b-6a01-5bca-a2f7-21766be6d67c
|
package/dist/sdk/core.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
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";
|
|
7
7
|
export * from "./core-governance.js";
|
|
8
8
|
export * from "./agent-session-context.js";
|
|
9
|
+
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
|
9
10
|
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
10
11
|
export { applyReadOutputSessionReferences, attachReadOutputSessionReceipt, parseReadOutputSession, readOutputSessionRemainingTokens, } from "./read-output-session.js";
|
|
11
12
|
export type { PmReadOutputBudgetExceeded, PmReadOutputDimension, PmReadOutputLegacyAlias, PmReadOutputOptions, PmReadOutputReceipt, PmReadOutputResult, PmReadOutputResultFor, PmReadOutputSurface, PmReadOutputSurfaceContract, } from "./read-output-contracts.js";
|
package/dist/sdk/core.js
CHANGED
|
@@ -4,11 +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]="
|
|
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]="2e0a2422-64c7-5ad3-867c-04479171fa27")}catch(e){}}();
|
|
8
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";
|
|
9
9
|
export * from "./core-governance.js";
|
|
10
10
|
export * from "./agent-session-context.js";
|
|
11
|
+
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
|
11
12
|
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
12
13
|
export { applyReadOutputSessionReferences, attachReadOutputSessionReceipt, parseReadOutputSession, readOutputSessionRemainingTokens, } from "./read-output-session.js";
|
|
13
14
|
//# sourceMappingURL=core.js.map
|
|
14
|
-
//# debugId=
|
|
15
|
+
//# debugId=2e0a2422-64c7-5ad3-867c-04479171fa27
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Provides cross-platform extension copy safety and owner-bound install locks.
|
|
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]="263602a2-c000-5df7-80d2-6f095985496f")}catch(e){}}();
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import path from "node:path";
|
|
12
|
-
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
12
|
+
import { isFileAbsentError, pathExists } from "../../core/fs/fs-utils.js";
|
|
13
13
|
import { isPathWithinDirectory } from "../../core/fs/path-utils.js";
|
|
14
14
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
15
15
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
@@ -173,7 +173,7 @@ const readExtensionInstallLockOwnerToken = async (lockPath) => {
|
|
|
173
173
|
ownerContents = await fs.readFile(path.join(lockPath, "owner.json"), "utf8");
|
|
174
174
|
}
|
|
175
175
|
catch (error) {
|
|
176
|
-
if (!
|
|
176
|
+
if (!isFileAbsentError(error))
|
|
177
177
|
throw error;
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
@@ -308,4 +308,4 @@ export const withExtensionInstallLock = async (settingsRoot, destinationDirector
|
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
//# sourceMappingURL=install-runtime.js.map
|
|
311
|
-
//# debugId=
|
|
311
|
+
//# debugId=263602a2-c000-5df7-80d2-6f095985496f
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Implements extension package-management support for Managed State.
|
|
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]="159d7bbd-1d2a-503d-b3ce-f32dcc6f6547")}catch(e){}}();
|
|
8
|
+
import { isFileMissingError } from "../../core/fs/fs-utils.js";
|
|
8
9
|
import fs from "node:fs/promises";
|
|
9
10
|
import path from "node:path";
|
|
10
11
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
@@ -204,7 +205,7 @@ export async function readManagedExtensionState(extensionsRoot) {
|
|
|
204
205
|
if (typeof error === "object" &&
|
|
205
206
|
error !== null &&
|
|
206
207
|
"code" in error &&
|
|
207
|
-
error
|
|
208
|
+
isFileMissingError(error)) {
|
|
208
209
|
return {
|
|
209
210
|
path: statePath,
|
|
210
211
|
state: fallback,
|
|
@@ -249,4 +250,4 @@ export async function persistManagedContributionInventory(extensionsRoot, state,
|
|
|
249
250
|
return updated;
|
|
250
251
|
}
|
|
251
252
|
//# sourceMappingURL=managed-state.js.map
|
|
252
|
-
//# debugId=
|
|
253
|
+
//# debugId=159d7bbd-1d2a-503d-b3ce-f32dcc6f6547
|
|
@@ -19,7 +19,7 @@ export type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];
|
|
|
19
19
|
/** Canonical extension governance policy modes. */
|
|
20
20
|
export declare const EXTENSION_POLICY_MODES: readonly ["off", "warn", "enforce"];
|
|
21
21
|
/** Canonical extension registration surfaces governed by policy. */
|
|
22
|
-
export declare const EXTENSION_POLICY_SURFACES: readonly ["commands.override", "commands.handler", "hooks.beforecommand", "hooks.beforemutation", "hooks.aftercommand", "hooks.onwrite", "hooks.onread", "hooks.onindex", "schema.flags", "schema.itemfields", "schema.itemtypes", "schema.relationshipkinds", "schema.migrations", "schema.profiles", "parser.override", "preflight.override", "services.override", "renderers.override", "importers.importer", "importers.exporter", "search.provider", "search.vectorstore"];
|
|
22
|
+
export declare const EXTENSION_POLICY_SURFACES: readonly ["commands.override", "commands.handler", "hooks.beforecommand", "hooks.beforemutation", "hooks.aftercommand", "hooks.onwrite", "hooks.onread", "hooks.onindex", "schema.flags", "schema.itemfields", "schema.itemtypes", "schema.relationshipkinds", "schema.migrations", "schema.profiles", "parser.override", "preflight.override", "services.override", "renderers.override", "importers.importer", "importers.exporter", "search.provider", "search.vectorstore", "services.assuranceprovider"];
|
|
23
23
|
/** Canonical extension trust modes shared by authoring and runtime consumers. */
|
|
24
24
|
export declare const EXTENSION_TRUST_MODES: readonly ["off", "warn", "enforce"];
|
|
25
25
|
/** Canonical extension sandbox profiles shared by authoring and runtime consumers. */
|
|
@@ -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]="0e2d29be-ff70-5e69-9bba-bef5ecd05fa1")}catch(e){}}();
|
|
3
3
|
const FLAG_DESCRIPTIONS = Object.freeze({
|
|
4
4
|
"--body": "Set the item body.",
|
|
5
5
|
"--body-file": "Read the item body from a file.",
|
|
@@ -71,7 +71,8 @@ function flagTakesValue(contract) {
|
|
|
71
71
|
contract.value_type === "number" ||
|
|
72
72
|
contract.list === true ||
|
|
73
73
|
contract.repeatable === true;
|
|
74
|
-
const inferredBoolean = contract.
|
|
74
|
+
const inferredBoolean = contract.value_type === "boolean" ||
|
|
75
|
+
contract.flag === "--stdin" ||
|
|
75
76
|
contract.flag === "--stdin-json" ||
|
|
76
77
|
BOOLEAN_FLAG_PREFIXES.some((prefix) => contract.flag.startsWith(prefix));
|
|
77
78
|
return explicitlyValued || !inferredBoolean;
|
|
@@ -88,9 +89,7 @@ export function enrichCliFlagInvocationContract(command, contract) {
|
|
|
88
89
|
description,
|
|
89
90
|
takes_value: takesValue,
|
|
90
91
|
value_required: takesValue,
|
|
91
|
-
...(takesValue
|
|
92
|
-
? { value_name: contract.value_name ?? "value" }
|
|
93
|
-
: {}),
|
|
92
|
+
...(takesValue ? { value_name: contract.value_name ?? "value" } : {}),
|
|
94
93
|
value_type: takesValue ? (contract.value_type ?? "string") : "boolean",
|
|
95
94
|
required: contract.required === true,
|
|
96
95
|
repeatable: contract.repeatable === true || contract.list === true,
|
|
@@ -107,4 +106,4 @@ export function enrichCliFlagInvocationContracts(command, contracts) {
|
|
|
107
106
|
return contracts.map((contract) => enrichCliFlagInvocationContract(command, contract));
|
|
108
107
|
}
|
|
109
108
|
//# sourceMappingURL=flag-invocation-contracts.js.map
|
|
110
|
-
//# debugId=
|
|
109
|
+
//# debugId=0e2d29be-ff70-5e69-9bba-bef5ecd05fa1
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/generated-error-code-catalog-part-1
|
|
3
|
+
*
|
|
4
|
+
* Generated by scripts/generate-error-code-catalog.mjs. Do not edit manually.
|
|
5
|
+
*/
|
|
6
|
+
import type { PmErrorCodeContract } from "../error-code-catalog.js";
|
|
7
|
+
/** Generated partition 1 of the exhaustive error-code catalog. */
|
|
8
|
+
export declare const PM_ERROR_CODE_CATALOG_PART_1: PmErrorCodeContract[];
|