@unbrained/pm-cli 2026.9.2 → 2026.9.3
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 +17 -0
- package/dist/cli/after-command-context-usage.js +16 -3
- package/dist/cli-bundle/bundle-manifest.json +154 -154
- package/dist/cli-bundle/chunks/{chunk-T6H5BZCP.js → chunk-34HASX3S.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-AY324UJ5.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-TAG4VC22.js → chunk-DKGP3QLE.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-E5RBBCXO.js +230 -0
- package/dist/cli-bundle/chunks/{chunk-DTGWEL23.js → chunk-EDPIS7EB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X4RCGLTX.js → chunk-IEHHE6GA.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-UDW64J2W.js → chunk-L7B7343B.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FZ4Z2J4F.js → chunk-LENC656S.js} +41 -41
- package/dist/cli-bundle/chunks/{chunk-ZLJIFSOE.js → chunk-LISESA7W.js} +33 -33
- package/dist/cli-bundle/chunks/{chunk-3WICXLVT.js → chunk-UPPM2FOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Y7VOMSZT.js → chunk-Y4PJ6HPK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-XYNX4ASQ.js → register-list-query-W2ZTOMKP.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-WFQ7MJTX.js → register-mutation-RVND5NCG.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-JVTI7JPP.js → register-operations-TTROIVC4.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-KVNC5KPL.js → register-setup-D3ZFHY3L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3ZBI35HU.js +176 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SVXJYD6G.js → chunk-4HJFY4MB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4RRHC3S4.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-4WR46RMG.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-5RFXUPN5.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-BWKHEIVF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4O4CJAR6.js → chunk-D7KXFBXV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MKHG3T76.js → chunk-GHCZ3YFR.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-KB5OFSFD.js → chunk-GT7MXDLW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KBLZRU62.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-KZ2NB3ET.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-M5M6SVHS.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BEVHCEWG.js → chunk-OL5EH6I3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MEASX544.js → chunk-Q45NHPF2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-O67VDLOT.js → chunk-QKHCSUGJ.js} +42 -42
- package/dist/cli-bundle/focused-chunks/chunk-S27XMBIN.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-TXE4TSHM.js +12 -0
- package/dist/cli-bundle/focused-chunks/chunk-UCLO3XDU.js +2 -0
- package/dist/cli-bundle/main.js +15 -15
- 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 +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 +35 -33
- 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 +9 -9
- package/dist/core/history/event-classification.d.ts +21 -0
- package/dist/core/history/event-classification.js +109 -0
- package/dist/core/history/event-index.d.ts +14 -3
- package/dist/core/history/event-index.js +543 -88
- package/dist/core/history/history.js +47 -18
- package/dist/core/history/workspace-history.js +7 -6
- package/dist/core/lock/lock.d.ts +22 -2
- package/dist/core/lock/lock.js +121 -19
- package/dist/core/output/output.js +31 -7
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +8 -2
- package/dist/core/store/item-metadata-query-index.js +5 -5
- package/dist/sdk/context/recency.d.ts +9 -0
- package/dist/sdk/context/recency.js +34 -0
- package/dist/sdk/context/usage-egress.d.ts +9 -0
- package/dist/sdk/context/usage-egress.js +30 -0
- package/dist/sdk/context-intent-contracts.js +7 -3
- package/dist/sdk/context-relevance.d.ts +23 -0
- package/dist/sdk/context-relevance.js +94 -23
- package/dist/sdk/context-signal-store.d.ts +7 -3
- package/dist/sdk/context-signal-store.js +155 -42
- package/dist/sdk/context-usage.d.ts +54 -0
- package/dist/sdk/context-usage.js +245 -16
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +14 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +14 -2
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +4 -2
- package/dist/sdk/init.d.ts +2 -0
- package/dist/sdk/init.js +18 -9
- package/dist/sdk/query/context.d.ts +3 -1
- package/dist/sdk/query/context.js +21 -9
- package/dist/sdk/query/next.js +18 -9
- package/dist/sdk/runtime-input.d.ts +2 -0
- package/dist/sdk/runtime-input.js +25 -2
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +17 -26
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -2
- package/docs/CONTEXT_RELEVANCE.md +44 -1
- package/docs/PERFORMANCE.md +6 -3
- package/docs/READ_OUTPUT_CONTRACTS.md +9 -1
- package/docs/SDK.md +11 -8
- package/docs/SDK_CONTEXT.md +7 -0
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +4 -3
- package/marketplace.json +2 -2
- package/package.json +4 -4
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +241 -24
- package/dist/cli-bundle/chunks/chunk-GOACULJW.js +0 -13
- package/dist/cli-bundle/chunks/chunk-NOPL37X4.js +0 -205
- package/dist/cli-bundle/focused-chunks/chunk-242AXYB2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2FEZ5SKM.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-6GCRSLPG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7VATS5QY.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-JEFKLWMM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PF3E6Q36.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-QDFJIRKN.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-RMRCQPWU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-S4U5CN5Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-T2LXXSOD.js +0 -158
- package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +0 -5
package/dist/sdk/query/next.js
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
* re-deriving readiness from a full `pm context` snapshot every turn.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
!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]="
|
|
12
|
+
!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]="b0f3d72c-ff0b-59bb-a6bc-8476eb9fb6c1")}catch(e){}}();
|
|
13
13
|
import { collectBlockedByIds, computeActionabilityReport, } from "../actionability.js";
|
|
14
14
|
import { resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, nowIso, normalizeStatusInput, normalizeStatusForRegistry, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
15
15
|
import { parseIntegerLimit } from "./parsers.js";
|
|
16
16
|
import { buildChildrenByParent, collectSubtreeIds, compareCriticalItems, mergeSortedWarnings, packRankedContextItems, resolveContextTokenBudget, toContextPackingSummary, toContextRankingSummary, toContextFocusItem, } from "./context.js";
|
|
17
17
|
import { runList } from "./list.js";
|
|
18
18
|
import { scoreContextCandidatesWithActiveExtensions } from "../context-relevance.js";
|
|
19
|
-
import { readContextUsageAffinity, recordContextUsageServing, } from "../context-usage.js";
|
|
19
|
+
import { attachContextUsageServingReceipt, collectContextUsageDeliveredItemIds, readContextUsageAffinity, recordContextUsageServing, } from "../context-usage.js";
|
|
20
20
|
import { readWorkspaceContextSignals, } from "../context-signal-store.js";
|
|
21
21
|
/** Supported values accepted by the next output contract. */
|
|
22
22
|
export const NEXT_OUTPUT_VALUES = ["markdown", "toon", "json"];
|
|
@@ -228,18 +228,27 @@ function buildNextTruncation(decisionCount, heldCount, limit) {
|
|
|
228
228
|
async function attachNextUsageFeedback(params) {
|
|
229
229
|
try {
|
|
230
230
|
const included = new Set(params.packing.included.map((entry) => entry.id));
|
|
231
|
-
|
|
231
|
+
const rows = params.ranking.ranked.map((entry) => ({
|
|
232
|
+
id: entry.id,
|
|
233
|
+
rank: entry.rank,
|
|
234
|
+
included: included.has(entry.id),
|
|
235
|
+
}));
|
|
236
|
+
const rankedIds = new Set(rows.map((row) => row.id));
|
|
237
|
+
for (const id of collectContextUsageDeliveredItemIds(params.result, "next")) {
|
|
238
|
+
if (!rankedIds.has(id)) {
|
|
239
|
+
rows.push({ id, rank: rows.length + 1, included: false });
|
|
240
|
+
rankedIds.add(id);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
const receipt = await recordContextUsageServing({
|
|
232
244
|
pmRoot: params.pmRoot,
|
|
233
245
|
author: params.author,
|
|
234
246
|
surface: "next",
|
|
235
247
|
profile: params.packing.profile,
|
|
236
|
-
rows
|
|
237
|
-
id: entry.id,
|
|
238
|
-
rank: entry.rank,
|
|
239
|
-
included: included.has(entry.id),
|
|
240
|
-
})),
|
|
248
|
+
rows,
|
|
241
249
|
enabled: process.env.PM_CONTEXT_USAGE_DISABLED !== "1",
|
|
242
250
|
});
|
|
251
|
+
attachContextUsageServingReceipt(params.result, receipt);
|
|
243
252
|
}
|
|
244
253
|
catch {
|
|
245
254
|
params.result.warnings = mergeSortedWarnings(params.result.warnings, [
|
|
@@ -479,4 +488,4 @@ function formatNextLine(item) {
|
|
|
479
488
|
return `${rankToken}${item.id} p${item.priority} ${item.status} ${item.type} deadline:${deadlineToken}${parentToken}${unblocksToken} ${item.title}`;
|
|
480
489
|
}
|
|
481
490
|
//# sourceMappingURL=next.js.map
|
|
482
|
-
//# debugId=
|
|
491
|
+
//# debugId=b0f3d72c-ff0b-59bb-a6bc-8476eb9fb6c1
|
|
@@ -31,6 +31,8 @@ export declare function withAddNoteOption(options: Record<string, unknown>): Rec
|
|
|
31
31
|
export declare function withFilesDiscoveryOptions(options: Record<string, unknown>): Record<string, unknown>;
|
|
32
32
|
/** Canonicalize one action name into lower-kebab-case tokens. */
|
|
33
33
|
export declare function normalizeActionName(value: string): string;
|
|
34
|
+
/** Return whether an action can change workspace extension contracts. */
|
|
35
|
+
export declare function shouldInvalidateWorkspaceContractsCacheAfterAction(action: string): boolean;
|
|
34
36
|
/** Canonicalize one space-separated command path for lookup comparisons. */
|
|
35
37
|
export declare function normalizeCommandPath(value: string): string;
|
|
36
38
|
/** Coerce an unknown payload value into a non-empty string array. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* primitives are shared by native action dispatchers and MCP-specific adapters.
|
|
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]="d42d5fb1-eebc-5549-ae88-dc923d9d3696")}catch(e){}}();
|
|
9
9
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
10
10
|
import { PmCliError } from "../core/shared/errors.js";
|
|
11
11
|
import { asRecordClone } from "../core/shared/primitives.js";
|
|
@@ -14,6 +14,25 @@ import { UPDATE_COMMANDER_STRING_OPTION_CONTRACTS } from "./cli-contracts/comman
|
|
|
14
14
|
import { normalizeBulkIdsValue, } from "../core/io/bulk-ids-input.js";
|
|
15
15
|
import { overlayMutationStdinTokenPolicy, preserveMutationStdinTokenLiterals, transferMutationStdinTokenPolicy, } from "../core/item/parse.js";
|
|
16
16
|
const MCP_MUTATION_TRANSPORT = Symbol("pm.mcp-mutation-transport");
|
|
17
|
+
const WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS = new Set([
|
|
18
|
+
"activity",
|
|
19
|
+
"aggregate",
|
|
20
|
+
"context",
|
|
21
|
+
"contracts",
|
|
22
|
+
"deps",
|
|
23
|
+
"files-discover",
|
|
24
|
+
"files-lookup",
|
|
25
|
+
"get",
|
|
26
|
+
"graph",
|
|
27
|
+
"health",
|
|
28
|
+
"history",
|
|
29
|
+
"list",
|
|
30
|
+
"next",
|
|
31
|
+
"search",
|
|
32
|
+
"stats",
|
|
33
|
+
"telemetry",
|
|
34
|
+
"validate",
|
|
35
|
+
]);
|
|
17
36
|
/** Mark an action object decoded from the MCP JSON-RPC transport. */
|
|
18
37
|
export function markMcpMutationTransportInput(input) {
|
|
19
38
|
Object.defineProperty(input, MCP_MUTATION_TRANSPORT, {
|
|
@@ -353,6 +372,10 @@ export function normalizeActionName(value) {
|
|
|
353
372
|
}
|
|
354
373
|
return chunks.join("");
|
|
355
374
|
}
|
|
375
|
+
/** Return whether an action can change workspace extension contracts. */
|
|
376
|
+
export function shouldInvalidateWorkspaceContractsCacheAfterAction(action) {
|
|
377
|
+
return !WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS.has(normalizeActionName(action));
|
|
378
|
+
}
|
|
356
379
|
/** Canonicalize one space-separated command path for lookup comparisons. */
|
|
357
380
|
export function normalizeCommandPath(value) {
|
|
358
381
|
return value.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ");
|
|
@@ -589,4 +612,4 @@ export function updateManyOptionsFromFlat(options) {
|
|
|
589
612
|
};
|
|
590
613
|
}
|
|
591
614
|
//# sourceMappingURL=runtime-input.js.map
|
|
592
|
-
//# debugId=
|
|
615
|
+
//# debugId=d42d5fb1-eebc-5549-ae88-dc923d9d3696
|
package/dist/sdk/runtime.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export type { ClaimResult, CloseResult, CreateResult, ReleaseResult, UpdateResul
|
|
|
66
66
|
export { getActiveExtensionRegistrations, runActiveOnReadHooks, runActiveOnWriteHooks, } from "../core/extensions/index.js";
|
|
67
67
|
export { pathExists, readFileIfExists, removeFileIfExists, writeFileAtomic, } from "../core/fs/fs-utils.js";
|
|
68
68
|
export { appendHistoryEntry, createHistoryEntry, } from "../core/history/history.js";
|
|
69
|
+
export { classifyHistoryEvent, HISTORY_EVENT_CLASSIFICATION_VERSION, MAINTENANCE_HISTORY_OPERATIONS, SUBSTANTIVE_HISTORY_OPERATIONS, type HistoryEventClass } from "../core/history/event-classification.js";
|
|
69
70
|
export { generateItemId, normalizeItemId, normalizeRawItemId, } from "../core/item/id.js";
|
|
70
71
|
export { readBooleanOption, readCsvListOption, readStringOption, } from "./package-runtime-options.js";
|
|
71
72
|
export { PM_CLI_EXPECTED_ERROR_NAME, createPmCliExpectedError, isPmCliExpectedError, type CreatePmCliExpectedErrorOptions, type PmCliExpectedError, } from "./errors.js";
|
package/dist/sdk/runtime.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Runtime.
|
|
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]="099c7cda-4a92-553c-ad60-00e185b5971b")}catch(e){}}();
|
|
8
8
|
export { PM_GITIGNORE_END, PM_GITIGNORE_START, ensurePmGitignore, getPmGitignoreBlock, } from "./workspace.js";
|
|
9
9
|
export { SEARCH_EXTENSION_FLAG_DEFINITIONS } from "./extension-contracts.js";
|
|
10
10
|
export * from "./cli-contracts/agent-output-contracts.js";
|
|
@@ -33,6 +33,7 @@ import { SDK_ACTION_ALIASES } from "./runtime-action-aliases.js";
|
|
|
33
33
|
import { createExtensionCommandSdk } from "./extension-command-context.js";
|
|
34
34
|
import { createUnknownSubcommandError } from "./agent/subcommand-recovery.js";
|
|
35
35
|
import { applyContextIntentProjection, attachReadOutputContracts, } from "./context-intent-contracts.js";
|
|
36
|
+
import { finalizeContextUsageEgress } from "./context/usage-egress.js";
|
|
36
37
|
import { runWithDiscoveredContextIntentContracts, } from "./context-intent-runtime.js";
|
|
37
38
|
import { normalizeReadOutputIncludeModeOptions, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
38
39
|
export { clearWorkspaceContractsCache } from "./workspace-contracts-cache.js";
|
|
@@ -65,14 +66,14 @@ import { runHealth, } from "./governance/health.js";
|
|
|
65
66
|
import { runValidate, } from "./governance/validate.js";
|
|
66
67
|
import { runExtension, } from "./extension.js";
|
|
67
68
|
import { runConfig } from "./config.js";
|
|
68
|
-
import { runInit } from "./init.js";
|
|
69
|
+
import { INIT_INVOCATION_CWD, runInit } from "./init.js";
|
|
69
70
|
import { runRuntimeEvalAction, runRuntimeEventsAction, runRuntimeMergeAction, runRuntimeSchedulingAction, runRuntimeWorkspaceAction, } from "./runtime-extended-actions.js";
|
|
70
71
|
import { acknowledgeUnknownAuthorHistoryEventsFromTransport, } from "./author-attribution.js";
|
|
71
72
|
import { PROFILE_SUBCOMMANDS, runProfileApply, runProfileLint, runProfileList, runProfileShow, } from "./profile.js";
|
|
72
73
|
import { runHistoryRedact, } from "./history-redact.js";
|
|
73
74
|
import { runMcpHistoryCompactAction, runMcpHistoryRepairAction, } from "./history-mcp.js";
|
|
74
75
|
import { runMcpCloseAction, runMcpReopenAction } from "./lifecycle/mcp-actions.js";
|
|
75
|
-
import { actionGlobalOptions as globalOptions, closeManyOptionsFromFlat, extensionOptionsFromArgs, graphOptionsFromFlat, mutationListOptions, mutationOptionsWithOverrides, normalizeActionName, normalizeCommandPath, normalizeMcpOptionsArrays, normalizeMcpUpdateOptions, optionsWithAuthor, parseRuntimeInteger as parseMcpInteger, readRuntimeScalarString as readScalarString, readRuntimeScalarStringAllowBlank as readScalarStringAllowBlank, readRuntimeString as readString, readRuntimeStringArray as readStringArray, resolveRuntimeLimit, updateManyOptionsFromFlat, withAddNoteOption, withFilesDiscoveryOptions, withMutationCompaction, } from "./runtime-input.js";
|
|
76
|
+
import { actionGlobalOptions as globalOptions, closeManyOptionsFromFlat, extensionOptionsFromArgs, graphOptionsFromFlat, mutationListOptions, mutationOptionsWithOverrides, normalizeActionName, normalizeCommandPath, normalizeMcpOptionsArrays, normalizeMcpUpdateOptions, optionsWithAuthor, parseRuntimeInteger as parseMcpInteger, readRuntimeScalarString as readScalarString, readRuntimeScalarStringAllowBlank as readScalarStringAllowBlank, readRuntimeString as readString, readRuntimeStringArray as readStringArray, resolveRuntimeLimit, shouldInvalidateWorkspaceContractsCacheAfterAction, updateManyOptionsFromFlat, withAddNoteOption, withFilesDiscoveryOptions, withMutationCompaction, } from "./runtime-input.js";
|
|
76
77
|
import { runDeps } from "./dependencies.js";
|
|
77
78
|
import { runDocs } from "./docs.js";
|
|
78
79
|
import { runGraph, } from "./graph/run.js";
|
|
@@ -92,6 +93,7 @@ import { SCHEMA_SUBCOMMANDS, runSchemaAddField, runSchemaAddStatus, runSchemaAdd
|
|
|
92
93
|
export { getActiveExtensionRegistrations, runActiveOnReadHooks, runActiveOnWriteHooks, } from "../core/extensions/index.js";
|
|
93
94
|
export { pathExists, readFileIfExists, removeFileIfExists, writeFileAtomic, } from "../core/fs/fs-utils.js";
|
|
94
95
|
export { appendHistoryEntry, createHistoryEntry, } from "../core/history/history.js";
|
|
96
|
+
export { classifyHistoryEvent, HISTORY_EVENT_CLASSIFICATION_VERSION, MAINTENANCE_HISTORY_OPERATIONS, SUBSTANTIVE_HISTORY_OPERATIONS } from "../core/history/event-classification.js";
|
|
95
97
|
export { generateItemId, normalizeItemId, normalizeRawItemId, } from "../core/item/id.js";
|
|
96
98
|
export { readBooleanOption, readCsvListOption, readStringOption, } from "./package-runtime-options.js";
|
|
97
99
|
export { PM_CLI_EXPECTED_ERROR_NAME, createPmCliExpectedError, isPmCliExpectedError, } from "./errors.js";
|
|
@@ -1276,24 +1278,6 @@ async function withCwd(cwd, run) {
|
|
|
1276
1278
|
process.chdir(previous);
|
|
1277
1279
|
}
|
|
1278
1280
|
}
|
|
1279
|
-
const WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS = new Set([
|
|
1280
|
-
"activity",
|
|
1281
|
-
"aggregate",
|
|
1282
|
-
"context",
|
|
1283
|
-
"contracts",
|
|
1284
|
-
"deps",
|
|
1285
|
-
"files-discover",
|
|
1286
|
-
"get",
|
|
1287
|
-
"graph",
|
|
1288
|
-
"health",
|
|
1289
|
-
"history",
|
|
1290
|
-
"list",
|
|
1291
|
-
"next",
|
|
1292
|
-
"search",
|
|
1293
|
-
"stats",
|
|
1294
|
-
"telemetry",
|
|
1295
|
-
"validate",
|
|
1296
|
-
]);
|
|
1297
1281
|
function resolveSdkActionInput(args) {
|
|
1298
1282
|
const rawAction = readRequiredString(args, "action");
|
|
1299
1283
|
const normalizedAction = normalizeActionName(rawAction);
|
|
@@ -1311,9 +1295,6 @@ function resolveSdkActionInput(args) {
|
|
|
1311
1295
|
}
|
|
1312
1296
|
return { action, args: resolvedArgs };
|
|
1313
1297
|
}
|
|
1314
|
-
function shouldInvalidateWorkspaceContractsCacheAfterAction(action) {
|
|
1315
|
-
return !WORKSPACE_CONTRACTS_CACHE_PRESERVING_ACTIONS.has(normalizeActionName(action));
|
|
1316
|
-
}
|
|
1317
1298
|
/** Execute one native or extension-contributed pm action in-process. */
|
|
1318
1299
|
export async function runAction(args) {
|
|
1319
1300
|
const resolved = resolveSdkActionInput(args);
|
|
@@ -1328,6 +1309,14 @@ export async function runAction(args) {
|
|
|
1328
1309
|
// pins process.cwd() (inside the serialized slot) for the built-in handler.
|
|
1329
1310
|
const explicitCwd = readString(resolved.args, "cwd");
|
|
1330
1311
|
const resolutionCwd = explicitCwd ?? process.cwd();
|
|
1312
|
+
if (resolved.action === "init") {
|
|
1313
|
+
global[INIT_INVOCATION_CWD] = resolutionCwd;
|
|
1314
|
+
}
|
|
1315
|
+
if (resolved.action !== "init" ||
|
|
1316
|
+
global.path !== undefined ||
|
|
1317
|
+
(process.env.PM_PATH?.trim().length ?? 0) > 0) {
|
|
1318
|
+
global.path = resolvePmRoot(resolutionCwd, global.path);
|
|
1319
|
+
}
|
|
1331
1320
|
try {
|
|
1332
1321
|
if (args[ACTIVE_EXTENSION_HOST_CONTEXT] === true ||
|
|
1333
1322
|
activeExtensionScope.getStore() === true) {
|
|
@@ -1886,7 +1875,9 @@ async function dispatchAction(action, args, global, activeExtensions) {
|
|
|
1886
1875
|
? await handler(ctx)
|
|
1887
1876
|
: await dispatchActiveExtensionAction(action, args, options, global, activeExtensions);
|
|
1888
1877
|
options.resolvedOutputFormat = "json";
|
|
1889
|
-
|
|
1878
|
+
const projected = attachReadOutputContracts(action, options, result);
|
|
1879
|
+
await finalizeContextUsageEgress(resolvePmRoot(process.cwd(), global.path), projected);
|
|
1880
|
+
return projected;
|
|
1890
1881
|
}
|
|
1891
1882
|
const actionRunnerTestHooks = {
|
|
1892
1883
|
closeManyOptionsFromFlat,
|
|
@@ -1933,4 +1924,4 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
|
|
|
1933
1924
|
}
|
|
1934
1925
|
}
|
|
1935
1926
|
//# sourceMappingURL=runtime.js.map
|
|
1936
|
-
//# debugId=
|
|
1927
|
+
//# debugId=099c7cda-4a92-553c-ad60-00e185b5971b
|
package/dist/types.d.ts
CHANGED
|
@@ -829,6 +829,8 @@ export interface HistoryEntry {
|
|
|
829
829
|
};
|
|
830
830
|
/** Value that configures or reports op for this contract. */
|
|
831
831
|
op: string;
|
|
832
|
+
/** Declared semantic effect used by recency consumers. Absent on legacy entries. */
|
|
833
|
+
event_class?: "substantive" | "maintenance";
|
|
832
834
|
/** Value that configures or reports patch for this contract. */
|
|
833
835
|
patch: HistoryPatchOp[];
|
|
834
836
|
/** Value that configures or reports before hash for this contract. */
|
package/dist/types.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Supported values accepted by the builtin item type contract. */
|
|
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]="668a8823-62c4-5c69-9b9b-0c72d6d94b2b")}catch(e){}}();
|
|
9
9
|
export const BUILTIN_ITEM_TYPE_VALUES = [
|
|
10
10
|
"Epic",
|
|
11
11
|
"Feature",
|
|
@@ -243,4 +243,4 @@ export const CONTEXT_SECTION_VALUES = [
|
|
|
243
243
|
"tests",
|
|
244
244
|
];
|
|
245
245
|
//# sourceMappingURL=types.js.map
|
|
246
|
-
//# debugId=
|
|
246
|
+
//# debugId=668a8823-62c4-5c69-9b9b-0c72d6d94b2b
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Context relevance and packing
|
|
2
2
|
|
|
3
|
-
Tracked by [pm-4k6b](../.agents/pm/features/pm-4k6b.toon), [pm-3hps](../.agents/pm/tasks/pm-3hps.toon), and [pm-801d](../.agents/pm/features/pm-801d.toon).
|
|
3
|
+
Tracked by [pm-4k6b](../.agents/pm/features/pm-4k6b.toon), [pm-07pt16](../.agents/pm/issues/pm-07pt16.toon), [pm-wv47pf](../.agents/pm/issues/pm-wv47pf.toon), [pm-3hps](../.agents/pm/tasks/pm-3hps.toon), and [pm-801d](../.agents/pm/features/pm-801d.toon).
|
|
4
4
|
|
|
5
5
|
`pm context` and `pm next` share one public SDK relevance pipeline. The built-in
|
|
6
6
|
commands assemble authoritative item metadata, load rebuildable signal rows,
|
|
@@ -73,6 +73,49 @@ Graph proximity normalizes parent and dependency degree. SDK hosts can supply
|
|
|
73
73
|
their own pre-normalized signal maps when their project model has richer
|
|
74
74
|
activity, graph, semantic, or usage data.
|
|
75
75
|
|
|
76
|
+
### Substantive recency
|
|
77
|
+
|
|
78
|
+
Recency is a property of what happened, not of the last file write. Every new
|
|
79
|
+
history entry declares `event_class: substantive|maintenance` through the
|
|
80
|
+
versioned `classifyHistoryEvent()` SDK contract. Legacy entries are classified
|
|
81
|
+
by the same declared operation and patch-field policy; unknown operations fail
|
|
82
|
+
closed as substantive. Package and extension scorers can therefore reuse the
|
|
83
|
+
core vocabulary instead of maintaining private operation lists.
|
|
84
|
+
|
|
85
|
+
The signal selects the most recent substantive history event, then a stamped
|
|
86
|
+
calendar release cohort such as `v2026.7.20`, then `created_at`. It never ranks
|
|
87
|
+
bare `updated_at`, so release attribution, relationship enrichment,
|
|
88
|
+
normalization, linked-artifact updates, and history maintenance cannot promote
|
|
89
|
+
otherwise unchanged work. The rebuildable v5 history-event index stores the
|
|
90
|
+
declared class and retrieves one latest substantive row per requested stream;
|
|
91
|
+
individual immutable streams remain the authoritative fallback. Rebuilds,
|
|
92
|
+
indexed validation reads, and compliant indexed appends share one cross-process
|
|
93
|
+
coordination lock; indexed appends commit their projection row and stream size
|
|
94
|
+
in one SQLite transaction. A lock-conflict fallback append writes authoritative
|
|
95
|
+
history without committing projection data in that transaction, publishes an
|
|
96
|
+
invalidation marker when possible, and discards the derived projection. The
|
|
97
|
+
index must validate or rebuild before serving that append.
|
|
98
|
+
|
|
99
|
+
Explained ranking includes `recency.source`, `coordinate`, and, for history,
|
|
100
|
+
`history_op` plus `event_class` on every served scorer row. Signal snapshots
|
|
101
|
+
persist that evidence alongside the normalized value so a fresh snapshot keeps
|
|
102
|
+
the same explanation as the ranking it serves.
|
|
103
|
+
|
|
104
|
+
### Delivered usage feedback
|
|
105
|
+
|
|
106
|
+
Usage affinity learns from post-egress delivery rather than pre-budget packing.
|
|
107
|
+
A versioned serve event records the full propensity rows and a correlation id;
|
|
108
|
+
CLI and `PmClient` egress append a delivery event containing the final
|
|
109
|
+
`result_omitted` decision and exact emitted item ids. A whole-result omission
|
|
110
|
+
therefore delivers zero items even when the packer selected rows earlier.
|
|
111
|
+
|
|
112
|
+
Direct `runContext` and `runNext` calls record only their assembled rows on a
|
|
113
|
+
serve event; they do not claim delivery or train affinity by themselves. A
|
|
114
|
+
later CLI or `PmClient` projection appends the correlated delivery decision.
|
|
115
|
+
Legacy serve events have no correlation marker, so the affinity reader ignores
|
|
116
|
+
their inclusion flags and reports them as `untrusted_serving_events` instead of
|
|
117
|
+
training on unverifiable phantom serves.
|
|
118
|
+
|
|
76
119
|
For corpora of at least 10,000 items, `context` automatically allocates a
|
|
77
120
|
bounded fraction of its token budget to recent calendar-epoch and epic-lineage
|
|
78
121
|
rollups. `search` attaches only matching rollups. The projection contains
|
package/docs/PERFORMANCE.md
CHANGED
|
@@ -12,7 +12,7 @@ Every measured CLI and SDK operation targets:
|
|
|
12
12
|
- default output at or below 5,000 estimated tokens;
|
|
13
13
|
- no feature, flag, output, history, or validation loss.
|
|
14
14
|
|
|
15
|
-
The committed regression budgets in [`scripts/bench/scale-budgets.json`](../scripts/bench/scale-budgets.json) protect the current baseline while the product targets stay fixed. Short local checks use the best observed latency as a regression floor; statistically meaningful runs of 20 or more use p95. Both receive 25% baseline headroom plus a 25 ms scheduler/filesystem noise margin. Reports always retain min/p50/p95, and product-target status always uses p95. This lets a busy workstation detect deterministic code slowdowns without pretending that three samples produce a meaningful p95 or hiding the real tail-latency target.
|
|
15
|
+
The committed regression budgets in [`scripts/bench/scale-budgets.json`](../scripts/bench/scale-budgets.json) protect the current baseline while the product targets stay fixed. Baseline refreshes use the Node major pinned by release and primary CI workflows (currently Node 24); newer supported runtimes remain compatibility targets, but their startup and memory characteristics must not silently rewrite the release baseline. Short local checks use the best observed latency as a regression floor; statistically meaningful runs of 20 or more use p95. Both receive 25% baseline headroom plus a 25 ms scheduler/filesystem noise margin. Reports always retain min/p50/p95, and product-target status always uses p95. This lets a busy workstation detect deterministic code slowdowns without pretending that three samples produce a meaningful p95 or hiding the real tail-latency target.
|
|
16
16
|
|
|
17
17
|
## Reproducible fixtures
|
|
18
18
|
|
|
@@ -92,7 +92,10 @@ probe off and performs no query on the create path; advisory/strict modes reuse
|
|
|
92
92
|
one dependency-light SDK scorer with the package-owned dedupe audit. Mutation
|
|
93
93
|
history events use a separate rebuildable ordered SQLite projection so
|
|
94
94
|
`pm events --since <cursor>` catch-up cost follows new history rows instead of
|
|
95
|
-
workspace size.
|
|
95
|
+
workspace size. Its v5 schema also indexes the declared substantive-versus-
|
|
96
|
+
maintenance event class, allowing context recency to fetch only the latest
|
|
97
|
+
substantive row per requested stream instead of folding complete histories on
|
|
98
|
+
each read. See [SDK Context Coordination](SDK_CONTEXT_COORDINATION.md).
|
|
96
99
|
|
|
97
100
|
SDK hosts that commit authoritative item documents outside the stock mutation
|
|
98
101
|
commands use `acquireItemMetadataDerivedIndexLock` and
|
|
@@ -127,7 +130,7 @@ To refresh a baseline after an intentional, measured improvement:
|
|
|
127
130
|
pnpm benchmark:scale --items ci --iterations 5 --transport both --update --headroom 1.25
|
|
128
131
|
```
|
|
129
132
|
|
|
130
|
-
Review the report and budget diff together. Never update a budget merely to silence a regression.
|
|
133
|
+
Review the report and budget diff together. Before a refresh, compare the delivery head with its exact base commit using the same runtime, fixture shape, and transport set; retain that evidence on the owning PM item. Never update a budget merely to silence a regression.
|
|
131
134
|
|
|
132
135
|
## Startup and observability
|
|
133
136
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Universal Read Output Contracts
|
|
2
2
|
|
|
3
|
-
Tracker references: [pm-hb7ug8](../.agents/pm/features/pm-hb7ug8.toon), [pm-cxr0jb](../.agents/pm/features/pm-cxr0jb.toon), [pm-hid9g1](../.agents/pm/features/pm-hid9g1.toon), [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon), [pm-5t33or](../.agents/pm/features/pm-5t33or.toon), [pm-srns](../.agents/pm/issues/pm-srns.toon), [pm-sb0tns](../.agents/pm/issues/pm-sb0tns.toon), [pm-gjjurs](../.agents/pm/issues/pm-gjjurs.toon), [pm-eugaqy](../.agents/pm/issues/pm-eugaqy.toon), [pm-jt8aa2](../.agents/pm/issues/pm-jt8aa2.toon), [pm-kyjdne](../.agents/pm/issues/pm-kyjdne.toon), [pm-8nev0o](../.agents/pm/issues/pm-8nev0o.toon), [pm-oahhyc](../.agents/pm/issues/pm-oahhyc.toon), [pm-q4isdq](../.agents/pm/issues/pm-q4isdq.toon), [pm-e5gl05](../.agents/pm/issues/pm-e5gl05.toon), [pm-cha95z](../.agents/pm/tasks/pm-cha95z.toon), [pm-2qvq7a](../.agents/pm/issues/pm-2qvq7a.toon), and [pm-xam9bt](../.agents/pm/issues/pm-xam9bt.toon).
|
|
3
|
+
Tracker references: [pm-hb7ug8](../.agents/pm/features/pm-hb7ug8.toon), [pm-cxr0jb](../.agents/pm/features/pm-cxr0jb.toon), [pm-hid9g1](../.agents/pm/features/pm-hid9g1.toon), [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon), [pm-5t33or](../.agents/pm/features/pm-5t33or.toon), [pm-wv47pf](../.agents/pm/issues/pm-wv47pf.toon), [pm-srns](../.agents/pm/issues/pm-srns.toon), [pm-sb0tns](../.agents/pm/issues/pm-sb0tns.toon), [pm-gjjurs](../.agents/pm/issues/pm-gjjurs.toon), [pm-eugaqy](../.agents/pm/issues/pm-eugaqy.toon), [pm-jt8aa2](../.agents/pm/issues/pm-jt8aa2.toon), [pm-kyjdne](../.agents/pm/issues/pm-kyjdne.toon), [pm-8nev0o](../.agents/pm/issues/pm-8nev0o.toon), [pm-oahhyc](../.agents/pm/issues/pm-oahhyc.toon), [pm-q4isdq](../.agents/pm/issues/pm-q4isdq.toon), [pm-e5gl05](../.agents/pm/issues/pm-e5gl05.toon), [pm-cha95z](../.agents/pm/tasks/pm-cha95z.toon), [pm-2qvq7a](../.agents/pm/issues/pm-2qvq7a.toon), and [pm-xam9bt](../.agents/pm/issues/pm-xam9bt.toon).
|
|
4
4
|
|
|
5
5
|
## Agent Quick Context
|
|
6
6
|
|
|
@@ -153,6 +153,14 @@ pm contracts --full --json
|
|
|
153
153
|
|
|
154
154
|
Every projected result carries a `read_output` receipt with the requested dimensions, precedence, observed option provenance, deterministic estimated token count, string/row compaction signals, and budget outcome. When canonical controls are present, `canonical_options_used` records spellings such as `--output-include`; the optional field is omitted when no canonical control was supplied so minimum-budget session receipts remain compact. `legacy_aliases_used` and `migration_hints` record only compatibility flags the caller actually supplied. A command-local flag synthesized internally to execute a canonical projection mode is therefore never misreported as deprecated syntax. When both spellings are supplied, both provenance arrays report that mixed invocation. Budget degradation discovers nested arrays as well as declared result rows, so validation diagnostics and other governance payloads compact their inner findings before the useful result is omitted. `compacted_row_paths` names every reduced collection without redefining those nested arrays as ordinary pagination rows.
|
|
155
155
|
|
|
156
|
+
For `context` and `next`, that final projection is also the usage-feedback
|
|
157
|
+
delivery boundary. The SDK carries a JSON-invisible serve receipt through
|
|
158
|
+
intent and universal output projection, then appends the final omitted decision
|
|
159
|
+
and exact emitted item ids. An infeasible output budget records zero delivered
|
|
160
|
+
rows; it can never leave the packer's earlier inclusions marked as served.
|
|
161
|
+
`PmClient` finalizes the receipt before resolving, while the CLI finalizes it
|
|
162
|
+
from the exact active result passed to telemetry and after-command hooks.
|
|
163
|
+
|
|
156
164
|
When rows are dropped to satisfy a ceiling, the result also carries `output_budget_truncation`, naming the binding budget and its source, any explicitly requested dimension the budget overrode, every compacted collection path, and executable CLI/SDK/MCP recovery options — a default ceiling can override an explicit `--output-limit unbounded`, and that override is reported rather than silent. If a producer supplied an opaque item-page cursor, compaction rebases it to the last row actually returned and reports `continuation_cursor_rebased: true`; following the cursor therefore cannot skip rows removed from the middle of a producer page. If no useful content can fit, `PmReadOutputBudgetExceeded` provides a discriminated omission result, a compact `{ outputBudget: "unbounded" }` recovery object, and `omitted_result_estimated_tokens`, the last useful-result estimate before omission; use `isReadOutputBudgetExceeded` before accessing result-specific fields. Universal controls are rejected on mutation commands and on the mutation mode of hybrid commands such as `comments`, `notes`, `files`, and `docs`.
|
|
157
165
|
|
|
158
166
|
Cursor recovery carries the opaque value once in `recovery.cursor` and declares
|
package/docs/SDK.md
CHANGED
|
@@ -1773,14 +1773,17 @@ For persistent derived signals, use `ContextSignalStore` with a caller-owned
|
|
|
1773
1773
|
`ContextSignalStoreAdapter`, or use `JsonFileContextSignalStoreAdapter` for a
|
|
1774
1774
|
same-directory atomic JSON snapshot. Each snapshot carries both a
|
|
1775
1775
|
`format_version` and `signal_set_version`, the authoritative history or index
|
|
1776
|
-
`source_cursor`,
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1776
|
+
`source_cursor`, a deterministic `recency_evidence_fingerprint`, the stable
|
|
1777
|
+
caller clock, and whether its items came from the `derived_index` or
|
|
1778
|
+
`scan_fallback` path. Item rows are deterministic and sorted; the snapshot never
|
|
1779
|
+
replaces item or history data.
|
|
1780
|
+
|
|
1781
|
+
`readOrRebuild(items, options)` reuses a snapshot only when its format and
|
|
1782
|
+
signal-set metadata are supported, its item source matches, and its cursor,
|
|
1783
|
+
complete item-id set, and substantive recency-evidence fingerprint match.
|
|
1784
|
+
Missing, stale, version-incompatible, or corrupt state is rebuilt from the
|
|
1785
|
+
authoritative items and atomically replaced. The result reports `cache_status`
|
|
1786
|
+
and non-fatal `context_signal_store_stale`,
|
|
1784
1787
|
`context_signal_store_invalid`, or `context_signal_store_write_failed`
|
|
1785
1788
|
warnings. A write failure still serves the in-memory rebuilt candidates because
|
|
1786
1789
|
the snapshot is derived, never authoritative. Optional maps for activity density,
|
package/docs/SDK_CONTEXT.md
CHANGED
|
@@ -31,6 +31,13 @@ stale, or unwritable snapshots return a stable warning, its meaning, an
|
|
|
31
31
|
executable recovery command, and the expected effect. Re-running `pm context`
|
|
32
32
|
confirms a successful rebuild as fresh.
|
|
33
33
|
|
|
34
|
+
Recency uses the public `classifyHistoryEvent()` contract and the most recent
|
|
35
|
+
substantive immutable event, with release-cohort and `created_at` fallbacks.
|
|
36
|
+
Explained ranking carries the selected coordinate, operation, and class.
|
|
37
|
+
`recordContextUsageServing()` plus `recordContextUsageDelivery()` expose the
|
|
38
|
+
same two-phase feedback boundary used by CLI and `PmClient`, so custom hosts can
|
|
39
|
+
correlate propensity rows with the exact result delivered after output budgets.
|
|
40
|
+
|
|
34
41
|
See [Context relevance and packing](CONTEXT_RELEVANCE.md) for signal and token
|
|
35
42
|
budgets, and [context coordination](SDK_CONTEXT_COORDINATION.md) for cursored
|
|
36
43
|
events and duplicate governance.
|
|
@@ -4,12 +4,12 @@ Tracker: `pm-f05lsg`.
|
|
|
4
4
|
|
|
5
5
|
Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.
|
|
6
6
|
|
|
7
|
-
- Catalog error codes:
|
|
7
|
+
- Catalog error codes: 356
|
|
8
8
|
- Executable error codes: 19
|
|
9
9
|
- Executable-code ratchet floor: 18
|
|
10
10
|
- Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `manifest_unknown_key`, `missing_lifecycle_target`, `missing_required_argument`, `no_version_bounds_declared`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
|
|
11
|
-
- Uncovered error codes:
|
|
12
|
-
- Coverage fraction: 0.
|
|
11
|
+
- Uncovered error codes: 337
|
|
12
|
+
- Coverage fraction: 0.053371
|
|
13
13
|
- Closed-domain probes: 19
|
|
14
14
|
- Grammar probes: 94
|
|
15
15
|
|
|
@@ -120,6 +120,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
|
|
|
120
120
|
| `history_merge_conflict_markers_detected` | `merge_conflict_markers_detected` | uncovered | none | 0 |
|
|
121
121
|
| `history_stream_over_compact_threshold` | `history_stream_over_compact_threshold` | uncovered | none | 0 |
|
|
122
122
|
| `history_target_out_of_range` | `history_target_out_of_range` | uncovered | none | 0 |
|
|
123
|
+
| `history_timestamp_invalid` | `history_timestamp_invalid` | uncovered | none | 0 |
|
|
123
124
|
| `history_unknown_author_events` | `history_unknown_author_events` | uncovered | none | 0 |
|
|
124
125
|
| `host_environment_capacity_fault` | `host_environment_capacity_fault` | uncovered | none | 0 |
|
|
125
126
|
| `host_environment_operation_invalid` | `host_environment_operation_invalid` | uncovered | none | 0 |
|
package/marketplace.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.9.
|
|
9
|
+
"version": "2026.9.3"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.9.
|
|
16
|
+
"version": "2026.9.3",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-cli",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"node": ">=22.18.0"
|
|
207
207
|
},
|
|
208
208
|
"dependencies": {
|
|
209
|
-
"@sentry/node": "10.
|
|
209
|
+
"@sentry/node": "10.73.0",
|
|
210
210
|
"@toon-format/toon": "^4.1.1",
|
|
211
211
|
"@types/node": ">=22",
|
|
212
212
|
"commander": "^15.0.0",
|
|
@@ -230,10 +230,10 @@
|
|
|
230
230
|
"eslint-plugin-unicorn": "74.0.0",
|
|
231
231
|
"fast-check": "^4.9.0",
|
|
232
232
|
"greptile": "^3.4.2",
|
|
233
|
-
"jscpd": "^5.
|
|
233
|
+
"jscpd": "^5.1.1",
|
|
234
234
|
"tsx": "^4.23.13",
|
|
235
235
|
"typescript": "^6.0.3",
|
|
236
|
-
"typescript-eslint": "^8.
|
|
236
|
+
"typescript-eslint": "^8.69.0",
|
|
237
237
|
"vitest": "^4.1.11"
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-digital-twin",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.",
|