@b-apm/core 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.mts +594 -21
  2. package/dist/index.mjs +3659 -718
  3. package/package.json +42 -40
package/dist/index.d.mts CHANGED
@@ -48,7 +48,10 @@ type ObjectDependency = {
48
48
  version?: string;
49
49
  ref?: string;
50
50
  alias?: string;
51
- skills?: unknown;
51
+ /** Consumer skill subset (validated string list; omit = all skills). */
52
+ skills?: string[];
53
+ /** Consumer per-dep target subset (mf-005 tokens; omit = all eligible targets). */
54
+ targets?: string[];
52
55
  [key: string]: unknown;
53
56
  };
54
57
  type DependencyEntry = string | ObjectDependency | BapmDependency;
@@ -96,10 +99,15 @@ type BapmManifest = {
96
99
  */
97
100
  targets?: string[] | TargetIntegrationMap;
98
101
  /**
99
- * Bapm extension: non-empty list of mf-005 host ids to activate for
100
- * materialize/MCP (multi) or compile (sole). Distinct from `target`/`targets`.
102
+ * Bapm extension: structured preset/target selection (normalized ActiveEntry[]).
103
+ * Distinct from `target`/`targets` preference maps.
101
104
  */
102
- active?: string[];
105
+ active?: ActiveEntry[];
106
+ /**
107
+ * Named dependency bundles selectable via `active` preset entries.
108
+ * Base manifest only — rejected on `bapm.local.yml` overlay.
109
+ */
110
+ presets?: ManifestPreset[];
103
111
  /**
104
112
  * Optional bake / placeholder defaults (string map). Deep-merged from
105
113
  * `bapm.local.yml` when present (local keys win).
@@ -107,6 +115,25 @@ type BapmManifest = {
107
115
  env?: Record<string, string>;
108
116
  [key: string]: unknown;
109
117
  };
118
+ /** Normalized structured `active` entry (preset or host target). */
119
+ type ActiveEntry = {
120
+ kind: "preset" | "target";
121
+ id: string;
122
+ negate: boolean;
123
+ };
124
+ /** Named preset: optional deps + optional nested structured `active`. */
125
+ type ManifestPreset = {
126
+ name: string;
127
+ dependencies?: DependencyLists;
128
+ devDependencies?: DependencyLists;
129
+ active?: ActiveEntry[];
130
+ [key: string]: unknown;
131
+ };
132
+ /** Result of expanding document `active` (+ nested preset `active`). */
133
+ type ResolvedActive = {
134
+ presetIds: string[];
135
+ targetIds: string[];
136
+ };
110
137
  type DiscoverManifestOptions = {
111
138
  /** Project root; defaults to `process.cwd()`. No parent walk-up. */
112
139
  cwd?: string;
@@ -162,7 +189,7 @@ declare const BAPM_LOCAL_MANIFEST_FILE = "bapm.local.yml";
162
189
  /** Unsupported dual-brand local overlay filename (v1 refuse). */
163
190
  declare const APM_LOCAL_MANIFEST_FILE = "apm.local.yml";
164
191
  type LocalOverlayFields = {
165
- active?: string[];
192
+ active?: ActiveEntry[];
166
193
  target?: string | TargetIntegrationMap;
167
194
  targets?: string[] | TargetIntegrationMap;
168
195
  env?: Record<string, string>;
@@ -195,6 +222,73 @@ declare function parseManifestDocument(input: unknown): ParseManifestResult;
195
222
  /** Back-compat entry for already-loaded JS objects. */
196
223
  declare function parseManifest(input: unknown): BapmManifest;
197
224
  //#endregion
225
+ //#region src/modules/Manifest/depSubset.d.ts
226
+ /** Reject empty, traversal (`..`), and absolute/drive skill names. */
227
+ declare function parseDepSkillSubset(value: unknown, path: string): string[];
228
+ /** Reject empty lists and unknown mf-005 tokens. */
229
+ declare function parseDepTargetSubset(value: unknown, path: string): string[];
230
+ /**
231
+ * Apply subset validation onto an object-form entry when `skills` / `targets` are set.
232
+ * Returns a shallow copy with typed string lists (or omits keys when absent).
233
+ */
234
+ declare function applyDepSubsetFields(obj: Record<string, unknown>, path: string): Record<string, unknown>;
235
+ //#endregion
236
+ //#region src/modules/Manifest/mergeApmDependency.d.ts
237
+ /**
238
+ * Merge an incoming APM dependency update into a manifest document.
239
+ * Mutates neither the original document nor existing entries in place —
240
+ * returns a new document. Throws when a registry `id:` identity would be
241
+ * replaced by a git-shaped entry.
242
+ */
243
+ declare function mergeApmDependencyUpdate(document: Record<string, unknown> | BapmManifest, incoming: unknown): BapmManifest;
244
+ /** True when entry is registry object-form (`id:` or bare `registry:`). */
245
+ declare function isRegistrySourced(entry: DependencyEntry): boolean;
246
+ /** True when entry is git-shaped (object `git:` or canonical git string). */
247
+ declare function isGitShaped(entry: DependencyEntry): boolean;
248
+ /** Stable package identity for matching `id: owner/repo` ↔ string `owner/repo`. */
249
+ declare function entryIdentity(entry: DependencyEntry): string | undefined;
250
+ declare function registryOrPackageIdentity(entry: DependencyEntry): string | undefined;
251
+ //#endregion
252
+ //#region src/modules/Manifest/active.d.ts
253
+ /**
254
+ * Parse structured `active` (list-of-maps or object form). Rejects legacy bare
255
+ * host-token lists, empty `[]`/`{}`, and scalars.
256
+ */
257
+ declare function parseActiveField(value: unknown, pathPrefix?: string): ActiveEntry[];
258
+ //#endregion
259
+ //#region src/modules/Manifest/presets.d.ts
260
+ type ValidateDependencyBlock = (value: unknown, field: string) => DependencyLists;
261
+ /**
262
+ * Parse top-level `presets`: non-empty sequence of uniquely named mappings.
263
+ */
264
+ declare function parsePresetsField(value: unknown, validateDependencyBlock: ValidateDependencyBlock, pathPrefix?: string): ManifestPreset[];
265
+ //#endregion
266
+ //#region src/modules/Manifest/resolveActive.d.ts
267
+ /**
268
+ * Pure expansion: walk top-level (and nested preset) `active` with cycle detection.
269
+ * Excludes win over includes. Omitted `active` → empty sets.
270
+ */
271
+ declare function resolveActive(doc: BapmManifest | Record<string, unknown>): ResolvedActive;
272
+ /** Aliases for acceptance helper pickExport. */
273
+ declare const expandActive: typeof resolveActive;
274
+ declare const resolveManifestActive: typeof resolveActive;
275
+ declare const resolveActiveSelection: typeof resolveActive;
276
+ //#endregion
277
+ //#region src/modules/Manifest/effectiveDirectDeps.d.ts
278
+ type EffectiveDirectDeps = {
279
+ dependencies?: DependencyLists;
280
+ devDependencies?: DependencyLists;
281
+ };
282
+ /**
283
+ * Effective direct deps = base ∪ included presets (same-name conflict fail-closed).
284
+ */
285
+ declare function effectiveDirectDeps(doc: BapmManifest | Record<string, unknown>, presetIds?: string[]): EffectiveDirectDeps;
286
+ /** Apply effective deps onto a shallow copy of the manifest (resolve/install). */
287
+ declare function withEffectiveDirectDeps(manifest: BapmManifest): BapmManifest;
288
+ /** Aliases for acceptance helper pickExport. */
289
+ declare const effectiveManifestDeps: typeof effectiveDirectDeps;
290
+ declare const unionPresetDependencies: typeof effectiveDirectDeps;
291
+ //#endregion
198
292
  //#region src/modules/Manifest/yaml-load.d.ts
199
293
  /**
200
294
  * Public YAML loader for Manifest consumers.
@@ -222,6 +316,7 @@ type WriteProducerManifestResult = {
222
316
  };
223
317
  /**
224
318
  * Serialize a manifest document to YAML (round-trip best-effort).
319
+ * Normalized `active` / nested preset `active` emit as list-of-maps.
225
320
  */
226
321
  declare function serializeManifest(document: BapmManifest | Record<string, unknown>): string;
227
322
  /**
@@ -248,8 +343,11 @@ type CreateMinimalManifestOptions = {
248
343
  target?: string;
249
344
  /** Multi host targets or object-map (mutually exclusive with `target`). */
250
345
  targets?: string[] | TargetIntegrationMap;
251
- /** Optional active host ids for materialize/compile selection. */
252
- active?: string[];
346
+ /**
347
+ * Structured `active` (object / list-of-maps / normalized ActiveEntry[]).
348
+ * Parsed via the same rules as document `active`.
349
+ */
350
+ active?: unknown;
253
351
  description?: string;
254
352
  author?: string;
255
353
  /**
@@ -426,7 +524,7 @@ type WriteLockfileOptions = {
426
524
  //#endregion
427
525
  //#region src/modules/Lockfile/errors.d.ts
428
526
  /** Typed diagnostics for lockfile discovery / YAML load / validate / write. */
429
- type LockfileErrorCode = "LOCKFILE_NOT_FOUND" | "LOCKFILE_DUAL_CONFLICT" | "LOCKFILE_MISSING_FILE" | "LOCKFILE_YAML_PARSE" | "LOCKFILE_YAML_SAFE_SUBSET" | "LOCKFILE_FORMAT" | "LOCKFILE_UNSUPPORTED_VERSION" | "LOCKFILE_VALIDATION";
527
+ type LockfileErrorCode = "LOCKFILE_NOT_FOUND" | "LOCKFILE_DUAL_CONFLICT" | "LOCKFILE_MISSING_FILE" | "LOCKFILE_YAML_PARSE" | "LOCKFILE_YAML_SAFE_SUBSET" | "LOCKFILE_FORMAT" | "LOCKFILE_UNSUPPORTED_VERSION" | "LOCKFILE_VALIDATION" | "LOCKFILE_UNSUPPORTED_PERSONAL_BRAND" | "LOCKFILE_MERGE_CONFLICT";
430
528
  declare class LockfileError extends Error {
431
529
  readonly code: LockfileErrorCode;
432
530
  readonly path?: string;
@@ -467,6 +565,81 @@ declare function loadLockfileOrNull(options?: LoadLockfileOptions): LoadLockfile
467
565
  */
468
566
  declare function writeLockfile(document: LockfileInput, options?: WriteLockfileOptions): string;
469
567
  //#endregion
568
+ //#region src/modules/Lockfile/effective.d.ts
569
+ type LoadEffectiveLockfileOptions = LoadLockfileOptions & {
570
+ /** When true, missing shared is treated as empty (personal-only ok). */
571
+ allowMissingShared?: boolean;
572
+ };
573
+ /**
574
+ * Load shared + personal, refuse unsupported brand, merge into effective document.
575
+ * Throws LOCKFILE_NOT_FOUND only when both halves are absent (and allowMissingShared is false
576
+ * for the OrNull path — see `loadEffectiveLockfileOrNull`).
577
+ */
578
+ declare function loadEffectiveLockfile(options?: LoadEffectiveLockfileOptions): LoadLockfileResult;
579
+ /**
580
+ * Like `loadEffectiveLockfile`, but returns null when neither shared nor personal exists.
581
+ * Dual-conflict / unsupported personal brand / corrupt files still throw.
582
+ */
583
+ declare function loadEffectiveLockfileOrNull(options?: LoadEffectiveLockfileOptions): LoadLockfileResult | null;
584
+ /** Alias names for acceptance pickExport. */
585
+ declare const loadMergedLockfile: typeof loadEffectiveLockfile;
586
+ declare const mergeLoadLockfile: typeof loadEffectiveLockfile;
587
+ declare const loadLockfileMerged: typeof loadEffectiveLockfile;
588
+ //#endregion
589
+ //#region src/modules/Lockfile/personal.d.ts
590
+ declare const BAPM_PERSONAL_LOCK_FILE = "bapm.local.lock.yaml";
591
+ declare const APM_PERSONAL_LOCK_FILE = "apm.local.lock.yaml";
592
+ declare const PERSONAL_LOCK_SCOPE_KEY = "x-bapm-lock-scope";
593
+ declare const PERSONAL_LOCK_SCOPE_VALUE = "local";
594
+ type LoadPersonalLockfileOptions = LoadLockfileOptions;
595
+ /**
596
+ * Load personal lock when present; otherwise null.
597
+ * Throws on unsupported brand, corrupt YAML, or validation errors.
598
+ */
599
+ declare function loadPersonalLockfileOrNull(options?: LoadPersonalLockfileOptions): LoadLockfileResult | null;
600
+ /** Alias for discover helpers used by acceptance pickExport. */
601
+ declare function discoverPersonalLockfile(options?: LoadPersonalLockfileOptions): LoadLockfileResult | null;
602
+ declare function isPersonalScopeDependency(dep: Record<string, unknown>): boolean;
603
+ declare function stampPersonalScope<T extends Record<string, unknown>>(dep: T): T;
604
+ //#endregion
605
+ //#region src/modules/Lockfile/merge.d.ts
606
+ type MergeLockDocumentsOptions = {
607
+ sharedPath?: string;
608
+ personalPath?: string;
609
+ };
610
+ /**
611
+ * Union dependencies by identity (`repo_url`) / package `name`.
612
+ * Fail closed when the same identity or name appears on both sides with conflicting content.
613
+ */
614
+ declare function mergeLockDocuments(shared: LockfileInput | null | undefined, personal: LockfileInput | null | undefined, options?: MergeLockDocumentsOptions): LockfileDocument;
615
+ //#endregion
616
+ //#region src/modules/Lockfile/partition.d.ts
617
+ type PartitionAndWriteOptions = WriteLockfileOptions & {
618
+ /** When true (default), ensure `.gitignore` covers personal lock if written. */
619
+ ensureGitignore?: boolean;
620
+ };
621
+ type PartitionAndWriteResult = {
622
+ sharedPath: string;
623
+ personalPath: string | null;
624
+ sharedDocument: LockfileDocument;
625
+ personalDocument: LockfileDocument | null;
626
+ };
627
+ type PartitionDocumentsResult = {
628
+ shared: LockfileDocument;
629
+ personal: LockfileDocument | null;
630
+ };
631
+ /**
632
+ * Split dependencies: personal-scope → personal doc; rest + inventory bags → shared.
633
+ */
634
+ declare function partitionLockDocument(effective: LockfileInput): PartitionDocumentsResult;
635
+ /**
636
+ * Write partitioned shared + personal locks. Empty personal → no create; clear/remove if stale.
637
+ */
638
+ declare function partitionAndWriteLockfiles(effective: LockfileInput, options?: PartitionAndWriteOptions): PartitionAndWriteResult;
639
+ /** @alias partitionAndWriteLockfiles — acceptance / design naming */
640
+ declare function partitionAndWrite(effective: LockfileInput, options?: PartitionAndWriteOptions): PartitionAndWriteResult;
641
+ declare function ensurePersonalLockGitignored(projectRoot: string): void;
642
+ //#endregion
470
643
  //#region src/modules/Lockfile/parse.d.ts
471
644
  /**
472
645
  * Validate a pre-parsed JS value as an OpenAPM/APM lockfile document.
@@ -495,6 +668,19 @@ declare function serializeLockfile(document: LockfileInput): string;
495
668
  */
496
669
  declare function isSemanticallyEquivalent(a: LockfileInput, b: LockfileInput): boolean;
497
670
  //#endregion
671
+ //#region src/modules/Lockfile/identity.d.ts
672
+ /**
673
+ * Package identity normalization (APM `normalize_package_repo_url` subset).
674
+ * Used for materialization_repo_url identity checks and sort keys — not display.
675
+ */
676
+ declare function normalizePackageRepoUrl(repoUrl: string, options?: {
677
+ source?: string;
678
+ host?: string;
679
+ registryPrefix?: string;
680
+ }): string;
681
+ /** Alias accepted by acceptance helpers. */
682
+ declare const normalizeLockPackageRepoUrl: typeof normalizePackageRepoUrl;
683
+ //#endregion
498
684
  //#region src/modules/Lockfile/treeSha256.d.ts
499
685
  type TreeSha256Violation = {
500
686
  entry: string;
@@ -540,7 +726,7 @@ declare const MAX_RESOLVE_DEPTH = 50;
540
726
  declare const DEFAULT_PARALLEL_DOWNLOADS = 4;
541
727
  //#endregion
542
728
  //#region src/modules/Resolver/errors.d.ts
543
- type ResolverErrorCode = "RESOLVE_NEST_REFUSED" | "RESOLVE_DEPTH_EXCEEDED" | "RESOLVE_CYCLE" | "RESOLVE_EMPTY_INTERSECTION" | "RESOLVE_REGISTRY_DEFERRED" | "RESOLVE_NO_MATCHING_TAG" | "RESOLVE_FAILED" | "LOCAL_PATH_ESCAPES_PROJECT_ROOT" | "LOCAL_ROOT_TRACKED" | "DOWNLOAD_FAILED" | "CLASSIFY_INVALID";
729
+ type ResolverErrorCode = "RESOLVE_NEST_REFUSED" | "RESOLVE_DEPTH_EXCEEDED" | "RESOLVE_CYCLE" | "RESOLVE_EMPTY_INTERSECTION" | "RESOLVE_REGISTRY_DEFERRED" | "RESOLVE_NO_MATCHING_TAG" | "RESOLVE_VIRTUAL_PATH_INVALID" | "RESOLVE_FAILED" | "LOCAL_PATH_ESCAPES_PROJECT_ROOT" | "LOCAL_ROOT_TRACKED" | "DOWNLOAD_FAILED" | "CLASSIFY_INVALID";
544
730
  declare class ResolverError extends Error {
545
731
  readonly code: ResolverErrorCode;
546
732
  readonly details?: Record<string, unknown>;
@@ -597,6 +783,15 @@ type ClassifiedDependency = {
597
783
  pluginName?: string;
598
784
  marketplaceName?: string;
599
785
  versionSpec?: string;
786
+ /**
787
+ * True when this edge originated from bapm `local` discriminator (not OpenAPM `path:`).
788
+ * Drives personal lock partition.
789
+ */
790
+ personalLockScope?: boolean;
791
+ /** Consumer skill subset from object-form `skills:` (materialize-time only). */
792
+ skillSubset?: string[];
793
+ /** Consumer per-dep target subset from object-form `targets:`. */
794
+ targetSubset?: string[];
600
795
  };
601
796
  type ResolvedNode = {
602
797
  name: string;
@@ -607,6 +802,10 @@ type ResolvedNode = {
607
802
  /** Display / lock repo_url (host/path form without scheme when git). */
608
803
  repo_url?: string;
609
804
  path?: string;
805
+ /** Canonical POSIX virtual subpath inside a git package (APM monorepo form). */
806
+ virtualPath?: string;
807
+ /** Original clone URL (preserves local git sources that lock repo_url cannot). */
808
+ gitUrl?: string;
610
809
  resolved_commit?: string;
611
810
  /** Pin identity for lock emit / outdated tip (literal ref or picked tag). */
612
811
  resolved_ref?: string;
@@ -630,6 +829,15 @@ type ResolvedNode = {
630
829
  marketplace_plugin_name?: string;
631
830
  source_url?: string;
632
831
  source_digest?: string;
832
+ /**
833
+ * Personal lock scope: true when originating from bapm `local` discriminator.
834
+ * Emitted as `x-bapm-lock-scope: local` on lock rows.
835
+ */
836
+ personalLockScope?: boolean;
837
+ /** Consumer skill subset carried from classifying object-form entry. */
838
+ skillSubset?: string[];
839
+ /** Consumer per-dep target subset carried from classifying object-form entry. */
840
+ targetSubset?: string[];
633
841
  };
634
842
  type ResolveGraphResult = {
635
843
  nodes: ResolvedNode[];
@@ -867,6 +1075,8 @@ type PolicyCandidate = {
867
1075
  kind?: string;
868
1076
  path?: string;
869
1077
  source?: string;
1078
+ /** Git host for req-pl-018 case fold (default inferred / github.com). */
1079
+ host?: string;
870
1080
  };
871
1081
  type PolicyDependencyInput = string | {
872
1082
  name?: string;
@@ -877,6 +1087,7 @@ type PolicyDependencyInput = string | {
877
1087
  depth?: number;
878
1088
  path?: string;
879
1089
  source?: string;
1090
+ host?: string;
880
1091
  };
881
1092
  type EvaluatePolicyOptions = {
882
1093
  policy: PolicyDocument;
@@ -1277,6 +1488,72 @@ declare function assertPolicyGateAllows(options?: PolicyGateExtendedOptions): Po
1277
1488
  */
1278
1489
  declare function redactPolicyRef(ref: string): string;
1279
1490
  //#endregion
1491
+ //#region src/common/repoIdentityCase.d.ts
1492
+ type RepoIdentityCaseOptions = {
1493
+ host?: string | null;
1494
+ source?: string | null;
1495
+ registryPrefix?: string | null;
1496
+ /** When true, treat as local (no path fold). */
1497
+ isLocal?: boolean;
1498
+ /** When true, treat as marketplace (no path fold). */
1499
+ isMarketplace?: boolean;
1500
+ /**
1501
+ * Env lookup for GHES (`GITHUB_HOST`). Defaults to `process.env.GITHUB_HOST`.
1502
+ * Injected in tests.
1503
+ */
1504
+ githubHostEnv?: string | null;
1505
+ };
1506
+ /** ASCII `A–Z` → `a–z` only (no Unicode / locale folding). */
1507
+ declare function asciiLower(s: string): string;
1508
+ /**
1509
+ * Disclosed case-insensitive git hosts: github.com, *.ghe.com, literal GITHUB_HOST.
1510
+ */
1511
+ declare function isCaseInsensitiveGitHost(host: string | null | undefined, options?: RepoIdentityCaseOptions): boolean;
1512
+ /**
1513
+ * Whether repository-coordinate path casing is excluded from identity / match.
1514
+ * Registry (+ registry prefix) always folds; local/marketplace never; else host rule.
1515
+ */
1516
+ declare function isCaseInsensitivePackageIdentity(options?: RepoIdentityCaseOptions): boolean;
1517
+ /**
1518
+ * Fold repository-coordinate segments under the disclosed case rule.
1519
+ * Virtual path / segments after the repo-coord prefix stay byte-exact.
1520
+ * For globs, foldable prefix stops before the first segment containing `**`.
1521
+ */
1522
+ declare function foldRepoCoordinatePath(value: string, options?: RepoIdentityCaseOptions & {
1523
+ isPattern?: boolean;
1524
+ }): string;
1525
+ /**
1526
+ * Identity-boundary normalization of a package repo path (APM `normalize_package_repo_url`).
1527
+ * Never use for display / filesystem paths.
1528
+ */
1529
+ declare function normalizePackageRepoPath(repoUrl: string, options?: RepoIdentityCaseOptions): string;
1530
+ //#endregion
1531
+ //#region src/modules/Policy/match.d.ts
1532
+ type IdentityMatchOptions = RepoIdentityCaseOptions & {
1533
+ /**
1534
+ * Force fold on/off. When omitted, fold follows host/source disclosure rules
1535
+ * (and defaults bare `owner/repo` to github.com).
1536
+ */
1537
+ caseFold?: boolean;
1538
+ };
1539
+ declare function identityMatchesPattern(identity: string, pattern: string, options?: IdentityMatchOptions): boolean;
1540
+ /**
1541
+ * Exact require match (req-pl-018): `*` is literal; compare package portion
1542
+ * before `#` under the same fold rule. No glob.
1543
+ */
1544
+ declare function identitySatisfiesRequire(identity: string, requirePattern: string, options?: IdentityMatchOptions): boolean;
1545
+ /**
1546
+ * pl-007/008: unbounded direct refs when require_pinned_constraint is true.
1547
+ * Pinned OK: 40-hex, v?semver tag, bounded range, registry source, local path.
1548
+ */
1549
+ declare function isPinnedConstraint(args: {
1550
+ ref?: string;
1551
+ constraint?: string;
1552
+ path?: string;
1553
+ source?: string;
1554
+ kind?: string;
1555
+ }): boolean;
1556
+ //#endregion
1280
1557
  //#region src/modules/Resolver/resolveAndLock.d.ts
1281
1558
  /**
1282
1559
  * Orchestrate: load manifest → resolve plan → policy gate → download → write lock.
@@ -1309,7 +1586,8 @@ declare function purgeModulesInstallPaths(args: PurgeInstallPathArgs): string[];
1309
1586
  * Minimum-safe repo identity for resolve/cache (req-rs-016).
1310
1587
  * - Host case folded to lowercase
1311
1588
  * - Trailing `.git` stripped
1312
- * - Path case preserved (example/REPO ≠ example/repo)
1589
+ * - Path case: ASCII-folded for disclosed case-insensitive hosts (github.com,
1590
+ * *.ghe.com, GITHUB_HOST); preserved for all other hosts
1313
1591
  * - Cache keys MUST NOT isolate solely by ref
1314
1592
  */
1315
1593
  declare function normalizeRepoIdentity(repoUrl: string): string;
@@ -1416,6 +1694,12 @@ type DiscoverPrimitivesOptions = {
1416
1694
  cwd?: string;
1417
1695
  /** Modules root; defaults to `<cwd>/apm_modules`. */
1418
1696
  modulesDir?: string;
1697
+ /**
1698
+ * Exact resolver package roots to scan. When set, discovery does not walk the
1699
+ * modules tree, so git virtual-path packages are read from their subdirectory
1700
+ * instead of the clone root.
1701
+ */
1702
+ packageRoots?: string[];
1419
1703
  /** Declaration order of dependency package names (pr-003). */
1420
1704
  declarationOrder?: string[];
1421
1705
  };
@@ -1485,6 +1769,12 @@ type AgentPluginManifest = {
1485
1769
  commands?: string[];
1486
1770
  /** Declared hook JSON paths relative to the plugin root. */
1487
1771
  hooks?: string[];
1772
+ /**
1773
+ * Exclusive skill declaration when present.
1774
+ * Omit → conventional `skills/<name>/SKILL.md` discovery;
1775
+ * `[]` → zero skills; non-empty → only resolved declared entries.
1776
+ */
1777
+ skills?: string[];
1488
1778
  extensions?: Record<string, Record<string, unknown>>;
1489
1779
  };
1490
1780
  type AgentPluginDiagnostic = {
@@ -1507,6 +1797,8 @@ type CreateAgentPluginManifestOptions = {
1507
1797
  repository?: string;
1508
1798
  license?: string;
1509
1799
  keywords?: string[];
1800
+ /** Exclusive skill names/paths/containers when producing a portable plugin. */
1801
+ skills?: string[];
1510
1802
  extensions?: Record<string, Record<string, unknown>>;
1511
1803
  };
1512
1804
  type WriteAgentPluginManifestOptions = CreateAgentPluginManifestOptions & {
@@ -1576,7 +1868,7 @@ type DiscoverAgentPluginMcpResult = LoadedAgentPluginManifest & {
1576
1868
  };
1577
1869
  //#endregion
1578
1870
  //#region src/modules/AgentPlugins/errors.d.ts
1579
- type AgentPluginsErrorCode = "AGENT_PLUGIN_ROOT_INVALID" | "AGENT_PLUGIN_MANIFEST_INVALID" | "AGENT_PLUGIN_DECLARED_PATH_INVALID";
1871
+ type AgentPluginsErrorCode = "AGENT_PLUGIN_ROOT_INVALID" | "AGENT_PLUGIN_MANIFEST_INVALID" | "AGENT_PLUGIN_DECLARED_PATH_INVALID" | "AGENT_PLUGIN_SKILL_DECLARED_INVALID";
1580
1872
  declare class AgentPluginsError extends Error {
1581
1873
  readonly code: AgentPluginsErrorCode;
1582
1874
  readonly details?: Record<string, unknown>;
@@ -1596,8 +1888,11 @@ declare function validateAgentPluginManifest(value: unknown, manifestPath?: stri
1596
1888
  //#endregion
1597
1889
  //#region src/modules/AgentPlugins/discover.d.ts
1598
1890
  /**
1599
- * Discover only immediate `skills/<name>/SKILL.md` entries and return complete,
1600
- * containment-checked directories for portable import.
1891
+ * Discover portable plugin skills.
1892
+ *
1893
+ * - Omit `plugin.json` `skills` → conventional immediate `skills/<name>/SKILL.md`.
1894
+ * - `"skills": []` → zero skills; shadow diagnostic when conventional entries exist.
1895
+ * - Non-empty list → exclusive fail-closed resolution (names / paths / container).
1601
1896
  */
1602
1897
  declare function discoverAgentPluginSkills(options: DiscoverAgentPluginSkillsOptions): DiscoverAgentPluginSkillsResult;
1603
1898
  //#endregion
@@ -1625,6 +1920,97 @@ declare function serializeAgentPluginManifest(manifest: AgentPluginManifest): st
1625
1920
  */
1626
1921
  declare function writeAgentPluginManifest(options: WriteAgentPluginManifestOptions): WrittenAgentPluginManifest;
1627
1922
  //#endregion
1923
+ //#region src/modules/CopilotNativeRegistration/errors.d.ts
1924
+ type CopilotNativeRegistrationErrorCode = "COPILOT_NATIVE_SETTINGS_INVALID" | "COPILOT_NATIVE_MARKETPLACE_COLLISION" | "COPILOT_NATIVE_PLUGIN_COLLISION" | "COPILOT_NATIVE_ADMISSION_INVALID" | "COPILOT_NATIVE_FAILED";
1925
+ declare class CopilotNativeRegistrationError extends Error {
1926
+ readonly code: CopilotNativeRegistrationErrorCode;
1927
+ readonly details?: Record<string, unknown>;
1928
+ constructor(code: CopilotNativeRegistrationErrorCode, message: string, options?: {
1929
+ details?: Record<string, unknown>;
1930
+ cause?: unknown;
1931
+ });
1932
+ }
1933
+ //#endregion
1934
+ //#region src/modules/CopilotNativeRegistration/types.d.ts
1935
+ type AdmittedCopilotNativePlugin = {
1936
+ /** Portable plugin.json name (enable key prefix). */
1937
+ pluginName: string;
1938
+ /** Package / lock identity name. */
1939
+ packageName: string;
1940
+ /** Absolute package root under apm_modules (or source). */
1941
+ packageRoot: string;
1942
+ /** Repo-relative path under apm_modules/ for catalog entries. */
1943
+ packagePathRel: string;
1944
+ /** Resolver depth (1 = direct). */
1945
+ depth: number;
1946
+ identity?: string;
1947
+ };
1948
+ type CopilotNativeLedgerPlugin = {
1949
+ packageName: string;
1950
+ packagePath: string;
1951
+ identity?: string;
1952
+ };
1953
+ type CopilotNativeLedger = {
1954
+ version: number;
1955
+ marketplaceId: string;
1956
+ modulesPath: string;
1957
+ ownedMarketplace: true;
1958
+ plugins: Record<string, CopilotNativeLedgerPlugin>;
1959
+ };
1960
+ type RebuildCopilotNativeRegistrationOptions = {
1961
+ cwd: string;
1962
+ admitted: AdmittedCopilotNativePlugin[];
1963
+ dryRun?: boolean;
1964
+ };
1965
+ type SyncCopilotNativeRegistrationOptions = {
1966
+ cwd: string;
1967
+ dryRun?: boolean;
1968
+ };
1969
+ //#endregion
1970
+ //#region src/modules/CopilotNativeRegistration/constants.d.ts
1971
+ /** Marketplace id / enable suffix aligned with APM Copilot projection. */
1972
+ declare const COPILOT_NATIVE_MARKETPLACE_ID = "apm";
1973
+ declare const COPILOT_NATIVE_ENABLE_SUFFIX = "@apm";
1974
+ /** Repository-relative modules root used in settings + catalog paths. */
1975
+ declare const COPILOT_NATIVE_MODULES_PATH = "apm_modules";
1976
+ declare const COPILOT_NATIVE_MARKETPLACE_REL: string;
1977
+ declare const COPILOT_NATIVE_LEDGER_REL: string;
1978
+ declare const COPILOT_NATIVE_SETTINGS_REL: string;
1979
+ //#endregion
1980
+ //#region src/modules/CopilotNativeRegistration/admit.d.ts
1981
+ /**
1982
+ * Admit portable Agent Plugin roots from resolved nodes for Copilot native registration.
1983
+ * Invalid plugin.json that claims the portable path fails closed.
1984
+ * Same plugin name: direct (lower depth) wins; same precedence → collision.
1985
+ */
1986
+ declare function admitCopilotNativePlugins(nodes: ResolvedNode[], options?: {
1987
+ cwd?: string;
1988
+ }): AdmittedCopilotNativePlugin[];
1989
+ //#endregion
1990
+ //#region src/modules/CopilotNativeRegistration/rebuild.d.ts
1991
+ /**
1992
+ * Rebuild or clear owned catalog/ledger/settings for the admitted set.
1993
+ * Empty admitted set retires owned registration artifacts.
1994
+ */
1995
+ declare function rebuildCopilotNativeRegistration(options: RebuildCopilotNativeRegistrationOptions): void;
1996
+ /**
1997
+ * Sync registration from current lock + on-disk package roots (uninstall/prune).
1998
+ */
1999
+ declare function syncCopilotNativeRegistrationFromLock(options: SyncCopilotNativeRegistrationOptions): void;
2000
+ /**
2001
+ * Admit from install-time resolver nodes when Copilot is an effective target.
2002
+ */
2003
+ declare function rebuildCopilotNativeRegistrationFromNodes(cwd: string, nodes: ResolvedNode[], options?: {
2004
+ dryRun?: boolean;
2005
+ }): AdmittedCopilotNativePlugin[];
2006
+ //#endregion
2007
+ //#region src/modules/CopilotNativeRegistration/filter.d.ts
2008
+ /**
2009
+ * Omit whole-plugin (portable) primitives for packages admitted to Copilot native
2010
+ * registration so Copilot does not double-deploy loose skills/MCP.
2011
+ */
2012
+ declare function filterPrimitivesForCopilotNative(primitives: AttributedPrimitive[], admittedPackageNames: ReadonlySet<string>): AttributedPrimitive[];
2013
+ //#endregion
1628
2014
  //#region src/modules/Install/types.d.ts
1629
2015
  type InstallOnlyMode = "apm" | "mcp";
1630
2016
  type RunInstallOptions = {
@@ -1743,6 +2129,24 @@ type RunInstallOptions = {
1743
2129
  * (`--trust-transitive-mcp`). Direct `dependencies.mcp` always eligible.
1744
2130
  */
1745
2131
  trustTransitiveMcp?: boolean;
2132
+ /**
2133
+ * Per-invocation bin deploy consent (`--trust-bin` / `--no-trust-bin`).
2134
+ * `allow` | `deny` | `default` (neither flag). Overlay on ExecutableTrust type `bin`.
2135
+ */
2136
+ trustBin?: "allow" | "deny" | "default";
2137
+ /**
2138
+ * Explicit interactive signal for bin consent defaults. When unset, derived from
2139
+ * CI / BAPM_NON_INTERACTIVE / frozen / stdin TTY.
2140
+ */
2141
+ isInteractive?: boolean;
2142
+ /** Env overlay for CI / BAPM_NON_INTERACTIVE (defaults to `process.env`). */
2143
+ env?: Record<string, string | undefined>;
2144
+ /** Injectable stdin TTY for bin consent (defaults to `process.stdin.isTTY`). */
2145
+ stdinIsTTY?: boolean;
2146
+ /**
2147
+ * Destination for gated dependency `bin/` materialize (default: `<cwd>/.agents/bin`).
2148
+ */
2149
+ binDeployRoot?: string;
1746
2150
  experimentalRegistries?: boolean;
1747
2151
  registryBaseUrl?: string;
1748
2152
  mirrorUrl?: string;
@@ -2517,11 +2921,19 @@ type SafeExtractZipResult = {
2517
2921
  filesExtracted: number;
2518
2922
  dest: string;
2519
2923
  };
2924
+ type SafeExtractZipOptions = {
2925
+ /**
2926
+ * `replace` (default): `dest` is a bapm-owned cache dir and is swapped for the archive tree.
2927
+ * `merge`: `dest` holds user files; members are added in place, nothing else is touched,
2928
+ * and a member that would overwrite different bytes fails closed before any write.
2929
+ */
2930
+ mode?: "replace" | "merge";
2931
+ };
2520
2932
  /**
2521
- * Fail-closed extract into `dest` via same-filesystem staging + rename.
2522
- * On any error, staging is removed and `dest` is not left as a half-write from this call.
2933
+ * Fail-closed extract into `dest`. See {@link SafeExtractZipOptions} for modes.
2934
+ * On any error, `dest` is not left as a half-write from this call.
2523
2935
  */
2524
- declare function safeExtractZip(bytes: Uint8Array, dest: string): SafeExtractZipResult;
2936
+ declare function safeExtractZip(bytes: Uint8Array, dest: string, options?: SafeExtractZipOptions): SafeExtractZipResult;
2525
2937
  //#endregion
2526
2938
  //#region src/modules/Pack/checkRelease.d.ts
2527
2939
  /**
@@ -2541,6 +2953,39 @@ declare const runCheckRelease: typeof checkReleaseTag;
2541
2953
  declare function isSecretPackPath(relativePath: string): boolean;
2542
2954
  declare function describeSecretRefuse(relativePath: string): string;
2543
2955
  //#endregion
2956
+ //#region src/modules/Pack/bapmIgnore.d.ts
2957
+ declare const BAPM_IGNORE_FILE = ".bapmignore";
2958
+ type BapmIgnoreRules = {
2959
+ /** True when `relativePath` (project-root, `/` separators) should be omitted. */
2960
+ ignores(relativePath: string): boolean;
2961
+ };
2962
+ /**
2963
+ * Load project-root `.bapmignore`.
2964
+ * Missing file → empty rules (no-op). Unreadable / non-file → fail closed.
2965
+ */
2966
+ declare function loadBapmIgnore(cwd: string): BapmIgnoreRules;
2967
+ declare function isBapmIgnored(relativePath: string, rules: BapmIgnoreRules): boolean;
2968
+ /** Whether a directory path should be pruned from the walk. */
2969
+ declare function isBapmIgnoredDir(relativePath: string, rules: BapmIgnoreRules): boolean;
2970
+ //#endregion
2971
+ //#region src/modules/Pack/collect.d.ts
2972
+ type PackFileEntry = {
2973
+ /** Path relative to project root using `/` separators. */
2974
+ relativePath: string;
2975
+ absolutePath: string;
2976
+ bytes: Uint8Array;
2977
+ };
2978
+ /**
2979
+ * Collect packable project files: manifest, lock, primitives, sources.
2980
+ * Excludes `.git`, `node_modules`, prior `*.zip` artifacts, and `.bapmignore` matches.
2981
+ * Fails closed when a secret-pattern path would be included (sc-007).
2982
+ */
2983
+ declare function collectPackFiles(cwd: string): PackFileEntry[];
2984
+ declare function assertProjectHasContent(entries: PackFileEntry[], options?: {
2985
+ agentPlugins?: boolean;
2986
+ }): void;
2987
+ declare function defaultArchiveName(name: string, version: string): string;
2988
+ //#endregion
2544
2989
  //#region src/modules/Auth/types.d.ts
2545
2990
  /**
2546
2991
  * Shared Auth types — OpenAPM §10.3 credential host-class / resolve / git child env.
@@ -2818,6 +3263,57 @@ declare function userGrantsToSurface(grants: UserExecutableGrants, opts?: {
2818
3263
  present?: boolean;
2819
3264
  }): ExecutableGrantSurface;
2820
3265
  //#endregion
3266
+ //#region src/modules/ExecutableTrust/binConsent.d.ts
3267
+ type TrustBinMode = "allow" | "deny" | "default";
3268
+ type ResolveBinDeployConsentOptions = {
3269
+ packageName: string;
3270
+ /** Invocation consent: `--trust-bin` → allow, `--no-trust-bin` → deny, neither → default. */
3271
+ trustBin?: TrustBinMode;
3272
+ /**
3273
+ * Explicit interactive signal (tests / callers). When unset, derived from
3274
+ * CI / BAPM_NON_INTERACTIVE / frozen / stdin TTY (D2).
3275
+ */
3276
+ isInteractive?: boolean;
3277
+ frozen?: boolean;
3278
+ env?: Record<string, string | undefined>;
3279
+ /** Injectable stdin TTY; defaults to `process.stdin.isTTY`. */
3280
+ stdinIsTTY?: boolean;
3281
+ orgExecutables?: OrgExecutables | null;
3282
+ projectSurface?: GrantSurfaceInput;
3283
+ userSurface?: GrantSurfaceInput;
3284
+ grantSurface?: GrantSurfaceInput;
3285
+ /** Precomputed ladder decision (skips resolveExecutableTrust). */
3286
+ ladder?: ExecutableTrustDecision;
3287
+ };
3288
+ type BinDeployConsentDecision = {
3289
+ deploy: boolean;
3290
+ withhold: boolean;
3291
+ warn: boolean;
3292
+ allowed: boolean;
3293
+ outcome: "deploy" | "withhold" | "skip";
3294
+ ladderOutcome: ExecutableTrustDecision["outcome"];
3295
+ packageName: string;
3296
+ executableType: "bin";
3297
+ reason?: string;
3298
+ trustBin: TrustBinMode;
3299
+ interactive: boolean;
3300
+ };
3301
+ /**
3302
+ * Effective bin-deploy decision: ExecutableTrust deny-wins for `bin`, then
3303
+ * invocation overlay. Flags cannot invent allow when the ladder denies/withholds.
3304
+ */
3305
+ declare function resolveBinDeployConsent(options: ResolveBinDeployConsentOptions): BinDeployConsentDecision;
3306
+ /** Alias preferred by design / acceptance discovery. */
3307
+ declare const resolveEffectiveBinDeploy: typeof resolveBinDeployConsent;
3308
+ declare const evaluateBinDeployConsent: typeof resolveBinDeployConsent;
3309
+ declare function normalizeTrustBin(value: unknown): TrustBinMode;
3310
+ declare function resolveIsInteractive(options: {
3311
+ isInteractive?: boolean;
3312
+ frozen?: boolean;
3313
+ env?: Record<string, string | undefined>;
3314
+ stdinIsTTY?: boolean;
3315
+ }): boolean;
3316
+ //#endregion
2821
3317
  //#region src/modules/ExecutableTrust/evaluate.d.ts
2822
3318
  /**
2823
3319
  * True when the consuming project declared a grant surface
@@ -2893,8 +3389,10 @@ type ApplyMcpInventoryOptions = {
2893
3389
  packageName?: string;
2894
3390
  [key: string]: unknown;
2895
3391
  }>;
2896
- configPath: string;
2897
- targetId: string;
3392
+ /** Target that received the config. Omit to refresh `mcp_servers` without inventing target inventory. */
3393
+ targetId?: string;
3394
+ /** Host config path; only written together with `targetId`. */
3395
+ configPath?: string;
2898
3396
  };
2899
3397
  //#endregion
2900
3398
  //#region src/modules/Mcp/bake.d.ts
@@ -2960,6 +3458,14 @@ declare function collectMcpServers(options: CollectMcpServersOptions): CollectMc
2960
3458
  /**
2961
3459
  * Populate lock top-level `mcp_*` fields from configured servers.
2962
3460
  * Preserves unknown / `x-*` keys already on the document.
3461
+ *
3462
+ * Without `targetId` + `configPath`, only `mcp_servers` (and provenance for the
3463
+ * current servers) is refreshed; existing target inventory is left untouched.
3464
+ * Passing an empty `servers` list therefore scrubs stale server declarations
3465
+ * without inventing a target entry.
3466
+ *
3467
+ * Maps are built with `Map` + `Object.fromEntries` so server names such as
3468
+ * `toString` / `constructor` never resolve through `Object.prototype`.
2963
3469
  */
2964
3470
  declare function applyMcpInventoryToLock(options: ApplyMcpInventoryOptions): LockfileDocument;
2965
3471
  //#endregion
@@ -3184,7 +3690,8 @@ declare function resolveRegistryToken(options?: {
3184
3690
  * Build flat registry publish zip: `apm.yml` at root + `.apm/**` (+ optional docs).
3185
3691
  * Does NOT call M7 pack product API — zip I/O only via fflate.
3186
3692
  * Wire `apm.yml` is serialized from the **dual-read base** only (no `bapm.local.yml` merge).
3187
- * Never includes personal overlay `bapm.local.yml` as a zip member.
3693
+ * Never includes personal overlay `bapm.local.yml` or personal lock `bapm.local.lock.yaml`.
3694
+ * Applies project-root `.bapmignore` to optional docs and `.apm/**` members.
3188
3695
  */
3189
3696
  declare function buildPublishArchive(options?: BuildPublishArchiveOptions): BuildPublishArchiveResult;
3190
3697
  //#endregion
@@ -3414,6 +3921,11 @@ type MarketplaceAuthoringOwner = string | {
3414
3921
  type MarketplaceAuthoringBuild = {
3415
3922
  tagPattern?: string;
3416
3923
  };
3924
+ /** Release-time version-alignment strategies for `pack --check-versions`. */
3925
+ type MarketplaceVersioningStrategy = "lockstep" | "tag_pattern" | "per_package";
3926
+ type MarketplaceAuthoringVersioning = {
3927
+ strategy: MarketplaceVersioningStrategy;
3928
+ };
3417
3929
  type MarketplaceAuthoringOutputs = Record<string, unknown>;
3418
3930
  type PackageEntry = {
3419
3931
  name: string;
@@ -3449,7 +3961,11 @@ type MarketplaceAuthoringConfig = {
3449
3961
  claude?: unknown;
3450
3962
  codex?: unknown;
3451
3963
  metadata?: Record<string, unknown>;
3452
- versioning?: unknown;
3964
+ /**
3965
+ * Present after authoring load (defaults to `{ strategy: "lockstep" }` when omitted in YAML).
3966
+ * Callers that construct configs by hand may omit it; gates treat missing as lockstep.
3967
+ */
3968
+ versioning?: MarketplaceAuthoringVersioning;
3453
3969
  packages: PackageEntry[];
3454
3970
  };
3455
3971
  type LoadMarketplaceFromBapmYmlOptions = {
@@ -3647,6 +4163,63 @@ declare function migrateMarketplaceYml(options?: MigrateMarketplaceYmlOptions):
3647
4163
  declare const migrateLegacyMarketplaceYml: typeof migrateMarketplaceYml;
3648
4164
  declare const runMarketplaceMigrate: typeof migrateMarketplaceYml;
3649
4165
  //#endregion
4166
+ //#region src/modules/Marketplace/modules/VersionCheck/types.d.ts
4167
+ type PackageVersionRow = {
4168
+ path: string;
4169
+ version: string | null;
4170
+ ok: boolean;
4171
+ reason: string;
4172
+ error?: string;
4173
+ rendered_tag?: string | null;
4174
+ };
4175
+ type VersionAlignmentReport = {
4176
+ strategy: MarketplaceVersioningStrategy;
4177
+ expected: string | null;
4178
+ ok: boolean;
4179
+ packages: PackageVersionRow[];
4180
+ };
4181
+ type CheckVersionAlignmentOptions = {
4182
+ config: MarketplaceAuthoringConfig;
4183
+ cwd?: string;
4184
+ projectRoot?: string;
4185
+ root?: string;
4186
+ };
4187
+ type LocalVersionStatus = "ok" | "no_apm_yml" | "invalid_yaml" | "invalid_yaml_manifest" | "missing_version" | "invalid_plugin_json" | "missing_plugin_version" | "invalid_plugin_version";
4188
+ type LocalVersionRead = {
4189
+ version: string | null;
4190
+ status: LocalVersionStatus;
4191
+ };
4192
+ //#endregion
4193
+ //#region src/modules/Marketplace/modules/VersionCheck/findPluginJson.d.ts
4194
+ /** APM `find_plugin_json` location order (first existing wins). */
4195
+ declare const PLUGIN_JSON_CANDIDATES: readonly ["plugin.json", ".github/plugin/plugin.json", ".claude-plugin/plugin.json", ".cursor-plugin/plugin.json"];
4196
+ declare function findPluginJson(packageRoot: string): string | undefined;
4197
+ //#endregion
4198
+ //#region src/modules/Marketplace/modules/VersionCheck/renderTag.d.ts
4199
+ /** Expand `{name}` and `{version}` placeholders (APM `render_tag` parity). */
4200
+ declare function renderTag(pattern: string, name: string, version: string): string;
4201
+ //#endregion
4202
+ //#region src/modules/Marketplace/modules/VersionCheck/readLocalVersion.d.ts
4203
+ declare const MAX_PLUGIN_JSON_BYTES: number;
4204
+ /**
4205
+ * Read local package version: dual-read OpenAPM YAML authoritative; else plugin.json.
4206
+ * Prefered manifest present ⇒ no plugin.json fallback (APM fail-closed).
4207
+ */
4208
+ declare function readLocalVersion(projectRoot: string, relSource: string): LocalVersionRead;
4209
+ //#endregion
4210
+ //#region src/modules/Marketplace/modules/VersionCheck/checkVersionAlignment.d.ts
4211
+ /**
4212
+ * Marketplace local-package version-alignment gate (APM `check_version_alignment`).
4213
+ * Pure / no network — distinct from `checkReleaseTag`.
4214
+ */
4215
+ declare function checkVersionAlignment(options: CheckVersionAlignmentOptions): VersionAlignmentReport;
4216
+ /** Human-readable diagnostics (APM `VersionAlignmentReport.error_messages`). */
4217
+ declare function versionAlignmentErrorMessages(report: VersionAlignmentReport): string[];
4218
+ /** Aliases for acceptance soft-resolve. */
4219
+ declare const checkMarketplaceVersionAlignment: typeof checkVersionAlignment;
4220
+ declare const runVersionAlignmentCheck: typeof checkVersionAlignment;
4221
+ declare const checkVersions: typeof checkVersionAlignment;
4222
+ //#endregion
3650
4223
  //#region src/modules/Marketplace/types.d.ts
3651
4224
  /** Shared option bags for Marketplace public APIs. */
3652
4225
  type MarketplaceConfigOptions = {
@@ -4045,4 +4618,4 @@ declare function getVersion(): string;
4045
4618
  //#region src/app/publicApi.d.ts
4046
4619
  declare const BAPM_NAME = "bapm";
4047
4620
  //#endregion
4048
- export { AGENT_PLUGIN_MANIFEST_SCHEMA_V1, APM_LOCAL_MANIFEST_FILE, APM_LOCK_FILE, APM_MANIFEST_FILE, APM_MODULES_DIR, APM_POLICY_FILE, type AgentPluginAuthor, type AgentPluginDeclaredPath, type AgentPluginDiagnostic, type AgentPluginManifest, type AgentPluginMcpServer, type AgentPluginSkill, AgentPluginsError, type AgentPluginsErrorCode, type AnnotatedTagCandidate, type ApplyMcpInventoryOptions, type AttributedPrimitive, type AuditCiCheck, type AuditCiCheckName, type AuditCiFormat, type AuditCiResult, type AuditCiStructuredReport, type AuditCiSummary, BAPM_LOCAL_MANIFEST_FILE, BAPM_LOCK_FILE, BAPM_MANIFEST_FILE, BAPM_NAME, BAPM_POLICY_FILE, type BakeMcpStringMapOptions, type BakeableMcpServer, type BapmDependency, type BapmManifest, type BuildGitChildEnvOptions, type BuildMarketplaceOutputsOptions, type BuildMarketplaceOutputsResult, type BuildPublishArchiveOptions, type BuildPublishArchiveResult, CACHE_TTL_SECONDS, CANONICAL_TARGET_TOKENS, CYCLONEDX_SPEC_VERSION, type CacheCleanOptions, type CacheCleanResult, type CacheInfoOptions, type CacheInfoResult, type CheckMarketplaceAuthoringResult, type CheckReleaseTagOptions, type CheckReleaseTagResult, type CheckSelfUpdateOptions, type CheckSelfUpdateResult, type ClassifiedDependency, type CollectMcpServersOptions, type CollectMcpServersResult, type CollectedMcpServer, type CompileAgentsMdOptions, type CompileAgentsMdResult, type CompileAttributionEntry, type CreateAgentPluginManifestOptions, type CreateMinimalManifestOptions, type CreatePluginJsonOptions, type CreateRegistryClientOptions, DEFAULT_LOCAL_ROOT, DEFAULT_PARALLEL_CHECKS, DEFAULT_PARALLEL_DOWNLOADS, DEFAULT_POLICY_PROVIDERS, DEPLOYED_HASH_ALGO, type DependencyEntry, type DependencyKind, type DependencyLists, type DeployedHashViolation, type DepsListResult, type DepsTreeResult, type DepsWhyError, type DepsWhyPackage, type DepsWhyPath, type DepsWhyPathNode, type DepsWhyResult, type DetectAuthoringConfigSourceResult, type DiscoverAgentPluginDeclaredPathsResult, type DiscoverAgentPluginMcpOptions, type DiscoverAgentPluginMcpResult, type DiscoverAgentPluginSkillsOptions, type DiscoverAgentPluginSkillsResult, type DiscoverLockfileOptions, type DiscoverManifestOptions, type DiscoverPolicyOptions, type DiscoverPrimitivesOptions, type DiscoveredLockfile, type DiscoveredManifest, type DiscoveredPolicy, type DoctorCheck, type DoctorResult, type DownloadArgs, type DownloadPackageSpec, type DownloadPackagesOptions, type Downloader, EXPERIMENTAL_REGISTRIES_ENV, type EditorResult, type EnforceFrozenOptions, type EvaluateExecutableTrustOptions, type EvaluatePolicyOptions, type EvaluatePolicyResult, type EvaluateRequiredPackagePresenceOptions, type EvaluateRequiredPackagePresenceResult, type ExecutableGrantEntry, type ExecutableGrantSurface, type ExecutableTrustDecision, type ExecutableTrustOutcome, type ExportSbomFailure, type ExportSbomOptions, type ExportSbomResult, type ExportSbomSuccess, type ExtractPackArchiveOptions, type ExtractPackArchiveResult, FIXED_EPOCH_TIMESTAMP, FORMAT_CYCLONEDX, FORMAT_SPDX, type FakeTag, type FetchWithRedirectAuthDropInit, type FindPathOptions, type FindPathResult, type GitRemote, type GrantSurfaceInput, IMPLEMENTATION_DEFAULT_HOST, InstallError, type InstallErrorCode, type InstallOptions, type InstallResult, type InventoryDep, KIND_EXPRESSION, KIND_ID, KIND_NAMED, type LicenseClass, type LicenseKind, type LoadAgentPluginManifestOptions, type LoadLockfileOptions, type LoadLockfileResult, type LoadManifestOptions, type LoadManifestResult, type LoadMarketplaceResult, type LoadPolicyOptions, type LoadPolicyResult, type LoadedAgentPluginManifest, type LockFilename, type LockedDependency, type LockfileDocument, LockfileError, type LockfileErrorCode, type LockfileInput, type LsRemoteFn, type LsRemoteResult, MARKETPLACE_PATHS, MAX_MARKETPLACE_JSON_BYTES, MAX_RESOLVE_DEPTH, MAX_SAFE_ENTRIES, MAX_SAFE_UNCOMPRESSED_BYTES, ManifestError, type ManifestErrorCode, type ManifestFilename, type ManifestWarning, type MarketplaceAuthoringConfig, MarketplaceAuthoringError, type MarketplaceConcreteDep, type MarketplaceConfigOptions, MarketplaceError, MarketplaceFetchError, type MarketplaceFetchOptions, type MarketplaceHostClass, type MarketplaceManifest, MarketplaceNotFoundError, type MarketplaceOutputFormat, type MarketplaceOutputWritten, MarketplacePackOutputsError, type MarketplacePlugin, MarketplacePluginNotFoundError, type MarketplacePluginResolution, type MarketplaceProvenance, MarketplaceSource, type MarketplaceSourceInit, type MarketplaceSourceKind, MarketplaceUnsupportedSourceError, McpEnvBakeError, type MigrateMarketplaceYmlResult, type ObjectDependency, type OrgExecutables, OutdatedError, type OutdatedErrorCode, type OutdatedResult, type OutdatedRow, PLATFORM_TOKEN_ENV_NAMES, POLICY_DISCOVERY_PROVIDERS, POLICY_EXTENDS_MAX_DEPTH, POLICY_PROVIDER_GITHUB_OWNER_DOTGITHUB, POLICY_PROVIDER_LOCAL, PackError, type PackErrorCode, type PackageEntry, type ParseExecutableGrantsOptions, type ParseMarketplaceFilterResult, type ParsePolicyResult, type ParsedMarketplaceRef, type PluginJsonAuthor, type PluginJsonDocument, type PolicyCandidate, type PolicyDependencies, type PolicyDependencyInput, type PolicyDocument, type PolicyEnforcement, PolicyError, type PolicyErrorCode, type PolicyExecutables, type PolicyGateOptions, type PolicyGateResult, type PolicyStatusOptions, type PolicyStatusOutcome, type PolicyStatusReport, type PolicyStatusRuleCounts, type PolicyViolation, type PolicyWarning, type PrimitiveConflictDiagnostic, type PrimitiveSource, type PrimitiveType, PrimitivesError, type PrimitivesErrorCode, type ProviderHostClass, PruneError, type PruneErrorCode, type PruneResult, type PurgeInstallPathArgs, type RegistryAliasEntry, type RegistryAliasMap, type RegistryClient, type RegistryEntry, RegistryError, type RegistryErrorCode, type RegistryHttpRequest, type RegistryHttpResponse, type RegistryHttpTransport, type RegistryVersionInfo, type RequiredPackagePresenceDiagnostic, type RequiredPackageTrustOutcome, type ResolveAndLockOptions, type ResolveAndLockResult, type ResolveCredentialsOptions, type ResolveDependencyGraphOptions, type ResolveEffectiveFrozenOptions, type ResolveEffectiveOutputPathOptions, type ResolveExecutableTrustOptions, type ResolveGraphResult, type ResolveMarketplacePackagesOptions, type ResolveMarketplacePackagesResult, type ResolveMarketplacePluginOptions, type ResolvePorts, type ResolvePrimitiveConflictsOptions, type ResolvePrimitiveConflictsResult, type ResolvedCredentials, type ResolvedDeployedFile, type ResolvedMarketplaceToken, type ResolvedNode, type ResolvedPackage, ResolverError, type ResolverErrorCode, type ReverseIndex, type RunAuditCiOptions, type RunDepsOptions, type RunDoctorOptions, type RunInstallOptions, type RunOutdatedOptions, type RunPackOptions, type RunPackResult, type RunPruneOptions, type RunUninstallOptions, type RunUpdateOptions, SPDX_VERSION, SUPPORTED_FORMATS, SafeExtractError, type SameCredentialHostClassOptions, type SaveUserExecutableGrantsOptions, type SbomFormat, type SourceValidationResult, TARGET_ALIAS_TOKENS, type TagLister, type TargetIntegrationMap, type TreeSha256Violation, UninstallError, type UninstallErrorCode, type UninstallResult, UpdateError, type UpdateErrorCode, type UpdatePlanEntry, type UpdateResult, type UserExecutableGrants, type UserExecutableStoreOptions, VENDOR_TARGET_RE, type ValidationResult, type ViewError, type ViewIdentity, type ViewPackageOptions, type ViewPackageResult, WORKSPACE_OWNER_KEY, type WriteAgentPluginManifestOptions, type WriteLockfileOptions, type WriteManifestOptions, type WritePluginJsonOptions, type WriteProducerManifestOptions, type WriteProducerManifestResult, type WrittenAgentPluginManifest, _formatOrigin, abbreviateSha, addMarketplace, addMarketplacePackage, applyDeployedHashesToLock, applyMcpInventoryToLock, assertExperimentalRegistriesEnabled, assertPolicyGateAllows, assertSafeZipCentralDirectory, atomicWriteMarketplaceJson, auditCi, authHeadersForHost, authHeadersForResolved, authHostClassOf, autoDetectMarketplacePath, bakeMcpServerMaps, bakeMcpStringMap, bakeMcpStringValue, buildAliasCredentialClassMap, buildFindReverseIndex, buildGitChildEnv, buildHardenedGitEnv, buildMarketplaceOutputs, buildPluginJson, buildPublishArchive, buildPurl, buildRegistryPublishZip, buildReverseIndex, build_reverse_index, cacheClean, cacheInfo, cacheKeyForSource, checkAuthoringMarketplace, checkDoctor, checkExecutableTrust, checkMarketplaceAuthoring, checkOutdated, checkRelease, checkReleaseTag, checkSelfUpdate, classifyDeclaredLicense, classifyDependencyRef, classifyExecutableTrust, classifyMarketplaceHost, classifyMarketplaceHostKind, classifyProviderHostClass, classifyRequiredPackagePresence, cleanModulesCache, cleanupOrphanDeployedFiles, clearMarketplaceCache, collectAdoHosts, collectDeployedHashViolations, collectDeployedHashes, collectLocalSourcePaths, collectMcpServers, collectTreeSha256Violations, compareSelfUpdate, compileAgentsMd, compileProject, componentName, componentVersion, computeCanonicalTreeSha256, createAgentPluginManifest, createDefaultDownloader, createDefaultGitRemote, createDefaultTagLister, createFetchTransport, createGitChildEnv, createMarketplaceAuthoringTemplate, createMarketplaceManifest, createMarketplacePlugin, createMarketplaceSource, createMinimalManifest, createMinimalManifestDocument, createPackageRegistryClient, createPeelAwareTagLister, createPluginJson, createPluginJsonDocument, createPublishArchive, createRegistryClient, createRegistryHttpClient, credentialHostClass, credentialHostClassForHost, credentialHostClassOf, credentialHostClassesEqual, declaredTargetIds, declaredTargetIntegrationMap, defaultPolicyProviders, depsList, depsTree, depsWhy, describeSecretRefuse, detectAuthoringConfigSource, digestsEqual, discoverAgentPluginDeclaredPaths, discoverAgentPluginMcp, discoverAgentPluginSkills, discoverLocalPolicyPath, discoverLockfilePath, discoverManifestPath, discoverPolicyPath, discoverPolicyProviders, discoverPolicyWithProviders, discoverPrimitives, doctor, downloadPackages, downloadUrl, effectiveLocalPath, effectiveProviderClassForHost, emitAgentsMd, emitManifest, emitMarketplacePackOutputs, emitPluginJson, enforceFrozen, ensureBapmConfigDir, ensureLocalRootUntracked, ensureLocalSourcesUntracked, ensureMarketplacePathWithin, evaluateExecutableTrust, evaluateInstallPolicy, evaluateMcpExecutableTrust, evaluatePolicy, evaluatePolicyRules, evaluateRequireLockPresence, evaluateRequiredPackagePresence, evaluateRequiredPackagesFromLock, experimentalRegistriesRemediation, exportSbom, extractPack, extractPackArchive, fetchAndMaterializeRegistry, fetchLatestCliVersion, fetchMarketplace, fetchRedirectAuthDrop, fetchWithCredentialHostClassRedirects, fetchWithRedirectAuthDrop, findDeployedPath, findLatestAnnotatedTag, findOwnerLabel, findPath, formatAuditCiJson, formatAuditCiSarif, formatFindOrigin, formatFindOwnerLabel, formatOrigin, formatOwnerLabel, formatSourceOrigin, formatTreeSha256Violation, formatUnsupportedMessage, formatsEnabledInConfig, gateExecutableMcp, getBapmConfigDir, getCacheInfo, getMarketplace, getVersion, gitChildEnvForHost, githubApiBaseForHost, hasGrantSurface, hashFileAt, hashFileBytes, hostClassForCredentials, hostClassForPolicy, hostClassOf, hostsShareCredentialClass, identityToCacheDir, initMarketplaceAuthoring, installProject, isCiEnvTruthy, isExemptInsecureHost, isExperimentalRegistriesEnabled, isFullRevisionPin, isGitSourcedLockEntry, isPolicyDisabled, isSecretPackPath, isSemanticallyEquivalent, isUnlockedMarketplaceHost, isValidMarketplaceAuthoringSource, isValidPluginName, isValidProjectName, isValidTargetToken, listDeps, listGitRemotes, listMarketplaces, loadAgentPluginManifest, loadBaseManifest, loadEffectiveManifest, loadExecutableUserGrants, loadLockfile, loadLockfileOrNull, loadManifest, loadMarketplaceAuthoringConfig, loadMarketplaceFromBapmYml, loadMarketplaceFromLegacyYml, loadPolicy, loadUserExecutableGrants, loadUserExecutables, loadYamlDocument, localRootGitignorePattern, localView, locateGitPackageTree, lookup, lookupFindPath, lookupInIndex, lookupReverseIndex, marketplaceCacheDir, marketplaceKindFromHostClass, marketplacesJsonPath, materializeRegistryArchive, materializeRegistryNodes, mayAttachGitCredential, mergeLocalOverlay, mergePolicies, mergePolicy, mergePolicyChain, mergePolicyDocuments, migrateLegacyMarketplaceYml, migrateMarketplaceYml, modulesCacheInfo, modulesRegistryDest, normalizeFindPath, normalizeFormat, normalizeMarketplacePathOverrides, normalizeRepoIdentity, outdated, ownerLabel, packArchive, packProject, packPublishArchive, packageBasenameFromRepo, packageOwnerKey, parseExecutableGrants, parseLocalOverlayDocument, parseLockfile, parseLockfileDocument, parseManifest, parseManifestDocument, parseMarketplaceFilter, parseMarketplaceJson, parseMarketplaceRef, parsePackageId, parsePolicy, parsePolicyDocument, parseZipCentralDirectory, persistUserExecutableGrant, pickHighestInIntersection, pickHighestSatisfyingTag, pickRegistryVersion, pickTightestRange, policyHostClass, prune, pruneModules, purgeModulesInstallPaths, readMarketplaceCache, readUserExecutableGrants, redactPolicyRef, redirectSafeFetch, registryRepoUrl, removeMarketplace, removeMarketplacePackage, renderInitMarketplaceBlock, renderMarketplaceBlock, repoBasename, repoOwnerRepo, resolveAndLock, resolveAuthCredentialsForHost, resolveAuthTokenForHost, resolveAuthoringPackages, resolveConflicts, resolveCredentialsForHost, resolveDependencyGraph, resolveEffectiveFrozen, resolveEffectiveOutputPath, resolveExecutableTrust, resolveExtends, resolveHostClass, resolveHostCredentials, resolveLocalFilesystemPath, resolveMarketplaceOutputPath, resolveMarketplacePackPackages, resolveMarketplacePackages, resolveMarketplacePlugin, resolveMarketplaceTokenForHost, resolvePackageQuery, resolvePolicyChain, resolvePolicyExtends, resolvePrimitiveConflicts, resolveProjectRemote, resolveRegistryBaseUrl, resolveRegistryToken, resolveTokenForHost, resolveUserConfigRoot, rewriteDownloadBase, runAudit, runAuditCi, runCheckRelease, runCompile, runDepsList, runDepsTree, runDepsWhy, runDoctor, runFind, runFindPath, runInstall, runMarketplaceAuthoringCheck, runMarketplaceBuilder, runMarketplaceMigrate, runOutdated, runPack, runPolicyDiscovery, runPolicyGate, runPolicyStatus, runPrune, runSelfUpdateCheck, runUninstall, runUpdate, runView, safeExtractZip, safeResolveUnderCwd, sameCredentialHostClass, sanitizeCacheName, saveExecutableUserGrants, saveUserExecutableGrants, saveUserExecutables, scrubUrl, selectGitRemoteForPolicy, selectOutputFormats, selectProjectRemote, selectProviderClassForHost, serializeAgentPluginManifest, serializeLockfile, serializeManifest, serializeMarketplaceJson, serializePluginJson, serializeSbom, setMarketplacePackage, sha256Digest, sha256Hex, summarizeChecks, toLockRepoUrl, toStructuredReport, treeDeps, treeSha256Equal, tryLoadMarketplaceAuthoring, uninstall, uninstallPackages, unpackArchive, updateProject, urlNamesRemoteManifest, userConfigJsonPath, userGrantsToSurface, validateAgentPluginManifest, validateManifestEnv, validateMarketplace, validateMarketplaceAuthoringSource, validatePluginName, validateProjectName, verifyArchiveDigest, verifyDeployedFileHashes, viewLocalPackage, viewPackage, whyDeps, writeAgentPluginManifest, writeLockfile, writeManifest, writeManifestValidated, writeMarketplaceCache, writeMarketplacePackOutputs, writePluginJson, writePluginJsonFile, writeProducerManifest, writeUserExecutableGrants };
4621
+ export { AGENT_PLUGIN_MANIFEST_SCHEMA_V1, APM_LOCAL_MANIFEST_FILE, APM_LOCK_FILE, APM_MANIFEST_FILE, APM_MODULES_DIR, APM_PERSONAL_LOCK_FILE, APM_POLICY_FILE, type ActiveEntry, type AdmittedCopilotNativePlugin, type AgentPluginAuthor, type AgentPluginDeclaredPath, type AgentPluginDiagnostic, type AgentPluginManifest, type AgentPluginMcpServer, type AgentPluginSkill, AgentPluginsError, type AgentPluginsErrorCode, type AnnotatedTagCandidate, type ApplyMcpInventoryOptions, type AttributedPrimitive, type AuditCiCheck, type AuditCiCheckName, type AuditCiFormat, type AuditCiResult, type AuditCiStructuredReport, type AuditCiSummary, BAPM_IGNORE_FILE, BAPM_LOCAL_MANIFEST_FILE, BAPM_LOCK_FILE, BAPM_MANIFEST_FILE, BAPM_NAME, BAPM_PERSONAL_LOCK_FILE, BAPM_POLICY_FILE, type BakeMcpStringMapOptions, type BakeableMcpServer, type BapmDependency, type BapmIgnoreRules, type BapmManifest, type BinDeployConsentDecision, type BuildGitChildEnvOptions, type BuildMarketplaceOutputsOptions, type BuildMarketplaceOutputsResult, type BuildPublishArchiveOptions, type BuildPublishArchiveResult, CACHE_TTL_SECONDS, CANONICAL_TARGET_TOKENS, COPILOT_NATIVE_ENABLE_SUFFIX, COPILOT_NATIVE_LEDGER_REL, COPILOT_NATIVE_MARKETPLACE_ID, COPILOT_NATIVE_MARKETPLACE_REL, COPILOT_NATIVE_MODULES_PATH, COPILOT_NATIVE_SETTINGS_REL, CYCLONEDX_SPEC_VERSION, type CacheCleanOptions, type CacheCleanResult, type CacheInfoOptions, type CacheInfoResult, type CheckMarketplaceAuthoringResult, type CheckReleaseTagOptions, type CheckReleaseTagResult, type CheckSelfUpdateOptions, type CheckSelfUpdateResult, type CheckVersionAlignmentOptions, type ClassifiedDependency, type CollectMcpServersOptions, type CollectMcpServersResult, type CollectedMcpServer, type CompileAgentsMdOptions, type CompileAgentsMdResult, type CompileAttributionEntry, type CopilotNativeLedger, type CopilotNativeLedgerPlugin, CopilotNativeRegistrationError, type CopilotNativeRegistrationErrorCode, type CreateAgentPluginManifestOptions, type CreateMinimalManifestOptions, type CreatePluginJsonOptions, type CreateRegistryClientOptions, DEFAULT_LOCAL_ROOT, DEFAULT_PARALLEL_CHECKS, DEFAULT_PARALLEL_DOWNLOADS, DEFAULT_POLICY_PROVIDERS, DEPLOYED_HASH_ALGO, type DependencyEntry, type DependencyKind, type DependencyLists, type DeployedHashViolation, type DepsListResult, type DepsTreeResult, type DepsWhyError, type DepsWhyPackage, type DepsWhyPath, type DepsWhyPathNode, type DepsWhyResult, type DetectAuthoringConfigSourceResult, type DiscoverAgentPluginDeclaredPathsResult, type DiscoverAgentPluginMcpOptions, type DiscoverAgentPluginMcpResult, type DiscoverAgentPluginSkillsOptions, type DiscoverAgentPluginSkillsResult, type DiscoverLockfileOptions, type DiscoverManifestOptions, type DiscoverPolicyOptions, type DiscoverPrimitivesOptions, type DiscoveredLockfile, type DiscoveredManifest, type DiscoveredPolicy, type DoctorCheck, type DoctorResult, type DownloadArgs, type DownloadPackageSpec, type DownloadPackagesOptions, type Downloader, EXPERIMENTAL_REGISTRIES_ENV, type EditorResult, type EffectiveDirectDeps, type EnforceFrozenOptions, type EvaluateExecutableTrustOptions, type EvaluatePolicyOptions, type EvaluatePolicyResult, type EvaluateRequiredPackagePresenceOptions, type EvaluateRequiredPackagePresenceResult, type ExecutableGrantEntry, type ExecutableGrantSurface, type ExecutableTrustDecision, type ExecutableTrustOutcome, type ExportSbomFailure, type ExportSbomOptions, type ExportSbomResult, type ExportSbomSuccess, type ExtractPackArchiveOptions, type ExtractPackArchiveResult, FIXED_EPOCH_TIMESTAMP, FORMAT_CYCLONEDX, FORMAT_SPDX, type FakeTag, type FetchWithRedirectAuthDropInit, type FindPathOptions, type FindPathResult, type GitRemote, type GrantSurfaceInput, IMPLEMENTATION_DEFAULT_HOST, InstallError, type InstallErrorCode, type InstallOptions, type InstallResult, type InventoryDep, KIND_EXPRESSION, KIND_ID, KIND_NAMED, type LicenseClass, type LicenseKind, type LoadAgentPluginManifestOptions, type LoadLockfileOptions, type LoadLockfileResult, type LoadManifestOptions, type LoadManifestResult, type LoadMarketplaceResult, type LoadPolicyOptions, type LoadPolicyResult, type LoadedAgentPluginManifest, type LocalVersionRead, type LocalVersionStatus, type LockFilename, type LockedDependency, type LockfileDocument, LockfileError, type LockfileErrorCode, type LockfileInput, type LsRemoteFn, type LsRemoteResult, MARKETPLACE_PATHS, MAX_MARKETPLACE_JSON_BYTES, MAX_PLUGIN_JSON_BYTES, MAX_RESOLVE_DEPTH, MAX_SAFE_ENTRIES, MAX_SAFE_UNCOMPRESSED_BYTES, ManifestError, type ManifestErrorCode, type ManifestFilename, type ManifestPreset, type ManifestWarning, type MarketplaceAuthoringConfig, MarketplaceAuthoringError, type MarketplaceAuthoringVersioning, type MarketplaceConcreteDep, type MarketplaceConfigOptions, MarketplaceError, MarketplaceFetchError, type MarketplaceFetchOptions, type MarketplaceHostClass, type MarketplaceManifest, MarketplaceNotFoundError, type MarketplaceOutputFormat, type MarketplaceOutputWritten, MarketplacePackOutputsError, type MarketplacePlugin, MarketplacePluginNotFoundError, type MarketplacePluginResolution, type MarketplaceProvenance, MarketplaceSource, type MarketplaceSourceInit, type MarketplaceSourceKind, MarketplaceUnsupportedSourceError, type MarketplaceVersioningStrategy, McpEnvBakeError, type MigrateMarketplaceYmlResult, type ObjectDependency, type OrgExecutables, OutdatedError, type OutdatedErrorCode, type OutdatedResult, type OutdatedRow, PERSONAL_LOCK_SCOPE_KEY, PERSONAL_LOCK_SCOPE_VALUE, PLATFORM_TOKEN_ENV_NAMES, PLUGIN_JSON_CANDIDATES, POLICY_DISCOVERY_PROVIDERS, POLICY_EXTENDS_MAX_DEPTH, POLICY_PROVIDER_GITHUB_OWNER_DOTGITHUB, POLICY_PROVIDER_LOCAL, PackError, type PackErrorCode, type PackFileEntry, type PackageEntry, type PackageVersionRow, type ParseExecutableGrantsOptions, type ParseMarketplaceFilterResult, type ParsePolicyResult, type ParsedMarketplaceRef, type PluginJsonAuthor, type PluginJsonDocument, type PolicyCandidate, type PolicyDependencies, type PolicyDependencyInput, type PolicyDocument, type PolicyEnforcement, PolicyError, type PolicyErrorCode, type PolicyExecutables, type PolicyGateOptions, type PolicyGateResult, type PolicyStatusOptions, type PolicyStatusOutcome, type PolicyStatusReport, type PolicyStatusRuleCounts, type PolicyViolation, type PolicyWarning, type PrimitiveConflictDiagnostic, type PrimitiveSource, type PrimitiveType, PrimitivesError, type PrimitivesErrorCode, type ProviderHostClass, PruneError, type PruneErrorCode, type PruneResult, type PurgeInstallPathArgs, type RebuildCopilotNativeRegistrationOptions, type RegistryAliasEntry, type RegistryAliasMap, type RegistryClient, type RegistryEntry, RegistryError, type RegistryErrorCode, type RegistryHttpRequest, type RegistryHttpResponse, type RegistryHttpTransport, type RegistryVersionInfo, type RequiredPackagePresenceDiagnostic, type RequiredPackageTrustOutcome, type ResolveAndLockOptions, type ResolveAndLockResult, type ResolveBinDeployConsentOptions, type ResolveCredentialsOptions, type ResolveDependencyGraphOptions, type ResolveEffectiveFrozenOptions, type ResolveEffectiveOutputPathOptions, type ResolveExecutableTrustOptions, type ResolveGraphResult, type ResolveMarketplacePackagesOptions, type ResolveMarketplacePackagesResult, type ResolveMarketplacePluginOptions, type ResolvePorts, type ResolvePrimitiveConflictsOptions, type ResolvePrimitiveConflictsResult, type ResolvedActive, type ResolvedCredentials, type ResolvedDeployedFile, type ResolvedMarketplaceToken, type ResolvedNode, type ResolvedPackage, ResolverError, type ResolverErrorCode, type ReverseIndex, type RunAuditCiOptions, type RunDepsOptions, type RunDoctorOptions, type RunInstallOptions, type RunOutdatedOptions, type RunPackOptions, type RunPackResult, type RunPruneOptions, type RunUninstallOptions, type RunUpdateOptions, SPDX_VERSION, SUPPORTED_FORMATS, SafeExtractError, type SameCredentialHostClassOptions, type SaveUserExecutableGrantsOptions, type SbomFormat, type SourceValidationResult, type SyncCopilotNativeRegistrationOptions, TARGET_ALIAS_TOKENS, type TagLister, type TargetIntegrationMap, type TreeSha256Violation, type TrustBinMode, UninstallError, type UninstallErrorCode, type UninstallResult, UpdateError, type UpdateErrorCode, type UpdatePlanEntry, type UpdateResult, type UserExecutableGrants, type UserExecutableStoreOptions, VENDOR_TARGET_RE, type ValidationResult, type VersionAlignmentReport, type ViewError, type ViewIdentity, type ViewPackageOptions, type ViewPackageResult, WORKSPACE_OWNER_KEY, type WriteAgentPluginManifestOptions, type WriteLockfileOptions, type WriteManifestOptions, type WritePluginJsonOptions, type WriteProducerManifestOptions, type WriteProducerManifestResult, type WrittenAgentPluginManifest, _formatOrigin, abbreviateSha, addMarketplace, addMarketplacePackage, admitCopilotNativePlugins, applyDepSubsetFields, applyDeployedHashesToLock, applyMcpInventoryToLock, asciiLower, assertExperimentalRegistriesEnabled, assertPolicyGateAllows, assertProjectHasContent, assertSafeZipCentralDirectory, atomicWriteMarketplaceJson, auditCi, authHeadersForHost, authHeadersForResolved, authHostClassOf, autoDetectMarketplacePath, bakeMcpServerMaps, bakeMcpStringMap, bakeMcpStringValue, buildAliasCredentialClassMap, buildFindReverseIndex, buildGitChildEnv, buildHardenedGitEnv, buildMarketplaceOutputs, buildPluginJson, buildPublishArchive, buildPurl, buildRegistryPublishZip, buildReverseIndex, build_reverse_index, cacheClean, cacheInfo, cacheKeyForSource, checkAuthoringMarketplace, checkDoctor, checkExecutableTrust, checkMarketplaceAuthoring, checkMarketplaceVersionAlignment, checkOutdated, checkRelease, checkReleaseTag, checkSelfUpdate, checkVersionAlignment, checkVersions, classifyDeclaredLicense, classifyDependencyRef, classifyExecutableTrust, classifyMarketplaceHost, classifyMarketplaceHostKind, classifyProviderHostClass, classifyRequiredPackagePresence, cleanModulesCache, cleanupOrphanDeployedFiles, clearMarketplaceCache, collectAdoHosts, collectDeployedHashViolations, collectDeployedHashes, collectLocalSourcePaths, collectMcpServers, collectPackFiles, collectTreeSha256Violations, compareSelfUpdate, compileAgentsMd, compileProject, componentName, componentVersion, computeCanonicalTreeSha256, createAgentPluginManifest, createDefaultDownloader, createDefaultGitRemote, createDefaultTagLister, createFetchTransport, createGitChildEnv, createMarketplaceAuthoringTemplate, createMarketplaceManifest, createMarketplacePlugin, createMarketplaceSource, createMinimalManifest, createMinimalManifestDocument, createPackageRegistryClient, createPeelAwareTagLister, createPluginJson, createPluginJsonDocument, createPublishArchive, createRegistryClient, createRegistryHttpClient, credentialHostClass, credentialHostClassForHost, credentialHostClassOf, credentialHostClassesEqual, declaredTargetIds, declaredTargetIntegrationMap, defaultArchiveName, defaultPolicyProviders, depsList, depsTree, depsWhy, describeSecretRefuse, detectAuthoringConfigSource, digestsEqual, discoverAgentPluginDeclaredPaths, discoverAgentPluginMcp, discoverAgentPluginSkills, discoverLocalPolicyPath, discoverLockfilePath, discoverManifestPath, discoverPersonalLockfile, discoverPolicyPath, discoverPolicyProviders, discoverPolicyWithProviders, discoverPrimitives, doctor, downloadPackages, downloadUrl, effectiveDirectDeps, effectiveLocalPath, effectiveManifestDeps, effectiveProviderClassForHost, emitAgentsMd, emitManifest, emitMarketplacePackOutputs, emitPluginJson, enforceFrozen, ensureBapmConfigDir, ensureLocalRootUntracked, ensureLocalSourcesUntracked, ensureMarketplacePathWithin, ensurePersonalLockGitignored, entryIdentity, evaluateBinDeployConsent, evaluateExecutableTrust, evaluateInstallPolicy, evaluateMcpExecutableTrust, evaluatePolicy, evaluatePolicyRules, evaluateRequireLockPresence, evaluateRequiredPackagePresence, evaluateRequiredPackagesFromLock, expandActive, experimentalRegistriesRemediation, exportSbom, extractPack, extractPackArchive, fetchAndMaterializeRegistry, fetchLatestCliVersion, fetchMarketplace, fetchRedirectAuthDrop, fetchWithCredentialHostClassRedirects, fetchWithRedirectAuthDrop, filterPrimitivesForCopilotNative, findDeployedPath, findLatestAnnotatedTag, findOwnerLabel, findPath, findPluginJson, foldRepoCoordinatePath, formatAuditCiJson, formatAuditCiSarif, formatFindOrigin, formatFindOwnerLabel, formatOrigin, formatOwnerLabel, formatSourceOrigin, formatTreeSha256Violation, formatUnsupportedMessage, formatsEnabledInConfig, gateExecutableMcp, getBapmConfigDir, getCacheInfo, getMarketplace, getVersion, gitChildEnvForHost, githubApiBaseForHost, hasGrantSurface, hashFileAt, hashFileBytes, hostClassForCredentials, hostClassForPolicy, hostClassOf, hostsShareCredentialClass, identityMatchesPattern, identitySatisfiesRequire, identityToCacheDir, initMarketplaceAuthoring, installProject, isBapmIgnored, isBapmIgnoredDir, isCaseInsensitiveGitHost, isCaseInsensitivePackageIdentity, isCiEnvTruthy, isExemptInsecureHost, isExperimentalRegistriesEnabled, isFullRevisionPin, isGitShaped, isGitSourcedLockEntry, isPersonalScopeDependency, isPinnedConstraint, isPolicyDisabled, isRegistrySourced, isSecretPackPath, isSemanticallyEquivalent, isUnlockedMarketplaceHost, isValidMarketplaceAuthoringSource, isValidPluginName, isValidProjectName, isValidTargetToken, listDeps, listGitRemotes, listMarketplaces, loadAgentPluginManifest, loadBapmIgnore, loadBaseManifest, loadEffectiveLockfile, loadEffectiveLockfileOrNull, loadEffectiveManifest, loadExecutableUserGrants, loadPersonalLockfileOrNull as loadLocalLockfileOrNull, loadPersonalLockfileOrNull, loadLockfile, loadLockfileMerged, loadLockfileOrNull, loadManifest, loadMarketplaceAuthoringConfig, loadMarketplaceFromBapmYml, loadMarketplaceFromLegacyYml, loadMergedLockfile, loadPolicy, loadUserExecutableGrants, loadUserExecutables, loadYamlDocument, localRootGitignorePattern, localView, locateGitPackageTree, lookup, lookupFindPath, lookupInIndex, lookupReverseIndex, marketplaceCacheDir, marketplaceKindFromHostClass, marketplacesJsonPath, materializeRegistryArchive, materializeRegistryNodes, mayAttachGitCredential, mergeApmDependencyUpdate, mergeLoadLockfile, mergeLocalOverlay, mergeLockDocuments, mergeLockDocuments as mergeLockfileDocuments, mergeLockDocuments as mergeLockfiles, mergePolicies, mergePolicy, mergePolicyChain, mergePolicyDocuments, migrateLegacyMarketplaceYml, migrateMarketplaceYml, modulesCacheInfo, modulesRegistryDest, normalizeFindPath, normalizeFormat, normalizeLockPackageRepoUrl, normalizeMarketplacePathOverrides, normalizePackageRepoPath, normalizePackageRepoUrl, normalizeRepoIdentity, normalizeTrustBin, outdated, ownerLabel, packArchive, packProject, packPublishArchive, packageBasenameFromRepo, packageOwnerKey, parseActiveField, parseDepSkillSubset, parseDepTargetSubset, parseExecutableGrants, parseLocalOverlayDocument, parseLockfile, parseLockfileDocument, parseManifest, parseManifestDocument, parseMarketplaceFilter, parseMarketplaceJson, parseMarketplaceRef, parsePackageId, parsePolicy, parsePolicyDocument, parsePresetsField, parseZipCentralDirectory, partitionAndWrite, partitionAndWriteLockfiles, partitionLockDocument, persistUserExecutableGrant, pickHighestInIntersection, pickHighestSatisfyingTag, pickRegistryVersion, pickTightestRange, policyHostClass, prune, pruneModules, purgeModulesInstallPaths, readLocalVersion, readMarketplaceCache, readUserExecutableGrants, rebuildCopilotNativeRegistration, rebuildCopilotNativeRegistrationFromNodes, redactPolicyRef, redirectSafeFetch, registryOrPackageIdentity, registryRepoUrl, removeMarketplace, removeMarketplacePackage, renderInitMarketplaceBlock, renderMarketplaceBlock, renderTag, repoBasename, repoOwnerRepo, resolveActive, resolveActiveSelection, resolveAndLock, resolveAuthCredentialsForHost, resolveAuthTokenForHost, resolveAuthoringPackages, resolveBinDeployConsent, resolveConflicts, resolveCredentialsForHost, resolveDependencyGraph, resolveEffectiveBinDeploy, resolveEffectiveFrozen, resolveEffectiveOutputPath, resolveExecutableTrust, resolveExtends, resolveHostClass, resolveHostCredentials, resolveIsInteractive, resolveLocalFilesystemPath, resolveManifestActive, resolveMarketplaceOutputPath, resolveMarketplacePackPackages, resolveMarketplacePackages, resolveMarketplacePlugin, resolveMarketplaceTokenForHost, resolvePackageQuery, resolvePolicyChain, resolvePolicyExtends, resolvePrimitiveConflicts, resolveProjectRemote, resolveRegistryBaseUrl, resolveRegistryToken, resolveTokenForHost, resolveUserConfigRoot, rewriteDownloadBase, runAudit, runAuditCi, runCheckRelease, runCompile, runDepsList, runDepsTree, runDepsWhy, runDoctor, runFind, runFindPath, runInstall, runMarketplaceAuthoringCheck, runMarketplaceBuilder, runMarketplaceMigrate, runOutdated, runPack, runPolicyDiscovery, runPolicyGate, runPolicyStatus, runPrune, runSelfUpdateCheck, runUninstall, runUpdate, runVersionAlignmentCheck, runView, safeExtractZip, safeResolveUnderCwd, sameCredentialHostClass, sanitizeCacheName, saveExecutableUserGrants, saveUserExecutableGrants, saveUserExecutables, scrubUrl, selectGitRemoteForPolicy, selectOutputFormats, selectProjectRemote, selectProviderClassForHost, serializeAgentPluginManifest, serializeLockfile, serializeManifest, serializeMarketplaceJson, serializePluginJson, serializeSbom, setMarketplacePackage, sha256Digest, sha256Hex, stampPersonalScope, summarizeChecks, syncCopilotNativeRegistrationFromLock, toLockRepoUrl, toStructuredReport, treeDeps, treeSha256Equal, tryLoadMarketplaceAuthoring, uninstall, uninstallPackages, unionPresetDependencies, unpackArchive, updateProject, urlNamesRemoteManifest, userConfigJsonPath, userGrantsToSurface, validateAgentPluginManifest, validateManifestEnv, validateMarketplace, validateMarketplaceAuthoringSource, validatePluginName, validateProjectName, verifyArchiveDigest, verifyDeployedFileHashes, versionAlignmentErrorMessages, viewLocalPackage, viewPackage, whyDeps, withEffectiveDirectDeps, writeAgentPluginManifest, writeLockfile, writeManifest, writeManifestValidated, writeMarketplaceCache, writeMarketplacePackOutputs, writePluginJson, writePluginJsonFile, writeProducerManifest, writeUserExecutableGrants };