@unbrained/pm-cli 2026.8.16 → 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 +65 -6
- package/README.md +16 -16
- package/dist/cli/error-guidance.js +7 -4
- package/dist/cli/public.d.ts +2 -0
- package/dist/cli/public.js +21 -0
- package/dist/cli/register-list-query.js +132 -51
- package/dist/cli/register-mutation.js +4 -4
- package/dist/cli-bundle/bundle-manifest.json +148 -148
- package/dist/cli-bundle/chunks/chunk-5UZZAJKR.js +3 -0
- package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +2 -0
- package/dist/cli-bundle/chunks/chunk-BSK2IN3C.js +8 -0
- package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-73UGEBRS.js → chunk-GNFAFIJI.js} +10 -10
- package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-RIS565OA.js → chunk-PVRUN5ZS.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-RZQTVMRQ.js +2 -0
- 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-URW4QRMI.js → chunk-YRGOLZA7.js} +59 -55
- package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-KGDNRMCL.js → register-operations-4HTFC6J7.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-NVXBOD5I.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-C7JUBRFP.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-CODV5LUT.js → chunk-EUEGXZ2A.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-4JPEBFFC.js → chunk-EX6MKP2X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SSNDYZTM.js → chunk-K43KKAFS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6ROKKT4X.js → chunk-M62NO7EI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-T46KLOIB.js → chunk-ODOVCP45.js} +47 -47
- 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-V5XTGLK7.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +2 -0
- 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 -2
- 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 +43 -48
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +52 -0
- package/dist/core/history/event-index.d.ts +5 -0
- package/dist/core/history/event-index.js +133 -27
- package/dist/core/history/replay.js +32 -14
- package/dist/core/schema/fields-file.d.ts +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +115 -9
- package/dist/core/schema/runtime-schema.d.ts +3 -1
- package/dist/core/schema/runtime-schema.js +124 -3
- package/dist/core/sentry/helpers.js +3 -3
- package/dist/core/shared/constants.js +5 -2
- package/dist/core/shared/errors.d.ts +10 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +27 -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.d.ts +46 -6
- package/dist/sdk/agent/refusal-reachability.js +350 -8
- 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 +10 -4
- 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 +9 -5
- package/dist/sdk/compose.js +33 -3
- package/dist/sdk/context-intent-contracts.d.ts +8 -4
- package/dist/sdk/context-intent-contracts.js +76 -31
- 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/dependency-flag-validation.d.ts +9 -2
- package/dist/sdk/dependency-flag-validation.js +101 -35
- package/dist/sdk/environment/host-environment-errors.js +25 -7
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +78 -14
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +62 -14
- package/dist/sdk/governance/assurance-action.d.ts +3 -7
- package/dist/sdk/governance/assurance-action.js +97 -2
- package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
- package/dist/sdk/governance/boundary-fixtures.js +201 -0
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
- package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
- package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
- package/dist/sdk/governance/defect-recurrence.js +523 -0
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +4 -2
- package/dist/sdk/graph/governance.js +3 -2
- package/dist/sdk/guide-topics.js +193 -4
- package/dist/sdk/index.d.ts +7 -3
- package/dist/sdk/index.js +8 -5
- package/dist/sdk/init-agent-guidance.js +3 -3
- package/dist/sdk/lifecycle/create.js +4 -2
- package/dist/sdk/lifecycle/update-many.js +15 -2
- package/dist/sdk/lifecycle/update.js +5 -2
- package/dist/sdk/linked-artifacts.js +63 -14
- 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/get.d.ts +2 -0
- package/dist/sdk/query/get.js +32 -7
- 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/relationship-analytics.js +90 -14
- package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
- package/dist/sdk/relationship-kinds/contract.js +3 -2
- package/dist/sdk/relationships.d.ts +1 -1
- package/dist/sdk/relationships.js +11 -2
- 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/sdk/schema.d.ts +1 -0
- package/dist/sdk/schema.js +2 -2
- package/dist/sdk/test/execution.d.ts +6 -2
- package/dist/sdk/test/execution.js +39 -13
- package/dist/types.d.ts +34 -2
- package/dist/types.js +4 -2
- package/docs/AGENT_GUIDE.md +25 -9
- package/docs/CLI_GRAMMAR.md +106 -0
- package/docs/COMMANDS.md +23 -23
- package/docs/CONFIGURATION.md +58 -1
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
- package/docs/DEFECT_RECURRENCE.md +134 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
- package/docs/ONBOARDING.md +4 -4
- package/docs/QUICKSTART.md +1 -1
- package/docs/README.md +4 -0
- package/docs/RELATIONSHIP_GRAPH.md +16 -2
- package/docs/RELEASING.md +30 -6
- package/docs/SDK.md +74 -7
- package/docs/SDK_ARTIFACT_OUTPUT.md +72 -0
- package/docs/SDK_CONTEXT_COORDINATION.md +46 -12
- package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
- package/docs/TESTING.md +18 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
- package/docs/agent-task-token-baseline.json +5 -5
- package/marketplace.json +2 -2
- package/package.json +8 -5
- 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-claude/skills/pm-audit/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
- package/sdk/public-surface.json +1243 -54
- package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +0 -35
- package/dist/cli-bundle/chunks/chunk-I2LUWWR5.js +0 -3
- package/dist/cli-bundle/chunks/chunk-IC5W2T34.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OAC5NIV4.js +0 -3
- package/dist/cli-bundle/chunks/chunk-PANOOBIS.js +0 -13
- package/dist/cli-bundle/chunks/chunk-TK6N7HGM.js +0 -8
- package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +0 -197
- package/dist/cli-bundle/chunks/register-list-query-EYCXHZAG.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HAACPSUW.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-J4UFYHOD.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-NJ5RLEFD.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-QYZERYR5.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-TZATVC4G.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +0 -2
package/dist/sdk/query/get.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ interface ClaimStateContext {
|
|
|
19
19
|
last_release: ClaimHistoryContext | null;
|
|
20
20
|
}
|
|
21
21
|
type GetItemProjection = Partial<ItemMetadata> & {
|
|
22
|
+
/** Canonical item identity retained by every depth and field projection. */
|
|
23
|
+
id: string;
|
|
22
24
|
body?: string;
|
|
23
25
|
/** Number of notes omitted by a token-bounded projection. */
|
|
24
26
|
notes_count?: number;
|
package/dist/sdk/query/get.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the SDK-owned item query shared by every surface.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c35e787c-a9a1-5ffa-9dcf-62780fceed4c")}catch(e){}}();
|
|
8
8
|
import { pathExists, getActiveExtensionRegistrations, toItemRecord, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, TYPE_TO_FOLDER, PmCliError, buildItemNotFoundError, listAllItemMetadataLight, locateItem, readLocatedItem, getHistoryPath, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
|
|
9
9
|
import { readHistoryEntries } from "../history-read.js";
|
|
10
10
|
import { recordContextUsageTouches } from "../context-usage.js";
|
|
@@ -44,7 +44,10 @@ function itemMaterialFieldGroups(item, body) {
|
|
|
44
44
|
return [
|
|
45
45
|
...(body.length > 0 ? ["body"] : []),
|
|
46
46
|
...Object.entries(collectionCounts).flatMap(([name, count]) => count > 0 ? [name] : []),
|
|
47
|
-
...(collectionCounts.files +
|
|
47
|
+
...(collectionCounts.files +
|
|
48
|
+
collectionCounts.tests +
|
|
49
|
+
collectionCounts.docs >
|
|
50
|
+
0
|
|
48
51
|
? ["linked"]
|
|
49
52
|
: []),
|
|
50
53
|
"children",
|
|
@@ -195,6 +198,30 @@ function validateGetFields(fields, runtimeMetadataKeys) {
|
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
}
|
|
201
|
+
const EMPTY_PROJECTED_COLLECTION_FIELDS = new Set([
|
|
202
|
+
"comments",
|
|
203
|
+
"notes",
|
|
204
|
+
"learnings",
|
|
205
|
+
"files",
|
|
206
|
+
"tests",
|
|
207
|
+
"test_runs",
|
|
208
|
+
"docs",
|
|
209
|
+
"reminders",
|
|
210
|
+
"events",
|
|
211
|
+
"dependencies",
|
|
212
|
+
"plan_steps",
|
|
213
|
+
"plan_decisions",
|
|
214
|
+
"plan_discoveries",
|
|
215
|
+
"plan_validation",
|
|
216
|
+
]);
|
|
217
|
+
/** Resolve one projected metadata value while distinguishing an empty requested collection from an omitted field. */
|
|
218
|
+
function projectedMetadataValue(source, counts, field) {
|
|
219
|
+
if (Object.hasOwn(counts, field))
|
|
220
|
+
return counts[field];
|
|
221
|
+
if (source[field] !== undefined)
|
|
222
|
+
return source[field];
|
|
223
|
+
return EMPTY_PROJECTED_COLLECTION_FIELDS.has(field) ? [] : undefined;
|
|
224
|
+
}
|
|
198
225
|
function projectItemForFields(item, fields) {
|
|
199
226
|
const source = toItemRecord(item);
|
|
200
227
|
const omittedCounts = {
|
|
@@ -202,7 +229,7 @@ function projectItemForFields(item, fields) {
|
|
|
202
229
|
tests_count: item.tests?.length ?? 0,
|
|
203
230
|
collection_counts: itemCollectionCounts(item),
|
|
204
231
|
};
|
|
205
|
-
const projected = {};
|
|
232
|
+
const projected = { id: item.id };
|
|
206
233
|
for (const field of fields) {
|
|
207
234
|
const normalized = normalizeGetField(field);
|
|
208
235
|
if (normalized === "body" ||
|
|
@@ -216,9 +243,7 @@ function projectItemForFields(item, fields) {
|
|
|
216
243
|
normalized.startsWith("schedule.")) {
|
|
217
244
|
continue;
|
|
218
245
|
}
|
|
219
|
-
projected[normalized] =
|
|
220
|
-
? omittedCounts[normalized]
|
|
221
|
-
: source[normalized];
|
|
246
|
+
projected[normalized] = projectedMetadataValue(source, omittedCounts, normalized);
|
|
222
247
|
}
|
|
223
248
|
return projected;
|
|
224
249
|
}
|
|
@@ -438,4 +463,4 @@ export const _testOnlyGetCommand = {
|
|
|
438
463
|
shouldAutoIncludeGetChildren,
|
|
439
464
|
};
|
|
440
465
|
//# sourceMappingURL=get.js.map
|
|
441
|
-
//# debugId=
|
|
466
|
+
//# debugId=c35e787c-a9a1-5ffa-9dcf-62780fceed4c
|
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]="3167c288-0bcc-5a66-8aa0-ca5876ed7d36")}catch(e){}}();
|
|
3
3
|
import { createQueryFingerprint, decodeQueryCursor, encodeQueryCursor, } from "./pagination.js";
|
|
4
4
|
import { createRelationshipKindRegistry, } from "./relationships.js";
|
|
5
5
|
function visitImpactNeighbor(state, id, parent, root, after, limit) {
|
|
@@ -216,12 +216,80 @@ export function analyzeRelationshipExecution(graph, options = {}) {
|
|
|
216
216
|
provenance: { algorithm: "kahn-longest-path", edgeFamily: "ordering" },
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
/**
|
|
220
|
-
|
|
221
|
-
const
|
|
219
|
+
/** Build impact-only adjacency from stored source-to-target orientation. */
|
|
220
|
+
function buildImpactAdjacency(graph, direction, kinds) {
|
|
221
|
+
const adjacency = createAdjacency(graph.nodes());
|
|
222
|
+
const selectedKinds = kinds === undefined
|
|
223
|
+
? undefined
|
|
224
|
+
: new Set(kinds.map((kind) => graph.registry().require(kind).kind));
|
|
225
|
+
const edges = graph.edges();
|
|
226
|
+
for (const edge of edges) {
|
|
227
|
+
const definition = graph.registry().require(edge.kind);
|
|
228
|
+
if (selectedKinds !== undefined &&
|
|
229
|
+
!selectedKinds.has(edge.kind) &&
|
|
230
|
+
(definition.inverse === undefined ||
|
|
231
|
+
!selectedKinds.has(definition.inverse))) {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
appendNeighbor(adjacency, direction === "incoming" ? edge.target : edge.source, direction === "incoming" ? edge.source : edge.target);
|
|
235
|
+
}
|
|
236
|
+
return { adjacency, inspectedEdges: edges.length };
|
|
237
|
+
}
|
|
238
|
+
/** Combine complete direction-locked incoming and outgoing impact traversals. */
|
|
239
|
+
function analyzeBidirectionalGraphImpact(graph, root, options, after, limit, cursorFingerprint) {
|
|
240
|
+
const incoming = analyzeGraphImpact(graph, root, {
|
|
241
|
+
...options,
|
|
242
|
+
after: undefined,
|
|
243
|
+
direction: "incoming",
|
|
244
|
+
limit: undefined,
|
|
245
|
+
});
|
|
246
|
+
const outgoing = analyzeGraphImpact(graph, root, {
|
|
247
|
+
...options,
|
|
248
|
+
after: undefined,
|
|
249
|
+
direction: "outgoing",
|
|
250
|
+
limit: undefined,
|
|
251
|
+
});
|
|
252
|
+
const rows = new Map();
|
|
253
|
+
const candidates = [...incoming.affected, ...outgoing.affected].sort((left, right) => left.distance - right.distance ||
|
|
254
|
+
left.id.localeCompare(right.id) ||
|
|
255
|
+
left.path.join("\u0000").localeCompare(right.path.join("\u0000")));
|
|
256
|
+
for (const row of candidates) {
|
|
257
|
+
if (!rows.has(row.id)) {
|
|
258
|
+
rows.set(row.id, row);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const ordered = [...rows.values()].sort((left, right) => left.distance - right.distance || left.id.localeCompare(right.id));
|
|
262
|
+
const afterIndex = after === undefined || after === root
|
|
263
|
+
? -1
|
|
264
|
+
: ordered.findIndex((row) => row.id === after);
|
|
265
|
+
if (after !== undefined && after !== root && afterIndex < 0) {
|
|
266
|
+
throw new TypeError(`Unknown impact cursor item: ${after}`);
|
|
267
|
+
}
|
|
268
|
+
const affected = ordered.slice(afterIndex + 1, afterIndex + 1 + limit);
|
|
269
|
+
const rowLimitTruncated = afterIndex + 1 + affected.length < ordered.length;
|
|
270
|
+
return {
|
|
271
|
+
root,
|
|
272
|
+
affected,
|
|
273
|
+
exact: true,
|
|
274
|
+
truncated: incoming.truncated || outgoing.truncated || rowLimitTruncated,
|
|
275
|
+
...(rowLimitTruncated
|
|
276
|
+
? {
|
|
277
|
+
nextCursor: encodeQueryCursor(cursorFingerprint, affected.at(-1)?.id ?? root),
|
|
278
|
+
}
|
|
279
|
+
: {}),
|
|
280
|
+
cost: {
|
|
281
|
+
visitedNodes: incoming.cost.visitedNodes + outgoing.cost.visitedNodes,
|
|
282
|
+
inspectedEdges: incoming.cost.inspectedEdges + outgoing.cost.inspectedEdges,
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
/** Compute one stored-direction impact traversal and exact shortest explanation paths. */
|
|
287
|
+
function analyzeUnidirectionalGraphImpact(graph, root, options) {
|
|
288
|
+
const direction = options.direction;
|
|
222
289
|
const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;
|
|
223
290
|
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
224
291
|
const { fingerprint: cursorFingerprint, after } = resolveImpactCursor(root, options, direction, maxDepth);
|
|
292
|
+
const { adjacency, inspectedEdges } = buildImpactAdjacency(graph, direction, options.kinds);
|
|
225
293
|
const state = {
|
|
226
294
|
queue: [{ id: root, depth: 0 }],
|
|
227
295
|
seen: new Set([root]),
|
|
@@ -230,25 +298,19 @@ export function analyzeGraphImpact(graph, root, options = {}) {
|
|
|
230
298
|
cursorFound: after === undefined || after === root,
|
|
231
299
|
};
|
|
232
300
|
let visitedNodes = 0;
|
|
233
|
-
let inspectedEdges = 0;
|
|
234
301
|
let truncated = false;
|
|
235
302
|
let rowLimitTruncated = false;
|
|
236
303
|
traversal: for (let index = 0; index < state.queue.length; index += 1) {
|
|
237
304
|
options.signal?.throwIfAborted();
|
|
238
305
|
const current = state.queue[index];
|
|
239
306
|
visitedNodes += 1;
|
|
240
|
-
const adjacent =
|
|
241
|
-
direction,
|
|
242
|
-
kinds: options.kinds,
|
|
243
|
-
signal: options.signal,
|
|
244
|
-
});
|
|
245
|
-
inspectedEdges += adjacent.meta.inspectedEdges;
|
|
307
|
+
const adjacent = [...adjacency.get(current.id)].sort();
|
|
246
308
|
if (current.depth >= maxDepth) {
|
|
247
|
-
if (adjacent.
|
|
309
|
+
if (adjacent.some((id) => !state.seen.has(id)))
|
|
248
310
|
truncated = true;
|
|
249
311
|
continue;
|
|
250
312
|
}
|
|
251
|
-
for (const id of adjacent
|
|
313
|
+
for (const id of adjacent) {
|
|
252
314
|
const outcome = visitImpactNeighbor(state, id, current, root, after, limit);
|
|
253
315
|
if (outcome === "truncate") {
|
|
254
316
|
truncated = true;
|
|
@@ -273,6 +335,20 @@ export function analyzeGraphImpact(graph, root, options = {}) {
|
|
|
273
335
|
cost: { visitedNodes, inspectedEdges },
|
|
274
336
|
};
|
|
275
337
|
}
|
|
338
|
+
/** Compute bounded impact rows and exact shortest explanation paths. */
|
|
339
|
+
export function analyzeGraphImpact(graph, root, options = {}) {
|
|
340
|
+
const direction = options.direction ?? "outgoing";
|
|
341
|
+
if (direction !== "both") {
|
|
342
|
+
return analyzeUnidirectionalGraphImpact(graph, root, {
|
|
343
|
+
...options,
|
|
344
|
+
direction,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;
|
|
348
|
+
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
349
|
+
const { fingerprint, after } = resolveImpactCursor(root, options, direction, maxDepth);
|
|
350
|
+
return analyzeBidirectionalGraphImpact(graph, root, options, after, limit, fingerprint);
|
|
351
|
+
}
|
|
276
352
|
/** Analyze weak/strong components, isolates, and exact unique-neighbor hubs. */
|
|
277
353
|
export function analyzeKnowledgeGraph(graph) {
|
|
278
354
|
const nodes = [...graph.nodes()];
|
|
@@ -332,4 +408,4 @@ export function compareRelationshipSnapshots(before, after) {
|
|
|
332
408
|
};
|
|
333
409
|
}
|
|
334
410
|
//# sourceMappingURL=relationship-analytics.js.map
|
|
335
|
-
//# debugId=
|
|
411
|
+
//# debugId=3167c288-0bcc-5a66-8aa0-ca5876ed7d36
|
|
@@ -9,6 +9,8 @@ export type RelationshipDirection = "directed" | "undirected";
|
|
|
9
9
|
export type RelationshipCardinality = "one" | "many";
|
|
10
10
|
/** Lifecycle policy for a relationship kind. */
|
|
11
11
|
export type RelationshipLifecycle = "persistent" | "supersedable" | "ephemeral";
|
|
12
|
+
/** Temporal meaning carried by a directed relationship independently of execution precedence. */
|
|
13
|
+
export type RelationshipTemporalOrder = "source_after_target";
|
|
12
14
|
/** Direction in which an ordering edge contributes to execution precedence. */
|
|
13
15
|
export type RelationshipPrecedence = "source_before_target" | "target_before_source";
|
|
14
16
|
/** Endpoint that represents the structural parent for hierarchy kinds. */
|
|
@@ -23,6 +25,8 @@ export interface RelationshipKindDefinition {
|
|
|
23
25
|
inverse?: string;
|
|
24
26
|
/** Whether the kind participates in execution-order cycle checks. */
|
|
25
27
|
ordering: boolean;
|
|
28
|
+
/** Optional chronological constraint; recurrence uses source-after-target without becoming scheduling precedence. */
|
|
29
|
+
temporalOrder?: RelationshipTemporalOrder;
|
|
26
30
|
/** Execution direction for ordering kinds; defaults to source before target. */
|
|
27
31
|
precedence?: RelationshipPrecedence;
|
|
28
32
|
/** Whether the kind contributes to structural ancestry. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Stable built-in relationship ontology without graph or storage dependencies. */
|
|
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]="825e1dd9-4168-56f6-9183-b8cf75314b73")}catch(e){}}();
|
|
9
9
|
export const BUILTIN_RELATIONSHIP_KINDS = [
|
|
10
10
|
{ kind: "blocked_by", direction: "directed", inverse: "blocks", ordering: true, precedence: "target_before_source", hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", aliases: ["depends_on"], compatibilityVersion: 1, allowSelf: false },
|
|
11
11
|
{ kind: "blocks", direction: "directed", inverse: "blocked_by", ordering: true, precedence: "source_before_target", hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
@@ -15,8 +15,9 @@ export const BUILTIN_RELATIONSHIP_KINDS = [
|
|
|
15
15
|
{ kind: "discovered_from", direction: "directed", ordering: false, hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
16
16
|
{ kind: "incident_from", direction: "directed", ordering: false, hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
17
17
|
{ kind: "implements", direction: "directed", ordering: false, hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
18
|
+
{ kind: "recurs_from", direction: "directed", ordering: false, temporalOrder: "source_after_target", hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
18
19
|
{ kind: "verifies", direction: "directed", ordering: false, hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "persistent", compatibilityVersion: 1, allowSelf: false },
|
|
19
20
|
{ kind: "supersedes", direction: "directed", ordering: false, hierarchy: false, outgoing: "many", incoming: "many", lifecycle: "supersedable", compatibilityVersion: 1, allowSelf: false },
|
|
20
21
|
];
|
|
21
22
|
//# sourceMappingURL=contract.js.map
|
|
22
|
-
//# debugId=
|
|
23
|
+
//# debugId=825e1dd9-4168-56f6-9183-b8cf75314b73
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Dependency, ItemMetadata } from "../types/index.js";
|
|
8
8
|
import { type RelationshipKindDefinition } from "./relationship-kinds/contract.js";
|
|
9
|
-
export { BUILTIN_RELATIONSHIP_KINDS, type RelationshipCardinality, type RelationshipDirection, type RelationshipHierarchyDirection, type RelationshipKindDefinition, type RelationshipLifecycle, type RelationshipPrecedence, } from "./relationship-kinds/contract.js";
|
|
9
|
+
export { BUILTIN_RELATIONSHIP_KINDS, type RelationshipCardinality, type RelationshipDirection, type RelationshipHierarchyDirection, type RelationshipKindDefinition, type RelationshipLifecycle, type RelationshipPrecedence, type RelationshipTemporalOrder, } from "./relationship-kinds/contract.js";
|
|
10
10
|
/** One normalized relationship edge indexed by the graph kernel. */
|
|
11
11
|
export interface RelationshipEdge {
|
|
12
12
|
/** Source node identifier. */
|
|
@@ -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]="7f733de4-104b-50a9-9c0a-cd9850bfcd78")}catch(e){}}();
|
|
3
3
|
import { BUILTIN_RELATIONSHIP_KINDS, } from "./relationship-kinds/contract.js";
|
|
4
4
|
export { BUILTIN_RELATIONSHIP_KINDS, } from "./relationship-kinds/contract.js";
|
|
5
5
|
function normalizeKind(kind) {
|
|
@@ -36,6 +36,14 @@ function assertRelationshipPrecedence(definition, kind) {
|
|
|
36
36
|
if (!definition.ordering && definition.precedence !== undefined)
|
|
37
37
|
throw new TypeError(`Non-ordering relationship kind cannot declare precedence: ${kind}`);
|
|
38
38
|
}
|
|
39
|
+
function assertRelationshipTemporalOrder(definition, kind) {
|
|
40
|
+
if (definition.temporalOrder !== undefined &&
|
|
41
|
+
definition.temporalOrder !== "source_after_target")
|
|
42
|
+
throw new TypeError(`Invalid relationship temporal order for ${kind}`);
|
|
43
|
+
if (definition.direction !== "directed" &&
|
|
44
|
+
definition.temporalOrder !== undefined)
|
|
45
|
+
throw new TypeError(`Undirected relationship kind cannot declare temporal order: ${kind}`);
|
|
46
|
+
}
|
|
39
47
|
function assertRelationshipHierarchyDirection(definition, kind) {
|
|
40
48
|
if (definition.hierarchyDirection !== undefined &&
|
|
41
49
|
definition.hierarchyDirection !== "source_parent" &&
|
|
@@ -102,6 +110,7 @@ export class RelationshipKindRegistry {
|
|
|
102
110
|
assertRelationshipKindSemantics(definition, kind);
|
|
103
111
|
assertRelationshipKindPayload(definition, kind);
|
|
104
112
|
assertRelationshipPrecedence(definition, kind);
|
|
113
|
+
assertRelationshipTemporalOrder(definition, kind);
|
|
105
114
|
assertRelationshipHierarchyDirection(definition, kind);
|
|
106
115
|
if (this.#definitions.has(kind) || this.#aliases.has(kind))
|
|
107
116
|
throw new TypeError(`Relationship kind already registered: ${kind}`);
|
|
@@ -543,4 +552,4 @@ export function dependencyToRelationship(source, dependency, registry = defaultR
|
|
|
543
552
|
};
|
|
544
553
|
}
|
|
545
554
|
//# sourceMappingURL=relationships.js.map
|
|
546
|
-
//# debugId=
|
|
555
|
+
//# debugId=7f733de4-104b-50a9-9c0a-cd9850bfcd78
|
|
@@ -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. */
|