@unbrained/pm-cli 2026.8.12 → 2026.8.14
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 +162 -111
- package/dist/cli/error-guidance.js +4 -8
- package/dist/cli/main.js +40 -3
- package/dist/cli/register-assurance.js +28 -17
- package/dist/cli-bundle/bundle-manifest.json +141 -173
- package/dist/cli-bundle/chunks/chunk-BBOFSVAK.js +197 -0
- package/dist/cli-bundle/chunks/chunk-BFALV3YP.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-WLAHPSOX.js → chunk-FIW4P64F.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BM5YJ2UW.js → chunk-G5JUB66K.js} +52 -52
- package/dist/cli-bundle/chunks/chunk-SBRKH6OR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TMJ7URWS.js +13 -0
- package/dist/cli-bundle/chunks/chunk-TXMEUUUY.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-KOQMGCTA.js → chunk-XAVMOK6B.js} +50 -50
- package/dist/cli-bundle/chunks/chunk-YAMTJL6Y.js +34 -0
- package/dist/cli-bundle/chunks/chunk-YSVSMJ2B.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-XPCJRUUD.js → register-list-query-T3EHHNNV.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4RJCBKRS.js → register-mutation-E27WCLSZ.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-4R6I7CPY.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-LLHAKP2V.js → register-setup-3YXZ444E.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JAFRIWVF.js → chunk-4DQ2YERC.js} +4 -4
- package/dist/cli-bundle/focused-chunks/chunk-F43TT2QQ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-K7RWWOAG.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-KFSZ3BP6.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-KHM2CS2C.js → chunk-KSEDUWVZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KYUQGTSB.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZMGWAYH7.js → chunk-LZ4MV3RH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-PGXJQLCT.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RWPAWUOT.js → chunk-PPFGQDSI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q4YY3XNF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QK753U3U.js +46 -0
- package/dist/cli-bundle/focused-chunks/chunk-QUMB2J27.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SM7MTG27.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GQW4BPUT.js → chunk-WCVE2NIG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XDNAW5OI.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YIAXMC3T.js → chunk-YOOI3UZX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZM6TZVHC.js +2 -0
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +45 -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 +109 -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/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.d.ts +6 -0
- package/dist/core/history/drift-scan.js +76 -58
- package/dist/core/history/workspace-history.d.ts +59 -0
- package/dist/core/history/workspace-history.js +197 -10
- package/dist/core/lock/lock-gc.js +8 -13
- package/dist/core/lock/lock.js +5 -4
- package/dist/core/output/output.js +12 -4
- package/dist/core/search/vector-stores.js +6 -11
- package/dist/core/store/item-metadata-cache.js +4 -4
- 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-contracts/completeness.js +9 -3
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +6 -3
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +6 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +155 -60
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +32 -0
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +25 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +35 -5
- package/dist/sdk/cli-contracts/tool-schema.js +17 -2
- package/dist/sdk/cli-program.js +3 -3
- package/dist/sdk/comments.js +4 -3
- package/dist/sdk/compile-cache.js +4 -3
- package/dist/sdk/compose.d.ts +3 -1
- package/dist/sdk/compose.js +16 -2
- package/dist/sdk/context-relevance.js +12 -4
- package/dist/sdk/context-signal-store.js +4 -3
- 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.js +14 -2
- package/dist/sdk/governance/assurance-action.d.ts +27 -3
- package/dist/sdk/governance/assurance-action.js +112 -28
- package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
- package/dist/sdk/governance/assurance-mutation-error.js +25 -2
- 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 +109 -8
- package/dist/sdk/governance/assurance.d.ts +39 -0
- package/dist/sdk/governance/assurance.js +145 -6
- package/dist/sdk/governance/gc.js +5 -11
- package/dist/sdk/governance/health.js +18 -6
- package/dist/sdk/governance/validate-history-drift.d.ts +7 -0
- package/dist/sdk/governance/validate-history-drift.js +68 -0
- package/dist/sdk/governance/validate.js +6 -48
- package/dist/sdk/graph/assembly.d.ts +23 -0
- package/dist/sdk/graph/assembly.js +54 -2
- package/dist/sdk/graph/durable-cache.js +91 -3
- package/dist/sdk/graph/governance-contracts.d.ts +12 -0
- package/dist/sdk/graph/governance-contracts.js +29 -0
- package/dist/sdk/graph/governance.d.ts +51 -3
- package/dist/sdk/graph/governance.js +216 -35
- package/dist/sdk/graph/index.d.ts +2 -2
- package/dist/sdk/graph/index.js +4 -4
- package/dist/sdk/graph/mutation-advisory.js +15 -7
- package/dist/sdk/graph/remediation.js +12 -2
- package/dist/sdk/guide.js +4 -4
- package/dist/sdk/history-read.d.ts +8 -0
- package/dist/sdk/history-read.js +2 -2
- package/dist/sdk/index.d.ts +3 -2
- package/dist/sdk/index.js +5 -4
- package/dist/sdk/linked-artifacts.d.ts +2 -0
- package/dist/sdk/linked-artifacts.js +29 -4
- package/dist/sdk/merge/install.js +5 -4
- package/dist/sdk/query/activity.js +4 -3
- package/dist/sdk/query/history.js +20 -3
- package/dist/sdk/read-output-budget.d.ts +2 -0
- package/dist/sdk/read-output-budget.js +12 -5
- package/dist/sdk/read-output-contracts.d.ts +61 -5
- package/dist/sdk/read-output-contracts.js +210 -28
- package/dist/sdk/read-output-rows.d.ts +11 -0
- package/dist/sdk/read-output-rows.js +47 -2
- package/dist/sdk/relationship-history.js +5 -5
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.js +5 -3
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/test/execution.js +4 -4
- 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/docs/ASSURANCE.md +163 -3
- package/docs/COMMANDS.md +31 -2
- package/docs/CONFIGURATION.md +2 -0
- package/docs/EXTENSIONS.md +11 -12
- package/docs/READ_OUTPUT_CONTRACTS.md +44 -8
- package/docs/RELATIONSHIP_GRAPH.md +34 -4
- package/docs/SDK.md +29 -8
- package/docs/SDK_CONTEXT_INTEGRITY.md +32 -1
- package/docs/TESTING.md +47 -16
- package/docs/performance/sdk-entrypoint-import-costs.md +20 -13
- package/marketplace.json +2 -2
- package/package.json +6 -6
- package/packages/pm-beads/extensions/beads/index.ts +1 -0
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +1 -0
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/extensions/digital-twin/index.ts +7 -0
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +4 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +5 -0
- 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/extensions/linked-test-adapters/index.ts +6 -0
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -0
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +4 -0
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +2 -0
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/extensions/vcs/index.ts +7 -0
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +17 -4
- package/sdk/public-surface.json +390 -60
- package/dist/cli-bundle/chunks/chunk-3PS7X6GS.js +0 -8
- package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +0 -13
- package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +0 -33
- package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +0 -196
- package/dist/cli-bundle/chunks/chunk-R76342NV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-VLUQOIDT.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ECADZMVC.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KPSXVBDV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KTLOKKCQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-NBLUKITQ.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-NYLOUPOB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q4T463SD.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +0 -17
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* section headings so a deep title never emits an invalid `#######` run.
|
|
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]="48c3e62a-8085-5215-a692-4c03792022ce")}catch(e){}}();
|
|
8
8
|
const MIN_HEADING_LEVEL = 1;
|
|
9
9
|
const MAX_HEADING_LEVEL = 6;
|
|
10
10
|
/**
|
|
@@ -28,6 +28,7 @@ const SURFACE_SECTIONS = [
|
|
|
28
28
|
["exporters", "Exporters"],
|
|
29
29
|
["search_providers", "Search providers"],
|
|
30
30
|
["vector_store_adapters", "Vector store adapters"],
|
|
31
|
+
["assurance_providers", "Assurance measurement providers"],
|
|
31
32
|
["hooks", "Lifecycle hooks"],
|
|
32
33
|
["parser_overrides", "Parser overrides"],
|
|
33
34
|
["service_overrides", "Service overrides"],
|
|
@@ -127,7 +128,7 @@ export function renderExtensionSurfaceMarkdown(summary, options = {}) {
|
|
|
127
128
|
lines.push(renderCapabilitiesLine(summary.capabilities), "");
|
|
128
129
|
}
|
|
129
130
|
for (const [field, heading] of SURFACE_SECTIONS) {
|
|
130
|
-
const entries = summary[field];
|
|
131
|
+
const entries = summary[field] ?? [];
|
|
131
132
|
if (entries.length === 0 && !includeEmpty) {
|
|
132
133
|
continue;
|
|
133
134
|
}
|
|
@@ -135,11 +136,11 @@ export function renderExtensionSurfaceMarkdown(summary, options = {}) {
|
|
|
135
136
|
}
|
|
136
137
|
lines.push(...renderPreflightSection(summary.preflight_overrides, sectionLevel, includeEmpty));
|
|
137
138
|
const hasAnySurface = summary.preflight_overrides > 0 ||
|
|
138
|
-
SURFACE_SECTIONS.some(([field]) => summary[field]
|
|
139
|
+
SURFACE_SECTIONS.some(([field]) => (summary[field]?.length ?? 0) > 0);
|
|
139
140
|
if (!hasAnySurface && !includeEmpty) {
|
|
140
141
|
lines.push("_This extension registers no surfaces._", "");
|
|
141
142
|
}
|
|
142
143
|
return `${lines.join("\n").trimEnd()}\n`;
|
|
143
144
|
}
|
|
144
145
|
//# sourceMappingURL=activation-summary-markdown.js.map
|
|
145
|
-
//# debugId=
|
|
146
|
+
//# debugId=48c3e62a-8085-5215-a692-4c03792022ce
|
|
@@ -74,6 +74,8 @@ export interface ExtensionActivationSummary {
|
|
|
74
74
|
search_providers: string[];
|
|
75
75
|
/** Vector-store adapter names registered via `registerVectorStoreAdapter`. */
|
|
76
76
|
vector_store_adapters: string[];
|
|
77
|
+
/** Assurance provider ids registered via `registerAssuranceMeasurementProvider`. */
|
|
78
|
+
assurance_providers?: string[];
|
|
77
79
|
/** Command paths with a parser override registered via `registerParser`. */
|
|
78
80
|
parser_overrides: string[];
|
|
79
81
|
/** Built-in service names overridden via `registerService`. */
|
|
@@ -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]="2c514907-377f-59f9-bfdd-a184abf7ffb7")}catch(e){}}();
|
|
3
3
|
import { collectUsedExtensionCapabilities, normalizeExtensionName, } from "./capability-usage.js";
|
|
4
4
|
/**
|
|
5
5
|
* Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}
|
|
@@ -52,6 +52,7 @@ export function describeExtensionActivation(activation, options = {}) {
|
|
|
52
52
|
result_discriminator: entry.resultDiscriminator !== undefined,
|
|
53
53
|
}))
|
|
54
54
|
.sort((left, right) => left.format.localeCompare(right.format));
|
|
55
|
+
const assuranceProviders = collect(registrations.assurance_providers ?? [], (entry) => entry.definition.id);
|
|
55
56
|
return {
|
|
56
57
|
capabilities: collectUsedExtensionCapabilities(activation, options),
|
|
57
58
|
commands: collect(registrations.commands, (entry) => entry.command),
|
|
@@ -70,6 +71,9 @@ export function describeExtensionActivation(activation, options = {}) {
|
|
|
70
71
|
exporters: collect(registrations.exporters, (entry) => entry.exporter),
|
|
71
72
|
search_providers: collect(registrations.search_providers, (entry) => entry.definition.name),
|
|
72
73
|
vector_store_adapters: collect(registrations.vector_store_adapters, (entry) => entry.definition.name),
|
|
74
|
+
...(assuranceProviders.length > 0
|
|
75
|
+
? { assurance_providers: assuranceProviders }
|
|
76
|
+
: {}),
|
|
73
77
|
parser_overrides: collect(parsers.overrides, (entry) => entry.command),
|
|
74
78
|
service_overrides: collect(services.overrides, (entry) => entry.service),
|
|
75
79
|
renderer_overrides: collect(renderers.overrides, (entry) => entry.format),
|
|
@@ -86,4 +90,4 @@ function sortUnique(values) {
|
|
|
86
90
|
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
87
91
|
}
|
|
88
92
|
//# sourceMappingURL=activation-summary.js.map
|
|
89
|
-
//# debugId=
|
|
93
|
+
//# debugId=2c514907-377f-59f9-bfdd-a184abf7ffb7
|
|
@@ -31,7 +31,7 @@ export declare const EXTENSION_CAPABILITY_REGISTRATION_SURFACES: {
|
|
|
31
31
|
readonly search: readonly ["registerSearchProvider", "registerVectorStoreAdapter"];
|
|
32
32
|
readonly parser: readonly ["registerParser"];
|
|
33
33
|
readonly preflight: readonly ["registerPreflight"];
|
|
34
|
-
readonly services: readonly ["registerService"];
|
|
34
|
+
readonly services: readonly ["registerService", "registerAssuranceMeasurementProvider"];
|
|
35
35
|
};
|
|
36
36
|
/** Per-extension reconciliation of declared versus exercised capabilities. */
|
|
37
37
|
export interface ExtensionCapabilityUsageReconciliation {
|
|
@@ -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]="a35f3cdc-810e-59bd-8408-03ce792db57f")}catch(e){}}();
|
|
3
3
|
import { normalizeKnownExtensionCapability } from "./extension-capability-aliases.js";
|
|
4
4
|
/**
|
|
5
5
|
* Canonical map from each known extension capability to the human-readable
|
|
@@ -33,7 +33,7 @@ export const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {
|
|
|
33
33
|
search: ["registerSearchProvider", "registerVectorStoreAdapter"],
|
|
34
34
|
parser: ["registerParser"],
|
|
35
35
|
preflight: ["registerPreflight"],
|
|
36
|
-
services: ["registerService"],
|
|
36
|
+
services: ["registerService", "registerAssuranceMeasurementProvider"],
|
|
37
37
|
};
|
|
38
38
|
// `layer` is a closed enum (`"global" | "project"`) that never contains a
|
|
39
39
|
// colon, so the first colon always separates the layer from the (possibly
|
|
@@ -103,6 +103,7 @@ function attributeCapabilityUsage(activation) {
|
|
|
103
103
|
record(parsers.overrides, "parser");
|
|
104
104
|
record(preflight.overrides, "preflight");
|
|
105
105
|
record(services.overrides, "services");
|
|
106
|
+
record(registrations.assurance_providers ?? [], "services");
|
|
106
107
|
record(renderers.overrides, "renderers");
|
|
107
108
|
record(hooks.beforeCommand, "hooks");
|
|
108
109
|
record(hooks.beforeMutation, "hooks");
|
|
@@ -170,4 +171,4 @@ export function reconcileExtensionCapabilityUsage(loaded, activation) {
|
|
|
170
171
|
return reconciliations;
|
|
171
172
|
}
|
|
172
173
|
//# sourceMappingURL=capability-usage.js.map
|
|
173
|
-
//# debugId=
|
|
174
|
+
//# debugId=a35f3cdc-810e-59bd-8408-03ce792db57f
|
|
@@ -17,6 +17,7 @@ export declare function createExtensionContributionInventory(summary: {
|
|
|
17
17
|
exporters: string[];
|
|
18
18
|
search_providers: string[];
|
|
19
19
|
vector_store_adapters: string[];
|
|
20
|
+
assurance_providers?: string[];
|
|
20
21
|
parser_overrides: string[];
|
|
21
22
|
service_overrides: string[];
|
|
22
23
|
renderer_overrides: string[];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Validates and canonicalizes the serializable extension surface inventory.
|
|
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]="f7c79f37-1cae-59c9-b500-eb87d0089f94")}catch(e){}}();
|
|
8
8
|
import { normalizeCommandName } from "./extension-runtime-helpers.js";
|
|
9
9
|
const COMMAND_PATH_FIELDS = new Set([
|
|
10
10
|
"commands",
|
|
@@ -28,6 +28,7 @@ const STRING_LIST_FIELDS = [
|
|
|
28
28
|
"exporters",
|
|
29
29
|
"search_providers",
|
|
30
30
|
"vector_store_adapters",
|
|
31
|
+
"assurance_providers",
|
|
31
32
|
"parser_overrides",
|
|
32
33
|
"service_overrides",
|
|
33
34
|
"renderer_overrides",
|
|
@@ -154,6 +155,9 @@ export function createExtensionContributionInventory(summary) {
|
|
|
154
155
|
exporters: summary.exporters,
|
|
155
156
|
search_providers: summary.search_providers,
|
|
156
157
|
vector_store_adapters: summary.vector_store_adapters,
|
|
158
|
+
...(summary.assurance_providers
|
|
159
|
+
? { assurance_providers: summary.assurance_providers }
|
|
160
|
+
: {}),
|
|
157
161
|
parser_overrides: summary.parser_overrides,
|
|
158
162
|
service_overrides: summary.service_overrides,
|
|
159
163
|
renderer_overrides: summary.renderer_overrides,
|
|
@@ -167,4 +171,4 @@ export function createExtensionContributionInventory(summary) {
|
|
|
167
171
|
};
|
|
168
172
|
}
|
|
169
173
|
//# sourceMappingURL=contribution-inventory.js.map
|
|
170
|
-
//# debugId=
|
|
174
|
+
//# debugId=f7c79f37-1cae-59c9-b500-eb87d0089f94
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Implements create empty extension hook registry for the public runtime surface of this module. */
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="48fff41d-2667-50a1-bfbb-40908804babd")}catch(e){}}();
|
|
4
4
|
export function createEmptyExtensionHookRegistry() {
|
|
5
5
|
return {
|
|
6
6
|
beforeCommand: [],
|
|
@@ -56,7 +56,8 @@ export function createEmptyExtensionRegistrationRegistry() {
|
|
|
56
56
|
exporters: [],
|
|
57
57
|
search_providers: [],
|
|
58
58
|
vector_store_adapters: [],
|
|
59
|
+
assurance_providers: [],
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
//# sourceMappingURL=extension-registries.js.map
|
|
62
|
-
//# debugId=
|
|
63
|
+
//# debugId=48fff41d-2667-50a1-bfbb-40908804babd
|
|
@@ -55,7 +55,7 @@ export interface PmMaxVersionExceededModeByLayer {
|
|
|
55
55
|
/** Settings value for `extensions.policy.pm_max_version_exceeded_mode`: either a single mode applied to both layers, or a per-layer override map. Unset (and any unset layer key) defaults to `"block"`. */
|
|
56
56
|
export type PmMaxVersionExceededModeSetting = PmMaxVersionExceededMode | PmMaxVersionExceededModeByLayer;
|
|
57
57
|
/** Public contract for known extension policy surfaces, shared by SDK and presentation-layer consumers. */
|
|
58
|
-
export declare const KNOWN_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"];
|
|
58
|
+
export declare const KNOWN_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"];
|
|
59
59
|
/** Restricts extension policy surface values accepted by command, SDK, and storage contracts. */
|
|
60
60
|
export type ExtensionPolicySurface = (typeof KNOWN_EXTENSION_POLICY_SURFACES)[number];
|
|
61
61
|
/** Public contract for known extension service names, shared by SDK and presentation-layer consumers. */
|
|
@@ -145,6 +145,8 @@ export interface ExtensionContributionInventory {
|
|
|
145
145
|
search_providers?: string[];
|
|
146
146
|
/** Declared vector-store adapter names. */
|
|
147
147
|
vector_store_adapters?: string[];
|
|
148
|
+
/** Declared assurance measurement-provider ids. */
|
|
149
|
+
assurance_providers?: string[];
|
|
148
150
|
/** Parser override command targets. */
|
|
149
151
|
parser_overrides?: string[];
|
|
150
152
|
/** Service override targets. */
|
|
@@ -1039,6 +1041,65 @@ export interface VectorStoreAdapterDefinition {
|
|
|
1039
1041
|
delete?: (context: VectorStoreDeleteContext) => unknown | Promise<unknown>;
|
|
1040
1042
|
[key: string]: unknown;
|
|
1041
1043
|
}
|
|
1044
|
+
/** Cost classes let lifecycle gates reject expensive provider work before invoking it. */
|
|
1045
|
+
export type AssuranceMeasurementProviderCostClass = "low" | "medium" | "high";
|
|
1046
|
+
/** JSON-compatible parameter contract for one provider measurement key. */
|
|
1047
|
+
export interface AssuranceMeasurementProviderParameterDefinition {
|
|
1048
|
+
/** Parameter value kind. */
|
|
1049
|
+
type: "string" | "number" | "boolean";
|
|
1050
|
+
/** Whether callers must supply the parameter. */
|
|
1051
|
+
required?: boolean;
|
|
1052
|
+
/** Human-readable parameter intent. */
|
|
1053
|
+
description?: string;
|
|
1054
|
+
}
|
|
1055
|
+
/** Serializable schema for one measurement key owned by a provider. */
|
|
1056
|
+
export interface AssuranceMeasurementProviderKeyDefinition {
|
|
1057
|
+
/** Value kind returned by the resolver. */
|
|
1058
|
+
value_type: "number" | "string_set";
|
|
1059
|
+
/** Human-readable metric intent. */
|
|
1060
|
+
description?: string;
|
|
1061
|
+
/** Accepted provider parameters. Unknown parameters are rejected. */
|
|
1062
|
+
parameters?: Record<string, AssuranceMeasurementProviderParameterDefinition>;
|
|
1063
|
+
}
|
|
1064
|
+
/** Runtime request supplied to an extension-owned assurance provider. */
|
|
1065
|
+
export interface AssuranceMeasurementProviderContext extends PortableWorkspaceContext {
|
|
1066
|
+
/** Provider id selected by the measurement declaration. */
|
|
1067
|
+
provider: string;
|
|
1068
|
+
/** Provider-owned metric key. */
|
|
1069
|
+
key: string;
|
|
1070
|
+
/** Validated provider parameters. */
|
|
1071
|
+
parameters: Record<string, string | number | boolean | null>;
|
|
1072
|
+
/** Gate trigger that authorized this invocation. */
|
|
1073
|
+
trigger: string;
|
|
1074
|
+
/** Tracker root bound to the active command or SDK request. */
|
|
1075
|
+
pm_root: string;
|
|
1076
|
+
}
|
|
1077
|
+
/** Result returned by an extension-owned assurance provider. */
|
|
1078
|
+
export interface AssuranceMeasurementProviderResult {
|
|
1079
|
+
/** Finite numeric value or deterministic labelled set. */
|
|
1080
|
+
value: number | string[];
|
|
1081
|
+
/** Population denominator represented by the metric. */
|
|
1082
|
+
population_size: number;
|
|
1083
|
+
/** Abstract compute units charged by the provider. */
|
|
1084
|
+
cost: number;
|
|
1085
|
+
/** Optional stable contributor ids or labels. */
|
|
1086
|
+
contributors?: string[];
|
|
1087
|
+
}
|
|
1088
|
+
/** Extension registration for an open assurance measurement vocabulary. */
|
|
1089
|
+
export interface AssuranceMeasurementProviderDefinition {
|
|
1090
|
+
/** Stable provider id used by measurement declarations and gate allow-lists. */
|
|
1091
|
+
id: string;
|
|
1092
|
+
/** Serializable metric-key schema. */
|
|
1093
|
+
keys: Record<string, AssuranceMeasurementProviderKeyDefinition>;
|
|
1094
|
+
/** Coarse execution cost used by trigger policy before invocation. */
|
|
1095
|
+
cost_class: AssuranceMeasurementProviderCostClass;
|
|
1096
|
+
/** Whether the resolver can access the network. */
|
|
1097
|
+
network: boolean;
|
|
1098
|
+
/** Maximum host wait for one resolver call. */
|
|
1099
|
+
timeout_ms?: number;
|
|
1100
|
+
/** Resolve one declared key. */
|
|
1101
|
+
resolve(context: AssuranceMeasurementProviderContext): AssuranceMeasurementProviderResult | Promise<AssuranceMeasurementProviderResult>;
|
|
1102
|
+
}
|
|
1042
1103
|
/** Documents the registered extension command override payload exchanged by command, SDK, and package integrations. */
|
|
1043
1104
|
export interface RegisteredExtensionCommandOverride {
|
|
1044
1105
|
/** Value that configures or reports layer for this contract. */
|
|
@@ -1250,6 +1311,21 @@ export interface RegisteredExtensionVectorStoreAdapter {
|
|
|
1250
1311
|
/** Value that configures or reports runtime definition for this contract. */
|
|
1251
1312
|
runtime_definition: VectorStoreAdapterDefinition;
|
|
1252
1313
|
}
|
|
1314
|
+
/** One validated assurance measurement provider registered by an active extension. */
|
|
1315
|
+
export interface RegisteredExtensionAssuranceMeasurementProvider {
|
|
1316
|
+
/** Extension layer owning the provider. */
|
|
1317
|
+
layer: ExtensionLayer;
|
|
1318
|
+
/** Extension name owning the provider. */
|
|
1319
|
+
name: string;
|
|
1320
|
+
/** Whether the owning manifest grants network access. */
|
|
1321
|
+
network_permission: boolean;
|
|
1322
|
+
/** Serializable definition used by doctor, inventory, and policy surfaces. */
|
|
1323
|
+
definition: Omit<AssuranceMeasurementProviderDefinition, "resolve"> & {
|
|
1324
|
+
resolve: "[Function]";
|
|
1325
|
+
};
|
|
1326
|
+
/** Runtime definition containing the executable resolver. */
|
|
1327
|
+
runtime_definition: AssuranceMeasurementProviderDefinition;
|
|
1328
|
+
}
|
|
1253
1329
|
/**
|
|
1254
1330
|
* Documents a project profile contributed by an extension via
|
|
1255
1331
|
* `api.registerProfile(profile)`.
|
|
@@ -1293,6 +1369,8 @@ export interface ExtensionRegistrationRegistry {
|
|
|
1293
1369
|
search_providers: RegisteredExtensionSearchProvider[];
|
|
1294
1370
|
/** Value that configures or reports vector store adapters for this contract. */
|
|
1295
1371
|
vector_store_adapters: RegisteredExtensionVectorStoreAdapter[];
|
|
1372
|
+
/** Extension-owned assurance measurement providers. */
|
|
1373
|
+
assurance_providers: RegisteredExtensionAssuranceMeasurementProvider[];
|
|
1296
1374
|
}
|
|
1297
1375
|
/** Documents the extension registration counts payload exchanged by command, SDK, and package integrations. */
|
|
1298
1376
|
export interface ExtensionRegistrationCounts {
|
|
@@ -1318,6 +1396,8 @@ export interface ExtensionRegistrationCounts {
|
|
|
1318
1396
|
search_providers: number;
|
|
1319
1397
|
/** Value that configures or reports vector store adapters for this contract. */
|
|
1320
1398
|
vector_store_adapters: number;
|
|
1399
|
+
/** Number of registered assurance measurement providers. */
|
|
1400
|
+
assurance_providers?: number;
|
|
1321
1401
|
}
|
|
1322
1402
|
/** Read-only identity an extension's `activate(api)` receives about itself, so authors can emit self-identifying logs, gate on their own version, and build better error messages without re-reading the on-disk manifest or duplicating metadata in-module. Exposed as `api.extension`. */
|
|
1323
1403
|
export interface ExtensionSelfIdentity {
|
|
@@ -1372,6 +1452,8 @@ export interface ExtensionApi {
|
|
|
1372
1452
|
registerSearchProvider(provider: SearchProviderDefinition): void;
|
|
1373
1453
|
/** Value that configures or reports register vector store adapter for this contract. */
|
|
1374
1454
|
registerVectorStoreAdapter(adapter: VectorStoreAdapterDefinition): void;
|
|
1455
|
+
/** Register an assurance measurement provider through the services capability. */
|
|
1456
|
+
registerAssuranceMeasurementProvider(provider: AssuranceMeasurementProviderDefinition): void;
|
|
1375
1457
|
/** Value that configures or reports hooks for this contract. */
|
|
1376
1458
|
hooks: {
|
|
1377
1459
|
beforeCommand(hook: BeforeCommandHook): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Public contract for known extension capabilities, shared by SDK and presentation-layer consumers. */
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="294f3a0c-e74d-5963-b966-8a4443855ce3")}catch(e){}}();
|
|
4
4
|
export const KNOWN_EXTENSION_CAPABILITIES = [
|
|
5
5
|
"commands",
|
|
6
6
|
"renderers",
|
|
@@ -61,6 +61,7 @@ export const KNOWN_EXTENSION_POLICY_SURFACES = [
|
|
|
61
61
|
"importers.exporter",
|
|
62
62
|
"search.provider",
|
|
63
63
|
"search.vectorstore",
|
|
64
|
+
"services.assuranceprovider",
|
|
64
65
|
];
|
|
65
66
|
/** Public contract for known extension service names, shared by SDK and presentation-layer consumers. */
|
|
66
67
|
export const KNOWN_EXTENSION_SERVICE_NAMES = [
|
|
@@ -99,4 +100,4 @@ export function createDefaultExtensionGovernancePolicy() {
|
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
//# sourceMappingURL=extension-types.js.map
|
|
102
|
-
//# debugId=
|
|
103
|
+
//# debugId=294f3a0c-e74d-5963-b966-8a4443855ce3
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { assertOptionalStringField, normalizeOptionalStringArrayField } from "./registration-validation.js";
|
|
2
2
|
import { compareComparableVersions, parseComparableVersion } from "./version-compat.js";
|
|
3
3
|
import { type NormalizedExtensionPolicy } from "./extension-policy.js";
|
|
4
|
+
import { createRegistrationValidationError, extractRegistrationValidationTrace, normalizeRegistrationRecord, normalizeRegistrationRecordList, normalizeRuntimeRegistrationRecord, sanitizeRegistrationValue } from "./registration-values.js";
|
|
4
5
|
export { parseUnknownExtensionCapabilityWarning, parseLegacyExtensionCapabilityAliasWarning, } from "./extension-capability-aliases.js";
|
|
5
6
|
export { createEmptyExtensionHookRegistry, createEmptyExtensionCommandRegistry, createEmptyExtensionParserRegistry, createEmptyExtensionPreflightRegistry, createEmptyExtensionServiceRegistry, createEmptyExtensionRendererRegistry, createEmptyExtensionRegistrationRegistry, } from "./extension-registries.js";
|
|
6
7
|
export { runBeforeCommandHooks, runBeforeMutationHooks, runAfterCommandHooks, runOnWriteHooks, runOnReadHooks, runOnIndexHooks, runCommandHandler, runParserOverride, runPreflightOverride, runServiceOverrideSync, runServiceOverride, runCommandOverride, runRendererOverride, } from "./extension-hook-runtime.js";
|
|
7
|
-
import { type ExtensionDeactivationOptions, type ExtensionDeactivationResult, type PmMaxVersionExceededMode, type ExtensionLayer, type ExtensionManifest, type EffectiveExtension, type ExtensionDiscoveryResult, type LoadedExtension, type ExtensionLoadResult, type ExtensionHookRegistry, type ExtensionCommandArgumentDefinition, type ExtensionCommandRegistry, type ExtensionParserRegistry, type ExtensionPreflightRegistry, type ExtensionServiceRegistry, type ExtensionRendererRegistry, type ExtensionRegistrationRegistry, type ExtensionRegistrationCounts, type ExtensionApi, type FailedExtensionActivation, type
|
|
8
|
+
import { type ExtensionDeactivationOptions, type ExtensionDeactivationResult, type PmMaxVersionExceededMode, type ExtensionLayer, type ExtensionManifest, type EffectiveExtension, type ExtensionDiscoveryResult, type LoadedExtension, type ExtensionLoadResult, type ExtensionHookRegistry, type ExtensionCommandArgumentDefinition, type ExtensionCommandRegistry, type ExtensionParserRegistry, type ExtensionPreflightRegistry, type ExtensionServiceRegistry, type ExtensionRendererRegistry, type ExtensionRegistrationRegistry, type ExtensionRegistrationCounts, type ExtensionApi, type FailedExtensionActivation, type ExtensionActivationResult, type DiscoverExtensionsOptions } from "./extension-types.js";
|
|
8
9
|
export * from "./extension-types.js";
|
|
9
10
|
/** Fallback extension priority used when callers do not provide an override. */
|
|
10
11
|
export declare const DEFAULT_EXTENSION_PRIORITY = 100;
|
|
@@ -51,13 +52,6 @@ export declare function loadExtensions(options: DiscoverExtensionsOptions): Prom
|
|
|
51
52
|
*/
|
|
52
53
|
export declare function deactivateExtensions(loadResult: ExtensionLoadResult, activationResult?: Pick<ExtensionActivationResult, "failed">, options?: ExtensionDeactivationOptions): Promise<ExtensionDeactivationResult>;
|
|
53
54
|
declare function normalizeExtensionDeactivateTimeout(rawTimeout: unknown): number;
|
|
54
|
-
declare function sanitizeRegistrationValue(value: unknown): unknown;
|
|
55
|
-
declare function createRegistrationValidationError(message: string, trace: ExtensionActivationFailureTrace): TypeError;
|
|
56
|
-
declare function extractRegistrationValidationTrace(error: unknown): ExtensionActivationFailureTrace | undefined;
|
|
57
|
-
declare function normalizeRegistrationRecord(name: string, value: unknown): Record<string, unknown>;
|
|
58
|
-
declare function normalizeRuntimeRegistrationRecord(name: string, value: unknown): Record<string, unknown>;
|
|
59
|
-
declare function normalizeRegistrationRecordList<T extends object>(name: string, value: readonly T[]): T[];
|
|
60
|
-
declare function normalizeRegistrationRecordList(name: string, value: unknown): Array<Record<string, unknown>>;
|
|
61
55
|
declare function resolveCommandDefinitionAction(commandPath: string, action: unknown): string;
|
|
62
56
|
declare function normalizeCommandDefinitionArguments(value: unknown): ExtensionCommandArgumentDefinition[];
|
|
63
57
|
/** Reject a declared `value_type`/`type` that is not a known flag value kind, and a `default` whose value(s) would not cleanly coerce under that kind — so the typed-flag contract is enforced at registration instead of silently leaving an untyped value to surface at use time. */
|