@unbrained/pm-cli 2026.8.13 → 2026.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +165 -113
- package/dist/cli/commander-usage.js +17 -4
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +52 -25
- package/dist/cli/main.js +40 -3
- package/dist/cli/register-mutation.js +4 -2
- package/dist/cli/register-operations.js +5 -5
- package/dist/cli-bundle/bundle-manifest.json +146 -178
- package/dist/cli-bundle/chunks/{chunk-F7FJYGK3.js → chunk-24GAV7XL.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-AIM6VT2N.js +13 -0
- package/dist/cli-bundle/chunks/chunk-DSWDLTDR.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-Q47C67TQ.js → chunk-J42EGKDK.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-KIEGUBYQ.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-3ZMOWAFM.js → chunk-KLKYLSDX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QGTUPEU5.js → chunk-LJHOAVGI.js} +59 -59
- package/dist/cli-bundle/chunks/chunk-MEM2ZS3O.js +5 -0
- package/dist/cli-bundle/chunks/chunk-QHPCJWEJ.js +35 -0
- package/dist/cli-bundle/chunks/{chunk-YLBAPY22.js → chunk-WLPDLNEZ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-4HIZ7EA3.js → register-list-query-CT3LFDDN.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-W64FZ5HN.js → register-mutation-NWEVA5YS.js} +3 -3
- package/dist/cli-bundle/chunks/register-operations-AHIAG5KM.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-634MFRXU.js → register-setup-ZJZFVAKE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4X57RE4U.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6XKF3PGV.js +18 -0
- package/dist/cli-bundle/focused-chunks/chunk-7NJ4QYQ2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-I75MANL7.js → chunk-EXZA4257.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITAUHSO6.js +50 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OOYYKQWX.js → chunk-KLVUMNXJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2RI2FESN.js → chunk-KT5XMYSX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-E3AVJ655.js → chunk-KTKH4IMG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-M67F5AIN.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-3DJSGWVB.js → chunk-NSPYTG6G.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-OKA6ELTL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-PUISBOPP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QLNMCESQ.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IIS2FRKL.js → chunk-SLKC6QLJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-U65UC4G3.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WTSER4WJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-2JP7W7GO.js → chunk-ZMFXQ7VF.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +41 -41
- 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 +110 -1
- 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 +2 -2
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/extensions/reserved-host-flags.js +3 -2
- package/dist/core/history/drift-scan.d.ts +6 -0
- package/dist/core/history/drift-scan.js +74 -50
- package/dist/core/history/replay.d.ts +14 -1
- package/dist/core/history/replay.js +45 -8
- package/dist/core/history/workspace-history.d.ts +59 -0
- package/dist/core/history/workspace-history.js +197 -10
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +13 -4
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/mcp/tool-definitions.js +9 -5
- package/dist/sdk/agent/refusal-reachability.d.ts +61 -0
- package/dist/sdk/agent/refusal-reachability.js +91 -3
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +7 -2
- package/dist/sdk/cli-contracts/completeness.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
- package/dist/sdk/cli-contracts/registration-helpers.js +3 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +176 -65
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -5
- package/dist/sdk/cli-contracts/tool-schema.js +10 -3
- package/dist/sdk/cli-program.js +4 -3
- package/dist/sdk/context-relevance.js +12 -4
- package/dist/sdk/core.d.ts +2 -2
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +26 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +50 -26
- package/dist/sdk/governance/assurance-action.d.ts +7 -1
- package/dist/sdk/governance/assurance-action.js +7 -6
- package/dist/sdk/governance/assurance-mutation-error.d.ts +42 -1
- package/dist/sdk/governance/assurance-mutation-error.js +27 -3
- package/dist/sdk/governance/assurance-runtime.js +12 -11
- package/dist/sdk/governance/assurance.d.ts +9 -0
- package/dist/sdk/governance/assurance.js +82 -16
- package/dist/sdk/governance/extension-host-version.d.ts +25 -0
- package/dist/sdk/governance/extension-host-version.js +105 -0
- package/dist/sdk/governance/health.d.ts +32 -1
- package/dist/sdk/governance/health.js +132 -28
- package/dist/sdk/governance/provenance-health.d.ts +27 -0
- package/dist/sdk/governance/provenance-health.js +95 -3
- package/dist/sdk/governance/validate-history-drift.d.ts +7 -0
- package/dist/sdk/governance/validate-history-drift.js +68 -0
- package/dist/sdk/governance/validate.js +9 -52
- package/dist/sdk/governance.d.ts +6 -0
- package/dist/sdk/governance.js +8 -2
- package/dist/sdk/graph/assembly.d.ts +23 -0
- package/dist/sdk/graph/assembly.js +54 -2
- package/dist/sdk/graph/durable-cache.js +50 -20
- package/dist/sdk/graph/governance-contracts.d.ts +1 -1
- package/dist/sdk/graph/governance-contracts.js +4 -2
- package/dist/sdk/graph/governance.d.ts +21 -1
- package/dist/sdk/graph/governance.js +94 -32
- package/dist/sdk/graph/index.d.ts +2 -2
- package/dist/sdk/graph/index.js +4 -4
- package/dist/sdk/graph/mutation-advisory.js +15 -7
- package/dist/sdk/graph/remediation.js +12 -2
- package/dist/sdk/history-read.d.ts +8 -0
- package/dist/sdk/history-read.js +2 -2
- package/dist/sdk/history-repair.d.ts +13 -1
- package/dist/sdk/history-repair.js +62 -18
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/linked-artifacts.js +16 -5
- package/dist/sdk/pagination.d.ts +15 -0
- package/dist/sdk/pagination.js +9 -5
- package/dist/sdk/query/context.d.ts +5 -1
- package/dist/sdk/query/context.js +14 -5
- package/dist/sdk/query/history.js +20 -3
- package/dist/sdk/read-output/continuation.d.ts +11 -0
- package/dist/sdk/read-output/continuation.js +132 -0
- package/dist/sdk/read-output-budget.d.ts +3 -1
- package/dist/sdk/read-output-budget.js +24 -13
- package/dist/sdk/read-output-contracts.d.ts +127 -7
- package/dist/sdk/read-output-contracts.js +381 -35
- package/dist/sdk/read-output-rows.d.ts +13 -0
- package/dist/sdk/read-output-rows.js +60 -2
- package/dist/sdk/runtime-input.js +4 -2
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.js +5 -3
- package/docs/ASSURANCE.md +68 -2
- package/docs/COMMANDS.md +39 -4
- package/docs/READ_OUTPUT_CONTRACTS.md +85 -8
- package/docs/RELATIONSHIP_GRAPH.md +20 -5
- package/docs/RELEASING.md +42 -5
- package/docs/SDK.md +12 -5
- package/docs/SDK_CONTEXT_INTEGRITY.md +94 -1
- package/docs/TESTING.md +23 -1
- package/docs/performance/sdk-entrypoint-import-costs.md +20 -13
- package/marketplace.json +2 -2
- package/package.json +7 -7
- package/packages/pm-beads/extensions/beads/index.ts +1 -0
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +1 -0
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/extensions/digital-twin/index.ts +7 -0
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +4 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +5 -0
- 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/extensions/linked-test-adapters/index.ts +6 -0
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -0
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +4 -0
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +2 -0
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/extensions/vcs/index.ts +7 -0
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +17 -4
- package/sdk/public-surface.json +1283 -157
- package/dist/cli-bundle/chunks/chunk-DEDU3DG7.js +0 -196
- package/dist/cli-bundle/chunks/chunk-DL5M5J3V.js +0 -13
- package/dist/cli-bundle/chunks/chunk-HIUZVCMN.js +0 -5
- package/dist/cli-bundle/chunks/chunk-IMGIN7R6.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TF3TPKPR.js +0 -34
- package/dist/cli-bundle/chunks/register-operations-C44ET7R5.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-27N23W6M.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-3BNVU6LC.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-6MLIRBLV.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-6XYLENDV.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-CP4K4WFS.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EBTNSFYE.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HC2OL2H2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-NFHFZH2Z.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OGC4XSBC.js +0 -17
- package/dist/cli-bundle/focused-chunks/chunk-PKPOZXLL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QDZUABWL.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QQX5TDFT.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-TEZIXMTH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-WEH6NSL6.js +0 -18
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm contracts 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]="8cdd82c3-979e-5f7f-bc72-592c7e55f11c")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, SETTINGS_DEFAULTS, PmCliError, activateExtensions, getActiveExtensionRegistrations, loadExtensions, pathExists, commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
9
9
|
import { buildMcpToolContracts, } from "../../mcp/tool-definitions.js";
|
|
10
10
|
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
@@ -18,6 +18,7 @@ import { PM_ERROR_CODE_CATALOG } from "../generated-error-code-catalog.js";
|
|
|
18
18
|
import { resolvePmCommandOutputEnvelope, } from "../output-contracts.js";
|
|
19
19
|
import { PM_COMMAND_EXIT_OUTCOME_CONTRACTS, resolvePmCommandExitContract, } from "./command-exit-contracts.js";
|
|
20
20
|
import { BUILTIN_RELATIONSHIP_KINDS } from "../relationship-kinds/contract.js";
|
|
21
|
+
import { ASSURANCE_GATE_TRIGGERS, ASSURANCE_MEASUREMENT_SOURCE_KINDS, } from "../governance/assurance.js";
|
|
21
22
|
const AGENT_BOOTSTRAP_FLAGS = new Map([
|
|
22
23
|
[
|
|
23
24
|
"claim",
|
|
@@ -224,19 +225,33 @@ const COMMAND_INTENTS = new Map([
|
|
|
224
225
|
["activity", "Read activity."],
|
|
225
226
|
["aggregate", "Group counts."],
|
|
226
227
|
["append", "Append body."],
|
|
228
|
+
["assurance", "Evaluate assurance."],
|
|
229
|
+
["beads", "Manage Beads interoperability."],
|
|
230
|
+
["cal", "Manage calendar integration."],
|
|
231
|
+
["calendar", "Manage calendar integration."],
|
|
232
|
+
["changelog", "Generate changelog output."],
|
|
227
233
|
["claim", "Claim work."],
|
|
228
234
|
["close", "Close work."],
|
|
235
|
+
["close-many", "Close matching work."],
|
|
236
|
+
["close-task", "Close task work."],
|
|
237
|
+
["command-kit", "Inspect command authoring primitives."],
|
|
229
238
|
["comments", "Manage comments."],
|
|
239
|
+
["comments-audit", "Audit comment governance."],
|
|
230
240
|
["completion", "Generate shell completions."],
|
|
231
241
|
["config", "Manage settings."],
|
|
232
242
|
["context", "Build context."],
|
|
233
243
|
["contracts", "Inspect contracts."],
|
|
234
244
|
["copy", "Copy work."],
|
|
235
245
|
["create", "Create work."],
|
|
246
|
+
["dedupe-audit", "Audit duplicate work."],
|
|
247
|
+
["dedupe-merge", "Merge duplicate work."],
|
|
236
248
|
["delete", "Delete work."],
|
|
237
249
|
["deps", "Manage deps."],
|
|
238
250
|
["duplicates", "Find duplicate clusters."],
|
|
239
251
|
["docs", "Link docs."],
|
|
252
|
+
["eval", "Run evaluations."],
|
|
253
|
+
["event", "Manage events."],
|
|
254
|
+
["events", "Read events."],
|
|
240
255
|
["files", "Link files."],
|
|
241
256
|
["focus", "Manage focus."],
|
|
242
257
|
["gc", "Clean caches."],
|
|
@@ -248,26 +263,53 @@ const COMMAND_INTENTS = new Map([
|
|
|
248
263
|
["history", "Inspect history."],
|
|
249
264
|
["init", "Initialize workspace."],
|
|
250
265
|
["install", "Install packages."],
|
|
266
|
+
["item", "Mutate work through typed operations."],
|
|
251
267
|
["learnings", "Manage learnings."],
|
|
252
268
|
["list", "List work."],
|
|
269
|
+
["list-all", "List work across every status."],
|
|
270
|
+
["list-blocked", "List blocked work."],
|
|
271
|
+
["list-canceled", "List canceled work."],
|
|
272
|
+
["list-closed", "List closed work."],
|
|
273
|
+
["list-draft", "List draft work."],
|
|
274
|
+
["list-in-progress", "List in-progress work."],
|
|
275
|
+
["list-open", "List open work."],
|
|
276
|
+
["meet", "Record meeting context."],
|
|
277
|
+
["merge", "Manage tracker merges."],
|
|
253
278
|
["next", "Pick next work."],
|
|
254
279
|
["notes", "Manage notes."],
|
|
280
|
+
["normalize", "Normalize tracker data."],
|
|
255
281
|
["ops", "Run operations."],
|
|
256
282
|
["package", "Manage packages."],
|
|
283
|
+
["packages", "Manage packages."],
|
|
284
|
+
["pause-task", "Pause task work."],
|
|
257
285
|
["plan", "Manage plans."],
|
|
258
286
|
["profile", "Manage profiles."],
|
|
259
287
|
["reindex", "Refresh search index."],
|
|
260
288
|
["release", "Release claim."],
|
|
289
|
+
["remind", "Manage reminders."],
|
|
261
290
|
["restore", "Restore history."],
|
|
262
291
|
["schema", "Customize schema."],
|
|
263
292
|
["search", "Search work."],
|
|
293
|
+
["search-advanced", "Run advanced search."],
|
|
294
|
+
["start-task", "Start task work."],
|
|
264
295
|
["stats", "Show stats."],
|
|
265
296
|
["telemetry", "Manage telemetry."],
|
|
297
|
+
["templates", "Manage work templates."],
|
|
266
298
|
["test", "Run linked tests."],
|
|
299
|
+
["test-all", "Run all linked tests."],
|
|
300
|
+
["test-runs", "Inspect background test runs."],
|
|
301
|
+
["todos", "Manage source-code todos."],
|
|
302
|
+
["twin", "Manage repository twins."],
|
|
267
303
|
["update", "Update work."],
|
|
304
|
+
["update-many", "Update matching work."],
|
|
268
305
|
["upgrade", "Upgrade packages."],
|
|
269
306
|
["validate", "Validate data."],
|
|
307
|
+
["vcs", "Inspect version-control context."],
|
|
270
308
|
["workspace", "Manage portable workspace primitives."],
|
|
309
|
+
["history-author-acknowledge", "Acknowledge reviewed history authors."],
|
|
310
|
+
["history-compact", "Compact history."],
|
|
311
|
+
["history-redact", "Redact sensitive history values."],
|
|
312
|
+
["history-repair", "Repair history integrity."],
|
|
271
313
|
]);
|
|
272
314
|
// Lifecycle subcommand flag contracts for `pm extension`. Only `init` differs
|
|
273
315
|
// between extension and package: `pm package init` / `pm packages init`
|
|
@@ -701,29 +743,29 @@ function collectExtensionCommandContracts(runtimeProbe) {
|
|
|
701
743
|
const contracts = [];
|
|
702
744
|
for (const command of [...extensionCommands].sort((left, right) => left.localeCompare(right))) {
|
|
703
745
|
const definition = definitionsByCommand.get(command);
|
|
704
|
-
|
|
705
|
-
contracts.push({
|
|
706
|
-
...definition,
|
|
707
|
-
flags: definition.flags.length > 0
|
|
708
|
-
? definition.flags
|
|
709
|
-
: (flagsByCommand.get(command)?.flags ?? []),
|
|
710
|
-
});
|
|
711
|
-
continue;
|
|
712
|
-
}
|
|
713
|
-
contracts.push({
|
|
714
|
-
command,
|
|
715
|
-
action: normalizeActionNameFromCommand(command),
|
|
716
|
-
source: null,
|
|
717
|
-
description: null,
|
|
718
|
-
intent: null,
|
|
719
|
-
arguments: [],
|
|
720
|
-
flags: flagsByCommand.get(command)?.flags ?? [],
|
|
721
|
-
examples: [],
|
|
722
|
-
failure_hints: [],
|
|
723
|
-
});
|
|
746
|
+
contracts.push(buildCollectedExtensionCommandContract(command, definition, flagsByCommand.get(command)?.flags ?? []));
|
|
724
747
|
}
|
|
725
748
|
return contracts;
|
|
726
749
|
}
|
|
750
|
+
function buildCollectedExtensionCommandContract(command, definition, registeredFlags) {
|
|
751
|
+
if (definition) {
|
|
752
|
+
return {
|
|
753
|
+
...definition,
|
|
754
|
+
flags: definition.flags.length > 0 ? definition.flags : registeredFlags,
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
return {
|
|
758
|
+
command,
|
|
759
|
+
action: normalizeActionNameFromCommand(command),
|
|
760
|
+
source: null,
|
|
761
|
+
description: null,
|
|
762
|
+
intent: null,
|
|
763
|
+
arguments: [],
|
|
764
|
+
flags: registeredFlags,
|
|
765
|
+
examples: [],
|
|
766
|
+
failure_hints: [],
|
|
767
|
+
};
|
|
768
|
+
}
|
|
727
769
|
function extensionSchemaPropertyNameFromFlag(flag) {
|
|
728
770
|
const normalized = flag.flag.replace(/^-+/, "").trim();
|
|
729
771
|
if (normalized.length === 0) {
|
|
@@ -1287,7 +1329,8 @@ function resolveContractsSelection(options) {
|
|
|
1287
1329
|
fullOutput,
|
|
1288
1330
|
omitUnfilteredSchema: unfilteredDefaultBriefMode,
|
|
1289
1331
|
omitUnfilteredCommandFlags: unfilteredDefaultBriefMode,
|
|
1290
|
-
omitUnfilteredCommanderAliases: unfilteredDefaultBriefMode
|
|
1332
|
+
omitUnfilteredCommanderAliases: unfilteredDefaultBriefMode ||
|
|
1333
|
+
(selectedCommand !== undefined && !fullOutput),
|
|
1291
1334
|
};
|
|
1292
1335
|
}
|
|
1293
1336
|
function assertSingleContractsProjection(selection) {
|
|
@@ -1564,55 +1607,109 @@ function resolveContractsCommands(selection, actionContext) {
|
|
|
1564
1607
|
function resolveOutputCommands(_selection, commands) {
|
|
1565
1608
|
return commands;
|
|
1566
1609
|
}
|
|
1567
|
-
function summarizeCommandIntent(command) {
|
|
1568
|
-
const rootCommand = command.split(" ")[0];
|
|
1569
|
-
return (COMMAND_INTENTS.get(command) ??
|
|
1570
|
-
COMMAND_INTENTS.get(rootCommand) ??
|
|
1571
|
-
"Inspect flags.");
|
|
1572
|
-
}
|
|
1573
1610
|
function canonicalSummaryCommand(command) {
|
|
1574
1611
|
const rootCommand = command.split(" ")[0];
|
|
1575
|
-
if (rootCommand.startsWith("list-"))
|
|
1612
|
+
if (rootCommand.startsWith("list-"))
|
|
1576
1613
|
return "list";
|
|
1577
|
-
|
|
1578
|
-
if (rootCommand.startsWith("history-")) {
|
|
1614
|
+
if (rootCommand.startsWith("history-"))
|
|
1579
1615
|
return "history";
|
|
1580
|
-
}
|
|
1581
|
-
if (rootCommand === "ctx") {
|
|
1582
|
-
return "context";
|
|
1583
|
-
}
|
|
1584
|
-
if (rootCommand === "packages") {
|
|
1585
|
-
return "package";
|
|
1586
|
-
}
|
|
1587
1616
|
return COMMAND_ALIAS_TO_CANONICAL.get(rootCommand) ?? rootCommand;
|
|
1588
1617
|
}
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1618
|
+
const COMMAND_OPERATION_INTENTS = new Map([
|
|
1619
|
+
["activate", "Activate"],
|
|
1620
|
+
["adopt", "Adopt"],
|
|
1621
|
+
["adopt-all", "Adopt all"],
|
|
1622
|
+
["catalog", "Catalog"],
|
|
1623
|
+
["complete", "Complete"],
|
|
1624
|
+
["create", "Create"],
|
|
1625
|
+
["deactivate", "Deactivate"],
|
|
1626
|
+
["delete", "Delete"],
|
|
1627
|
+
["describe", "Describe"],
|
|
1628
|
+
["doctor", "Diagnose"],
|
|
1629
|
+
["explore", "Explore"],
|
|
1630
|
+
["init", "Initialize"],
|
|
1631
|
+
["inspect", "Inspect"],
|
|
1632
|
+
["install", "Install"],
|
|
1633
|
+
["list", "List"],
|
|
1634
|
+
["manage", "Manage"],
|
|
1635
|
+
["migrate", "Migrate"],
|
|
1636
|
+
["mutate", "Mutate"],
|
|
1637
|
+
["reload", "Reload"],
|
|
1638
|
+
["restore", "Restore"],
|
|
1639
|
+
["run", "Run"],
|
|
1640
|
+
["snapshot", "Manage snapshots for"],
|
|
1641
|
+
["uninstall", "Uninstall"],
|
|
1642
|
+
]);
|
|
1643
|
+
const COMMAND_INTENT_SUBJECT_OVERRIDES = new Map([
|
|
1644
|
+
["extension adopt-all", "extensions"],
|
|
1645
|
+
["package adopt-all", "packages"],
|
|
1646
|
+
["workspace snapshot list", "workspace snapshots"],
|
|
1647
|
+
]);
|
|
1648
|
+
function summarizeCommandIntent(command, extensionContracts) {
|
|
1649
|
+
const declared = COMMAND_INTENTS.get(command) ??
|
|
1650
|
+
(command.includes(" ")
|
|
1651
|
+
? undefined
|
|
1652
|
+
: COMMAND_INTENTS.get(canonicalSummaryCommand(command)));
|
|
1653
|
+
if (declared !== undefined) {
|
|
1654
|
+
return { intent: declared, intent_source: "command" };
|
|
1655
|
+
}
|
|
1656
|
+
const extensionContract = extensionContracts.find((contract) => splitCommandPathAliases(contract.command).includes(command));
|
|
1657
|
+
if (extensionContract?.intent !== null &&
|
|
1658
|
+
extensionContract?.intent !== undefined) {
|
|
1659
|
+
return { intent: extensionContract.intent, intent_source: "command" };
|
|
1660
|
+
}
|
|
1661
|
+
if (extensionContract?.description !== null &&
|
|
1662
|
+
extensionContract?.description !== undefined) {
|
|
1663
|
+
return {
|
|
1664
|
+
intent: extensionContract.description,
|
|
1665
|
+
intent_source: "description",
|
|
1666
|
+
};
|
|
1597
1667
|
}
|
|
1598
|
-
const
|
|
1668
|
+
const tokens = command.split(" ");
|
|
1669
|
+
const operation = tokens.at(-1);
|
|
1670
|
+
const subject = tokens.slice(0, -1).join(" ");
|
|
1671
|
+
const verb = COMMAND_OPERATION_INTENTS.get(operation);
|
|
1672
|
+
const intentSubject = COMMAND_INTENT_SUBJECT_OVERRIDES.get(command) ?? subject;
|
|
1673
|
+
return {
|
|
1674
|
+
intent: verb === undefined || subject.length === 0
|
|
1675
|
+
? `Run ${command}.`
|
|
1676
|
+
: `${verb} ${intentSubject}.`,
|
|
1677
|
+
intent_source: "generated",
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
function buildCommandSummarySurface(commands, extensionContracts = []) {
|
|
1681
|
+
return [...new Set(commands.map(normalizeCommandPath))]
|
|
1599
1682
|
.filter((command) => command.length > 0)
|
|
1600
|
-
.sort((left, right) => left.localeCompare(right))
|
|
1601
|
-
|
|
1683
|
+
.sort((left, right) => left.localeCompare(right))
|
|
1684
|
+
.map((command) => {
|
|
1602
1685
|
const budget = resolvePmCommandOutputBudget(command, {
|
|
1603
1686
|
generateFallback: true,
|
|
1604
1687
|
});
|
|
1605
|
-
const
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1688
|
+
const rootCommand = command.split(" ")[0];
|
|
1689
|
+
const canonicalRoot = COMMAND_ALIAS_TO_CANONICAL.get(rootCommand) ??
|
|
1690
|
+
(rootCommand.startsWith("list-")
|
|
1691
|
+
? "list"
|
|
1692
|
+
: rootCommand.startsWith("history-")
|
|
1693
|
+
? "history"
|
|
1694
|
+
: rootCommand);
|
|
1695
|
+
const availableFlags = new Set([
|
|
1696
|
+
...resolveCoreCommandFlags(command).map((contract) => contract.flag),
|
|
1697
|
+
...extensionContracts
|
|
1698
|
+
.filter((contract) => splitCommandPathAliases(contract.command).includes(command))
|
|
1699
|
+
.flatMap((contract) => contract.flags.map((flag) => flag.flag)),
|
|
1700
|
+
]);
|
|
1701
|
+
const flags = (AGENT_BOOTSTRAP_FLAGS.get(command) ??
|
|
1702
|
+
AGENT_BOOTSTRAP_FLAGS.get(canonicalRoot) ??
|
|
1703
|
+
AGENT_BOUNDED_FLAG_PRIORITY).filter((flag) => availableFlags.has(flag));
|
|
1704
|
+
const intent = summarizeCommandIntent(command, extensionContracts);
|
|
1610
1705
|
return {
|
|
1611
1706
|
command,
|
|
1612
|
-
...
|
|
1613
|
-
intent: summarizeCommandIntent(command),
|
|
1707
|
+
...intent,
|
|
1614
1708
|
...(flags.length > 0 ? { flags } : {}),
|
|
1615
1709
|
default_max_estimated_tokens: budget.default_max_estimated_tokens,
|
|
1710
|
+
default_max_estimated_tokens_by_format: {
|
|
1711
|
+
...budget.default_max_estimated_tokens_by_format,
|
|
1712
|
+
},
|
|
1616
1713
|
};
|
|
1617
1714
|
});
|
|
1618
1715
|
}
|
|
@@ -1686,20 +1783,26 @@ function createContractsResult(selection, schemaContext, actionContext, outputCo
|
|
|
1686
1783
|
: {}),
|
|
1687
1784
|
};
|
|
1688
1785
|
}
|
|
1689
|
-
function attachRuntimeContractsResult(result, runtime) {
|
|
1786
|
+
function attachRuntimeContractsResult(result, runtime, selection) {
|
|
1787
|
+
const selectedCommand = selection.selectedCommand;
|
|
1690
1788
|
result.runtime_schema = {
|
|
1691
1789
|
statuses: runtime.statusRegistry.definitions.map((definition) => definition.id),
|
|
1692
1790
|
open_status: runtime.statusRegistry.open_status,
|
|
1693
1791
|
close_status: runtime.statusRegistry.close_status,
|
|
1694
1792
|
canceled_status: runtime.statusRegistry.canceled_status,
|
|
1695
1793
|
types: [...runtime.typeRegistry.types],
|
|
1696
|
-
fields_by_command: Object.fromEntries([...runtime.runtimeFieldRegistry.command_to_fields.entries()]
|
|
1794
|
+
fields_by_command: Object.fromEntries([...runtime.runtimeFieldRegistry.command_to_fields.entries()]
|
|
1795
|
+
.filter(([command]) => selectedCommand === undefined || command === selectedCommand)
|
|
1796
|
+
.map(([command, definitions]) => [
|
|
1697
1797
|
command,
|
|
1698
1798
|
[
|
|
1699
1799
|
...new Set(definitions.map((definition) => `--${definition.cli_flag}`)),
|
|
1700
1800
|
].sort((left, right) => left.localeCompare(right)),
|
|
1701
1801
|
])),
|
|
1702
1802
|
};
|
|
1803
|
+
if (selectedCommand !== undefined && !selection.fullOutput) {
|
|
1804
|
+
return;
|
|
1805
|
+
}
|
|
1703
1806
|
result.extension_contracts = {
|
|
1704
1807
|
capabilities: [...PM_EXTENSION_CAPABILITY_CONTRACTS],
|
|
1705
1808
|
services: [...PM_EXTENSION_SERVICE_NAME_CONTRACTS],
|
|
@@ -1782,11 +1885,13 @@ function attachCommanderAliasContractsResult(result, selection) {
|
|
|
1782
1885
|
result.commander_aliases = buildCommanderAliasSurface();
|
|
1783
1886
|
return;
|
|
1784
1887
|
}
|
|
1785
|
-
result.commander_aliases_omitted_reason =
|
|
1888
|
+
result.commander_aliases_omitted_reason = selection.selectedCommand
|
|
1889
|
+
? "command_scoped"
|
|
1890
|
+
: "unfiltered_default_brief";
|
|
1786
1891
|
}
|
|
1787
1892
|
/** Attach the compact agent-facing command semantics shared by summary and full projections. */
|
|
1788
|
-
function attachAgentCommandContractsResult(result, outputCommands) {
|
|
1789
|
-
result.command_summaries = buildCommandSummarySurface(outputCommands);
|
|
1893
|
+
function attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts) {
|
|
1894
|
+
result.command_summaries = buildCommandSummarySurface(outputCommands, extensionCommandContracts);
|
|
1790
1895
|
result.output_policy = {
|
|
1791
1896
|
token_estimate: "ceil(utf8_bytes / 4)",
|
|
1792
1897
|
degradation_ladder: [...PM_OUTPUT_DEGRADATION_STEPS],
|
|
@@ -1804,20 +1909,26 @@ export async function runContracts(options, global) {
|
|
|
1804
1909
|
const commands = resolveContractsCommands(selection, actionContext);
|
|
1805
1910
|
const outputCommands = resolveOutputCommands(selection, commands);
|
|
1806
1911
|
const result = createContractsResult(selection, schemaContext, actionContext, outputCommands);
|
|
1912
|
+
const extensionCommandContracts = resolveExtensionCommandContracts(selection, runtime, outputCommands);
|
|
1807
1913
|
if (selection.summary || selection.fullOutput) {
|
|
1808
|
-
attachAgentCommandContractsResult(result, outputCommands);
|
|
1914
|
+
attachAgentCommandContractsResult(result, outputCommands, extensionCommandContracts);
|
|
1809
1915
|
}
|
|
1810
1916
|
if (selection.summary) {
|
|
1811
1917
|
return result;
|
|
1812
1918
|
}
|
|
1813
1919
|
const commandAliases = buildCommandAliasSurface(commands);
|
|
1814
|
-
const extensionCommandContracts = resolveExtensionCommandContracts(selection, runtime, outputCommands);
|
|
1815
1920
|
if (!(selection.flagsOnly && !selection.fullOutput)) {
|
|
1816
|
-
attachRuntimeContractsResult(result, runtime);
|
|
1921
|
+
attachRuntimeContractsResult(result, runtime, selection);
|
|
1817
1922
|
}
|
|
1818
1923
|
attachSchemaContractsResult(result, selection, schemaContext, extensionCommandContracts);
|
|
1819
1924
|
attachFlagContractsResult(result, selection, runtime, outputCommands, commandAliases);
|
|
1820
1925
|
attachCommanderAliasContractsResult(result, selection);
|
|
1926
|
+
if (selection.selectedCommand === "assurance" || selection.fullOutput) {
|
|
1927
|
+
result.assurance_contracts = {
|
|
1928
|
+
measurement_source_kinds: [...ASSURANCE_MEASUREMENT_SOURCE_KINDS],
|
|
1929
|
+
gate_triggers: [...ASSURANCE_GATE_TRIGGERS],
|
|
1930
|
+
};
|
|
1931
|
+
}
|
|
1821
1932
|
// pm-4os2: snapshot the static MCP tool surface in the full projection so
|
|
1822
1933
|
// `pnpm contracts:check` (CI static gate) fails on unintended inputSchema
|
|
1823
1934
|
// drift in src/mcp/tool-definitions.ts.
|
|
@@ -1872,4 +1983,4 @@ export const _testOnlyContractsCommand = {
|
|
|
1872
1983
|
toRuntimeShortFlagToken,
|
|
1873
1984
|
};
|
|
1874
1985
|
//# sourceMappingURL=runtime-contracts.js.map
|
|
1875
|
-
//# debugId=
|
|
1986
|
+
//# debugId=8cdd82c3-979e-5f7f-bc72-592c7e55f11c
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines SDK command-contract metadata for Tool Parameter Tables.
|
|
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]="ddb90f7e-f3ca-56d8-be75-13e238da306c")}catch(e){}}();
|
|
8
8
|
import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
|
|
9
9
|
import { PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS } from "../read-output-session.js";
|
|
10
10
|
import { ASSURANCE_DEFINITION_SCHEMA } from "./schemas/assurance-definition.js";
|
|
@@ -20,7 +20,9 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
20
20
|
outputLimit: {
|
|
21
21
|
anyOf: [{ type: "integer", minimum: 1 }, { const: "unbounded" }],
|
|
22
22
|
},
|
|
23
|
-
outputBudget: {
|
|
23
|
+
outputBudget: {
|
|
24
|
+
anyOf: [{ type: "integer", minimum: 1 }, { const: "unbounded" }],
|
|
25
|
+
},
|
|
24
26
|
outputFormat: { type: "string", enum: ["json", "toon"] },
|
|
25
27
|
outputSession: {
|
|
26
28
|
anyOf: [
|
|
@@ -55,6 +57,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
55
57
|
},
|
|
56
58
|
],
|
|
57
59
|
},
|
|
60
|
+
outputCursor: { type: "string", minLength: 1 },
|
|
58
61
|
outputRowContract: { type: "boolean" },
|
|
59
62
|
path: { type: "string" },
|
|
60
63
|
pmExecutable: { type: "string" },
|
|
@@ -476,6 +479,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
476
479
|
edit: { type: "integer", minimum: 1 },
|
|
477
480
|
delete: { type: "integer", minimum: 1 },
|
|
478
481
|
dryRun: { type: "boolean" },
|
|
482
|
+
normalizeProvenance: { type: "boolean" },
|
|
479
483
|
all: { type: "boolean" },
|
|
480
484
|
clear: { type: "boolean" },
|
|
481
485
|
cliOnly: { type: "boolean" },
|
|
@@ -940,8 +944,8 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
940
944
|
examples: [10, "unbounded"],
|
|
941
945
|
},
|
|
942
946
|
outputBudget: {
|
|
943
|
-
description: "Universal estimated-token ceiling for a read result.",
|
|
944
|
-
examples: [600, 1200],
|
|
947
|
+
description: "Universal estimated-token ceiling for a read result, or unbounded to disable the shared ceiling.",
|
|
948
|
+
examples: [600, 1200, "unbounded"],
|
|
945
949
|
},
|
|
946
950
|
outputFormat: {
|
|
947
951
|
description: "Universal read-result encoding selector.",
|
|
@@ -959,6 +963,9 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
959
963
|
},
|
|
960
964
|
],
|
|
961
965
|
},
|
|
966
|
+
outputCursor: {
|
|
967
|
+
description: "Opaque continuation cursor returned when a declared row collection is compacted by the output budget.",
|
|
968
|
+
},
|
|
962
969
|
outputRowContract: {
|
|
963
970
|
description: "Include the row selector and TOON row-encoding contract on a read result.",
|
|
964
971
|
},
|
|
@@ -1393,6 +1400,9 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1393
1400
|
dryRun: {
|
|
1394
1401
|
description: "Preview command effects without mutating storage artifacts.",
|
|
1395
1402
|
},
|
|
1403
|
+
normalizeProvenance: {
|
|
1404
|
+
description: "For history-repair: remove invalid legacy provenance observations and emit only aggregate privacy-safe repair evidence.",
|
|
1405
|
+
},
|
|
1396
1406
|
all: {
|
|
1397
1407
|
description: "For history-repair action: scan every stream for drift and repair each drifted stream in one audited pass (mutually exclusive with id).",
|
|
1398
1408
|
},
|
|
@@ -2049,4 +2059,4 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
|
2049
2059
|
},
|
|
2050
2060
|
};
|
|
2051
2061
|
//# sourceMappingURL=tool-parameter-tables.js.map
|
|
2052
|
-
//# debugId=
|
|
2062
|
+
//# debugId=ddb90f7e-f3ca-56d8-be75-13e238da306c
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* consumers from a single source of truth.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!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]="
|
|
10
|
+
!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]="aa58e280-0a39-5285-a451-811e60481661")}catch(e){}}();
|
|
11
11
|
import { normalizeUniqueStringList } from "./string-lists.js";
|
|
12
12
|
import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
|
|
13
13
|
import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, } from "./tool-option-contracts.js";
|
|
@@ -31,6 +31,7 @@ const PM_TOOL_READ_OUTPUT_PARAMETER_KEYS = [
|
|
|
31
31
|
"outputBudget",
|
|
32
32
|
"outputFormat",
|
|
33
33
|
"outputSession",
|
|
34
|
+
"outputCursor",
|
|
34
35
|
"outputRowContract",
|
|
35
36
|
];
|
|
36
37
|
/** Canonical top-level MCP properties that take precedence over runtime custom fields. */
|
|
@@ -621,7 +622,13 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
621
622
|
},
|
|
622
623
|
"history-repair": {
|
|
623
624
|
// Exactly one of `id` (single stream) or `all` (bulk drift repair) is required.
|
|
624
|
-
optional: [
|
|
625
|
+
optional: [
|
|
626
|
+
"id",
|
|
627
|
+
"all",
|
|
628
|
+
"dryRun",
|
|
629
|
+
"normalizeProvenance",
|
|
630
|
+
...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
|
|
631
|
+
],
|
|
625
632
|
oneOfRequired: [["id"], ["all"]],
|
|
626
633
|
},
|
|
627
634
|
"history-author-acknowledge": {
|
|
@@ -1573,4 +1580,4 @@ export const _testOnlyCliContracts = {
|
|
|
1573
1580
|
withFlagAliasMetadata,
|
|
1574
1581
|
};
|
|
1575
1582
|
//# sourceMappingURL=tool-schema.js.map
|
|
1576
|
-
//# debugId=
|
|
1583
|
+
//# debugId=aa58e280-0a39-5285-a451-811e60481661
|
package/dist/sdk/cli-program.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Builds the reusable Commander root that embeds pm's universal global contracts.
|
|
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]="03d46cbf-73bc-50c9-b4e6-e7329ee53076")}catch(e){}}();
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
import { writeStdout } from "../core/output/output.js";
|
|
10
10
|
/** Create a fresh pm root program suitable for one-shot CLI or embedded hosts. */
|
|
@@ -27,9 +27,10 @@ export function createPmCliProgram(version) {
|
|
|
27
27
|
.option("--token-accounting", "Attach a bounded per-section token-cost receipt to command output")
|
|
28
28
|
.option("--output-include <fields>", "Retain comma-separated fields or sections in read output")
|
|
29
29
|
.option("--output-limit <count>", "Bound rows in read output")
|
|
30
|
-
.option("--output-budget <tokens>", "Bound estimated tokens in read output")
|
|
30
|
+
.option("--output-budget <tokens|unbounded>", "Bound estimated tokens in read output or explicitly disable the default ceiling")
|
|
31
31
|
.option("--output-format <toon|json>", "Select the read-output encoding")
|
|
32
32
|
.option("--output-session <state>", "Carry a JSON session budget and served-item ledger across read calls")
|
|
33
|
+
.option("--output-cursor <cursor>", "Resume a budget-compacted declared row collection")
|
|
33
34
|
.option("--output-row-contract", "Include the machine-readable row selector and TOON encoding contract")
|
|
34
35
|
.option("--quiet", "Suppress stdout output")
|
|
35
36
|
.option("--no-changed-fields", "Omit the changed_fields array from mutation output (keeps changed_field_count)")
|
|
@@ -45,4 +46,4 @@ export function createPmCliProgram(version) {
|
|
|
45
46
|
.exitOverride();
|
|
46
47
|
}
|
|
47
48
|
//# sourceMappingURL=cli-program.js.map
|
|
48
|
-
//# debugId=
|
|
49
|
+
//# debugId=03d46cbf-73bc-50c9-b4e6-e7329ee53076
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* with core, extension, or project-specific feature stores.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
9
|
+
!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]="7eefe5f0-364d-559a-b365-0e7d539ee19e")}catch(e){}}();
|
|
10
10
|
import { runActiveServiceOverride } from "../core/extensions/index.js";
|
|
11
11
|
import { normalizeStatusForRegistry, normalizeStatusInput, } from "../core/item/status.js";
|
|
12
12
|
import { compareTimestampStrings, resolveIsoOrRelative } from "../core/shared/time.js";
|
|
@@ -364,8 +364,16 @@ export async function runContextEvaluationScenario(scenario, reader) {
|
|
|
364
364
|
throw new TypeError("Context evaluation scenarios require non-empty id and rationale values");
|
|
365
365
|
}
|
|
366
366
|
const result = scenario.surface === "context"
|
|
367
|
-
? await reader.context({
|
|
368
|
-
|
|
367
|
+
? await reader.context({
|
|
368
|
+
...scenario.options,
|
|
369
|
+
explainRanking: true,
|
|
370
|
+
outputBudget: "unbounded",
|
|
371
|
+
})
|
|
372
|
+
: await reader.next({
|
|
373
|
+
...scenario.options,
|
|
374
|
+
explainRanking: true,
|
|
375
|
+
outputBudget: "unbounded",
|
|
376
|
+
});
|
|
369
377
|
const { rankedIds, attribution } = rankingPayloadForScenario(result, scenario.surface);
|
|
370
378
|
const packet = { ...result, ranking: undefined };
|
|
371
379
|
const actualTokens = estimateJsonTokens(packet);
|
|
@@ -422,4 +430,4 @@ export async function runContextEvaluationCorpus(scenarios, reader, thresholds)
|
|
|
422
430
|
return summarizeContextEvaluationReports(reports, thresholds);
|
|
423
431
|
}
|
|
424
432
|
//# sourceMappingURL=context-relevance.js.map
|
|
425
|
-
//# debugId=
|
|
433
|
+
//# debugId=7eefe5f0-364d-559a-b365-0e7d539ee19e
|
package/dist/sdk/core.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT
|
|
|
7
7
|
export * from "./core-governance.js";
|
|
8
8
|
export * from "./agent-session-context.js";
|
|
9
9
|
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
|
10
|
-
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
10
|
+
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, decodeReadOutputContinuationCursor, encodeReadOutputContinuationCursor, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
11
11
|
export { applyReadOutputSessionReferences, attachReadOutputSessionReceipt, parseReadOutputSession, readOutputSessionRemainingTokens, } from "./read-output-session.js";
|
|
12
|
-
export type { PmReadOutputBudgetExceeded, PmReadOutputDimension, PmReadOutputLegacyAlias, PmReadOutputOptions, PmReadOutputReceipt, PmReadOutputResult, PmReadOutputResultFor, PmReadOutputSurface, PmReadOutputSurfaceContract, } from "./read-output-contracts.js";
|
|
12
|
+
export type { PmReadOutputBudgetExceeded, PmReadOutputContinuation, PmReadOutputCursorEnvelope, PmReadOutputDimension, PmReadOutputLegacyAlias, PmReadOutputOptions, PmReadOutputReceipt, PmReadOutputResult, PmReadOutputResultFor, PmReadOutputSurface, PmReadOutputSurfaceContract, } from "./read-output-contracts.js";
|
|
13
13
|
export type { PmReadOutputSessionReceipt, PmReadOutputSessionReference, PmReadOutputSessionState, } from "./read-output-session.js";
|
|
14
14
|
export type { ItemDocument, ItemMetadata, ItemStatus, ItemType, PmSettings, } from "../types/index.js";
|
package/dist/sdk/core.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Provides the stable item lifecycle client and universal project data types.
|
|
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]="dfc95179-77dd-5762-9bcc-c6bb461ff553")}catch(e){}}();
|
|
8
8
|
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, canonicalDocument, classifyItemFormatVersion, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, isPmCliExpectedError, normalizeItemFormatVersion, normalizeItemId, normalizeStatusInput, nowIso, runAction, serializeItemDocument, aggregate, append, claim, claimNext, close, comments, context, copy, create, deleteItem, deps, docs, files, filesDiscover, focus, get, graph, learnings, list, next, notes, release, restore, search, update, } from "./runtime.js";
|
|
9
9
|
export * from "./core-governance.js";
|
|
10
10
|
export * from "./agent-session-context.js";
|
|
11
11
|
export { isAlreadyClaimedError } from "./lifecycle/claim.js";
|
|
12
|
-
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
12
|
+
export { PM_READ_OUTPUT_DIMENSIONS, PM_READ_OUTPUT_OPTION_FLAGS, PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS, PM_READ_OUTPUT_SURFACE_CONTRACTS, applyReadOutputDimensions, decodeReadOutputContinuationCursor, encodeReadOutputContinuationCursor, isReadOutputBudgetExceeded, resolveReadOutputDimensions, resolveReadOutputEncoding, resolveReadOutputSurface, validateReadOutputOptions, } from "./read-output-contracts.js";
|
|
13
13
|
export { applyReadOutputSessionReferences, attachReadOutputSessionReceipt, parseReadOutputSession, readOutputSessionRemainingTokens, } from "./read-output-session.js";
|
|
14
14
|
//# sourceMappingURL=core.js.map
|
|
15
|
-
//# debugId=
|
|
15
|
+
//# debugId=dfc95179-77dd-5762-9bcc-c6bb461ff553
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Generated partition 1 of the exhaustive error-code catalog. */
|
|
2
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]="
|
|
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]="3891c17c-c79d-54d4-8b62-da8fe9c1eaf4")}catch(e){}}();
|
|
4
4
|
export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
5
5
|
{
|
|
6
6
|
code: "acceptance_criteria_mutation_conflict",
|
|
@@ -1592,6 +1592,30 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
1592
1592
|
canonical_code: "manifest_capabilities_absent",
|
|
1593
1593
|
aliases: [],
|
|
1594
1594
|
},
|
|
1595
|
+
{
|
|
1596
|
+
code: "merge_conflict_markers_detected",
|
|
1597
|
+
meaning: "Merge conflict markers detected condition.",
|
|
1598
|
+
stability: "stable",
|
|
1599
|
+
exit_code: 1,
|
|
1600
|
+
class: "generic_failure",
|
|
1601
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1602
|
+
sources: ["core/item/item-format.ts"],
|
|
1603
|
+
emitting_commands: ["*"],
|
|
1604
|
+
canonical_code: "merge_conflict_markers_detected",
|
|
1605
|
+
aliases: ["history_merge_conflict_markers_detected"],
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
code: "merge_decisions_unreviewed",
|
|
1609
|
+
meaning: "Merge decisions unreviewed condition.",
|
|
1610
|
+
stability: "provisional",
|
|
1611
|
+
exit_code: 1,
|
|
1612
|
+
class: "generic_failure",
|
|
1613
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1614
|
+
sources: ["core/diagnostics/remediation.ts"],
|
|
1615
|
+
emitting_commands: ["*"],
|
|
1616
|
+
canonical_code: "merge_decisions_unreviewed",
|
|
1617
|
+
aliases: [],
|
|
1618
|
+
},
|
|
1595
1619
|
];
|
|
1596
1620
|
//# sourceMappingURL=generated-error-code-catalog-part-1.js.map
|
|
1597
|
-
//# debugId=
|
|
1621
|
+
//# debugId=3891c17c-c79d-54d4-8b62-da8fe9c1eaf4
|