@unbrained/pm-cli 2026.8.10 → 2026.8.12
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 +153 -100
- package/dist/cli/commander-usage.js +113 -15
- package/dist/cli/error-guidance.d.ts +12 -0
- package/dist/cli/error-guidance.js +147 -29
- package/dist/cli/main.js +38 -19
- package/dist/cli/register-annotations.js +56 -3
- package/dist/cli/register-assurance.d.ts +8 -0
- package/dist/cli/register-assurance.js +52 -0
- package/dist/cli/register-files-lookup.js +14 -3
- package/dist/cli/register-list-query.js +10 -7
- package/dist/cli/register-mutation.js +30 -9
- package/dist/cli/register-operations.js +30 -15
- package/dist/cli-bundle/bundle-manifest.json +155 -155
- package/dist/cli-bundle/chunks/{chunk-TRWXF476.js → chunk-3PS7X6GS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7KL6KMWF.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-EBO7OUUE.js → chunk-BM5YJ2UW.js} +69 -55
- package/dist/cli-bundle/chunks/chunk-D55A5AEN.js +33 -0
- package/dist/cli-bundle/chunks/chunk-KIKDWECH.js +196 -0
- package/dist/cli-bundle/chunks/{chunk-ETML5C6H.js → chunk-KOQMGCTA.js} +47 -47
- package/dist/cli-bundle/chunks/chunk-R76342NV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-RBTK5EZV.js +5 -0
- package/dist/cli-bundle/chunks/chunk-VLUQOIDT.js +2 -0
- package/dist/cli-bundle/chunks/chunk-WLAHPSOX.js +3 -0
- package/dist/cli-bundle/chunks/register-list-query-XPCJRUUD.js +10 -0
- package/dist/cli-bundle/chunks/register-mutation-4RJCBKRS.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-2OGISOVR.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-S3KT2LTH.js → register-setup-LLHAKP2V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2DALMVF7.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-5OQIMELN.js +155 -0
- package/dist/cli-bundle/focused-chunks/chunk-5TAGTDRE.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ECADZMVC.js +18 -0
- package/dist/cli-bundle/focused-chunks/chunk-EJGXRA6B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FFGSZCPK.js +16 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IW43E4XL.js → chunk-GQW4BPUT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ISKOBJCM.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-75774JWP.js → chunk-JAFRIWVF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2COZ67XT.js → chunk-KHM2CS2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-M6RPIXKC.js → chunk-KPSXVBDV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-34SX654S.js → chunk-KTLOKKCQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-LGYK3NUF.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-2EXI2DKR.js → chunk-NBLUKITQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-NYLOUPOB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Q4T463SD.js +31 -0
- package/dist/cli-bundle/focused-chunks/chunk-QVZVY53N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-DZGAHZZV.js → chunk-RWPAWUOT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-UTEWXDEQ.js +17 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7UN6BHHO.js → chunk-YIAXMC3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZMGWAYH7.js +2 -0
- 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 -39
- 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 +1 -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/extensions/reserved-host-flags.js +3 -2
- package/dist/core/history/drift-scan.js +13 -8
- package/dist/core/history/history.d.ts +8 -0
- package/dist/core/history/history.js +57 -7
- package/dist/core/history/replay.d.ts +9 -1
- package/dist/core/history/replay.js +48 -13
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +46 -14
- package/dist/core/session/session-state.d.ts +47 -0
- package/dist/core/session/session-state.js +207 -6
- package/dist/core/shared/author.d.ts +7 -1
- package/dist/core/shared/author.js +66 -46
- 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 +13 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/store/item-metadata-cache.d.ts +1 -1
- package/dist/core/store/item-metadata-cache.js +14 -7
- package/dist/sdk/agent/refusal-reachability.d.ts +40 -0
- package/dist/sdk/agent/refusal-reachability.js +72 -0
- package/dist/sdk/agent/subcommand-recovery.d.ts +40 -0
- package/dist/sdk/agent/subcommand-recovery.js +84 -0
- package/dist/sdk/cli-bootstrap.d.ts +10 -0
- package/dist/sdk/cli-bootstrap.js +11 -7
- package/dist/sdk/cli-contracts/completeness.js +14 -3
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +20 -2
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
- package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
- package/dist/sdk/cli-contracts/runtime-contracts.js +4 -3
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +515 -0
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +252 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +99 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js +38 -5
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/completion.js +23 -8
- package/dist/sdk/config.js +9 -3
- package/dist/sdk/context/semantic-session-attribution.d.ts +32 -0
- package/dist/sdk/context/semantic-session-attribution.js +83 -0
- package/dist/sdk/context-intent-contracts.js +45 -4
- package/dist/sdk/core-governance.d.ts +3 -1
- package/dist/sdk/core-governance.js +5 -3
- package/dist/sdk/core.d.ts +2 -1
- package/dist/sdk/core.js +3 -2
- package/dist/sdk/error-code-catalog.d.ts +13 -0
- package/dist/sdk/error-code-catalog.js +35 -2
- package/dist/sdk/extension.js +18 -17
- package/dist/sdk/files.d.ts +11 -0
- package/dist/sdk/files.js +82 -24
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1585 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
- package/dist/sdk/generated-error-code-catalog.js +6 -3121
- package/dist/sdk/governance/assurance-action-contracts.d.ts +7 -0
- package/dist/sdk/governance/assurance-action-contracts.js +5 -0
- package/dist/sdk/governance/assurance-action.d.ts +70 -0
- package/dist/sdk/governance/assurance-action.js +200 -0
- package/dist/sdk/governance/assurance-limits.d.ts +7 -0
- package/dist/sdk/governance/assurance-limits.js +11 -0
- package/dist/sdk/governance/assurance-mutation-error.d.ts +7 -0
- package/dist/sdk/governance/assurance-mutation-error.js +35 -0
- package/dist/sdk/governance/assurance-runtime.d.ts +20 -0
- package/dist/sdk/governance/assurance-runtime.js +134 -0
- package/dist/sdk/governance/assurance.d.ts +438 -0
- package/dist/sdk/governance/assurance.js +804 -0
- package/dist/sdk/governance/health.d.ts +3 -1
- package/dist/sdk/governance/health.js +21 -4
- package/dist/sdk/governance/validate-item-reader.js +3 -3
- package/dist/sdk/governance/validate.d.ts +2 -0
- package/dist/sdk/governance/validate.js +13 -3
- package/dist/sdk/graph/durable-cache.d.ts +1 -1
- package/dist/sdk/graph/durable-cache.js +98 -29
- package/dist/sdk/graph/governance.d.ts +14 -0
- package/dist/sdk/graph/governance.js +34 -9
- package/dist/sdk/graph/run.js +8 -3
- package/dist/sdk/index.d.ts +7 -2
- package/dist/sdk/index.js +9 -4
- package/dist/sdk/lifecycle/claim.js +26 -4
- package/dist/sdk/lifecycle/focus.js +13 -3
- package/dist/sdk/lifecycle/plan.js +8 -3
- package/dist/sdk/merge/driver.d.ts +2 -2
- package/dist/sdk/merge/driver.js +3 -3
- package/dist/sdk/merge/receipts.d.ts +6 -4
- package/dist/sdk/merge/receipts.js +7 -5
- package/dist/sdk/merge/three-way.d.ts +2 -2
- package/dist/sdk/merge/three-way.js +3 -3
- package/dist/sdk/output-projection.d.ts +9 -1
- package/dist/sdk/output-projection.js +45 -9
- package/dist/sdk/provenance.d.ts +38 -0
- package/dist/sdk/provenance.js +64 -2
- package/dist/sdk/query/activity.d.ts +49 -2
- package/dist/sdk/query/activity.js +183 -37
- package/dist/sdk/query/context.js +19 -8
- package/dist/sdk/query/get.js +19 -2
- package/dist/sdk/read-output-contracts.d.ts +5 -1
- package/dist/sdk/read-output-contracts.js +17 -2
- package/dist/sdk/read-output-session.d.ts +2 -0
- package/dist/sdk/read-output-session.js +12 -5
- package/dist/sdk/runtime-extended-actions.js +22 -5
- package/dist/sdk/runtime-primitives.d.ts +5 -3
- package/dist/sdk/runtime-primitives.js +7 -5
- package/dist/sdk/runtime-stats-options.js +3 -2
- package/dist/sdk/runtime.d.ts +4 -0
- package/dist/sdk/runtime.js +34 -34
- package/dist/sdk/stats.d.ts +36 -3
- package/dist/sdk/stats.js +55 -15
- package/dist/sdk/telemetry.js +7 -4
- package/dist/sdk/test/execution.d.ts +4 -0
- package/dist/sdk/test/execution.js +86 -21
- package/dist/sdk/traceability/runtime-files-lookup.d.ts +8 -0
- package/dist/sdk/traceability/runtime-files-lookup.js +33 -0
- package/dist/sdk/traceability/source-traceability.d.ts +102 -0
- package/dist/sdk/traceability/source-traceability.js +293 -0
- package/dist/types.d.ts +10 -2
- package/dist/types.js +2 -2
- package/docs/ASSURANCE.md +137 -0
- package/docs/COMMANDS.md +29 -8
- package/docs/CONFIGURATION.md +7 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
- package/docs/MERGE_SAFETY.md +3 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
- package/docs/README.md +3 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
- package/docs/RELEASING.md +9 -5
- package/docs/SDK.md +12 -1
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +52 -5
- package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +39 -1
- package/docs/SDK_RUNTIME_BOUNDARIES.md +36 -1
- package/docs/TESTING.md +12 -9
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
- package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -0
- package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
- package/marketplace.json +2 -2
- package/package.json +7 -7
- 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/extensions/templates/index.ts +9 -3
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +1030 -67
- package/dist/cli-bundle/chunks/chunk-2QYH4QMI.js +0 -30
- package/dist/cli-bundle/chunks/chunk-JUDU4RO4.js +0 -194
- package/dist/cli-bundle/chunks/chunk-JZSNADRR.js +0 -5
- package/dist/cli-bundle/chunks/chunk-MENWVGJW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S4EITGLA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TIGKWVLA.js +0 -13
- package/dist/cli-bundle/chunks/chunk-TSLDTJLQ.js +0 -2
- package/dist/cli-bundle/chunks/register-list-query-OJ6ZXKV4.js +0 -10
- package/dist/cli-bundle/chunks/register-mutation-DKI7QC7O.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-P5OGMT6I.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-36FTZ2NT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3CQECMKR.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-CHIBMEZR.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-FF4MNAYB.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-GHTN2ILR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I4YM2I7S.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IMDTEN7K.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JMVA4HKR.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-KR5RVXLQ.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-KSNJG4KI.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-MXYSIQ56.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-RIIN5V4N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RKWSCYYN.js +0 -2
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/cli-contracts/schemas/assurance-definition
|
|
3
|
+
*
|
|
4
|
+
* Defines the strict JSON Schema accepted by assurance definition mutations.
|
|
5
|
+
*/
|
|
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]="2d81fb20-890a-553b-b761-d60caf56b502")}catch(e){}}();
|
|
8
|
+
const ASSURANCE_VALUE_SCHEMA = {
|
|
9
|
+
oneOf: [{ type: "number" }, { type: "array", items: { type: "string" } }],
|
|
10
|
+
};
|
|
11
|
+
const ITEMS_FIELD_CONDITIONAL_SCHEMA = {
|
|
12
|
+
if: { required: ["field"] },
|
|
13
|
+
};
|
|
14
|
+
// Keep the JSON Schema keyword visible while avoiding unicorn/no-thenable,
|
|
15
|
+
// which intentionally rejects object literals with a `then` property.
|
|
16
|
+
Reflect.set(ITEMS_FIELD_CONDITIONAL_SCHEMA, "then", {
|
|
17
|
+
oneOf: [{ required: ["equals"] }, { required: ["state"] }],
|
|
18
|
+
});
|
|
19
|
+
/** JSON Schema for measurement, assertion, and gate assurance definitions. */
|
|
20
|
+
export const ASSURANCE_DEFINITION_SCHEMA = {
|
|
21
|
+
oneOf: [
|
|
22
|
+
{
|
|
23
|
+
type: "object",
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
required: ["id", "source"],
|
|
26
|
+
properties: {
|
|
27
|
+
id: { type: "string", minLength: 1 },
|
|
28
|
+
description: { type: "string" },
|
|
29
|
+
max_cost: { type: "number", minimum: 0 },
|
|
30
|
+
source: {
|
|
31
|
+
oneOf: [
|
|
32
|
+
{
|
|
33
|
+
type: "object",
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
required: ["kind"],
|
|
36
|
+
allOf: [ITEMS_FIELD_CONDITIONAL_SCHEMA],
|
|
37
|
+
properties: {
|
|
38
|
+
kind: { const: "items" },
|
|
39
|
+
statuses: { type: "array", items: { type: "string" } },
|
|
40
|
+
types: { type: "array", items: { type: "string" } },
|
|
41
|
+
tags: { type: "array", items: { type: "string" } },
|
|
42
|
+
field: { type: "string" },
|
|
43
|
+
equals: { type: ["string", "number", "boolean", "null"] },
|
|
44
|
+
state: { enum: ["present", "missing"] },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "object",
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
required: ["kind", "dependency_kind"],
|
|
51
|
+
properties: {
|
|
52
|
+
kind: { const: "dependency_kind" },
|
|
53
|
+
dependency_kind: { type: "string", minLength: 1 },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "object",
|
|
58
|
+
required: ["kind", "operation", "field"],
|
|
59
|
+
properties: {
|
|
60
|
+
kind: { const: "graph" },
|
|
61
|
+
operation: { type: "string", minLength: 1 },
|
|
62
|
+
field: { type: "string", minLength: 1 },
|
|
63
|
+
parameters: { type: "object" },
|
|
64
|
+
},
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
},
|
|
67
|
+
...["validate", "health"].map((kind) => ({
|
|
68
|
+
type: "object",
|
|
69
|
+
required: ["kind", "check", "field"],
|
|
70
|
+
properties: {
|
|
71
|
+
kind: { const: kind },
|
|
72
|
+
check: { type: "string", minLength: 1 },
|
|
73
|
+
field: { type: "string", minLength: 1 },
|
|
74
|
+
},
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
})),
|
|
77
|
+
{
|
|
78
|
+
type: "object",
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
required: ["kind"],
|
|
81
|
+
properties: {
|
|
82
|
+
kind: { const: "history" },
|
|
83
|
+
op: { type: "string" },
|
|
84
|
+
author: { type: "string" },
|
|
85
|
+
harness: { type: "string" },
|
|
86
|
+
model: { type: "string" },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: "object",
|
|
91
|
+
additionalProperties: false,
|
|
92
|
+
required: ["kind", "link", "state"],
|
|
93
|
+
properties: {
|
|
94
|
+
kind: { const: "links" },
|
|
95
|
+
link: { enum: ["files", "tests", "docs"] },
|
|
96
|
+
state: { enum: ["present", "missing"] },
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: "object",
|
|
101
|
+
additionalProperties: false,
|
|
102
|
+
required: ["kind", "provider", "key"],
|
|
103
|
+
properties: {
|
|
104
|
+
kind: { const: "provider" },
|
|
105
|
+
provider: { type: "string", minLength: 1 },
|
|
106
|
+
key: { type: "string", minLength: 1 },
|
|
107
|
+
parameters: { type: "object" },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
required: ["kind", "expression"],
|
|
114
|
+
properties: {
|
|
115
|
+
kind: { const: "derived" },
|
|
116
|
+
expression: { type: "object", minProperties: 1 },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: "object",
|
|
125
|
+
additionalProperties: false,
|
|
126
|
+
required: [
|
|
127
|
+
"id",
|
|
128
|
+
"measurement_id",
|
|
129
|
+
"owner_item_id",
|
|
130
|
+
"scope",
|
|
131
|
+
"enforcement",
|
|
132
|
+
"negative_control",
|
|
133
|
+
],
|
|
134
|
+
oneOf: [
|
|
135
|
+
{ required: ["ceiling"] },
|
|
136
|
+
{ required: ["floor"] },
|
|
137
|
+
{ required: ["equals"] },
|
|
138
|
+
{ required: ["zero"] },
|
|
139
|
+
{ required: ["monotone_nondecreasing"] },
|
|
140
|
+
{ required: ["monotone_nonincreasing"] },
|
|
141
|
+
{ required: ["subset_of"] },
|
|
142
|
+
],
|
|
143
|
+
allOf: [
|
|
144
|
+
{
|
|
145
|
+
oneOf: [
|
|
146
|
+
{
|
|
147
|
+
not: {
|
|
148
|
+
required: ["lifetime"],
|
|
149
|
+
properties: { lifetime: { const: "retire" } },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
required: ["lifetime", "retire_reason"],
|
|
154
|
+
properties: {
|
|
155
|
+
lifetime: { const: "retire" },
|
|
156
|
+
retire_reason: { type: "string", minLength: 1 },
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
properties: {
|
|
163
|
+
id: { type: "string", minLength: 1 },
|
|
164
|
+
measurement_id: { type: "string", minLength: 1 },
|
|
165
|
+
owner_item_id: { type: "string", minLength: 1 },
|
|
166
|
+
scope: {
|
|
167
|
+
oneOf: [
|
|
168
|
+
{
|
|
169
|
+
type: "object",
|
|
170
|
+
additionalProperties: false,
|
|
171
|
+
required: ["kind"],
|
|
172
|
+
properties: { kind: { enum: ["all", "active"] } },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: "object",
|
|
176
|
+
additionalProperties: false,
|
|
177
|
+
required: ["kind", "measurement_id"],
|
|
178
|
+
properties: {
|
|
179
|
+
kind: { const: "filter" },
|
|
180
|
+
measurement_id: { type: "string", minLength: 1 },
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
ceiling: { type: "number" },
|
|
186
|
+
floor: { type: "number" },
|
|
187
|
+
equals: ASSURANCE_VALUE_SCHEMA,
|
|
188
|
+
zero: { const: true },
|
|
189
|
+
monotone_nondecreasing: { type: "number" },
|
|
190
|
+
monotone_nonincreasing: { type: "number" },
|
|
191
|
+
subset_of: { type: "array", items: { type: "string" } },
|
|
192
|
+
lifetime: { enum: ["hold", "retire"] },
|
|
193
|
+
retire_reason: { type: "string", minLength: 1 },
|
|
194
|
+
enforcement: { enum: ["block", "warn", "observe"] },
|
|
195
|
+
authorization_decision: { type: "string", minLength: 1 },
|
|
196
|
+
negative_control: {
|
|
197
|
+
type: "object",
|
|
198
|
+
additionalProperties: false,
|
|
199
|
+
required: ["cases"],
|
|
200
|
+
properties: {
|
|
201
|
+
cases: {
|
|
202
|
+
type: "array",
|
|
203
|
+
minItems: 2,
|
|
204
|
+
items: {
|
|
205
|
+
type: "object",
|
|
206
|
+
additionalProperties: false,
|
|
207
|
+
required: ["observed", "expected"],
|
|
208
|
+
properties: {
|
|
209
|
+
observed: ASSURANCE_VALUE_SCHEMA,
|
|
210
|
+
expected: { enum: ["pass", "fail"] },
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: "object",
|
|
220
|
+
additionalProperties: false,
|
|
221
|
+
required: ["id", "assertion_ids", "triggers"],
|
|
222
|
+
properties: {
|
|
223
|
+
id: { type: "string", minLength: 1 },
|
|
224
|
+
description: { type: "string" },
|
|
225
|
+
assertion_ids: {
|
|
226
|
+
type: "array",
|
|
227
|
+
minItems: 1,
|
|
228
|
+
items: { type: "string", minLength: 1 },
|
|
229
|
+
},
|
|
230
|
+
triggers: {
|
|
231
|
+
type: "array",
|
|
232
|
+
minItems: 1,
|
|
233
|
+
items: {
|
|
234
|
+
enum: [
|
|
235
|
+
"pre-commit",
|
|
236
|
+
"pre-push",
|
|
237
|
+
"pre-merge",
|
|
238
|
+
"ci",
|
|
239
|
+
"pre-release",
|
|
240
|
+
"post-release",
|
|
241
|
+
"scheduled",
|
|
242
|
+
"on-claim",
|
|
243
|
+
"on-close",
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
};
|
|
251
|
+
//# sourceMappingURL=assurance-definition.js.map
|
|
252
|
+
//# debugId=2d81fb20-890a-553b-b761-d60caf56b502
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Returns fresh option contract objects so exported arrays cannot share mutable entries. */
|
|
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]="e2028eff-b29e-5850-87b1-4a3e06f28964")}catch(e){}}();
|
|
4
4
|
function cloneOptionContracts(contracts) {
|
|
5
5
|
return contracts.map((contract) => ({ ...contract }));
|
|
6
6
|
}
|
|
@@ -351,6 +351,7 @@ export const TOOL_ACTIVITY_OPTION_CONTRACTS = [
|
|
|
351
351
|
{ param: "limit", flag: "--limit" },
|
|
352
352
|
{ param: "unbounded", flag: "--unbounded" },
|
|
353
353
|
{ param: "compact", flag: "--compact" },
|
|
354
|
+
{ param: "raw", flag: "--raw" },
|
|
354
355
|
{ param: "full", flag: "--full" },
|
|
355
356
|
{ param: "provenance", flag: "--provenance" },
|
|
356
357
|
{ param: "provenanceSummary", flag: "--provenance-summary" },
|
|
@@ -423,4 +424,4 @@ export const TOOL_GRAPH_OPTION_CONTRACTS = [
|
|
|
423
424
|
{ param: "summary", flag: "--summary" },
|
|
424
425
|
];
|
|
425
426
|
//# sourceMappingURL=tool-option-contracts.js.map
|
|
426
|
-
//# debugId=
|
|
427
|
+
//# debugId=e2028eff-b29e-5850-87b1-4a3e06f28964
|
|
@@ -4,9 +4,10 @@
|
|
|
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]="6cdf1fd1-7328-5bae-9238-d317f6efba8a")}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
|
+
import { ASSURANCE_DEFINITION_SCHEMA } from "./schemas/assurance-definition.js";
|
|
10
11
|
/** Public contract for pm tool parameter properties, shared by SDK and presentation-layer consumers. */
|
|
11
12
|
export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
12
13
|
json: { type: "boolean", default: true },
|
|
@@ -54,6 +55,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
54
55
|
},
|
|
55
56
|
],
|
|
56
57
|
},
|
|
58
|
+
outputRowContract: { type: "boolean" },
|
|
57
59
|
path: { type: "string" },
|
|
58
60
|
pmExecutable: { type: "string" },
|
|
59
61
|
timeoutMs: { type: "number" },
|
|
@@ -259,8 +261,10 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
259
261
|
semanticWeight: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
260
262
|
op: { type: "string" },
|
|
261
263
|
compact: { type: "boolean" },
|
|
264
|
+
raw: { type: "boolean" },
|
|
262
265
|
brief: { type: "boolean" },
|
|
263
266
|
full: { type: "boolean" },
|
|
267
|
+
includeEmpty: { type: "boolean" },
|
|
264
268
|
view: { type: "string", enum: ["agenda", "day", "week", "month"] },
|
|
265
269
|
date: { type: "string" },
|
|
266
270
|
from: { type: "string" },
|
|
@@ -369,6 +373,10 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
369
373
|
verboseAuthorEvents: { type: "boolean" },
|
|
370
374
|
match: { type: "string" },
|
|
371
375
|
onlyIndex: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
376
|
+
removeIndex: {
|
|
377
|
+
type: "array",
|
|
378
|
+
items: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
379
|
+
},
|
|
372
380
|
onlyLast: { type: "boolean" },
|
|
373
381
|
envSet: { type: "array", items: { type: "string" } },
|
|
374
382
|
envClear: { type: "array", items: { type: "string" } },
|
|
@@ -492,6 +500,23 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
492
500
|
sum: { type: "string" },
|
|
493
501
|
avg: { type: "string" },
|
|
494
502
|
tree: { type: "boolean" },
|
|
503
|
+
treeId: { type: "string", minLength: 1 },
|
|
504
|
+
definition: { type: "object" },
|
|
505
|
+
trigger: {
|
|
506
|
+
type: "string",
|
|
507
|
+
enum: [
|
|
508
|
+
"pre-commit",
|
|
509
|
+
"pre-push",
|
|
510
|
+
"pre-merge",
|
|
511
|
+
"ci",
|
|
512
|
+
"pre-release",
|
|
513
|
+
"post-release",
|
|
514
|
+
"scheduled",
|
|
515
|
+
"on-claim",
|
|
516
|
+
"on-close",
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
gate: { type: "string", minLength: 1 },
|
|
495
520
|
treeDepth: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
496
521
|
includeUnparented: { type: "boolean" },
|
|
497
522
|
gcScope: {
|
|
@@ -548,6 +573,9 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
548
573
|
apply: { type: "boolean" },
|
|
549
574
|
discoveryNote: { type: "string" },
|
|
550
575
|
lookupPath: { type: "array", items: { type: "string" } },
|
|
576
|
+
explain: { type: "boolean" },
|
|
577
|
+
lines: { type: "string", pattern: "^[1-9]\\d*:[1-9]\\d*$" },
|
|
578
|
+
decisionDepth: { type: "integer", minimum: 1, maximum: 32 },
|
|
551
579
|
// GH-170 (pm-pfnx): single-string note for files/docs add batches (the shared
|
|
552
580
|
// `note` key below is the array-typed create/update note seed).
|
|
553
581
|
addNote: { type: "string" },
|
|
@@ -610,6 +638,18 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
610
638
|
};
|
|
611
639
|
/** Per-action property overrides for parameters whose transport shape differs from their shared default. */
|
|
612
640
|
export const PM_TOOL_ACTION_SCOPED_PARAMETER_PROPERTIES = {
|
|
641
|
+
assurance: {
|
|
642
|
+
definition: ASSURANCE_DEFINITION_SCHEMA,
|
|
643
|
+
kind: {
|
|
644
|
+
type: "string",
|
|
645
|
+
enum: ["measurement", "assertion", "gate"],
|
|
646
|
+
},
|
|
647
|
+
subcommand: {
|
|
648
|
+
type: "string",
|
|
649
|
+
enum: ["list", "show", "put", "remove", "run", "verdicts"],
|
|
650
|
+
},
|
|
651
|
+
limit: { type: "integer", minimum: 1, maximum: 1000 },
|
|
652
|
+
},
|
|
613
653
|
activity: {
|
|
614
654
|
harness: {
|
|
615
655
|
anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }],
|
|
@@ -901,6 +941,9 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
901
941
|
},
|
|
902
942
|
],
|
|
903
943
|
},
|
|
944
|
+
outputRowContract: {
|
|
945
|
+
description: "Include the row selector and TOON row-encoding contract on a read result.",
|
|
946
|
+
},
|
|
904
947
|
profile: {
|
|
905
948
|
description: "Emit deterministic timing diagnostics to stderr.",
|
|
906
949
|
},
|
|
@@ -912,6 +955,21 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
912
955
|
description: "Item identifier for read or mutation actions.",
|
|
913
956
|
examples: ["pm-a1b2"],
|
|
914
957
|
},
|
|
958
|
+
treeId: {
|
|
959
|
+
description: "Commit, tree, snapshot, or immutable workspace identity judged by an assurance gate.",
|
|
960
|
+
examples: ["0123456789abcdef", "release-candidate-3"],
|
|
961
|
+
},
|
|
962
|
+
definition: {
|
|
963
|
+
description: "Structured measurement, assertion, or gate declaration used by assurance put.",
|
|
964
|
+
},
|
|
965
|
+
trigger: {
|
|
966
|
+
description: "Lifecycle trigger used to evaluate an assurance gate.",
|
|
967
|
+
examples: ["ci", "pre-release"],
|
|
968
|
+
},
|
|
969
|
+
gate: {
|
|
970
|
+
description: "Stable assurance gate id used to filter durable verdict history.",
|
|
971
|
+
examples: ["release-readiness"],
|
|
972
|
+
},
|
|
915
973
|
runId: {
|
|
916
974
|
description: "Background test run identifier.",
|
|
917
975
|
examples: ["tr-kq9x3f-93acde"],
|
|
@@ -1164,6 +1222,17 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1164
1222
|
description: "One or more source paths whose referencing pm items should be returned by files lookup.",
|
|
1165
1223
|
examples: [["src/sdk/files.ts"], ["README.md", "docs/SDK.md"]],
|
|
1166
1224
|
},
|
|
1225
|
+
explain: {
|
|
1226
|
+
description: "Include ranked linked-file, rationale, and governing-decision evidence for a files lookup.",
|
|
1227
|
+
},
|
|
1228
|
+
lines: {
|
|
1229
|
+
description: "Inclusive start:end source-line range for Git contribution attribution; requires one lookup path.",
|
|
1230
|
+
examples: ["10:24"],
|
|
1231
|
+
},
|
|
1232
|
+
decisionDepth: {
|
|
1233
|
+
description: "Maximum typed relationship depth searched for a governing Decision during files lookup.",
|
|
1234
|
+
examples: [8],
|
|
1235
|
+
},
|
|
1167
1236
|
clearComments: {
|
|
1168
1237
|
description: "When true, clear item comments.",
|
|
1169
1238
|
},
|
|
@@ -1240,6 +1309,10 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1240
1309
|
description: "Run only the 1-based linked-test index from pm test <id> --list order.",
|
|
1241
1310
|
examples: [1, "2"],
|
|
1242
1311
|
},
|
|
1312
|
+
removeIndex: {
|
|
1313
|
+
description: "Remove linked tests by their 1-based positions from pm test <id> --list order; repeatable and lossless for commands containing commas or equals signs.",
|
|
1314
|
+
examples: [[1], ["2", "4"]],
|
|
1315
|
+
},
|
|
1243
1316
|
onlyLast: {
|
|
1244
1317
|
description: "Run only the most recently added linked-test entry.",
|
|
1245
1318
|
},
|
|
@@ -1597,6 +1670,9 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1597
1670
|
compact: {
|
|
1598
1671
|
description: "Render compact projection output for search and list-family actions.",
|
|
1599
1672
|
},
|
|
1673
|
+
raw: {
|
|
1674
|
+
description: "For activity, restore the compact per-event stream instead of the default item digest.",
|
|
1675
|
+
},
|
|
1600
1676
|
brief: {
|
|
1601
1677
|
description: "Emit compact low-token output for commands that support terse projections or health details.",
|
|
1602
1678
|
examples: [true],
|
|
@@ -1604,6 +1680,9 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1604
1680
|
full: {
|
|
1605
1681
|
description: "Enable command-specific full/detail output mode when supported, such as deep item reads for get or full payload mode for search/history.",
|
|
1606
1682
|
},
|
|
1683
|
+
includeEmpty: {
|
|
1684
|
+
description: "For stats, restore zero-count registered type and lifecycle-status buckets.",
|
|
1685
|
+
},
|
|
1607
1686
|
fields: {
|
|
1608
1687
|
description: "Comma-separated projection fields for get, search, list-family, or context outputs. Valid field names are command-specific (e.g. score/matched_fields apply to search; context projects focus-row fields such as priority/deadline/completion_pct).",
|
|
1609
1688
|
examples: [
|
|
@@ -1769,6 +1848,24 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1769
1848
|
* because its single `name` property must cover every action at once.
|
|
1770
1849
|
*/
|
|
1771
1850
|
export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
1851
|
+
assurance: {
|
|
1852
|
+
subcommand: {
|
|
1853
|
+
description: "Assurance operation: list, show, put, remove, run, or verdicts.",
|
|
1854
|
+
examples: ["list", "run", "verdicts"],
|
|
1855
|
+
},
|
|
1856
|
+
kind: {
|
|
1857
|
+
description: "Assurance declaration kind for registry operations: measurement, assertion, or gate.",
|
|
1858
|
+
examples: ["measurement", "assertion", "gate"],
|
|
1859
|
+
},
|
|
1860
|
+
id: {
|
|
1861
|
+
description: "Stable assurance declaration id or gate id, depending on subcommand.",
|
|
1862
|
+
examples: ["active-issues", "release-readiness"],
|
|
1863
|
+
},
|
|
1864
|
+
limit: {
|
|
1865
|
+
description: "Maximum number of newest assurance verdicts returned.",
|
|
1866
|
+
examples: [10, 25],
|
|
1867
|
+
},
|
|
1868
|
+
},
|
|
1772
1869
|
update: {
|
|
1773
1870
|
acceptanceCriteria: {
|
|
1774
1871
|
description: "Complete acceptance-criteria replacement text. Use removeAc plus addAc together for an atomic one-entry repair that preserves unrelated criteria.",
|
|
@@ -1922,4 +2019,4 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
|
1922
2019
|
},
|
|
1923
2020
|
};
|
|
1924
2021
|
//# sourceMappingURL=tool-parameter-tables.js.map
|
|
1925
|
-
//# debugId=
|
|
2022
|
+
//# debugId=6cdf1fd1-7328-5bae-9238-d317f6efba8a
|
|
@@ -90,15 +90,15 @@ export interface PmActionToolInputSchemaOptions {
|
|
|
90
90
|
* `PM_TOOL_PARAMETERS_SCHEMA`, eliminating a hand-maintained MCP schema table.
|
|
91
91
|
*/
|
|
92
92
|
export declare function buildPmActionToolInputSchema(action: PmToolAction, options?: PmActionToolInputSchemaOptions): Record<string, unknown>;
|
|
93
|
-
/** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and
|
|
94
|
-
export declare const PM_TOOL_PARAMETERS_SCHEMA_VERSION: "4.
|
|
93
|
+
/** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and contract tests bind to one version constant. Bump the patch/minor for additive, backward-compatible schema changes; bump the MAJOR for breaking changes — the major also drives the `$id` `tool-parameters-v{major}` slug, so the two never drift. */
|
|
94
|
+
export declare const PM_TOOL_PARAMETERS_SCHEMA_VERSION: "4.7.0";
|
|
95
95
|
/**
|
|
96
96
|
* Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
|
|
97
97
|
* schema `$id` slug so a breaking version bump renames the document in lockstep.
|
|
98
98
|
*/
|
|
99
99
|
export declare const PM_TOOL_PARAMETERS_SCHEMA_MAJOR: string;
|
|
100
100
|
/** Version of the provider-compatible flat tool-parameters schema (`PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`). Tracked separately from the strict schema because the flat projection evolves independently. */
|
|
101
|
-
export declare const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION: "1.
|
|
101
|
+
export declare const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION: "1.3.0";
|
|
102
102
|
/** Public contract for pm tool parameters schema, shared by SDK and presentation-layer consumers. */
|
|
103
103
|
export declare const PM_TOOL_PARAMETERS_SCHEMA: Record<string, unknown>;
|
|
104
104
|
declare function toProviderCompatibleParameterDefinition(key: string, definition: unknown): Record<string, unknown>;
|
|
@@ -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]="5a184f36-a305-59f1-8c68-ef53cea1df1e")}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
|
+
"outputRowContract",
|
|
34
35
|
];
|
|
35
36
|
/** Canonical top-level MCP properties that take precedence over runtime custom fields. */
|
|
36
37
|
export const PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES = new Set([
|
|
@@ -82,6 +83,7 @@ const PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS = {
|
|
|
82
83
|
append: ["fullChangedFields"],
|
|
83
84
|
"update-many": ["fullChangedFields"],
|
|
84
85
|
"close-many": ["fullChangedFields"],
|
|
86
|
+
assurance: ["fullChangedFields", "idOnly"],
|
|
85
87
|
};
|
|
86
88
|
/** Create-compatible metadata parameters reused by Plan materialization and CLI registration. */
|
|
87
89
|
export const PLAN_CREATE_METADATA_PARAMETER_KEYS = [
|
|
@@ -889,6 +891,9 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
889
891
|
"offset",
|
|
890
892
|
"noTruncate",
|
|
891
893
|
"strictRead",
|
|
894
|
+
"explain",
|
|
895
|
+
"lines",
|
|
896
|
+
"decisionDepth",
|
|
892
897
|
...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
|
|
893
898
|
],
|
|
894
899
|
anyOfRequired: [["id"], ["lookupPath"]],
|
|
@@ -955,6 +960,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
955
960
|
"add",
|
|
956
961
|
"addJson",
|
|
957
962
|
"remove",
|
|
963
|
+
"removeIndex",
|
|
958
964
|
"run",
|
|
959
965
|
"match",
|
|
960
966
|
"onlyIndex",
|
|
@@ -1023,6 +1029,7 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
1023
1029
|
},
|
|
1024
1030
|
stats: {
|
|
1025
1031
|
optional: [
|
|
1032
|
+
"includeEmpty",
|
|
1026
1033
|
"storage",
|
|
1027
1034
|
"metadataCoverage",
|
|
1028
1035
|
"fieldUtilization",
|
|
@@ -1099,6 +1106,32 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
1099
1106
|
"full",
|
|
1100
1107
|
],
|
|
1101
1108
|
},
|
|
1109
|
+
assurance: {
|
|
1110
|
+
required: ["subcommand"],
|
|
1111
|
+
optional: [
|
|
1112
|
+
"kind",
|
|
1113
|
+
"id",
|
|
1114
|
+
"definition",
|
|
1115
|
+
"trigger",
|
|
1116
|
+
"treeId",
|
|
1117
|
+
"gate",
|
|
1118
|
+
"limit",
|
|
1119
|
+
"dryRun",
|
|
1120
|
+
"author",
|
|
1121
|
+
"message",
|
|
1122
|
+
],
|
|
1123
|
+
conditionalRequired: [
|
|
1124
|
+
{ property: "subcommand", value: "list", required: ["kind"] },
|
|
1125
|
+
{ property: "subcommand", value: "show", required: ["kind", "id"] },
|
|
1126
|
+
{
|
|
1127
|
+
property: "subcommand",
|
|
1128
|
+
value: "put",
|
|
1129
|
+
required: ["kind", "id", "definition"],
|
|
1130
|
+
},
|
|
1131
|
+
{ property: "subcommand", value: "remove", required: ["kind", "id"] },
|
|
1132
|
+
{ property: "subcommand", value: "run", required: ["id", "trigger"] },
|
|
1133
|
+
],
|
|
1134
|
+
},
|
|
1102
1135
|
gc: { optional: ["dryRun", "gcScope"] },
|
|
1103
1136
|
contracts: {
|
|
1104
1137
|
optional: [
|
|
@@ -1442,15 +1475,15 @@ function createLazyContractSchema(build) {
|
|
|
1442
1475
|
},
|
|
1443
1476
|
});
|
|
1444
1477
|
}
|
|
1445
|
-
/** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and
|
|
1446
|
-
export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.
|
|
1478
|
+
/** Canonical version of the action-scoped strict MCP tool-parameters schema (`PM_TOOL_PARAMETERS_SCHEMA`). Exported as the single source of truth so the MCP server, the `pm contracts` command, SDK consumers, and contract tests bind to one version constant. Bump the patch/minor for additive, backward-compatible schema changes; bump the MAJOR for breaking changes — the major also drives the `$id` `tool-parameters-v{major}` slug, so the two never drift. */
|
|
1479
|
+
export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.7.0";
|
|
1447
1480
|
/**
|
|
1448
1481
|
* Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
|
|
1449
1482
|
* schema `$id` slug so a breaking version bump renames the document in lockstep.
|
|
1450
1483
|
*/
|
|
1451
1484
|
export const PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
|
|
1452
1485
|
/** Version of the provider-compatible flat tool-parameters schema (`PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`). Tracked separately from the strict schema because the flat projection evolves independently. */
|
|
1453
|
-
export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.
|
|
1486
|
+
export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.3.0";
|
|
1454
1487
|
/** Public contract for pm tool parameters schema, shared by SDK and presentation-layer consumers. */
|
|
1455
1488
|
export const PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
|
|
1456
1489
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1525,4 +1558,4 @@ export const _testOnlyCliContracts = {
|
|
|
1525
1558
|
withFlagAliasMetadata,
|
|
1526
1559
|
};
|
|
1527
1560
|
//# sourceMappingURL=tool-schema.js.map
|
|
1528
|
-
//# debugId=
|
|
1561
|
+
//# debugId=5a184f36-a305-59f1-8c68-ef53cea1df1e
|
|
@@ -19,7 +19,7 @@ export type { PmExtensionCapabilityContract, PmExtensionServiceNameContract, PmE
|
|
|
19
19
|
export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, } from "./cli-contracts/tool-option-contracts.js";
|
|
20
20
|
export type { OptionsFromContracts, PmBulkMutationControlOptions, PmBulkMutationFilterOptions, PmCloseActionOptions, PmCloseManyActionOptions, PmCreateActionOptions, PmMutationAttributionOptions, PmOptionScalar, PmUpdateActionOptions, PmUpdateManyActionOptions, } from "./cli-contracts/typed-action-inputs.js";
|
|
21
21
|
export type { CliFlagContract, ToolOptionFlagContract, } from "./cli-contracts/flag-contracts.js";
|
|
22
|
-
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
22
|
+
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, ASSURANCE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
23
23
|
export type { PmActionSchemaContract } from "./cli-contracts/tool-schema.js";
|
|
24
24
|
export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, resolvePmToolCustomFieldCollision, CLOSE_ACTION_OPTION_KEYS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
|
|
25
25
|
export type { PmActionToolInputSchemaOptions, PmToolCustomFieldCollision, } from "./cli-contracts/tool-schema.js";
|