pm-context 2026.10.23 → 2026.10.25
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/CHANGELOG.md +19 -0
- package/README.md +59 -2
- package/dist/context-receipts.d.ts +9 -2
- package/dist/context-receipts.d.ts.map +1 -1
- package/dist/context-receipts.js +14 -9
- package/dist/context-receipts.js.map +1 -1
- package/dist/evidence-packing.d.ts +68 -0
- package/dist/evidence-packing.d.ts.map +1 -0
- package/dist/evidence-packing.js +146 -0
- package/dist/evidence-packing.js.map +1 -0
- package/dist/file-focus.d.ts.map +1 -1
- package/dist/file-focus.js +1 -0
- package/dist/file-focus.js.map +1 -1
- package/dist/index.d.ts +15 -71
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -92
- package/dist/index.js.map +1 -1
- package/dist/next-evidence.d.ts +64 -0
- package/dist/next-evidence.d.ts.map +1 -0
- package/dist/next-evidence.js +123 -0
- package/dist/next-evidence.js.map +1 -0
- package/dist/witnesses.d.ts +56 -0
- package/dist/witnesses.d.ts.map +1 -0
- package/dist/witnesses.js +121 -0
- package/dist/witnesses.js.map +1 -0
- package/manifest.json +2 -2
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
export { planNextEvidence, parseNextEvidencePacket, readNextEvidenceJson, validateNextEvidencePlan, encodeNextEvidencePlan, NextEvidenceError } from "./next-evidence.ts";
|
|
2
|
+
export type { EvidenceRead, NextEvidencePacket, NextEvidenceStep, NextEvidencePlan } from "./next-evidence.ts";
|
|
3
|
+
export { packCriterionEvidence, encodeEvidencePack, parseEvidencePacket, readEvidencePacket, EvidencePackingError } from "./evidence-packing.ts";
|
|
4
|
+
export type { EvidenceBinding, EvidenceCriterion, EvidencePacket, EvidencePack, EvidencePackOptions, CriterionCoverage, PackedEvidence } from "./evidence-packing.ts";
|
|
5
|
+
export { checkContextWitnesses, encodeWitnessReport, parseWitnessPacket, readWitnessPacket, WitnessError } from "./witnesses.ts";
|
|
6
|
+
export type { ClaimCitation, ContextClaim, ContextWitness, WitnessPacket, WitnessReport } from "./witnesses.ts";
|
|
1
7
|
export { createFreshnessReader, encodeFreshness, FRESHNESS_LIMITS, FreshnessError, parseFreshnessPacket, readFreshnessFile, readFreshnessJson, recordFreshness, resumeFreshness } from "./freshness.ts";
|
|
2
8
|
export type { FreshnessManifest, FreshnessPacket, FreshnessReader, FreshnessResult, FreshnessSection, FreshnessSource } from "./freshness.ts";
|
|
3
9
|
import type { FileFocus } from "./file-focus.ts";
|
|
4
10
|
import type { ExtensionApi, RuntimeStatusRegistry, RelationshipKindRegistry } from "@unbrained/pm-cli/sdk";
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
11
|
+
import { listAllComplete } from "@unbrained/pm-cli/sdk/core";
|
|
12
|
+
import type { PmCompleteListResult } from "@unbrained/pm-cli/sdk";
|
|
7
13
|
import type { ContextRelevanceReport } from "@unbrained/pm-cli/sdk/query";
|
|
8
14
|
/** Stable failure categories reported by context command handlers. */
|
|
9
15
|
export declare const EXIT_CODE: {
|
|
@@ -286,76 +292,14 @@ export declare function renderAgentHandoff(pack: ContextPack, options?: {
|
|
|
286
292
|
relationshipRegistry?: RelationshipKindRegistry;
|
|
287
293
|
}): string;
|
|
288
294
|
/**
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* envelope the CLI serializes for `list-all --json`), but the declared
|
|
293
|
-
* `ListResult` type does not carry it — this local view reads it without
|
|
294
|
-
* weakening the SDK type.
|
|
295
|
-
*/
|
|
296
|
-
interface ListOmissionReceipt {
|
|
297
|
-
/** True when field groups were dropped from the projection. */
|
|
298
|
-
has_omissions?: boolean;
|
|
299
|
-
/** Count of dropped groups. */
|
|
300
|
-
omitted_field_group_count?: number;
|
|
301
|
-
/** Names of the dropped groups. */
|
|
302
|
-
omitted_field_groups?: string[];
|
|
303
|
-
}
|
|
304
|
-
/** A list result widened only by the runtime-present omission receipt. */
|
|
305
|
-
type ListResultWithReceipt = ListResult & {
|
|
306
|
-
omission_receipt?: ListOmissionReceipt;
|
|
307
|
-
};
|
|
308
|
-
/**
|
|
309
|
-
* Refuse an incomplete SDK `list-all` result instead of consuming it.
|
|
310
|
-
*
|
|
311
|
-
* Reading `.items` without consulting the result's completeness receipt is how
|
|
312
|
-
* this package once built a context pack from 10 of 682 workspace items and
|
|
313
|
-
* reported success: pm 2026.8.14 defaulted the list to a truncated answer and
|
|
314
|
-
* nothing here checked. Any one of four independent signals means the rows in
|
|
315
|
-
* `items` are NOT the whole workspace, so this throws (never returns a partial
|
|
316
|
-
* list, never logs and continues) naming the signal that tripped plus the
|
|
317
|
-
* `count`/`total` figures:
|
|
318
|
-
*
|
|
319
|
-
* - `truncated === true` — the row list was cut short (output budget, limit);
|
|
320
|
-
* - `has_more === true` — rows exist past the returned cursor boundary;
|
|
321
|
-
* - `completeness.status !== "complete"` — items/directories were unreadable
|
|
322
|
-
* ("partial") or the corpus was never scanned ("unchecked"); either way the
|
|
323
|
-
* answer is not attested complete;
|
|
324
|
-
* - `omission_receipt.has_omissions === true` — field groups were dropped from
|
|
325
|
-
* the projection, so rows are present but degraded.
|
|
326
|
-
*
|
|
327
|
-
* Thrown errors are {@link CommandError} so the command runtime turns them into
|
|
328
|
-
* a clean nonzero exit. Paging is deliberately NOT attempted: a context pack
|
|
329
|
-
* silently built from a partial page is the failure mode this guard exists to
|
|
330
|
-
* prevent, so refusing loudly is simpler and safer.
|
|
331
|
-
*
|
|
332
|
-
* @param result - SDK list result (a result missing its receipt trips the
|
|
333
|
-
* completeness signal: an unverifiable answer is not complete).
|
|
334
|
-
* @throws {@link CommandError} naming the first tripped signal and the counts.
|
|
335
|
-
*/
|
|
336
|
-
export declare function assertListResultComplete(result: ListResultWithReceipt): void;
|
|
337
|
-
/** Injectable seam over the SDK list action {@link readPmItems} uses. */
|
|
338
|
-
export type PmListAction = typeof pmList;
|
|
339
|
-
/**
|
|
340
|
-
* Read every pm item (full metadata + body) in-process through the SDK.
|
|
341
|
-
*
|
|
342
|
-
* Replaces the previous `spawnSync("pm", ["list-all", "--json", "--include-body"])`
|
|
343
|
-
* shell-out with the typed {@link list} action from `@unbrained/pm-cli/sdk/core`.
|
|
344
|
-
* `list-all` is the SDK alias for `list` with `excludeTerminal: false`; passing
|
|
345
|
-
* `full: true` + `includeBody: true` reproduces the full-metadata-with-body
|
|
346
|
-
* projection the shell-out parsed. `noTruncate: true` deliberately overrides any
|
|
347
|
-
* truncating limit and `strictRead: true` makes unreadable corpus entries a hard
|
|
348
|
-
* SDK error, and the returned receipt is STILL verified by
|
|
349
|
-
* {@link assertListResultComplete} — the 2026.8.14 truncated-default regression
|
|
350
|
-
* is exactly the silently-partial read this package refuses to reintroduce, so
|
|
351
|
-
* the guard does not trust the request options alone. Being an in-process SDK
|
|
352
|
-
* action (no child process), there is no spawn stdout buffer to size here; the
|
|
353
|
-
* completeness receipt is the over-run guard.
|
|
354
|
-
*
|
|
355
|
-
* @param pmRoot - Tracker storage root to read.
|
|
356
|
-
* @param list - Injectable SDK list action (tests substitute a canned real
|
|
357
|
-
* result); defaults to the real {@link pmList}.
|
|
295
|
+
* Re-certify the full SDK envelope and require its producer's certificate.
|
|
296
|
+
* The SDK owns corpus and output invariants; this consumer also refuses a
|
|
297
|
+
* missing or inconsistent producer certificate before constructing a pack.
|
|
358
298
|
*/
|
|
299
|
+
export declare function assertListResultComplete(result: unknown): asserts result is PmCompleteListResult;
|
|
300
|
+
/** Injectable complete-read boundary; receipt tests derive inputs from real trackers. */
|
|
301
|
+
export type PmListAction = typeof listAllComplete;
|
|
302
|
+
/** Read all types and lifecycle states without extension side effects, preserving SDK refusals. */
|
|
359
303
|
export declare function readPmItems(pmRoot: string, list?: PmListAction): Promise<PmItem[]>;
|
|
360
304
|
/** Rank options forwarded to the SDK relevance engine. */
|
|
361
305
|
export interface SdkRankOptions {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1K,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE/G,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjJ,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtK,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjI,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxM,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAM9I,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAEV,YAAY,EAEZ,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAO/B,OAA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parseNextEvidencePacket, readNextEvidenceJson, validateNextEvidencePlan, encodeNextEvidencePlan, NextEvidenceError } from "./next-evidence.js";
|
|
2
|
+
export { planNextEvidence, parseNextEvidencePacket, readNextEvidenceJson, validateNextEvidencePlan, encodeNextEvidencePlan, NextEvidenceError } from "./next-evidence.js";
|
|
3
|
+
import { packCriterionEvidence, encodeEvidencePack, readEvidencePacket, EvidencePackingError } from "./evidence-packing.js";
|
|
4
|
+
export { packCriterionEvidence, encodeEvidencePack, parseEvidencePacket, readEvidencePacket, EvidencePackingError } from "./evidence-packing.js";
|
|
1
5
|
import { createFreshnessReader, encodeFreshness, FreshnessError, parseFreshnessPacket, readFreshnessJson, recordFreshness, resumeFreshness } from "./freshness.js";
|
|
6
|
+
import { checkContextWitnesses, encodeWitnessReport, readWitnessPacket, WitnessError } from "./witnesses.js";
|
|
7
|
+
export { checkContextWitnesses, encodeWitnessReport, parseWitnessPacket, readWitnessPacket, WitnessError } from "./witnesses.js";
|
|
2
8
|
export { createFreshnessReader, encodeFreshness, FRESHNESS_LIMITS, FreshnessError, parseFreshnessPacket, readFreshnessFile, readFreshnessJson, recordFreshness, resumeFreshness } from "./freshness.js";
|
|
3
9
|
import { buildSincePack, encodeSincePack } from "./since.js";
|
|
4
10
|
import { writeFileSync } from "node:fs";
|
|
11
|
+
import { isDeepStrictEqual } from "node:util";
|
|
5
12
|
import { resolveFileFocus, matchFileFocus, rankFileFocus, renderFileFocus, readFileFocusItems } from "./file-focus.js";
|
|
6
13
|
import { createRelationshipKindRegistry, readSettings, resolveRuntimeStatusRegistry, resolveWorkspaceRelationshipKindRegistry, } from "@unbrained/pm-cli/sdk";
|
|
7
|
-
import {
|
|
8
|
-
import { buildItemContextRelevanceCandidates, defaultScoreContextCandidates, packContextCandidates, recordContextUsageServing, } from "@unbrained/pm-cli/sdk/query";
|
|
14
|
+
import { listAllComplete } from "@unbrained/pm-cli/sdk/core";
|
|
15
|
+
import { buildItemContextRelevanceCandidates, certifyCompleteListResult, PmCompleteListValidationError, defaultScoreContextCandidates, packContextCandidates, recordContextUsageServing, } from "@unbrained/pm-cli/sdk/query";
|
|
9
16
|
import { DEFAULT_REPORT_LIMIT, renderUsageReport, reportContextUsage, resolveSince } from "./context-usage.js";
|
|
10
17
|
import { readContextUsageAffinity } from "@unbrained/pm-cli/sdk/query";
|
|
11
18
|
import { recordReceiptUsage, reportContextReceipts, renderReceiptReport, serveContextReceipt } from "./context-receipts.js";
|
|
@@ -733,97 +740,23 @@ export function renderAgentHandoff(pack, options = {}) {
|
|
|
733
740
|
return output;
|
|
734
741
|
}
|
|
735
742
|
/**
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
* this package once built a context pack from 10 of 682 workspace items and
|
|
740
|
-
* reported success: pm 2026.8.14 defaulted the list to a truncated answer and
|
|
741
|
-
* nothing here checked. Any one of four independent signals means the rows in
|
|
742
|
-
* `items` are NOT the whole workspace, so this throws (never returns a partial
|
|
743
|
-
* list, never logs and continues) naming the signal that tripped plus the
|
|
744
|
-
* `count`/`total` figures:
|
|
745
|
-
*
|
|
746
|
-
* - `truncated === true` — the row list was cut short (output budget, limit);
|
|
747
|
-
* - `has_more === true` — rows exist past the returned cursor boundary;
|
|
748
|
-
* - `completeness.status !== "complete"` — items/directories were unreadable
|
|
749
|
-
* ("partial") or the corpus was never scanned ("unchecked"); either way the
|
|
750
|
-
* answer is not attested complete;
|
|
751
|
-
* - `omission_receipt.has_omissions === true` — field groups were dropped from
|
|
752
|
-
* the projection, so rows are present but degraded.
|
|
753
|
-
*
|
|
754
|
-
* Thrown errors are {@link CommandError} so the command runtime turns them into
|
|
755
|
-
* a clean nonzero exit. Paging is deliberately NOT attempted: a context pack
|
|
756
|
-
* silently built from a partial page is the failure mode this guard exists to
|
|
757
|
-
* prevent, so refusing loudly is simpler and safer.
|
|
758
|
-
*
|
|
759
|
-
* @param result - SDK list result (a result missing its receipt trips the
|
|
760
|
-
* completeness signal: an unverifiable answer is not complete).
|
|
761
|
-
* @throws {@link CommandError} naming the first tripped signal and the counts.
|
|
743
|
+
* Re-certify the full SDK envelope and require its producer's certificate.
|
|
744
|
+
* The SDK owns corpus and output invariants; this consumer also refuses a
|
|
745
|
+
* missing or inconsistent producer certificate before constructing a pack.
|
|
762
746
|
*/
|
|
763
747
|
export function assertListResultComplete(result) {
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
+ "The item list was cut short (output budget or limit); a context pack "
|
|
770
|
-
+ "built from it would silently miss items. Narrow the operation or "
|
|
771
|
-
+ "raise the output budget, then retry.");
|
|
772
|
-
}
|
|
773
|
-
if (result.has_more === true) {
|
|
774
|
-
throw new CommandError(`Refusing incomplete pm list-all result: has_more=true (${counts}). `
|
|
775
|
-
+ "Rows exist beyond the returned page; packing the page as the whole "
|
|
776
|
-
+ "workspace would silently drop them.");
|
|
777
|
-
}
|
|
778
|
-
if (result.completeness?.status !== "complete") {
|
|
779
|
-
const status = result.completeness?.status === undefined
|
|
780
|
-
? "(missing)"
|
|
781
|
-
: JSON.stringify(result.completeness.status);
|
|
782
|
-
const unreadable = `unreadable_item_count=${result.completeness?.unreadable_item_count ?? 0}`
|
|
783
|
-
+ `, unreadable_directory_count=${result.completeness?.unreadable_directory_count ?? 0}`;
|
|
784
|
-
throw new CommandError(`Refusing incomplete pm list-all result: completeness.status=${status} `
|
|
785
|
-
+ `(${unreadable}; ${counts}). The workspace corpus behind this list was `
|
|
786
|
-
+ "not attested completely read, so the rows are not the whole workspace.");
|
|
787
|
-
}
|
|
788
|
-
const omission = result.omission_receipt;
|
|
789
|
-
if (omission?.has_omissions === true) {
|
|
790
|
-
const groups = omission.omitted_field_groups ?? [];
|
|
791
|
-
throw new CommandError(`Refusing incomplete pm list-all result: omission_receipt.has_omissions=true `
|
|
792
|
-
+ `(omitted_field_groups: ${groups.length ? groups.join(", ") : "(none listed)"}; ${counts}). `
|
|
793
|
-
+ "Field groups were dropped from the projection, so the rows are present "
|
|
794
|
-
+ "but degraded; re-read without the field-omitting options.");
|
|
748
|
+
const certified = certifyCompleteListResult(result);
|
|
749
|
+
if (!isDeepStrictEqual(result.complete_list, certified.complete_list)) {
|
|
750
|
+
throw new PmCompleteListValidationError([{
|
|
751
|
+
code: "invalid_envelope", message: "Context input requires a matching complete_list certificate from listAllComplete.",
|
|
752
|
+
}]);
|
|
795
753
|
}
|
|
796
754
|
}
|
|
797
|
-
/**
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
* Replaces the previous `spawnSync("pm", ["list-all", "--json", "--include-body"])`
|
|
801
|
-
* shell-out with the typed {@link list} action from `@unbrained/pm-cli/sdk/core`.
|
|
802
|
-
* `list-all` is the SDK alias for `list` with `excludeTerminal: false`; passing
|
|
803
|
-
* `full: true` + `includeBody: true` reproduces the full-metadata-with-body
|
|
804
|
-
* projection the shell-out parsed. `noTruncate: true` deliberately overrides any
|
|
805
|
-
* truncating limit and `strictRead: true` makes unreadable corpus entries a hard
|
|
806
|
-
* SDK error, and the returned receipt is STILL verified by
|
|
807
|
-
* {@link assertListResultComplete} — the 2026.8.14 truncated-default regression
|
|
808
|
-
* is exactly the silently-partial read this package refuses to reintroduce, so
|
|
809
|
-
* the guard does not trust the request options alone. Being an in-process SDK
|
|
810
|
-
* action (no child process), there is no spawn stdout buffer to size here; the
|
|
811
|
-
* completeness receipt is the over-run guard.
|
|
812
|
-
*
|
|
813
|
-
* @param pmRoot - Tracker storage root to read.
|
|
814
|
-
* @param list - Injectable SDK list action (tests substitute a canned real
|
|
815
|
-
* result); defaults to the real {@link pmList}.
|
|
816
|
-
*/
|
|
817
|
-
export async function readPmItems(pmRoot, list = pmList) {
|
|
818
|
-
let result;
|
|
819
|
-
try {
|
|
820
|
-
result = await list({ full: true, includeBody: true, excludeTerminal: false, noTruncate: true, strictRead: true }, { pmRoot });
|
|
821
|
-
}
|
|
822
|
-
catch (err) {
|
|
823
|
-
throw new CommandError(`Could not read pm items via SDK list: ${err instanceof Error ? err.message : String(err)}`);
|
|
824
|
-
}
|
|
755
|
+
/** Read all types and lifecycle states without extension side effects, preserving SDK refusals. */
|
|
756
|
+
export async function readPmItems(pmRoot, list = listAllComplete) {
|
|
757
|
+
const result = await list({ includeBody: true }, { pmRoot, noExtensions: true });
|
|
825
758
|
assertListResultComplete(result);
|
|
826
|
-
return result.items
|
|
759
|
+
return result.items;
|
|
827
760
|
}
|
|
828
761
|
/** Per-item token estimate for one character of text (rough 4 chars/token). */
|
|
829
762
|
const TOKENS_PER_CHAR = 0.25;
|
|
@@ -1112,7 +1045,7 @@ async function recordPackServing(ctx, focus, neighbors) {
|
|
|
1112
1045
|
*/
|
|
1113
1046
|
async function measureContextOutput(ctx, pack, output, format, command, compress, outputPath) {
|
|
1114
1047
|
try {
|
|
1115
|
-
const measured = serveContextReceipt(ctx.pm_root, output, format === "json" ? "json" : "text", {
|
|
1048
|
+
const measured = await serveContextReceipt(ctx.pm_root, output, format === "json" ? "json" : "text", {
|
|
1116
1049
|
item_ids: [...pack.items, ...pack.neighbors].map((item) => item.id),
|
|
1117
1050
|
files: pack.links.filter((link) => link.kind === "file"),
|
|
1118
1051
|
}, {
|
|
@@ -1303,6 +1236,62 @@ function setupCommands(api) {
|
|
|
1303
1236
|
return renderedCommandResult(output);
|
|
1304
1237
|
},
|
|
1305
1238
|
});
|
|
1239
|
+
api.registerCommand({
|
|
1240
|
+
name: "context-next-evidence",
|
|
1241
|
+
description: "Plan the cheapest declared reads covering explicitly missing evidence; execute nothing.",
|
|
1242
|
+
flags: [
|
|
1243
|
+
{ long: "--packet", value_name: "file", description: "JSON missing criteria, revision contracts and available read estimates", type: "string" },
|
|
1244
|
+
{ long: "--check", value_name: "file", description: "Validate a saved JSON plan against the current packet", type: "string" },
|
|
1245
|
+
{ long: "--format", value_name: "format", description: "toon (default) or json", type: "string" },
|
|
1246
|
+
],
|
|
1247
|
+
async run(ctx) {
|
|
1248
|
+
const path = stringOption(ctx.options, "packet");
|
|
1249
|
+
const format = stringOption(ctx.options, "format") ?? (ctx.global.json ? "json" : "toon");
|
|
1250
|
+
if (!path || (format !== "json" && format !== "toon") || ctx.args.length)
|
|
1251
|
+
throw new NextEvidenceError("INVALID_ARGUMENT", "Supply --packet JSON and --format json or toon, without positional arguments.");
|
|
1252
|
+
const packet = parseNextEvidencePacket(readNextEvidenceJson(path));
|
|
1253
|
+
const check = stringOption(ctx.options, "check");
|
|
1254
|
+
const plan = check ? validateNextEvidencePlan(readNextEvidenceJson(check), packet) : planNextEvidence(packet);
|
|
1255
|
+
return renderedCommandResult(encodeNextEvidencePlan(plan, format));
|
|
1256
|
+
},
|
|
1257
|
+
});
|
|
1258
|
+
api.registerCommand({
|
|
1259
|
+
name: "context-evidence",
|
|
1260
|
+
description: "Pack explicit criterion evidence with exact coverage lost at a byte budget.",
|
|
1261
|
+
flags: [
|
|
1262
|
+
{ long: "--packet", value_name: "file", description: "JSON acceptance criteria and tracker field bindings", type: "string" },
|
|
1263
|
+
{ long: "--format", value_name: "format", description: "toon (default) or json", type: "string" },
|
|
1264
|
+
{ long: "--byte-budget", value_name: "n", description: "Complete-output UTF-8 byte ceiling (default 4000)", type: "string" },
|
|
1265
|
+
],
|
|
1266
|
+
async run(ctx) {
|
|
1267
|
+
const path = stringOption(ctx.options, "packet");
|
|
1268
|
+
const format = stringOption(ctx.options, "format") ?? (ctx.global.json ? "json" : "toon");
|
|
1269
|
+
if (!path || (format !== "json" && format !== "toon") || ctx.args.length)
|
|
1270
|
+
throw new EvidencePackingError("INVALID_ARGUMENT", "Supply --packet JSON with --format json or toon; no positional arguments are accepted.");
|
|
1271
|
+
const pack = await packCriterionEvidence(readEvidencePacket(path), createFreshnessReader(ctx.pm_root, "."), {
|
|
1272
|
+
format, byteBudget: Number(stringOption(ctx.options, "byte-budget", "byteBudget") ?? "4000"),
|
|
1273
|
+
});
|
|
1274
|
+
return renderedCommandResult(encodeEvidencePack(pack, format));
|
|
1275
|
+
},
|
|
1276
|
+
});
|
|
1277
|
+
api.registerCommand({
|
|
1278
|
+
name: "context-witnesses",
|
|
1279
|
+
description: "Find the smallest cited contradiction among declared packet assertions without editing sources.",
|
|
1280
|
+
flags: [
|
|
1281
|
+
{ long: "--packet", value_name: "file", description: "JSON packet of cited co-current claims", type: "string" },
|
|
1282
|
+
{ long: "--format", value_name: "format", description: "toon (default) or json", type: "string" },
|
|
1283
|
+
{ long: "--byte-budget", value_name: "n", description: "Complete-output UTF-8 byte ceiling (default 4000)", type: "string" },
|
|
1284
|
+
],
|
|
1285
|
+
async run(ctx) {
|
|
1286
|
+
const path = stringOption(ctx.options, "packet");
|
|
1287
|
+
const format = stringOption(ctx.options, "format") ?? (ctx.global.json ? "json" : "toon");
|
|
1288
|
+
if (!path || (format !== "json" && format !== "toon") || ctx.args.length)
|
|
1289
|
+
throw new WitnessError("INVALID_ARGUMENT", "Supply --packet JSON with --format json or toon; no positional arguments are accepted.");
|
|
1290
|
+
const budget = Number(stringOption(ctx.options, "byte-budget", "byteBudget") ?? "4000");
|
|
1291
|
+
const report = checkContextWitnesses(readWitnessPacket(path));
|
|
1292
|
+
return renderedCommandResult(encodeWitnessReport(report, format, budget));
|
|
1293
|
+
},
|
|
1294
|
+
});
|
|
1306
1295
|
for (const action of ["record", "resume"]) {
|
|
1307
1296
|
api.registerCommand({
|
|
1308
1297
|
name: `context-freshness ${action}`,
|
|
@@ -1517,7 +1506,7 @@ function setupCommands(api) {
|
|
|
1517
1506
|
if (!receiptId)
|
|
1518
1507
|
throw new CommandError("Usage evidence requires --receipt", EXIT_CODE.USAGE);
|
|
1519
1508
|
try {
|
|
1520
|
-
recordReceiptUsage(ctx.pm_root, { receipt_id: receiptId, session, citations, touched_items: touchedItems, edited_files: editedFiles });
|
|
1509
|
+
await recordReceiptUsage(ctx.pm_root, { receipt_id: receiptId, session, citations, touched_items: touchedItems, edited_files: editedFiles });
|
|
1521
1510
|
}
|
|
1522
1511
|
catch (error) {
|
|
1523
1512
|
throw new CommandError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
@@ -1558,13 +1547,13 @@ function setupCommands(api) {
|
|
|
1558
1547
|
/** Register context commands and renderers with checked host behavior and package metadata. */
|
|
1559
1548
|
export default {
|
|
1560
1549
|
name: "pm-context",
|
|
1561
|
-
version: "2026.10.
|
|
1550
|
+
version: "2026.10.25",
|
|
1562
1551
|
description: "Generate deterministic pm context packs for agent handoffs, reviews, and status briefs",
|
|
1563
1552
|
activate(api) {
|
|
1564
1553
|
setupCommands(api);
|
|
1565
1554
|
if (typeof api.registerRenderer === "function") {
|
|
1566
1555
|
const rendererOwnership = {
|
|
1567
|
-
commands: ["context-pack", "context-pack since", "context-handoff", "context-usage", "context-freshness record", "context-freshness resume"],
|
|
1556
|
+
commands: ["context-pack", "context-pack since", "context-handoff", "context-usage", "context-freshness record", "context-freshness resume", "context-witnesses", "context-evidence", "context-next-evidence"],
|
|
1568
1557
|
resultDiscriminator: isRenderedCommandResult,
|
|
1569
1558
|
};
|
|
1570
1559
|
api.registerRenderer("toon", renderCommandResult, rendererOwnership);
|