@unbrained/pm-cli 2026.8.17 → 2026.8.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +4 -3
- package/CHANGELOG.md +51 -5
- package/README.md +3 -3
- package/dist/cli/error-guidance.js +8 -4
- package/dist/cli/help-content.js +32 -13
- package/dist/cli/help-json-payload.d.ts +15 -0
- package/dist/cli/help-json-payload.js +101 -23
- package/dist/cli/main.js +6 -2
- package/dist/cli/register-list-query.js +138 -54
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-4THEB6PD.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BHYMXLAE.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
- package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
- package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-OIOKV6NO.js} +58 -54
- package/dist/cli-bundle/chunks/chunk-QXSH7BLM.js +3 -0
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-TOXJM4WA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-YBMRWW4E.js} +44 -44
- package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-I4LUHGVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-BJRYFVSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-EF6ZS5GH.js} +44 -44
- package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-ESISGDAY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EXBCLIBU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-JDOMQ7VQ.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-PRHY2IMX.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-US7VEYZG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VXDSU5MC.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-ZBIQQYMI.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -1
- package/dist/cli-bundle/sdk-core.js +28 -28
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +32 -32
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +5 -4
- package/dist/core/config/nested-settings.js +8 -2
- package/dist/core/extensions/exporter-output-contract.d.ts +12 -0
- package/dist/core/extensions/exporter-output-contract.js +67 -0
- package/dist/core/extensions/extension-types.d.ts +36 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +35 -44
- package/dist/core/history/event-index.d.ts +5 -0
- package/dist/core/history/event-index.js +133 -27
- package/dist/core/sentry/helpers.js +3 -3
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/settings-validator.d.ts +4 -0
- package/dist/core/store/settings-validator.js +3 -2
- package/dist/core/store/settings.js +8 -2
- package/dist/mcp/tool-definitions.js +12 -7
- package/dist/sdk/agent/refusal-closure.d.ts +41 -0
- package/dist/sdk/agent/refusal-closure.js +92 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
- package/dist/sdk/agent/refusal-reachability.js +4 -4
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +104 -7
- package/dist/sdk/authoring.d.ts +1 -1
- package/dist/sdk/authoring.js +2 -2
- package/dist/sdk/cli-bootstrap.d.ts +2 -2
- package/dist/sdk/cli-bootstrap.js +4 -4
- package/dist/sdk/cli-contracts/command-aliases.d.ts +34 -2
- package/dist/sdk/cli-contracts/command-aliases.js +80 -13
- package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
- package/dist/sdk/cli-contracts/commander-types.js +5 -4
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -0
- package/dist/sdk/cli-contracts/enum-contracts.js +9 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +84 -13
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +151 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +958 -0
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +33 -5
- package/dist/sdk/cli-contracts/runtime-contracts.js +100 -23
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +7 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +20 -11
- package/dist/sdk/cli-contracts.d.ts +5 -4
- package/dist/sdk/cli-contracts.js +7 -6
- package/dist/sdk/completion.js +13 -15
- package/dist/sdk/compose.d.ts +3 -3
- package/dist/sdk/compose.js +2 -2
- package/dist/sdk/context-intent-contracts.d.ts +2 -2
- package/dist/sdk/context-intent-contracts.js +22 -7
- package/dist/sdk/contracts.d.ts +3 -0
- package/dist/sdk/contracts.js +5 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/environment/host-environment-errors.js +3 -3
- package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
- package/dist/sdk/flag-invocation-contracts.js +218 -9
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +186 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +194 -26
- package/dist/sdk/guide-topics.js +5 -5
- package/dist/sdk/index.d.ts +10 -7
- package/dist/sdk/index.js +10 -7
- package/dist/sdk/init-agent-guidance.js +3 -3
- package/dist/sdk/mutation-events.d.ts +18 -2
- package/dist/sdk/mutation-events.js +59 -16
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/output.d.ts +44 -0
- package/dist/sdk/output.js +28 -2
- package/dist/sdk/query/complete-list.d.ts +94 -0
- package/dist/sdk/query/complete-list.js +173 -0
- package/dist/sdk/query/get.js +25 -6
- package/dist/sdk/query/list.js +19 -2
- package/dist/sdk/query/search-contracts.d.ts +1 -1
- package/dist/sdk/query/search-contracts.js +23 -9
- package/dist/sdk/query/search.js +3 -3
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/read-output/continuation.d.ts +1 -1
- package/dist/sdk/read-output/continuation.js +7 -24
- package/dist/sdk/read-output-contracts.d.ts +2 -2
- package/dist/sdk/read-output-contracts.js +89 -13
- package/dist/sdk/read-output-rows.d.ts +4 -0
- package/dist/sdk/read-output-rows.js +47 -18
- package/dist/sdk/runtime-extended-actions.js +10 -2
- package/dist/sdk/runtime.d.ts +8 -2
- package/dist/sdk/runtime.js +18 -11
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/dist/types.d.ts +5 -0
- package/dist/types.js +2 -2
- package/docs/AGENT_GUIDE.md +25 -9
- package/docs/CLI_GRAMMAR.md +106 -0
- package/docs/COMMANDS.md +39 -27
- package/docs/ONBOARDING.md +4 -4
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +42 -2
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/TESTING.md +14 -1
- package/docs/agent-task-token-baseline.json +5 -5
- package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
- package/marketplace.json +2 -2
- package/package.json +5 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/generate-agent-capability-surfaces.mjs +20 -14
- package/sdk/public-surface.json +1245 -60
- package/dist/cli-bundle/chunks/chunk-2QLOXC3V.js +0 -3
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +0 -35
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +0 -13
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +0 -197
- package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TPXZIBIV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +0 -2
- package/dist/cli-bundle/chunks/register-list-query-Q7KII4G5.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-SSENDH5B.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-267MUUS6.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2QSAKMIH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KGEXTMPG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-XPIC53VA.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +0 -155
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Reads and writes tracker storage with format-aware helpers for Settings.
|
|
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]="67bf189e-e816-536d-9051-589a2e468423")}catch(e){}}();
|
|
8
8
|
import { validateSettings } from "./settings-validator.js";
|
|
9
9
|
import { runActiveOnReadHooks, runActiveOnWriteHooks, } from "../extensions/index.js";
|
|
10
10
|
import { GOVERNANCE_PRESET_DEFAULTS, SETTINGS_DEFAULTS, } from "../shared/constants.js";
|
|
@@ -710,6 +710,7 @@ function mergeSettings(settings) {
|
|
|
710
710
|
},
|
|
711
711
|
checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
|
|
712
712
|
output: { ...defaults.output, ...settings.output },
|
|
713
|
+
ux: { ...defaults.ux, ...settings.ux },
|
|
713
714
|
history: {
|
|
714
715
|
...defaults.history,
|
|
715
716
|
...settings.history,
|
|
@@ -777,6 +778,9 @@ function orderSerializedSettingsSections(ordered) {
|
|
|
777
778
|
ordered.output = orderObject(ordered.output, [
|
|
778
779
|
"default_format",
|
|
779
780
|
]);
|
|
781
|
+
ordered.ux = orderObject(ordered.ux, [
|
|
782
|
+
"deprecation_hints",
|
|
783
|
+
]);
|
|
780
784
|
ordered.history = orderObject(ordered.history, [
|
|
781
785
|
"missing_stream",
|
|
782
786
|
"compact_policy",
|
|
@@ -934,6 +938,7 @@ function buildSerializeBaseSettings(settings) {
|
|
|
934
938
|
mutation_guard: valueOrDefault(settings.mutation_guard, SETTINGS_DEFAULTS.mutation_guard),
|
|
935
939
|
checkpoints: valueOrDefault(settings.checkpoints, SETTINGS_DEFAULTS.checkpoints),
|
|
936
940
|
output: valueOrDefault(settings.output, SETTINGS_DEFAULTS.output),
|
|
941
|
+
ux: valueOrDefault(settings.ux, SETTINGS_DEFAULTS.ux),
|
|
937
942
|
history: valueOrDefault(settings.history, SETTINGS_DEFAULTS.history),
|
|
938
943
|
validation: valueOrDefault(settings.validation, SETTINGS_DEFAULTS.validation),
|
|
939
944
|
workflow: valueOrDefault(settings.workflow, SETTINGS_DEFAULTS.workflow),
|
|
@@ -1084,6 +1089,7 @@ const SETTINGS_TOP_LEVEL_KEY_ORDER = [
|
|
|
1084
1089
|
"locks",
|
|
1085
1090
|
"checkpoints",
|
|
1086
1091
|
"output",
|
|
1092
|
+
"ux",
|
|
1087
1093
|
"history",
|
|
1088
1094
|
"validation",
|
|
1089
1095
|
"governance",
|
|
@@ -1298,4 +1304,4 @@ export const settingsStoreTestOnly = {
|
|
|
1298
1304
|
selectedSettingsReadCacheSignaturesEqual,
|
|
1299
1305
|
};
|
|
1300
1306
|
//# sourceMappingURL=settings.js.map
|
|
1301
|
-
//# debugId=
|
|
1307
|
+
//# debugId=67bf189e-e816-536d-9051-589a2e468423
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Defines the Tool Definitions module for pm CLI source.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
-
import { GRAPH_SUBCOMMAND_VALUES,
|
|
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]="90896fb6-ee3e-575d-b103-bbc1a83c6672")}catch(e){}}();
|
|
8
|
+
import { GRAPH_SUBCOMMAND_VALUES, PM_DISCOVERABLE_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
|
|
9
9
|
import { buildPmActionToolInputSchema } from "../sdk/cli-contracts/tool-schema.js";
|
|
10
10
|
import { RUNTIME_STATUS_ROLE_VALUES } from "../types.js";
|
|
11
11
|
const CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY = buildPmActionToolInputSchema("list").properties.outputSession;
|
|
@@ -65,9 +65,9 @@ const idSchema = {
|
|
|
65
65
|
description: "pm item id, for example pm-abc1.",
|
|
66
66
|
};
|
|
67
67
|
// pm-fd8n: derive the pm_run action enumeration from the canonical
|
|
68
|
-
//
|
|
68
|
+
// PM_DISCOVERABLE_TOOL_ACTIONS contract instead of a hand-maintained prose list, so the
|
|
69
69
|
// MCP-facing description can never drift from the actual supported actions.
|
|
70
|
-
const PM_RUN_ACTION_DESCRIPTION = `Operation name (one of): ${
|
|
70
|
+
const PM_RUN_ACTION_DESCRIPTION = `Operation name (one of): ${PM_DISCOVERABLE_TOOL_ACTIONS.join(", ")}. ` +
|
|
71
71
|
"Package-owned actions are available dynamically when their provider package is installed.";
|
|
72
72
|
const LIST_TOP_LEVEL_OPTION_PROPERTIES = {
|
|
73
73
|
status: { type: "string", description: "Alias for options.status." },
|
|
@@ -111,7 +111,7 @@ const RAW_TOOLS = [
|
|
|
111
111
|
inputSchema: objectSchema({
|
|
112
112
|
action: {
|
|
113
113
|
type: "string",
|
|
114
|
-
enum: [...
|
|
114
|
+
enum: [...PM_DISCOVERABLE_TOOL_ACTIONS],
|
|
115
115
|
description: PM_RUN_ACTION_DESCRIPTION,
|
|
116
116
|
},
|
|
117
117
|
id: idSchema,
|
|
@@ -209,7 +209,7 @@ const RAW_TOOLS = [
|
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
name: "pm_events",
|
|
212
|
-
description: "Read a bounded, cursor-resumable page of committed mutation events across item history streams.",
|
|
212
|
+
description: "Read a bounded, cursor-resumable page of committed mutation events across item history streams. Batch cursors are the token-efficient default; pass cursorMode=row for per-event checkpoints.",
|
|
213
213
|
inputSchema: objectSchema({
|
|
214
214
|
since: {
|
|
215
215
|
type: "string",
|
|
@@ -235,6 +235,11 @@ const RAW_TOOLS = [
|
|
|
235
235
|
},
|
|
236
236
|
limit: { type: "integer", minimum: 0, maximum: 1000 },
|
|
237
237
|
full: { type: "boolean" },
|
|
238
|
+
cursorMode: {
|
|
239
|
+
type: "string",
|
|
240
|
+
enum: ["batch", "row"],
|
|
241
|
+
description: "Cursor framing: batch returns one terminal next_cursor (default); row also adds a cursor to every event.",
|
|
242
|
+
},
|
|
238
243
|
}),
|
|
239
244
|
},
|
|
240
245
|
{
|
|
@@ -743,4 +748,4 @@ export function buildMcpToolContracts() {
|
|
|
743
748
|
}).sort((left, right) => left.name.localeCompare(right.name));
|
|
744
749
|
}
|
|
745
750
|
//# sourceMappingURL=tool-definitions.js.map
|
|
746
|
-
//# debugId=
|
|
751
|
+
//# debugId=90896fb6-ee3e-575d-b103-bbc1a83c6672
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** One real refusal and the outcome of executing its advertised retry. */
|
|
2
|
+
export interface PmRefusalClosureObservation {
|
|
3
|
+
/** Stable corpus identifier. */
|
|
4
|
+
probe_id: string;
|
|
5
|
+
/** Public entrypoint that refused the invocation. */
|
|
6
|
+
entrypoint: string;
|
|
7
|
+
/** Process exit code returned by the refusal. */
|
|
8
|
+
exit_code: number;
|
|
9
|
+
/** Rejected closed-domain token. */
|
|
10
|
+
rejected_value: string;
|
|
11
|
+
/** Complete accepted domain emitted by the refusal. */
|
|
12
|
+
allowed_values: readonly string[];
|
|
13
|
+
/** Exact command emitted for recovery. */
|
|
14
|
+
suggested_retry: string;
|
|
15
|
+
/** Whether executing the advertised retry succeeded. */
|
|
16
|
+
retry_succeeded: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** One missing or contradictory recovery primitive. */
|
|
19
|
+
export interface PmRefusalClosureFinding {
|
|
20
|
+
/** Stable finding code. */
|
|
21
|
+
code: "accepted_rejected_value" | "duplicate_probe" | "empty_corpus" | "missing_allowed_values" | "missing_suggested_retry" | "non_refusal_exit" | "retry_failed";
|
|
22
|
+
/** Stable corpus identifier. */
|
|
23
|
+
probe_id: string;
|
|
24
|
+
/** Actionable mismatch detail. */
|
|
25
|
+
detail: string;
|
|
26
|
+
}
|
|
27
|
+
/** Complete recovery-closure score and its fail-closed findings. */
|
|
28
|
+
export interface PmRefusalClosureReport {
|
|
29
|
+
/** Whether every refusal was self-contained and executable. */
|
|
30
|
+
ok: boolean;
|
|
31
|
+
/** Number of unique probes scored. */
|
|
32
|
+
probe_count: number;
|
|
33
|
+
/** Number of probes with complete successful closure. */
|
|
34
|
+
closed_probe_count: number;
|
|
35
|
+
/** Closed probes divided by unique probes. */
|
|
36
|
+
closure_fraction: number;
|
|
37
|
+
/** Stable ordered findings. */
|
|
38
|
+
findings: readonly PmRefusalClosureFinding[];
|
|
39
|
+
}
|
|
40
|
+
/** Score structured closed-domain refusals and executable retries. */
|
|
41
|
+
export declare function scorePmRefusalClosure(observations: readonly PmRefusalClosureObservation[]): PmRefusalClosureReport;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/agent/refusal-closure
|
|
3
|
+
*
|
|
4
|
+
* Scores whether a structured refusal contains enough executable context for
|
|
5
|
+
* an agent to recover without another discovery round trip.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="65cfaa41-6f53-5339-8b55-c1a4d3660c5d")}catch(e){}}();
|
|
9
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
10
|
+
/** Return every closure defect contributed by one unique observation. */
|
|
11
|
+
function listObservationFindings(observation) {
|
|
12
|
+
return [
|
|
13
|
+
observation.exit_code !== EXIT_CODE.USAGE
|
|
14
|
+
? {
|
|
15
|
+
code: "non_refusal_exit",
|
|
16
|
+
probe_id: observation.probe_id,
|
|
17
|
+
detail: `${observation.entrypoint} returned exit code ${observation.exit_code}; a structured usage refusal must return ${EXIT_CODE.USAGE}.`,
|
|
18
|
+
}
|
|
19
|
+
: undefined,
|
|
20
|
+
observation.allowed_values.length === 0
|
|
21
|
+
? {
|
|
22
|
+
code: "missing_allowed_values",
|
|
23
|
+
probe_id: observation.probe_id,
|
|
24
|
+
detail: "The refusal omitted its complete accepted value domain.",
|
|
25
|
+
}
|
|
26
|
+
: undefined,
|
|
27
|
+
observation.allowed_values.includes(observation.rejected_value)
|
|
28
|
+
? {
|
|
29
|
+
code: "accepted_rejected_value",
|
|
30
|
+
probe_id: observation.probe_id,
|
|
31
|
+
detail: `${observation.rejected_value} is both rejected and advertised as allowed.`,
|
|
32
|
+
}
|
|
33
|
+
: undefined,
|
|
34
|
+
observation.suggested_retry.trim().length === 0
|
|
35
|
+
? {
|
|
36
|
+
code: "missing_suggested_retry",
|
|
37
|
+
probe_id: observation.probe_id,
|
|
38
|
+
detail: "The refusal omitted an executable suggested retry.",
|
|
39
|
+
}
|
|
40
|
+
: undefined,
|
|
41
|
+
!observation.retry_succeeded
|
|
42
|
+
? {
|
|
43
|
+
code: "retry_failed",
|
|
44
|
+
probe_id: observation.probe_id,
|
|
45
|
+
detail: "The advertised suggested retry did not succeed.",
|
|
46
|
+
}
|
|
47
|
+
: undefined,
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
/** Score structured closed-domain refusals and executable retries. */
|
|
51
|
+
export function scorePmRefusalClosure(observations) {
|
|
52
|
+
const findings = [];
|
|
53
|
+
const seen = new Set();
|
|
54
|
+
let closedProbeCount = 0;
|
|
55
|
+
if (observations.length === 0) {
|
|
56
|
+
findings.push({
|
|
57
|
+
code: "empty_corpus",
|
|
58
|
+
probe_id: "corpus",
|
|
59
|
+
detail: "At least one real refusal observation is required.",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
for (const observation of observations) {
|
|
63
|
+
if (seen.has(observation.probe_id)) {
|
|
64
|
+
findings.push({
|
|
65
|
+
code: "duplicate_probe",
|
|
66
|
+
probe_id: observation.probe_id,
|
|
67
|
+
detail: `${observation.probe_id} was supplied more than once.`,
|
|
68
|
+
});
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
seen.add(observation.probe_id);
|
|
72
|
+
const findingCount = findings.length;
|
|
73
|
+
for (const finding of listObservationFindings(observation)) {
|
|
74
|
+
if (finding !== undefined)
|
|
75
|
+
findings.push(finding);
|
|
76
|
+
}
|
|
77
|
+
if (findings.length === findingCount)
|
|
78
|
+
closedProbeCount += 1;
|
|
79
|
+
}
|
|
80
|
+
findings.sort((left, right) => left.probe_id !== right.probe_id
|
|
81
|
+
? left.probe_id.localeCompare(right.probe_id)
|
|
82
|
+
: left.code.localeCompare(right.code));
|
|
83
|
+
return {
|
|
84
|
+
ok: findings.length === 0,
|
|
85
|
+
probe_count: seen.size,
|
|
86
|
+
closed_probe_count: closedProbeCount,
|
|
87
|
+
closure_fraction: seen.size === 0 ? 0 : closedProbeCount / seen.size,
|
|
88
|
+
findings,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=refusal-closure.js.map
|
|
92
|
+
//# debugId=65cfaa41-6f53-5339-8b55-c1a4d3660c5d
|
|
@@ -37,7 +37,7 @@ export type PmRecoveryReferenceKind = (typeof PM_RECOVERY_REFERENCE_KINDS)[numbe
|
|
|
37
37
|
/** Behavioral promise attached to a recovery reference. */
|
|
38
38
|
export type PmRecoveryReferenceSemantics = "recovery" | "replacement" | "behavior_preserving";
|
|
39
39
|
/** Literal envelope fields recognized as recovery-reference producers. */
|
|
40
|
-
export declare const PM_RECOVERY_REFERENCE_FIELDS: readonly ("restore_with" | "migration_hint" | "migration_hints" | "suggested_retry" | "next_best_command" | "fallback_candidates" | "examples" | "next_steps" | "suggested_next_steps" | "candidate_commands" | "
|
|
40
|
+
export declare const PM_RECOVERY_REFERENCE_FIELDS: readonly ("restore_with" | "migration_hint" | "migration_hints" | "suggested_retry" | "next_best_command" | "fallback_candidates" | "examples" | "next_steps" | "suggested_next_steps" | "candidate_commands" | "example" | "candidate_command" | "next_step" | "retry_command")[];
|
|
41
41
|
/** One source file supplied to the producer-census analyzer. */
|
|
42
42
|
export interface PmRecoveryProducerSource {
|
|
43
43
|
/** Repository-relative source path. */
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* generated public error-code catalog.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
9
|
-
import
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7b488d32-9f92-5a80-965e-e2555cd49315")}catch(e){}}();
|
|
9
|
+
import * as nodeModule from "node:module";
|
|
10
10
|
/** Recovery-reference kinds emitted by structured refusal envelopes. */
|
|
11
11
|
export const PM_RECOVERY_REFERENCE_KINDS = [
|
|
12
12
|
"suggested_retry",
|
|
@@ -237,7 +237,7 @@ function isPatternLikeObjectClosure(tokens, index) {
|
|
|
237
237
|
}
|
|
238
238
|
/** Parse static object-literal members without treating patterns or labels as producers. */
|
|
239
239
|
function scanSourcePropertyTokens(source) {
|
|
240
|
-
const tokens = tokenizeExecutableSource(stripTypeScriptTypes(source, { mode: "strip" }));
|
|
240
|
+
const tokens = tokenizeExecutableSource(nodeModule.stripTypeScriptTypes(source, { mode: "strip" }));
|
|
241
241
|
const properties = [];
|
|
242
242
|
const stack = [];
|
|
243
243
|
for (const [index, token] of tokens.entries()) {
|
|
@@ -567,4 +567,4 @@ export function verifyPmRecoveryReferences(obligations, observations) {
|
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
569
|
//# sourceMappingURL=refusal-reachability.js.map
|
|
570
|
-
//# debugId=
|
|
570
|
+
//# debugId=7b488d32-9f92-5a80-965e-e2555cd49315
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Visibility tiers shared by CLI help, completions, docs, extensions, and MCP. */
|
|
2
2
|
export type PmCommandVisibilityTier = "core" | "standard" | "full" | "internal";
|
|
3
|
+
/** Stable capability families shared by every agent-facing command surface. */
|
|
4
|
+
export type PmCommandCapabilityFamily = "workspace" | "intake" | "context" | "lifecycle" | "evidence" | "graph" | "quality" | "automation" | "extensions" | "internal";
|
|
3
5
|
/** One command's canonical agent-surface visibility declaration. */
|
|
4
6
|
export interface PmCommandVisibilityContract {
|
|
5
7
|
/** Canonical command path. */
|
|
@@ -7,6 +9,13 @@ export interface PmCommandVisibilityContract {
|
|
|
7
9
|
/** Minimum surface tier that advertises the command. */
|
|
8
10
|
tier: PmCommandVisibilityTier;
|
|
9
11
|
}
|
|
12
|
+
/** Complete command capability contract with visibility and family ownership. */
|
|
13
|
+
export interface PmCommandCapabilityContract extends PmCommandVisibilityContract {
|
|
14
|
+
/** Exactly one stable capability family used to group the command. */
|
|
15
|
+
family: PmCommandCapabilityFamily;
|
|
16
|
+
}
|
|
17
|
+
/** Resolve one command's stable capability family. */
|
|
18
|
+
export declare function resolvePmCommandCapabilityFamily(command: string): PmCommandCapabilityFamily;
|
|
10
19
|
/**
|
|
11
20
|
* Canonical visibility contract for every built-in command.
|
|
12
21
|
*
|
|
@@ -14,11 +23,15 @@ export interface PmCommandVisibilityContract {
|
|
|
14
23
|
* surface. Internal worker/helper paths are appended below and never advertised
|
|
15
24
|
* by normal help or completion projections.
|
|
16
25
|
*/
|
|
26
|
+
export declare const PM_COMMAND_CAPABILITY_CONTRACTS: readonly PmCommandCapabilityContract[];
|
|
27
|
+
/** Backward-compatible tier-only projection of the capability contract. */
|
|
17
28
|
export declare const PM_COMMAND_VISIBILITY_CONTRACTS: readonly PmCommandVisibilityContract[];
|
|
18
29
|
/** Resolve one command's declared tier; extension commands default to standard. */
|
|
19
30
|
export declare function resolvePmCommandVisibilityTier(command: string, extensionTier?: PmCommandVisibilityTier): PmCommandVisibilityTier;
|
|
20
31
|
/** Return commands visible at a requested tier, preserving contract order. */
|
|
21
32
|
export declare function listPmCommandsForTier(tier: Exclude<PmCommandVisibilityTier, "internal">): string[];
|
|
33
|
+
/** Return commands in one capability family, preserving contract order. */
|
|
34
|
+
export declare function listPmCommandsForFamily(family: PmCommandCapabilityFamily): string[];
|
|
22
35
|
/** MCP profile names accepted by the server and embedding hosts. */
|
|
23
36
|
export type PmMcpToolProfile = "core" | "standard" | "full" | "custom";
|
|
24
37
|
/** Mapping from one narrow MCP tool to the command contract that tiers it. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* surfaces from one public SDK contract.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd74bc56-9971-59b9-8d2b-a6cc78b0a650")}catch(e){}}();
|
|
9
9
|
import { PM_CORE_COMMAND_NAMES } from "./cli-contracts/enum-contracts.js";
|
|
10
10
|
const CORE_COMMANDS = new Set([
|
|
11
11
|
"claim",
|
|
@@ -46,6 +46,92 @@ const STANDARD_COMMANDS = new Set([
|
|
|
46
46
|
"schema",
|
|
47
47
|
"test",
|
|
48
48
|
]);
|
|
49
|
+
const COMMANDS_BY_FAMILY = Object.freeze({
|
|
50
|
+
workspace: new Set([
|
|
51
|
+
"config",
|
|
52
|
+
"gc",
|
|
53
|
+
"health",
|
|
54
|
+
"init",
|
|
55
|
+
"merge",
|
|
56
|
+
"profile",
|
|
57
|
+
"schema",
|
|
58
|
+
"telemetry",
|
|
59
|
+
"workspace",
|
|
60
|
+
]),
|
|
61
|
+
intake: new Set(["copy", "create", "focus", "item", "restore"]),
|
|
62
|
+
context: new Set([
|
|
63
|
+
"activity",
|
|
64
|
+
"aggregate",
|
|
65
|
+
"context",
|
|
66
|
+
"ctx",
|
|
67
|
+
"duplicates",
|
|
68
|
+
"eval",
|
|
69
|
+
"get",
|
|
70
|
+
"help",
|
|
71
|
+
"list",
|
|
72
|
+
"list-all",
|
|
73
|
+
"list-blocked",
|
|
74
|
+
"list-canceled",
|
|
75
|
+
"list-closed",
|
|
76
|
+
"list-draft",
|
|
77
|
+
"list-in-progress",
|
|
78
|
+
"list-open",
|
|
79
|
+
"next",
|
|
80
|
+
"search",
|
|
81
|
+
"stats",
|
|
82
|
+
]),
|
|
83
|
+
lifecycle: new Set([
|
|
84
|
+
"claim",
|
|
85
|
+
"close",
|
|
86
|
+
"close-many",
|
|
87
|
+
"close-task",
|
|
88
|
+
"delete",
|
|
89
|
+
"pause-task",
|
|
90
|
+
"release",
|
|
91
|
+
"start-task",
|
|
92
|
+
"update",
|
|
93
|
+
"update-many",
|
|
94
|
+
]),
|
|
95
|
+
evidence: new Set([
|
|
96
|
+
"append",
|
|
97
|
+
"comments",
|
|
98
|
+
"docs",
|
|
99
|
+
"events",
|
|
100
|
+
"files",
|
|
101
|
+
"history",
|
|
102
|
+
"history-author-acknowledge",
|
|
103
|
+
"history-compact",
|
|
104
|
+
"history-redact",
|
|
105
|
+
"history-repair",
|
|
106
|
+
"learnings",
|
|
107
|
+
"notes",
|
|
108
|
+
]),
|
|
109
|
+
graph: new Set(["deps", "graph", "plan"]),
|
|
110
|
+
quality: new Set([
|
|
111
|
+
"assurance",
|
|
112
|
+
"contracts",
|
|
113
|
+
"test",
|
|
114
|
+
"test-all",
|
|
115
|
+
"validate",
|
|
116
|
+
]),
|
|
117
|
+
automation: new Set(["event", "meet", "remind"]),
|
|
118
|
+
});
|
|
119
|
+
const EXTENSION_COMMANDS = new Set([
|
|
120
|
+
"extension",
|
|
121
|
+
"install",
|
|
122
|
+
"package",
|
|
123
|
+
"packages",
|
|
124
|
+
"upgrade",
|
|
125
|
+
]);
|
|
126
|
+
/** Resolve one command's stable capability family. */
|
|
127
|
+
export function resolvePmCommandCapabilityFamily(command) {
|
|
128
|
+
const normalized = command.trim().toLowerCase();
|
|
129
|
+
for (const [family, commands] of Object.entries(COMMANDS_BY_FAMILY)) {
|
|
130
|
+
if (commands.has(normalized))
|
|
131
|
+
return family;
|
|
132
|
+
}
|
|
133
|
+
return EXTENSION_COMMANDS.has(normalized) ? "extensions" : "internal";
|
|
134
|
+
}
|
|
49
135
|
/**
|
|
50
136
|
* Canonical visibility contract for every built-in command.
|
|
51
137
|
*
|
|
@@ -53,7 +139,7 @@ const STANDARD_COMMANDS = new Set([
|
|
|
53
139
|
* surface. Internal worker/helper paths are appended below and never advertised
|
|
54
140
|
* by normal help or completion projections.
|
|
55
141
|
*/
|
|
56
|
-
export const
|
|
142
|
+
export const PM_COMMAND_CAPABILITY_CONTRACTS = Object.freeze([
|
|
57
143
|
...PM_CORE_COMMAND_NAMES.map((command) => ({
|
|
58
144
|
command,
|
|
59
145
|
tier: CORE_COMMANDS.has(command)
|
|
@@ -61,24 +147,31 @@ export const PM_COMMAND_VISIBILITY_CONTRACTS = Object.freeze([
|
|
|
61
147
|
: STANDARD_COMMANDS.has(command)
|
|
62
148
|
? "standard"
|
|
63
149
|
: "full",
|
|
150
|
+
family: resolvePmCommandCapabilityFamily(command),
|
|
64
151
|
})),
|
|
65
152
|
{
|
|
66
153
|
command: "completion-statuses",
|
|
67
154
|
tier: "internal",
|
|
155
|
+
family: "internal",
|
|
68
156
|
},
|
|
69
157
|
{
|
|
70
158
|
command: "completion-tags",
|
|
71
159
|
tier: "internal",
|
|
160
|
+
family: "internal",
|
|
72
161
|
},
|
|
73
162
|
{
|
|
74
163
|
command: "completion-types",
|
|
75
164
|
tier: "internal",
|
|
165
|
+
family: "internal",
|
|
76
166
|
},
|
|
77
167
|
{
|
|
78
168
|
command: "test-runs-worker",
|
|
79
169
|
tier: "internal",
|
|
170
|
+
family: "internal",
|
|
80
171
|
},
|
|
81
172
|
]);
|
|
173
|
+
/** Backward-compatible tier-only projection of the capability contract. */
|
|
174
|
+
export const PM_COMMAND_VISIBILITY_CONTRACTS = PM_COMMAND_CAPABILITY_CONTRACTS;
|
|
82
175
|
const TIER_ORDER = {
|
|
83
176
|
core: 0,
|
|
84
177
|
standard: 1,
|
|
@@ -95,6 +188,10 @@ export function listPmCommandsForTier(tier) {
|
|
|
95
188
|
const maximum = TIER_ORDER[tier];
|
|
96
189
|
return PM_COMMAND_VISIBILITY_CONTRACTS.filter((entry) => entry.tier !== "internal" && TIER_ORDER[entry.tier] <= maximum).map((entry) => entry.command);
|
|
97
190
|
}
|
|
191
|
+
/** Return commands in one capability family, preserving contract order. */
|
|
192
|
+
export function listPmCommandsForFamily(family) {
|
|
193
|
+
return PM_COMMAND_CAPABILITY_CONTRACTS.filter((entry) => entry.family === family).map((entry) => entry.command);
|
|
194
|
+
}
|
|
98
195
|
/** Mapping from one narrow MCP tool to the command contract that tiers it. */
|
|
99
196
|
export const PM_MCP_TOOL_COMMAND_CONTRACTS = Object.freeze({
|
|
100
197
|
pm_append: "append",
|
|
@@ -217,17 +314,17 @@ export const PM_MCP_PROMPT_CONTRACTS = Object.freeze([
|
|
|
217
314
|
]);
|
|
218
315
|
/** Render the generated command visibility reference used by docs drift gates. */
|
|
219
316
|
export function renderPmCommandVisibilityMarkdown() {
|
|
220
|
-
const rows =
|
|
317
|
+
const rows = PM_COMMAND_CAPABILITY_CONTRACTS.map(({ command, tier, family }) => `| \`${command}\` | ${tier} | ${family} |`);
|
|
221
318
|
return [
|
|
222
319
|
"# Generated agent command surface",
|
|
223
320
|
"",
|
|
224
|
-
"This file is generated from `
|
|
321
|
+
"This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it manually.",
|
|
225
322
|
"",
|
|
226
|
-
"| Command | Minimum visibility tier |",
|
|
227
|
-
"| --- | --- |",
|
|
323
|
+
"| Command | Minimum visibility tier | Capability family |",
|
|
324
|
+
"| --- | --- | --- |",
|
|
228
325
|
...rows,
|
|
229
326
|
"",
|
|
230
327
|
].join("\n");
|
|
231
328
|
}
|
|
232
329
|
//# sourceMappingURL=agent-capability-contracts.js.map
|
|
233
|
-
//# debugId=
|
|
330
|
+
//# debugId=dd74bc56-9971-59b9-8d2b-a6cc78b0a650
|
package/dist/sdk/authoring.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export { planProfileApplication, type ProfileApplicationPlan, type ProfileChange
|
|
|
15
15
|
export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, type CollectUsedExtensionCapabilitiesOptions, type ExtensionCapabilityUsageReconciliation, } from "../core/extensions/capability-usage.js";
|
|
16
16
|
export { renderExtensionSurfaceMarkdown, type ExtensionSurfaceMarkdownOptions, } from "../core/extensions/activation-summary-markdown.js";
|
|
17
17
|
export { createExtensionContributionInventory, normalizeExtensionContributionInventory, } from "../core/extensions/contribution-inventory.js";
|
|
18
|
-
export type { AfterCommandAffectedItem, AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, BeforeMutationHook, BeforeMutationHookContext, BeforeMutationHookDecision, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandHandlerResult, ExtensionCommandSdk, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDeactivationFailure, ExtensionDeactivationOptions, ExtensionDeactivationResult, ExtensionDiagnostic, ExtensionContributionInventory, ExtensionDiscoveryResult, ExtensionHookRegistry, ExtensionSelfIdentity, ExtensionLoadResult, ExtensionManifest, ExtensionManifestEngines, ExtensionMutationGuardSdk, ExtensionGovernancePolicy, ExtensionPolicyOverride, ExtensionProvenanceMetadata, ExtensionRuntimePermissionDeclaration, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, ImportExportRegistrationOptions, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RegisteredExtensionExporter, RegisteredExtensionFlagDefinitions, RegisteredExtensionHook, RegisteredExtensionImporter, RegisteredExtensionProjectProfile, RegisteredExtensionSchemaMigrationDefinition, RegisteredExtensionSearchProvider, RegisteredExtensionServiceOverride, RegisteredExtensionVectorStoreAdapter, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, ServiceOverrideDecision, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
|
|
18
|
+
export type { AfterCommandAffectedItem, AfterCommandHook, AfterCommandHookContext, BeforeCommandHook, BeforeCommandHookContext, BeforeMutationHook, BeforeMutationHookContext, BeforeMutationHookDecision, CommandDefinition, ExtensionCommandArgumentDefinition, CommandHandler, CommandHandlerContext, CommandHandlerResult, ExtensionCommandSdk, CommandOverride, CommandOverrideContext, ExtensionServiceName, Exporter, ExporterArtifactOutputContract, ExporterRegistrationOptions, ExtensionActivationResult, ExtensionApi, ExtensionCommandRegistry, ExtensionDeactivationFailure, ExtensionDeactivationOptions, ExtensionDeactivationResult, ExtensionDiagnostic, ExtensionContributionInventory, ExtensionDiscoveryResult, ExtensionHookRegistry, ExtensionSelfIdentity, ExtensionLoadResult, ExtensionManifest, ExtensionManifestEngines, ExtensionMutationGuardSdk, ExtensionGovernancePolicy, ExtensionPolicyOverride, ExtensionProvenanceMetadata, ExtensionRuntimePermissionDeclaration, ExtensionSearchMode, ExtensionParserRegistry, ExtensionPreflightRegistry, ExtensionRegistrationRegistry, ExtensionRendererRegistry, ExtensionServiceRegistry, FlagValueType, FlagDefinition, ImportExportContext, ImportExportRegistrationOptions, Importer, OnIndexHook, OnIndexHookContext, OnReadHook, OnReadHookContext, OnWriteHook, OnWriteHookContext, OutputRendererFormat, ParserOverride, ParserOverrideContext, ParserOverrideDelta, PreflightOverride, PreflightOverrideContext, PreflightOverrideDelta, PreflightRuntimeDecision, RegisteredExtensionExporter, RegisteredExporterArtifactOutputContract, RegisteredExtensionFlagDefinitions, RegisteredExtensionHook, RegisteredExtensionImporter, RegisteredExtensionProjectProfile, RegisteredExtensionSchemaMigrationDefinition, RegisteredExtensionSearchProvider, RegisteredExtensionServiceOverride, RegisteredExtensionVectorStoreAdapter, RendererOverride, RendererOverrideContext, SchemaFieldDefinition, SchemaItemTypeCommandOptionPolicyDefinition, SchemaItemTypeOptionDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SchemaMigrationRunContext, SchemaMigrationRunner, SearchProviderEmbedBatchContext, SearchProviderEmbedContext, SearchProviderDefinition, SearchProviderHit, SearchProviderQueryContext, SearchProviderQueryResult, ServiceOverride, ServiceOverrideContext, ServiceOverrideDecision, VectorStoreAdapterDefinition, VectorStoreDeleteContext, VectorStoreQueryContext, VectorStoreQueryHit, VectorStoreUpsertContext, VectorStoreUpsertPoint, } from "../core/extensions/loader.js";
|
package/dist/sdk/authoring.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides the focused extension and package authoring surface.
|
|
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]="6260572c-1496-58ef-9377-0825f4183bc6")}catch(e){}}();
|
|
8
8
|
export * from "./compose.js";
|
|
9
9
|
export * from "./define.js";
|
|
10
10
|
export * from "./extension-contracts.js";
|
|
@@ -18,4 +18,4 @@ export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabil
|
|
|
18
18
|
export { renderExtensionSurfaceMarkdown, } from "../core/extensions/activation-summary-markdown.js";
|
|
19
19
|
export { createExtensionContributionInventory, normalizeExtensionContributionInventory, } from "../core/extensions/contribution-inventory.js";
|
|
20
20
|
//# sourceMappingURL=authoring.js.map
|
|
21
|
-
//# debugId=
|
|
21
|
+
//# debugId=6260572c-1496-58ef-9377-0825f4183bc6
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides public bootstrap argument normalization for embedded CLI hosts.
|
|
5
5
|
*/
|
|
6
|
-
import { EXECUTABLE_COMMAND_ALIASES, type CliFlagContract } from "./cli-contracts.js";
|
|
7
|
-
export { EXECUTABLE_COMMAND_ALIASES };
|
|
6
|
+
import { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, type CliFlagContract, type PmCommandAliasContract, type PmCommandAliasLifecycle, type PmCommandAliasRegistration } from "./cli-contracts.js";
|
|
7
|
+
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, type PmCommandAliasContract, type PmCommandAliasLifecycle, type PmCommandAliasRegistration, };
|
|
8
8
|
/** Documents the bootstrap global options payload exchanged by command, SDK, and package integrations. */
|
|
9
9
|
export interface BootstrapGlobalOptions {
|
|
10
10
|
/** Filesystem path used for path resolution. */
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Provides public bootstrap argument normalization for embedded CLI hosts.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
-
import { EXECUTABLE_COMMAND_ALIASES, resolveSubcommandFlagContractsForCommand, } from "./cli-contracts.js";
|
|
9
|
-
export { EXECUTABLE_COMMAND_ALIASES };
|
|
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]="d45455ca-9496-5b8c-906c-d33d3d890e68")}catch(e){}}();
|
|
8
|
+
import { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, resolveSubcommandFlagContractsForCommand, } from "./cli-contracts.js";
|
|
9
|
+
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, };
|
|
10
10
|
import { levenshteinDistanceWithinLimit } from "../core/shared/levenshtein.js";
|
|
11
11
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
12
12
|
import { PmCliError } from "../core/shared/errors.js";
|
|
@@ -895,4 +895,4 @@ export const _testOnly = {
|
|
|
895
895
|
resolveCanonicalFlag,
|
|
896
896
|
};
|
|
897
897
|
//# sourceMappingURL=cli-bootstrap.js.map
|
|
898
|
-
//# debugId=
|
|
898
|
+
//# debugId=d45455ca-9496-5b8c-906c-d33d3d890e68
|
|
@@ -1,7 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module sdk/cli-contracts/command-aliases
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Declares command aliases once so CLI registration, bootstrap parsing,
|
|
5
|
+
* contracts, completions, and package authors can share one compatibility
|
|
6
|
+
* policy instead of maintaining parallel spelling lists.
|
|
5
7
|
*/
|
|
6
|
-
/**
|
|
8
|
+
/** Lifecycle policy applied to a command alias. */
|
|
9
|
+
export type PmCommandAliasLifecycle = "permanent" | "deprecated";
|
|
10
|
+
/** Registration mechanism used to preserve an alias invocation. */
|
|
11
|
+
export type PmCommandAliasRegistration = "bootstrap" | "commander";
|
|
12
|
+
/** Machine-readable compatibility contract for one executable command alias. */
|
|
13
|
+
export interface PmCommandAliasContract {
|
|
14
|
+
/** Legacy or ergonomic spelling accepted at the command root. */
|
|
15
|
+
alias: string;
|
|
16
|
+
/** Canonical command path agents should discover and generate. */
|
|
17
|
+
canonical: string;
|
|
18
|
+
/** Canonical tokens inserted before user-provided options and arguments. */
|
|
19
|
+
canonical_argv: readonly string[];
|
|
20
|
+
/** Whether the alias is permanent ergonomics or migration-only compatibility. */
|
|
21
|
+
lifecycle: PmCommandAliasLifecycle;
|
|
22
|
+
/** Whether default help and completion discovery omit the alias. */
|
|
23
|
+
hidden: boolean;
|
|
24
|
+
/** Runtime layer that keeps the alias executable. */
|
|
25
|
+
registration: PmCommandAliasRegistration;
|
|
26
|
+
/** PM item that owns the compatibility disposition. */
|
|
27
|
+
owner: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Public command-alias table. Deprecated aliases must remain executable but
|
|
31
|
+
* are intentionally absent from default help and completion discovery.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PM_COMMAND_ALIAS_CONTRACTS: readonly PmCommandAliasContract[];
|
|
34
|
+
/** High-frequency executable aliases whose targets accept identical arguments. */
|
|
7
35
|
export declare const EXECUTABLE_COMMAND_ALIASES: Readonly<Record<string, string>>;
|
|
36
|
+
/** Resolve one declared command alias without inferring from its spelling. */
|
|
37
|
+
export declare function resolvePmCommandAlias(alias: string): PmCommandAliasContract | undefined;
|
|
38
|
+
/** Render the stable one-line migration hint emitted for deprecated aliases. */
|
|
39
|
+
export declare function renderPmCommandAliasMigrationHint(contract: PmCommandAliasContract): string;
|