@unbrained/pm-cli 2026.8.17 → 2026.8.18
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 +35 -3
- package/README.md +3 -3
- package/dist/cli/error-guidance.js +7 -4
- package/dist/cli/register-list-query.js +132 -51
- package/dist/cli-bundle/bundle-manifest.json +146 -146
- package/dist/cli-bundle/chunks/chunk-5UZZAJKR.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-YM2YAMF7.js → chunk-ALDJGKAK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HBJAS566.js → chunk-BSK2IN3C.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-JOKATURE.js → chunk-GNFAFIJI.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-TPXZIBIV.js → chunk-PVRUN5ZS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7IBRGCHX.js → chunk-RZQTVMRQ.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +3 -0
- package/dist/cli-bundle/chunks/chunk-UYCLQVL2.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-3UEGXBMR.js → chunk-YRGOLZA7.js} +58 -54
- package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +11 -0
- package/dist/cli-bundle/chunks/{register-mutation-4WBRPXLV.js → register-mutation-6YGU3GPH.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-SSENDH5B.js → register-operations-4HTFC6J7.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-DOSFBGKE.js → register-setup-PPPEF3SN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ZQPGZZWQ.js → chunk-3TKWMNKF.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-5AF3ZBNB.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SYZENPIT.js → chunk-EUEGXZ2A.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XKAMP5OU.js → chunk-EX6MKP2X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CYFK5UPB.js → chunk-K43KKAFS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ATEY76SX.js → chunk-M62NO7EI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SALH6B6K.js → chunk-ODOVCP45.js} +5 -5
- package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-TN4AE665.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-UI6AJ5TD.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MHPIL773.js → chunk-V5XTGLK7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KP2VQQVQ.js → chunk-WGHQVU6P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +2 -0
- package/dist/cli-bundle/main.js +7 -7
- 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 +31 -31
- 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 +4 -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/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-reachability.js +4 -4
- 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 +64 -13
- 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.js +11 -7
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +70 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +345 -0
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +19 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +61 -14
- 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 +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- 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/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -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/generated/generated-error-code-catalog-part-1.js +54 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -14
- package/dist/sdk/guide-topics.js +5 -5
- package/dist/sdk/index.d.ts +4 -3
- package/dist/sdk/index.js +6 -5
- 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.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/list.js +5 -2
- package/dist/sdk/query.d.ts +1 -0
- package/dist/sdk/query.js +3 -2
- package/dist/sdk/read-output-contracts.d.ts +2 -2
- package/dist/sdk/read-output-contracts.js +36 -9
- package/dist/sdk/runtime-extended-actions.js +10 -2
- package/dist/sdk/runtime.d.ts +8 -2
- package/dist/sdk/runtime.js +11 -8
- 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 +23 -23
- package/docs/ONBOARDING.md +4 -4
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +2 -0
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +36 -2
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/agent-task-token-baseline.json +5 -5
- package/marketplace.json +2 -2
- package/package.json +3 -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/sdk/public-surface.json +652 -31
- 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/register-list-query-Q7KII4G5.js +0 -10
- 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-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
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/** Stable reasons a purported whole-workspace list cannot be trusted. */
|
|
2
|
+
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cc342d27-aa2d-5e84-8441-46a35c42dc00")}catch(e){}}();
|
|
4
|
+
export const PM_COMPLETE_LIST_FINDING_CODES = [
|
|
5
|
+
"invalid_envelope",
|
|
6
|
+
"source_incomplete",
|
|
7
|
+
"source_unchecked",
|
|
8
|
+
"filtered_corpus",
|
|
9
|
+
"terminal_items_excluded",
|
|
10
|
+
"strict_read_unproven",
|
|
11
|
+
"page_incomplete",
|
|
12
|
+
"count_mismatch",
|
|
13
|
+
"projection_incomplete",
|
|
14
|
+
"field_omission",
|
|
15
|
+
"budget_compaction",
|
|
16
|
+
"budget_omission",
|
|
17
|
+
"session_projection",
|
|
18
|
+
"invalid_item_id",
|
|
19
|
+
"duplicate_item_id",
|
|
20
|
+
];
|
|
21
|
+
/** Typed fail-closed error raised when whole-corpus proof is absent. */
|
|
22
|
+
export class PmCompleteListValidationError extends Error {
|
|
23
|
+
/** Structured failure and executable recovery evidence. */
|
|
24
|
+
receipt;
|
|
25
|
+
/** Construct an immutable complete-list validation failure. */
|
|
26
|
+
constructor(findings) {
|
|
27
|
+
super(`Complete-list certification failed: ${findings.map((finding) => finding.code).join(", ")}.`);
|
|
28
|
+
this.name = "PmCompleteListValidationError";
|
|
29
|
+
this.receipt = {
|
|
30
|
+
contract_version: 1,
|
|
31
|
+
contract: "complete_list",
|
|
32
|
+
findings,
|
|
33
|
+
recovery: {
|
|
34
|
+
suggested_retry: "pm list-all --full --strict-read --no-truncate --output-budget unbounded --json",
|
|
35
|
+
sdk: "await client.listAllComplete()",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Build the canonical all-status, full, strict, and unbounded list request. */
|
|
41
|
+
export function createCompleteListOptions(options = {}) {
|
|
42
|
+
return {
|
|
43
|
+
excludeTerminal: false,
|
|
44
|
+
full: true,
|
|
45
|
+
...(options.includeBody === undefined
|
|
46
|
+
? {}
|
|
47
|
+
: { includeBody: options.includeBody }),
|
|
48
|
+
noTruncate: true,
|
|
49
|
+
outputBudget: "unbounded",
|
|
50
|
+
outputLimit: "unbounded",
|
|
51
|
+
strictRead: true,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Narrow an unknown envelope fragment to a non-array object. */
|
|
55
|
+
function isRecord(value) {
|
|
56
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
57
|
+
}
|
|
58
|
+
/** Append one finding only when its invariant failed. */
|
|
59
|
+
function addFinding(findings, condition, code, message) {
|
|
60
|
+
if (condition)
|
|
61
|
+
findings.push({ code, message });
|
|
62
|
+
}
|
|
63
|
+
/** Append source-scan and filter-scope findings for a list envelope. */
|
|
64
|
+
function inspectSourceScope(candidate, findings) {
|
|
65
|
+
const completeness = isRecord(candidate.completeness)
|
|
66
|
+
? candidate.completeness
|
|
67
|
+
: {};
|
|
68
|
+
addFinding(findings, completeness.status === "partial", "source_incomplete", "The source scan reported unreadable tracker artifacts.");
|
|
69
|
+
addFinding(findings, completeness.status !== "complete" && completeness.status !== "partial", "source_unchecked", "The source scan did not prove completeness.");
|
|
70
|
+
const filters = isRecord(candidate.filters) ? candidate.filters : {};
|
|
71
|
+
const runtimeFilters = isRecord(filters.runtime_filters)
|
|
72
|
+
? filters.runtime_filters
|
|
73
|
+
: {};
|
|
74
|
+
const filterEchoKeys = new Set([
|
|
75
|
+
"exclude_terminal",
|
|
76
|
+
"include_body",
|
|
77
|
+
"no_truncate",
|
|
78
|
+
"runtime_filters",
|
|
79
|
+
"status",
|
|
80
|
+
"strict_read",
|
|
81
|
+
]);
|
|
82
|
+
addFinding(findings, filters.status !== "all" ||
|
|
83
|
+
Object.keys(runtimeFilters).length > 0 ||
|
|
84
|
+
Object.keys(filters).some((key) => !filterEchoKeys.has(key)), "filtered_corpus", "The list did not explicitly select every lifecycle status.");
|
|
85
|
+
addFinding(findings, filters.exclude_terminal === true, "terminal_items_excluded", "Terminal lifecycle states were explicitly excluded.");
|
|
86
|
+
addFinding(findings, filters.strict_read !== true, "strict_read_unproven", "The result does not echo strict source-read enforcement.");
|
|
87
|
+
return filters;
|
|
88
|
+
}
|
|
89
|
+
/** Append pagination, count, projection, and field-omission findings. */
|
|
90
|
+
function inspectEnvelopeShape(candidate, filters, findings) {
|
|
91
|
+
addFinding(findings, candidate.has_more !== false ||
|
|
92
|
+
candidate.next_cursor !== null ||
|
|
93
|
+
candidate.truncated !== false ||
|
|
94
|
+
candidate.applied_limit !== undefined ||
|
|
95
|
+
filters.no_truncate !== true, "page_incomplete", "Pagination or a row ceiling may have withheld items.");
|
|
96
|
+
addFinding(findings, candidate.count !== candidate.items.length ||
|
|
97
|
+
candidate.total !== candidate.items.length, "count_mismatch", "Envelope counts do not equal the returned item count.");
|
|
98
|
+
const projection = isRecord(candidate.projection) ? candidate.projection : {};
|
|
99
|
+
addFinding(findings, projection.mode !== "full" || projection.fields !== null, "projection_incomplete", "The result is not the full metadata projection.");
|
|
100
|
+
const omissionReceipt = isRecord(candidate.omission_receipt)
|
|
101
|
+
? candidate.omission_receipt
|
|
102
|
+
: undefined;
|
|
103
|
+
addFinding(findings, omissionReceipt?.has_omissions === true, "field_omission", "The omission receipt reports withheld field groups.");
|
|
104
|
+
}
|
|
105
|
+
/** Append universal-output and cross-call-session findings. */
|
|
106
|
+
function inspectOutputScope(candidate, findings) {
|
|
107
|
+
const readOutput = isRecord(candidate.read_output)
|
|
108
|
+
? candidate.read_output
|
|
109
|
+
: undefined;
|
|
110
|
+
addFinding(findings, readOutput?.strings_compacted === true ||
|
|
111
|
+
readOutput?.rows_compacted === true ||
|
|
112
|
+
candidate.output_budget_truncation !== undefined, "budget_compaction", "Universal output shaping compacted the result.");
|
|
113
|
+
const budgetExceeded = isRecord(candidate.output_budget_exceeded)
|
|
114
|
+
? candidate.output_budget_exceeded
|
|
115
|
+
: undefined;
|
|
116
|
+
addFinding(findings, readOutput?.result_omitted === true ||
|
|
117
|
+
budgetExceeded?.omitted_result === true, "budget_omission", "Universal output shaping omitted the useful result.");
|
|
118
|
+
addFinding(findings, candidate.read_session !== undefined, "session_projection", "A cross-call read session can suppress previously served facts.");
|
|
119
|
+
}
|
|
120
|
+
/** Append row-identity findings that prevent exact set reasoning. */
|
|
121
|
+
function inspectItemIds(items, findings) {
|
|
122
|
+
const ids = items.map((item) => isRecord(item) && typeof item.id === "string" ? item.id.trim() : "");
|
|
123
|
+
addFinding(findings, ids.some((id) => id.length === 0), "invalid_item_id", "Every full item row must carry a non-empty string id.");
|
|
124
|
+
addFinding(findings, new Set(ids).size !== ids.length, "duplicate_item_id", "Every item id must occur exactly once.");
|
|
125
|
+
}
|
|
126
|
+
/** Inspect an unknown result and report every missing whole-corpus invariant. */
|
|
127
|
+
export function inspectCompleteListResult(candidate) {
|
|
128
|
+
if (!isRecord(candidate) || !Array.isArray(candidate.items)) {
|
|
129
|
+
return {
|
|
130
|
+
ok: false,
|
|
131
|
+
findings: [
|
|
132
|
+
{
|
|
133
|
+
code: PM_COMPLETE_LIST_FINDING_CODES[0],
|
|
134
|
+
message: "The result must be an object with an items array.",
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const envelope = candidate;
|
|
140
|
+
const findings = [];
|
|
141
|
+
const filters = inspectSourceScope(envelope, findings);
|
|
142
|
+
inspectEnvelopeShape(envelope, filters, findings);
|
|
143
|
+
inspectOutputScope(envelope, findings);
|
|
144
|
+
inspectItemIds(envelope.items, findings);
|
|
145
|
+
return { ok: findings.length === 0, findings };
|
|
146
|
+
}
|
|
147
|
+
/** Certify a result as the whole tracker corpus or throw a typed recovery error. */
|
|
148
|
+
export function certifyCompleteListResult(candidate) {
|
|
149
|
+
const inspection = inspectCompleteListResult(candidate);
|
|
150
|
+
if (!inspection.ok) {
|
|
151
|
+
throw new PmCompleteListValidationError(inspection.findings);
|
|
152
|
+
}
|
|
153
|
+
const result = candidate;
|
|
154
|
+
return {
|
|
155
|
+
...result,
|
|
156
|
+
complete_list: {
|
|
157
|
+
contract_version: 1,
|
|
158
|
+
item_count: result.items.length,
|
|
159
|
+
unique_item_id_count: new Set(result.items.map((item) => item.id)).size,
|
|
160
|
+
terminal_items_included: true,
|
|
161
|
+
source_complete: true,
|
|
162
|
+
full_projection: true,
|
|
163
|
+
no_omissions: true,
|
|
164
|
+
unbounded: true,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/** Assert whole-corpus completeness while narrowing the candidate type in place. */
|
|
169
|
+
export function assertCompleteListResult(candidate) {
|
|
170
|
+
certifyCompleteListResult(candidate);
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=complete-list.js.map
|
|
173
|
+
//# debugId=cc342d27-aa2d-5e84-8441-46a35c42dc00
|
package/dist/sdk/query/list.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm list command surface and its agent-facing runtime behavior.
|
|
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]="41f54a9b-b7ba-52c1-bd84-76aa57021827")}catch(e){}}();
|
|
8
8
|
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
9
9
|
import { getActiveExtensionRegistrations, hasActiveOnReadHooks, } from "../../core/extensions/index.js";
|
|
10
10
|
import { toItemRecord } from "../../core/item/item-record.js";
|
|
@@ -1106,6 +1106,9 @@ function buildVerboseListFilters(params) {
|
|
|
1106
1106
|
if (noTruncate) {
|
|
1107
1107
|
filters.no_truncate = true;
|
|
1108
1108
|
}
|
|
1109
|
+
if (options.strictRead === true) {
|
|
1110
|
+
filters.strict_read = true;
|
|
1111
|
+
}
|
|
1109
1112
|
if (treeEnabled) {
|
|
1110
1113
|
filters.tree = true;
|
|
1111
1114
|
if (treeDepth !== undefined) {
|
|
@@ -1240,4 +1243,4 @@ export const _testOnly = {
|
|
|
1240
1243
|
withTreeMetadata,
|
|
1241
1244
|
};
|
|
1242
1245
|
//# sourceMappingURL=list.js.map
|
|
1243
|
-
//# debugId=
|
|
1246
|
+
//# debugId=41f54a9b-b7ba-52c1-bd84-76aa57021827
|
package/dist/sdk/query.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Provides focused read, search, pagination, and context-ranking primitives.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./query/list.js";
|
|
7
|
+
export * from "./query/complete-list.js";
|
|
7
8
|
export * from "./query/search.js";
|
|
8
9
|
export { runActivity, type ActivityCommandOptions, type ActivityEntry, type ActivityResult, type CompactActivityEntry, } from "./query/activity.js";
|
|
9
10
|
export * from "./query/aggregate.js";
|
package/dist/sdk/query.js
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Provides focused read, search, pagination, and context-ranking primitives.
|
|
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]="036baf5a-3ba9-55ea-a11b-d9e94a848b92")}catch(e){}}();
|
|
8
8
|
export * from "./query/list.js";
|
|
9
|
+
export * from "./query/complete-list.js";
|
|
9
10
|
export * from "./query/search.js";
|
|
10
11
|
export { runActivity, } from "./query/activity.js";
|
|
11
12
|
export * from "./query/aggregate.js";
|
|
@@ -29,4 +30,4 @@ export * from "./context-usage.js";
|
|
|
29
30
|
export * from "./workspace-memory.js";
|
|
30
31
|
export * from "./duplicates.js";
|
|
31
32
|
//# sourceMappingURL=query.js.map
|
|
32
|
-
//# debugId=
|
|
33
|
+
//# debugId=036baf5a-3ba9-55ea-a11b-d9e94a848b92
|
|
@@ -5,7 +5,7 @@ export declare const PM_READ_OUTPUT_DIMENSIONS: readonly ["include", "amount", "
|
|
|
5
5
|
/** One member of the universal read-output dimension set. */
|
|
6
6
|
export type PmReadOutputDimension = (typeof PM_READ_OUTPUT_DIMENSIONS)[number];
|
|
7
7
|
/** Built-in command roots whose primary operation is a read. */
|
|
8
|
-
export declare const PM_READ_OUTPUT_SURFACES: readonly ["list", "context", "search", "get", "next", "health", "deps", "graph", "history", "activity", "validate", "events", "contracts", "comments", "notes", "files", "docs", "stats", "aggregate", "package-manage", "comments-audit", "assurance"];
|
|
8
|
+
export declare const PM_READ_OUTPUT_SURFACES: readonly ["list", "context", "search", "get", "next", "health", "deps", "graph", "history", "activity", "validate", "events", "contracts", "comments", "notes", "files", "docs", "stats", "aggregate", "package-catalog", "package-manage", "comments-audit", "assurance"];
|
|
9
9
|
/** Built-in read command supported by the universal output contract. */
|
|
10
10
|
export type PmReadOutputSurface = (typeof PM_READ_OUTPUT_SURFACES)[number];
|
|
11
11
|
/** Canonical output controls accepted by every built-in read action. */
|
|
@@ -226,7 +226,7 @@ export declare const PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS: readonly ["--outpu
|
|
|
226
226
|
/** Universal output contract for every built-in read surface. */
|
|
227
227
|
export declare const PM_READ_OUTPUT_SURFACE_CONTRACTS: readonly PmReadOutputSurfaceContract[];
|
|
228
228
|
/** Resolve a command or list/context alias to its canonical read-output surface. */
|
|
229
|
-
export declare function resolveReadOutputSurface(command: string): PmReadOutputSurface | undefined;
|
|
229
|
+
export declare function resolveReadOutputSurface(command: string, options?: Record<string, unknown>): PmReadOutputSurface | undefined;
|
|
230
230
|
/** Reject malformed or mutation-scoped universal output controls before command execution. */
|
|
231
231
|
export declare function validateReadOutputOptions(command: string, options: Record<string, unknown>): void;
|
|
232
232
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* surface without coupling package authors to command-specific option names.
|
|
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]="db1d54b0-ff27-51f5-a179-14556ced24eb")}catch(e){}}();
|
|
9
9
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
10
10
|
import { PmCliError } from "../core/shared/errors.js";
|
|
11
11
|
import { compactReadOutputToBudget, estimateReadOutputTokens, updateReadOutputReceiptEstimate, } from "./read-output-budget.js";
|
|
@@ -43,6 +43,7 @@ export const PM_READ_OUTPUT_SURFACES = [
|
|
|
43
43
|
"docs",
|
|
44
44
|
"stats",
|
|
45
45
|
"aggregate",
|
|
46
|
+
"package-catalog",
|
|
46
47
|
"package-manage",
|
|
47
48
|
"comments-audit",
|
|
48
49
|
"assurance",
|
|
@@ -135,6 +136,7 @@ const LEGACY_FLAGS_BY_COMMAND = {
|
|
|
135
136
|
docs: {},
|
|
136
137
|
stats: {},
|
|
137
138
|
aggregate: {},
|
|
139
|
+
"package-catalog": {},
|
|
138
140
|
"package-manage": {},
|
|
139
141
|
"comments-audit": {},
|
|
140
142
|
assurance: {},
|
|
@@ -208,15 +210,26 @@ const SURFACE_CONTRACT_BY_COMMAND = new Map(PM_READ_OUTPUT_SURFACE_CONTRACTS.map
|
|
|
208
210
|
contract,
|
|
209
211
|
]));
|
|
210
212
|
/** Resolve a command or list/context alias to its canonical read-output surface. */
|
|
211
|
-
export function resolveReadOutputSurface(command) {
|
|
213
|
+
export function resolveReadOutputSurface(command, options = {}) {
|
|
212
214
|
const normalizedCommand = command
|
|
213
215
|
.trim()
|
|
214
216
|
.toLowerCase()
|
|
215
217
|
.replaceAll(/\s+/gu, " ");
|
|
216
|
-
const
|
|
217
|
-
normalizedCommand === "
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
const packageMode = normalizedCommand === "package catalog" ||
|
|
219
|
+
normalizedCommand === "packages catalog" ||
|
|
220
|
+
normalizedCommand === "package-catalog" ||
|
|
221
|
+
((normalizedCommand === "package" ||
|
|
222
|
+
normalizedCommand === "packages" ||
|
|
223
|
+
normalizedCommand === "extension") &&
|
|
224
|
+
(options.catalog === true ||
|
|
225
|
+
options.target === "catalog" ||
|
|
226
|
+
options.action === "catalog"));
|
|
227
|
+
const root = packageMode
|
|
228
|
+
? "package-catalog"
|
|
229
|
+
: normalizedCommand === "package manage" ||
|
|
230
|
+
normalizedCommand === "package-manage"
|
|
231
|
+
? "package-manage"
|
|
232
|
+
: normalizedCommand.split(" ")[0];
|
|
220
233
|
const normalized = root.startsWith("list-")
|
|
221
234
|
? "list"
|
|
222
235
|
: root === "ctx"
|
|
@@ -247,6 +260,20 @@ const HYBRID_READ_MUTATION_KEYS = {
|
|
|
247
260
|
notes: ["add", "addJson", "stdin", "file", "edit", "delete"],
|
|
248
261
|
files: ["add", "addGlob", "remove", "migrate", "apply", "note"],
|
|
249
262
|
docs: ["add", "addGlob", "remove", "migrate", "note"],
|
|
263
|
+
"package-catalog": [
|
|
264
|
+
"activate",
|
|
265
|
+
"adopt",
|
|
266
|
+
"adoptAll",
|
|
267
|
+
"deactivate",
|
|
268
|
+
"doctor",
|
|
269
|
+
"init",
|
|
270
|
+
"install",
|
|
271
|
+
"manage",
|
|
272
|
+
"migrate",
|
|
273
|
+
"reload",
|
|
274
|
+
"scaffold",
|
|
275
|
+
"uninstall",
|
|
276
|
+
],
|
|
250
277
|
};
|
|
251
278
|
function hasCanonicalReadOutputOptions(options) {
|
|
252
279
|
return CANONICAL_OPTION_KEYS.some((key) => options[key] !== undefined);
|
|
@@ -290,7 +317,7 @@ const READ_OUTPUT_VALUE_VALIDATORS = [
|
|
|
290
317
|
export function validateReadOutputOptions(command, options) {
|
|
291
318
|
if (!hasCanonicalReadOutputOptions(options))
|
|
292
319
|
return;
|
|
293
|
-
const normalizedCommand = resolveReadOutputSurface(command);
|
|
320
|
+
const normalizedCommand = resolveReadOutputSurface(command, options);
|
|
294
321
|
if (!normalizedCommand) {
|
|
295
322
|
throw new PmCliError(`Universal output controls apply only to read commands; ${command || "this command"} is not a read surface.`, EXIT_CODE.USAGE);
|
|
296
323
|
}
|
|
@@ -471,7 +498,7 @@ function resolveEncodingValue(canonical, legacy) {
|
|
|
471
498
|
}
|
|
472
499
|
/** Resolve canonical and compatibility controls into the universal dimension set. */
|
|
473
500
|
export function resolveReadOutputDimensions(command, options) {
|
|
474
|
-
const normalizedCommand = resolveReadOutputSurface(command);
|
|
501
|
+
const normalizedCommand = resolveReadOutputSurface(command, options);
|
|
475
502
|
if (!normalizedCommand)
|
|
476
503
|
return undefined;
|
|
477
504
|
const contract = SURFACE_CONTRACT_BY_COMMAND.get(normalizedCommand);
|
|
@@ -1058,4 +1085,4 @@ export function resolveReadOutputEncoding(command, options) {
|
|
|
1058
1085
|
: undefined;
|
|
1059
1086
|
}
|
|
1060
1087
|
//# sourceMappingURL=read-output-contracts.js.map
|
|
1061
|
-
//# debugId=
|
|
1088
|
+
//# debugId=db1d54b0-ff27-51f5-a179-14556ced24eb
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0492d773-2af2-5072-8164-9f8aab536191")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
4
4
|
import { PmCliError } from "../core/shared/errors.js";
|
|
5
5
|
import { createUnknownSubcommandError } from "./agent/subcommand-recovery.js";
|
|
@@ -32,6 +32,13 @@ export function runRuntimeEvalAction(context) {
|
|
|
32
32
|
/** Dispatch one bounded mutation-event page through the public SDK runner. */
|
|
33
33
|
export function runRuntimeEventsAction(context) {
|
|
34
34
|
const input = mergedInput(context);
|
|
35
|
+
const rawCursorMode = input.cursorMode;
|
|
36
|
+
if (rawCursorMode !== undefined &&
|
|
37
|
+
rawCursorMode !== "batch" &&
|
|
38
|
+
rawCursorMode !== "row") {
|
|
39
|
+
throw new PmCliError("Mutation event cursor mode must be batch or row.", EXIT_CODE.USAGE, { code: "invalid_event_cursor_mode" });
|
|
40
|
+
}
|
|
41
|
+
const cursorMode = rawCursorMode;
|
|
35
42
|
return listMutationEvents({
|
|
36
43
|
cwd: readRuntimeString(input, "cwd"),
|
|
37
44
|
pmRoot: readRuntimeString(input, "path"),
|
|
@@ -43,6 +50,7 @@ export function runRuntimeEventsAction(context) {
|
|
|
43
50
|
? undefined
|
|
44
51
|
: parseRuntimeInteger(input.limit, "limit"),
|
|
45
52
|
full: input.full === true,
|
|
53
|
+
cursorMode,
|
|
46
54
|
...(input.provenance === undefined
|
|
47
55
|
? {}
|
|
48
56
|
: { provenance: input.provenance === true }),
|
|
@@ -161,4 +169,4 @@ export function runRuntimeSchedulingAction(context) {
|
|
|
161
169
|
return runRemind(title, input, context.global);
|
|
162
170
|
}
|
|
163
171
|
//# sourceMappingURL=runtime-extended-actions.js.map
|
|
164
|
-
//# debugId=
|
|
172
|
+
//# debugId=0492d773-2af2-5072-8164-9f8aab536191
|
package/dist/sdk/runtime.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { SEARCH_EXTENSION_FLAG_DEFINITIONS } from "./extension-contracts.js";
|
|
|
8
8
|
export type { FlagDefinition } from "../core/extensions/loader.js";
|
|
9
9
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
10
10
|
import type { ItemMetadata } from "../types/index.js";
|
|
11
|
+
import { type PmCompleteListOptions, type PmCompleteListResult } from "./query/complete-list.js";
|
|
12
|
+
export { PmCompleteListValidationError, assertCompleteListResult, certifyCompleteListResult, createCompleteListOptions, inspectCompleteListResult, type PmCompleteListCertificate, type PmCompleteListFailureReceipt, type PmCompleteListFinding, type PmCompleteListFindingCode, type PmCompleteListInspection, type PmCompleteListOptions, type PmCompleteListResult } from "./query/complete-list.js";
|
|
11
13
|
export type { WorkspaceExtensionCommandContract, WorkspaceFieldContract, } from "./workspace-contracts.js";
|
|
12
14
|
import { type PmReadOutputOptions, type PmReadOutputResultFor } from "./read-output-contracts.js";
|
|
13
15
|
export type { PmReadOutputBudgetExceeded, PmReadOutputOptions, PmReadOutputResult, PmReadOutputResultFor, PmReadOutputSurfaceContract, } from "./read-output-contracts.js";
|
|
@@ -138,6 +140,8 @@ export declare class PmClient {
|
|
|
138
140
|
listAllItemMetadataLight(): Promise<ItemMetadata[]>;
|
|
139
141
|
/** List items with the MCP/agent compact defaults. */
|
|
140
142
|
list<Options extends ReadOptions<ListOptions> = ListOptions>(options?: Options): ReadPromise<ListResult, Options>;
|
|
143
|
+
/** Return every status and full item row only after fail-closed corpus certification. */
|
|
144
|
+
listAllComplete(options?: PmCompleteListOptions): Promise<PmCompleteListResult>;
|
|
141
145
|
/** Search items with the MCP/agent compact defaults. */
|
|
142
146
|
search<Options extends ReadOptions<SearchOptions> = SearchOptions>(query: string, options?: Options): ReadPromise<SearchResult, Options>;
|
|
143
147
|
/** Read one item by id. */
|
|
@@ -336,7 +340,7 @@ export declare class PmClient {
|
|
|
336
340
|
/** Reload installed package extensions using the same action as `pm package reload`. */
|
|
337
341
|
packageReload(options?: PackageCommandOptions): Promise<PackageCommandResult>;
|
|
338
342
|
/** Read bundled package catalog metadata using the same action as `pm package catalog`. */
|
|
339
|
-
packageCatalog(options?:
|
|
343
|
+
packageCatalog<Options extends ReadOptions<PackageCommandOptions> = PackageCommandOptions>(options?: Options): ReadPromise<PackageCommandResult, Options>;
|
|
340
344
|
/** Enable an installed package using the same action as `pm package activate`. */
|
|
341
345
|
packageActivate(target: string, options?: PackageCommandOptions): Promise<PackageCommandResult>;
|
|
342
346
|
/** Disable an installed package using the same action as `pm package deactivate`. */
|
|
@@ -350,6 +354,8 @@ export declare class PmClient {
|
|
|
350
354
|
export declare function context<Options extends ReadOptions<ContextOptions> = ContextOptions>(options?: Options, clientOptions?: PmClientOptions): ReadPromise<ContextResult, Options>;
|
|
351
355
|
/** List items with the MCP/agent compact defaults without constructing a reusable client. */
|
|
352
356
|
export declare function list<Options extends ReadOptions<ListOptions> = ListOptions>(options?: Options, clientOptions?: PmClientOptions): ReadPromise<ListResult, Options>;
|
|
357
|
+
/** Return every status and full item row with fail-closed corpus proof. */
|
|
358
|
+
export declare function listAllComplete(options?: PmCompleteListOptions, clientOptions?: PmClientOptions): Promise<PmCompleteListResult>;
|
|
353
359
|
/** Search items with the MCP/agent compact defaults without constructing a reusable client. */
|
|
354
360
|
export declare function search<Options extends ReadOptions<SearchOptions> = SearchOptions>(query: string, options?: Options, clientOptions?: PmClientOptions): ReadPromise<SearchResult, Options>;
|
|
355
361
|
/** Read one item by id without constructing a reusable client. */
|
|
@@ -510,7 +516,7 @@ export declare function packageDescribe(target?: string, options?: PackageComman
|
|
|
510
516
|
/** Reload package extensions without constructing a reusable client. */
|
|
511
517
|
export declare function packageReload(options?: PackageCommandOptions, clientOptions?: PmClientOptions): Promise<PackageCommandResult>;
|
|
512
518
|
/** Read bundled package catalog metadata without constructing a reusable client. */
|
|
513
|
-
export declare function packageCatalog(options?:
|
|
519
|
+
export declare function packageCatalog<Options extends ReadOptions<PackageCommandOptions> = PackageCommandOptions>(options?: Options, clientOptions?: PmClientOptions): ReadPromise<PackageCommandResult, Options>;
|
|
514
520
|
/** Enable a package without constructing a reusable client. */
|
|
515
521
|
export declare function packageActivate(target: string, options?: PackageCommandOptions, clientOptions?: PmClientOptions): Promise<PackageCommandResult>;
|
|
516
522
|
/** Disable a package without constructing a reusable client. */
|
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]="48d9b905-70a1-52c3-9b9c-33624661e6eb")}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
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -23,6 +23,8 @@ import { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, } from "../c
|
|
|
23
23
|
import { getSettingsPath, resolvePmRoot } from "../core/store/paths.js";
|
|
24
24
|
import { readSettings } from "../core/store/settings.js";
|
|
25
25
|
import { listClientItemMetadataLight } from "./query/light-metadata.js";
|
|
26
|
+
import { certifyCompleteListResult, createCompleteListOptions } from "./query/complete-list.js";
|
|
27
|
+
export { PmCompleteListValidationError, assertCompleteListResult, certifyCompleteListResult, createCompleteListOptions, inspectCompleteListResult } from "./query/complete-list.js";
|
|
26
28
|
import { buildWorkspaceExtensionCommandContracts, buildWorkspaceFieldContracts, } from "./workspace-contracts.js";
|
|
27
29
|
import { PM_TOOL_ACTIONS } from "./cli-contracts/enum-contracts.js";
|
|
28
30
|
import { clearWorkspaceContractsCache, memoizeWorkspaceExtensionRegistrations, } from "./workspace-contracts-cache.js";
|
|
@@ -181,6 +183,8 @@ export class PmClient {
|
|
|
181
183
|
list(options = {}) {
|
|
182
184
|
return this.runTyped("list", { options });
|
|
183
185
|
}
|
|
186
|
+
/** Return every status and full item row only after fail-closed corpus certification. */
|
|
187
|
+
async listAllComplete(options = {}) { return certifyCompleteListResult(await this.list(createCompleteListOptions(options))); }
|
|
184
188
|
/** Search items with the MCP/agent compact defaults. */
|
|
185
189
|
search(query, options = {}) {
|
|
186
190
|
return this.runTyped("search", { query, options });
|
|
@@ -673,9 +677,7 @@ export class PmClient {
|
|
|
673
677
|
return this.runTyped("package-reload", { options });
|
|
674
678
|
}
|
|
675
679
|
/** Read bundled package catalog metadata using the same action as `pm package catalog`. */
|
|
676
|
-
packageCatalog(options = {}) {
|
|
677
|
-
return this.runTyped("package-catalog", { options });
|
|
678
|
-
}
|
|
680
|
+
packageCatalog(options = {}) { return this.runTyped("package-catalog", { options }); }
|
|
679
681
|
/** Enable an installed package using the same action as `pm package activate`. */
|
|
680
682
|
packageActivate(target, options = {}) {
|
|
681
683
|
return this.runTyped("package-activate", { target, options });
|
|
@@ -704,6 +706,8 @@ export function context(options = {}, clientOptions = {}) {
|
|
|
704
706
|
export function list(options = {}, clientOptions = {}) {
|
|
705
707
|
return new PmClient(clientOptions).list(options);
|
|
706
708
|
}
|
|
709
|
+
/** Return every status and full item row with fail-closed corpus proof. */
|
|
710
|
+
export function listAllComplete(options = {}, clientOptions = {}) { return new PmClient(clientOptions).listAllComplete(options); }
|
|
707
711
|
/** Search items with the MCP/agent compact defaults without constructing a reusable client. */
|
|
708
712
|
export function search(query, options = {}, clientOptions = {}) {
|
|
709
713
|
return new PmClient(clientOptions).search(query, options);
|
|
@@ -997,9 +1001,7 @@ export function packageReload(options = {}, clientOptions = {}) {
|
|
|
997
1001
|
return new PmClient(clientOptions).packageReload(options);
|
|
998
1002
|
}
|
|
999
1003
|
/** Read bundled package catalog metadata without constructing a reusable client. */
|
|
1000
|
-
export function packageCatalog(options = {}, clientOptions = {}) {
|
|
1001
|
-
return new PmClient(clientOptions).packageCatalog(options);
|
|
1002
|
-
}
|
|
1004
|
+
export function packageCatalog(options = {}, clientOptions = {}) { return new PmClient(clientOptions).packageCatalog(options); }
|
|
1003
1005
|
/** Enable a package without constructing a reusable client. */
|
|
1004
1006
|
export function packageActivate(target, options = {}, clientOptions = {}) {
|
|
1005
1007
|
return new PmClient(clientOptions).packageActivate(target, options);
|
|
@@ -1338,6 +1340,7 @@ async function runMcpListAction(ctx) {
|
|
|
1338
1340
|
const listOptions = applyContextIntentProjection("list", ctx.options);
|
|
1339
1341
|
if (listOptions.compact === undefined &&
|
|
1340
1342
|
listOptions.brief === undefined &&
|
|
1343
|
+
listOptions.full === undefined &&
|
|
1341
1344
|
listOptions.fields === undefined &&
|
|
1342
1345
|
listOptions.includeBody === undefined) {
|
|
1343
1346
|
listOptions.compact = true;
|
|
@@ -1933,4 +1936,4 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
|
|
|
1933
1936
|
}
|
|
1934
1937
|
}
|
|
1935
1938
|
//# sourceMappingURL=runtime.js.map
|
|
1936
|
-
//# debugId=
|
|
1939
|
+
//# debugId=48d9b905-70a1-52c3-9b9c-33624661e6eb
|
package/dist/types.d.ts
CHANGED
|
@@ -1078,6 +1078,11 @@ export interface PmSettings {
|
|
|
1078
1078
|
output: {
|
|
1079
1079
|
default_format: "toon" | "json";
|
|
1080
1080
|
};
|
|
1081
|
+
/** Agent and human interaction preferences that do not change command semantics. */
|
|
1082
|
+
ux?: {
|
|
1083
|
+
/** Emit one stderr migration hint when a deprecated command alias is invoked. */
|
|
1084
|
+
deprecation_hints?: boolean;
|
|
1085
|
+
};
|
|
1081
1086
|
/** Value that configures or reports history for this contract. */
|
|
1082
1087
|
history: {
|
|
1083
1088
|
missing_stream: "auto_create" | "strict_error";
|
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]="f6ab5bae-53b3-5feb-b89f-46e64afe7058")}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=f6ab5bae-53b3-5feb-b89f-46e64afe7058
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -9,8 +9,8 @@ Run this before heavy work:
|
|
|
9
9
|
```bash
|
|
10
10
|
pm context --limit 10
|
|
11
11
|
pm search "<request keywords>" --limit 10
|
|
12
|
-
pm list
|
|
13
|
-
pm list
|
|
12
|
+
pm list --status open --limit 20
|
|
13
|
+
pm list --status in_progress --limit 20
|
|
14
14
|
pm init --agent-guidance status
|
|
15
15
|
pm install guide-shell --project
|
|
16
16
|
pm guide workflows
|
|
@@ -28,8 +28,8 @@ Tracked documentation work: [pm-u9d0](../.agents/pm/epics/pm-u9d0.toon).
|
|
|
28
28
|
```bash
|
|
29
29
|
pm context --limit 10
|
|
30
30
|
pm search "<keywords>" --limit 10
|
|
31
|
-
pm list
|
|
32
|
-
pm list
|
|
31
|
+
pm list --status open --limit 20
|
|
32
|
+
pm list --status in_progress --limit 20
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
2. **Create only when necessary**
|
|
@@ -115,13 +115,13 @@ pm release <item-id>
|
|
|
115
115
|
| Require every query token | `pm search "<keywords>" --match-mode and` (hard-filter; `exact` = contiguous phrase; default `or` adds an all-terms ranking bonus) |
|
|
116
116
|
| Just the match count | `pm search "<keywords>" --count` (no hit rows; `count`/`total` carry the matched total) |
|
|
117
117
|
| Per-query score threshold | `pm search "<keywords>" --min-score 5` (overrides settings `search.score_threshold` for this query) |
|
|
118
|
-
| Every matched row (no cap) | `pm list
|
|
119
|
-
| Item bodies in bulk (one call) | `pm list
|
|
118
|
+
| Every matched row (no cap) | `pm list --all --no-truncate --brief` (`result.total` reports the full count when a `--limit`/`--offset` truncates) |
|
|
119
|
+
| Item bodies in bulk (one call) | `pm list --status open --json --include-body` (avoids one `pm get` per item) |
|
|
120
120
|
| Open work only | `pm search "<keywords>" --status open` (drops closed-history noise; did-you-mean on typos) |
|
|
121
121
|
| Scope search like list | `pm search "<keywords>" --type Task --assignee <name> --parent <id>` (full `pm list` filter parity) |
|
|
122
|
-
| Items changed since last window | `pm list
|
|
123
|
-
| Open items changed today | `pm list
|
|
124
|
-
| Items changed recently | `pm list
|
|
122
|
+
| Items changed since last window | `pm list --all --updated-after <prev-run-ISO> --brief` (relative `-2h`/`-7d` also work) |
|
|
123
|
+
| Open items changed today | `pm list --status open --today --brief` (local-midnight shorthand; mutually exclusive with `--updated-after`) |
|
|
124
|
+
| Items changed recently | `pm list --all --recent --brief` (last seven days; mutually exclusive with `--updated-after`) |
|
|
125
125
|
| Single item | `pm get <id>` |
|
|
126
126
|
| Full machine payload | `pm get <id> --full --json` |
|
|
127
127
|
| Command flags | `pm <command> --help --json` |
|
|
@@ -171,6 +171,22 @@ Use the canonical [guide topic map](README.md#guide-topic-map) when local in-CLI
|
|
|
171
171
|
- Use `--force` only for explicit override paths.
|
|
172
172
|
- Release when pausing, handing off, or after close.
|
|
173
173
|
|
|
174
|
+
## Reviewed Delivery Closeout
|
|
175
|
+
|
|
176
|
+
Treat PM evidence, item closure, and the generated changelog as part of the
|
|
177
|
+
reviewed change. Add all evidence known before merge to the active branch,
|
|
178
|
+
close and release the item there, regenerate `CHANGELOG.md`, and include those
|
|
179
|
+
artifacts in the same pull request.
|
|
180
|
+
|
|
181
|
+
If evidence depends on the merge commit SHA or a post-merge hosted result, use
|
|
182
|
+
a normal `main`-based follow-up pull request for the repository mutation. Never
|
|
183
|
+
push tracker-only or changelog-only closeout directly to `main`: that direct
|
|
184
|
+
commit becomes the release candidate but has no reviewed analyzer provenance,
|
|
185
|
+
so `Release analyzer readiness (main)` must refuse it. Record external
|
|
186
|
+
post-merge observations on GitHub without changing repository state when no
|
|
187
|
+
tracked closeout update is required. See [Releasing](RELEASING.md#reviewed-delivery-closeout)
|
|
188
|
+
for the release contract.
|
|
189
|
+
|
|
174
190
|
## Documentation Rules for Agents
|
|
175
191
|
|
|
176
192
|
- Keep [README](../README.md) short.
|