@unbrained/pm-cli 2026.8.9 → 2026.8.11
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 +142 -80
- package/dist/cli/commander-usage.js +94 -17
- package/dist/cli/error-guidance.d.ts +10 -0
- package/dist/cli/error-guidance.js +76 -25
- package/dist/cli/help-json-payload.js +51 -16
- package/dist/cli/main.js +11 -6
- 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-mutation.js +30 -9
- package/dist/cli/register-operations.js +16 -11
- package/dist/cli-bundle/bundle-manifest.json +163 -163
- package/dist/cli-bundle/chunks/{chunk-RJC7TPF4.js → chunk-2OOU2AFH.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +33 -0
- package/dist/cli-bundle/chunks/chunk-A2SJGHSI.js +3 -0
- package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +13 -0
- package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +194 -0
- package/dist/cli-bundle/chunks/chunk-IUNRVDAI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YC3UF2IO.js → chunk-WMEZHCFI.js} +66 -60
- package/dist/cli-bundle/chunks/{chunk-GMX5YOI3.js → chunk-ZU34C3LH.js} +48 -48
- package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +5 -0
- package/dist/cli-bundle/chunks/{register-list-query-BUE7PTCU.js → register-list-query-HAUXVUPY.js} +8 -8
- package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-UQDTNTLJ.js → register-setup-NOCOOWQY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KNEHLPBF.js → chunk-23FTGO3W.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6DO4YQWZ.js → chunk-2DL3MRTD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-MRWVJ3ZG.js → chunk-4H5IA6AV.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-55BIB6DV.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPIY34S.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-DPO7TEFX.js +31 -0
- package/dist/cli-bundle/focused-chunks/{chunk-3WVHTUAW.js → chunk-E3KCL7AY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +153 -0
- package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FPSYO5ZG.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-73FIJONU.js → chunk-J5EKAIVD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KDH5OX3D.js +4 -0
- package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-TL5M2PAY.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-UDAZWT25.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +17 -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/diagnostics/remediation.js +9 -9
- package/dist/core/fs/fs-utils.d.ts +10 -0
- package/dist/core/fs/fs-utils.js +16 -4
- package/dist/core/item/item-format.js +3 -32
- package/dist/core/schema/fields-file.d.ts +1 -2
- package/dist/core/schema/fields-file.js +4 -11
- package/dist/core/schema/runtime-schema.js +3 -10
- package/dist/core/schema/status-defs-file.d.ts +1 -2
- package/dist/core/schema/status-defs-file.js +4 -32
- package/dist/core/schema/status-token.d.ts +2 -0
- package/dist/core/schema/status-token.js +32 -0
- package/dist/core/schema/type-workflows.d.ts +1 -2
- package/dist/core/schema/type-workflows.js +4 -11
- 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 +8 -2
- package/dist/core/shared/author.js +85 -52
- package/dist/core/shared/errors.d.ts +12 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/text-normalization.d.ts +1 -1
- package/dist/core/shared/text-normalization.js +2 -2
- package/dist/sdk/agent/command-recovery.d.ts +4 -0
- package/dist/sdk/agent/command-recovery.js +52 -0
- package/dist/sdk/agent/command-suggestions.d.ts +4 -0
- package/dist/sdk/agent/command-suggestions.js +67 -0
- package/dist/sdk/agent/create-option-policy.d.ts +12 -0
- package/dist/sdk/agent/create-option-policy.js +32 -0
- package/dist/sdk/agent/item-addressing.d.ts +19 -0
- package/dist/sdk/agent/item-addressing.js +208 -0
- 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 +9 -1
- package/dist/sdk/cli-bootstrap.js +25 -10
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -4
- package/dist/sdk/cli-contracts/completeness.js +13 -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 +77 -21
- package/dist/sdk/cli-contracts/registration-helpers.js +10 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +6 -3
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +513 -0
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +251 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +6 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +96 -4
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +49 -6
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/completion.js +9 -3
- 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-runtime.js +8 -5
- package/dist/sdk/context-signal-store.d.ts +34 -0
- package/dist/sdk/context-signal-store.js +24 -2
- package/dist/sdk/core-governance.d.ts +3 -1
- package/dist/sdk/core-governance.js +5 -3
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +2 -2
- package/dist/sdk/dependency-flag-validation.d.ts +15 -1
- package/dist/sdk/dependency-flag-validation.js +54 -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-error-code-catalog.js +104 -13
- 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 +198 -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-runtime.d.ts +20 -0
- package/dist/sdk/governance/assurance-runtime.js +131 -0
- package/dist/sdk/governance/assurance.d.ts +432 -0
- package/dist/sdk/governance/assurance.js +689 -0
- package/dist/sdk/governance/health.js +14 -7
- package/dist/sdk/governance/provenance-health.d.ts +13 -0
- package/dist/sdk/governance/provenance-health.js +63 -17
- package/dist/sdk/governance/validate-item-reader.d.ts +13 -0
- package/dist/sdk/governance/validate-item-reader.js +18 -0
- package/dist/sdk/governance/validate.d.ts +2 -2
- package/dist/sdk/governance/validate.js +15 -6
- package/dist/sdk/graph/run.js +8 -3
- package/dist/sdk/index.d.ts +10 -1
- package/dist/sdk/index.js +12 -3
- package/dist/sdk/lifecycle/claim.js +18 -3
- package/dist/sdk/lifecycle/close.js +17 -14
- package/dist/sdk/lifecycle/create.d.ts +2 -0
- package/dist/sdk/lifecycle/create.js +62 -9
- package/dist/sdk/lifecycle/focus.js +13 -3
- package/dist/sdk/lifecycle/plan.js +8 -3
- package/dist/sdk/lifecycle/update-many.js +39 -27
- package/dist/sdk/lifecycle/update.d.ts +6 -1
- package/dist/sdk/lifecycle/update.js +47 -10
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/install.d.ts +4 -0
- package/dist/sdk/merge/install.js +28 -16
- package/dist/sdk/merge/receipts.d.ts +3 -0
- package/dist/sdk/merge/receipts.js +81 -17
- package/dist/sdk/output-projection.js +24 -4
- package/dist/sdk/provenance.d.ts +38 -0
- package/dist/sdk/provenance.js +64 -2
- package/dist/sdk/query/context.d.ts +2 -0
- package/dist/sdk/query/context.js +24 -10
- package/dist/sdk/query/light-metadata.d.ts +3 -0
- package/dist/sdk/query/light-metadata.js +19 -0
- package/dist/sdk/runtime-extended-actions.js +22 -5
- package/dist/sdk/runtime-primitives.d.ts +2 -0
- package/dist/sdk/runtime-primitives.js +4 -2
- package/dist/sdk/runtime.d.ts +8 -1
- package/dist/sdk/runtime.js +37 -28
- package/dist/sdk/schema-migration.js +7 -9
- package/dist/sdk/similarity-scoring.d.ts +1 -2
- package/dist/sdk/similarity-scoring.js +4 -16
- package/dist/sdk/telemetry.js +7 -4
- 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/sdk/workspace-snapshot.d.ts +4 -0
- package/dist/sdk/workspace-snapshot.js +24 -11
- package/dist/types.d.ts +8 -2
- package/dist/types.js +2 -2
- package/docs/AGENT_GUIDE.md +3 -1
- package/docs/ASSURANCE.md +132 -0
- package/docs/COMMANDS.md +8 -5
- package/docs/MERGE_SAFETY.md +7 -5
- package/docs/README.md +3 -5
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -2
- package/docs/RELEASING.md +9 -5
- package/docs/SDK.md +44 -8
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +43 -6
- package/docs/SDK_CONTEXT.md +97 -0
- package/docs/SDK_CONTEXT_INTEGRITY.md +18 -3
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +39 -1
- package/docs/SDK_RUNTIME_BOUNDARIES.md +36 -1
- package/docs/TESTING.md +12 -9
- package/docs/agent-task-token-baseline.json +2 -2
- package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -0
- package/marketplace.json +2 -2
- package/package.json +7 -6
- 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 +1028 -48
- package/dist/cli-bundle/chunks/chunk-2DTCZXSD.js +0 -13
- package/dist/cli-bundle/chunks/chunk-5JO6R4BS.js +0 -3
- package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +0 -194
- package/dist/cli-bundle/chunks/chunk-EF43KODO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +0 -28
- package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PYO5GZU6.js +0 -5
- package/dist/cli-bundle/chunks/register-mutation-FC3XLVIK.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-3GSFUDAI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-54TZJ4BM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-C3GCHDSQ.js +0 -31
- package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-P6BBIQRG.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-PZAGVQNN.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +0 -14
- package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-U46GQJNY.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-VRXJSGIT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XC2ZW3CJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZG54B4XG.js +0 -2
|
@@ -0,0 +1,251 @@
|
|
|
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]="13e7d51c-8464-578c-8780-5ddb6e029705")}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
|
+
required: ["equals"],
|
|
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
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: "object",
|
|
48
|
+
additionalProperties: false,
|
|
49
|
+
required: ["kind", "dependency_kind"],
|
|
50
|
+
properties: {
|
|
51
|
+
kind: { const: "dependency_kind" },
|
|
52
|
+
dependency_kind: { type: "string", minLength: 1 },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "object",
|
|
57
|
+
required: ["kind", "operation", "field"],
|
|
58
|
+
properties: {
|
|
59
|
+
kind: { const: "graph" },
|
|
60
|
+
operation: { type: "string", minLength: 1 },
|
|
61
|
+
field: { type: "string", minLength: 1 },
|
|
62
|
+
parameters: { type: "object" },
|
|
63
|
+
},
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
},
|
|
66
|
+
...["validate", "health"].map((kind) => ({
|
|
67
|
+
type: "object",
|
|
68
|
+
required: ["kind", "check", "field"],
|
|
69
|
+
properties: {
|
|
70
|
+
kind: { const: kind },
|
|
71
|
+
check: { type: "string", minLength: 1 },
|
|
72
|
+
field: { type: "string", minLength: 1 },
|
|
73
|
+
},
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
})),
|
|
76
|
+
{
|
|
77
|
+
type: "object",
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
required: ["kind"],
|
|
80
|
+
properties: {
|
|
81
|
+
kind: { const: "history" },
|
|
82
|
+
op: { type: "string" },
|
|
83
|
+
author: { type: "string" },
|
|
84
|
+
harness: { type: "string" },
|
|
85
|
+
model: { type: "string" },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "object",
|
|
90
|
+
additionalProperties: false,
|
|
91
|
+
required: ["kind", "link", "state"],
|
|
92
|
+
properties: {
|
|
93
|
+
kind: { const: "links" },
|
|
94
|
+
link: { enum: ["files", "tests", "docs"] },
|
|
95
|
+
state: { enum: ["present", "missing"] },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: "object",
|
|
100
|
+
additionalProperties: false,
|
|
101
|
+
required: ["kind", "provider", "key"],
|
|
102
|
+
properties: {
|
|
103
|
+
kind: { const: "provider" },
|
|
104
|
+
provider: { type: "string", minLength: 1 },
|
|
105
|
+
key: { type: "string", minLength: 1 },
|
|
106
|
+
parameters: { type: "object" },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: "object",
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
required: ["kind", "expression"],
|
|
113
|
+
properties: {
|
|
114
|
+
kind: { const: "derived" },
|
|
115
|
+
expression: { type: "object", minProperties: 1 },
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: "object",
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
required: [
|
|
126
|
+
"id",
|
|
127
|
+
"measurement_id",
|
|
128
|
+
"owner_item_id",
|
|
129
|
+
"scope",
|
|
130
|
+
"enforcement",
|
|
131
|
+
"negative_control",
|
|
132
|
+
],
|
|
133
|
+
oneOf: [
|
|
134
|
+
{ required: ["ceiling"] },
|
|
135
|
+
{ required: ["floor"] },
|
|
136
|
+
{ required: ["equals"] },
|
|
137
|
+
{ required: ["zero"] },
|
|
138
|
+
{ required: ["monotone_nondecreasing"] },
|
|
139
|
+
{ required: ["monotone_nonincreasing"] },
|
|
140
|
+
{ required: ["subset_of"] },
|
|
141
|
+
],
|
|
142
|
+
allOf: [
|
|
143
|
+
{
|
|
144
|
+
oneOf: [
|
|
145
|
+
{
|
|
146
|
+
not: {
|
|
147
|
+
required: ["lifetime"],
|
|
148
|
+
properties: { lifetime: { const: "retire" } },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
required: ["lifetime", "retire_reason"],
|
|
153
|
+
properties: {
|
|
154
|
+
lifetime: { const: "retire" },
|
|
155
|
+
retire_reason: { type: "string", minLength: 1 },
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
properties: {
|
|
162
|
+
id: { type: "string", minLength: 1 },
|
|
163
|
+
measurement_id: { type: "string", minLength: 1 },
|
|
164
|
+
owner_item_id: { type: "string", minLength: 1 },
|
|
165
|
+
scope: {
|
|
166
|
+
oneOf: [
|
|
167
|
+
{
|
|
168
|
+
type: "object",
|
|
169
|
+
additionalProperties: false,
|
|
170
|
+
required: ["kind"],
|
|
171
|
+
properties: { kind: { enum: ["all", "active"] } },
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: "object",
|
|
175
|
+
additionalProperties: false,
|
|
176
|
+
required: ["kind", "measurement_id"],
|
|
177
|
+
properties: {
|
|
178
|
+
kind: { const: "filter" },
|
|
179
|
+
measurement_id: { type: "string", minLength: 1 },
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
ceiling: { type: "number" },
|
|
185
|
+
floor: { type: "number" },
|
|
186
|
+
equals: ASSURANCE_VALUE_SCHEMA,
|
|
187
|
+
zero: { const: true },
|
|
188
|
+
monotone_nondecreasing: { type: "number" },
|
|
189
|
+
monotone_nonincreasing: { type: "number" },
|
|
190
|
+
subset_of: { type: "array", items: { type: "string" } },
|
|
191
|
+
lifetime: { enum: ["hold", "retire"] },
|
|
192
|
+
retire_reason: { type: "string", minLength: 1 },
|
|
193
|
+
enforcement: { enum: ["block", "warn", "observe"] },
|
|
194
|
+
authorization_decision: { type: "string", minLength: 1 },
|
|
195
|
+
negative_control: {
|
|
196
|
+
type: "object",
|
|
197
|
+
additionalProperties: false,
|
|
198
|
+
required: ["cases"],
|
|
199
|
+
properties: {
|
|
200
|
+
cases: {
|
|
201
|
+
type: "array",
|
|
202
|
+
minItems: 2,
|
|
203
|
+
items: {
|
|
204
|
+
type: "object",
|
|
205
|
+
additionalProperties: false,
|
|
206
|
+
required: ["observed", "expected"],
|
|
207
|
+
properties: {
|
|
208
|
+
observed: ASSURANCE_VALUE_SCHEMA,
|
|
209
|
+
expected: { enum: ["pass", "fail"] },
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
type: "object",
|
|
219
|
+
additionalProperties: false,
|
|
220
|
+
required: ["id", "assertion_ids", "triggers"],
|
|
221
|
+
properties: {
|
|
222
|
+
id: { type: "string", minLength: 1 },
|
|
223
|
+
description: { type: "string" },
|
|
224
|
+
assertion_ids: {
|
|
225
|
+
type: "array",
|
|
226
|
+
minItems: 1,
|
|
227
|
+
items: { type: "string", minLength: 1 },
|
|
228
|
+
},
|
|
229
|
+
triggers: {
|
|
230
|
+
type: "array",
|
|
231
|
+
minItems: 1,
|
|
232
|
+
items: {
|
|
233
|
+
enum: [
|
|
234
|
+
"pre-commit",
|
|
235
|
+
"pre-push",
|
|
236
|
+
"pre-merge",
|
|
237
|
+
"ci",
|
|
238
|
+
"pre-release",
|
|
239
|
+
"post-release",
|
|
240
|
+
"scheduled",
|
|
241
|
+
"on-claim",
|
|
242
|
+
"on-close",
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=assurance-definition.js.map
|
|
251
|
+
//# debugId=13e7d51c-8464-578c-8780-5ddb6e029705
|
|
@@ -170,6 +170,9 @@ export declare const TOOL_CREATE_OPTION_CONTRACT_SOURCE: readonly [{
|
|
|
170
170
|
}, {
|
|
171
171
|
readonly param: "allowMissingParent";
|
|
172
172
|
readonly flag: "--allow-missing-parent";
|
|
173
|
+
}, {
|
|
174
|
+
readonly param: "allowUnresolvedDeps";
|
|
175
|
+
readonly flag: "--allow-unresolved-deps";
|
|
173
176
|
}, {
|
|
174
177
|
readonly param: "allowDuplicate";
|
|
175
178
|
readonly flag: "--allow-duplicate";
|
|
@@ -325,6 +328,9 @@ export declare const TOOL_UPDATE_OPTION_CONTRACT_SOURCE: readonly [{
|
|
|
325
328
|
}, {
|
|
326
329
|
readonly param: "allowMissingParent";
|
|
327
330
|
readonly flag: "--allow-missing-parent";
|
|
331
|
+
}, {
|
|
332
|
+
readonly param: "allowUnresolvedDeps";
|
|
333
|
+
readonly flag: "--allow-unresolved-deps";
|
|
328
334
|
}, {
|
|
329
335
|
readonly param: "dep";
|
|
330
336
|
readonly flag: "--dep";
|
|
@@ -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]="26955ae3-1aca-503e-9492-46652285d17a")}catch(e){}}();
|
|
4
4
|
function cloneOptionContracts(contracts) {
|
|
5
5
|
return contracts.map((contract) => ({ ...contract }));
|
|
6
6
|
}
|
|
@@ -183,6 +183,7 @@ export const TOOL_CREATE_OPTION_CONTRACT_SOURCE = [
|
|
|
183
183
|
{ param: "message", flag: "--message", allowEmpty: true },
|
|
184
184
|
{ param: "assignee", flag: "--assignee" },
|
|
185
185
|
{ param: "allowMissingParent", flag: "--allow-missing-parent" },
|
|
186
|
+
{ param: "allowUnresolvedDeps", flag: "--allow-unresolved-deps" },
|
|
186
187
|
{ param: "allowDuplicate", flag: "--allow-duplicate", booleanish: true },
|
|
187
188
|
{ param: "reminder", flag: "--reminder", repeatable: true },
|
|
188
189
|
{ param: "event", flag: "--event", repeatable: true },
|
|
@@ -235,6 +236,7 @@ export const TOOL_UPDATE_OPTION_CONTRACT_SOURCE = [
|
|
|
235
236
|
{ param: "message", flag: "--message", allowEmpty: true },
|
|
236
237
|
{ param: "assignee", flag: "--assignee" },
|
|
237
238
|
{ param: "allowMissingParent", flag: "--allow-missing-parent" },
|
|
239
|
+
{ param: "allowUnresolvedDeps", flag: "--allow-unresolved-deps" },
|
|
238
240
|
{ param: "dep", flag: "--dep", repeatable: true },
|
|
239
241
|
{ param: "depRemove", flag: "--dep-remove", repeatable: true },
|
|
240
242
|
{ param: "replaceDeps", flag: "--replace-deps" },
|
|
@@ -421,4 +423,4 @@ export const TOOL_GRAPH_OPTION_CONTRACTS = [
|
|
|
421
423
|
{ param: "summary", flag: "--summary" },
|
|
422
424
|
];
|
|
423
425
|
//# sourceMappingURL=tool-option-contracts.js.map
|
|
424
|
-
//# debugId=
|
|
426
|
+
//# debugId=26955ae3-1aca-503e-9492-46652285d17a
|
|
@@ -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]="28d82e94-0359-5ae8-87f1-145f412df35e")}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 },
|
|
@@ -164,6 +165,7 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
164
165
|
},
|
|
165
166
|
idOnly: { type: "boolean" },
|
|
166
167
|
allowMissingParent: { type: "boolean" },
|
|
168
|
+
allowUnresolvedDeps: { type: "boolean" },
|
|
167
169
|
allowDuplicate: { type: "boolean" },
|
|
168
170
|
duplicateOf: { type: "string" },
|
|
169
171
|
configAction: { type: "string", enum: ["get", "set", "list", "export"] },
|
|
@@ -491,6 +493,23 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
491
493
|
sum: { type: "string" },
|
|
492
494
|
avg: { type: "string" },
|
|
493
495
|
tree: { type: "boolean" },
|
|
496
|
+
treeId: { type: "string", minLength: 1 },
|
|
497
|
+
definition: { type: "object" },
|
|
498
|
+
trigger: {
|
|
499
|
+
type: "string",
|
|
500
|
+
enum: [
|
|
501
|
+
"pre-commit",
|
|
502
|
+
"pre-push",
|
|
503
|
+
"pre-merge",
|
|
504
|
+
"ci",
|
|
505
|
+
"pre-release",
|
|
506
|
+
"post-release",
|
|
507
|
+
"scheduled",
|
|
508
|
+
"on-claim",
|
|
509
|
+
"on-close",
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
gate: { type: "string", minLength: 1 },
|
|
494
513
|
treeDepth: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
495
514
|
includeUnparented: { type: "boolean" },
|
|
496
515
|
gcScope: {
|
|
@@ -547,6 +566,9 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
547
566
|
apply: { type: "boolean" },
|
|
548
567
|
discoveryNote: { type: "string" },
|
|
549
568
|
lookupPath: { type: "array", items: { type: "string" } },
|
|
569
|
+
explain: { type: "boolean" },
|
|
570
|
+
lines: { type: "string", pattern: "^[1-9]\\d*:[1-9]\\d*$" },
|
|
571
|
+
decisionDepth: { type: "integer", minimum: 1, maximum: 32 },
|
|
550
572
|
// GH-170 (pm-pfnx): single-string note for files/docs add batches (the shared
|
|
551
573
|
// `note` key below is the array-typed create/update note seed).
|
|
552
574
|
addNote: { type: "string" },
|
|
@@ -609,6 +631,18 @@ export const PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
609
631
|
};
|
|
610
632
|
/** Per-action property overrides for parameters whose transport shape differs from their shared default. */
|
|
611
633
|
export const PM_TOOL_ACTION_SCOPED_PARAMETER_PROPERTIES = {
|
|
634
|
+
assurance: {
|
|
635
|
+
definition: ASSURANCE_DEFINITION_SCHEMA,
|
|
636
|
+
kind: {
|
|
637
|
+
type: "string",
|
|
638
|
+
enum: ["measurement", "assertion", "gate"],
|
|
639
|
+
},
|
|
640
|
+
subcommand: {
|
|
641
|
+
type: "string",
|
|
642
|
+
enum: ["list", "show", "put", "remove", "run", "verdicts"],
|
|
643
|
+
},
|
|
644
|
+
limit: { type: "integer", minimum: 1, maximum: 1000 },
|
|
645
|
+
},
|
|
612
646
|
activity: {
|
|
613
647
|
harness: {
|
|
614
648
|
anyOf: [{ type: "string" }, { type: "array", items: { type: "string" } }],
|
|
@@ -911,6 +945,21 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
911
945
|
description: "Item identifier for read or mutation actions.",
|
|
912
946
|
examples: ["pm-a1b2"],
|
|
913
947
|
},
|
|
948
|
+
treeId: {
|
|
949
|
+
description: "Commit, tree, snapshot, or immutable workspace identity judged by an assurance gate.",
|
|
950
|
+
examples: ["0123456789abcdef", "release-candidate-3"],
|
|
951
|
+
},
|
|
952
|
+
definition: {
|
|
953
|
+
description: "Structured measurement, assertion, or gate declaration used by assurance put.",
|
|
954
|
+
},
|
|
955
|
+
trigger: {
|
|
956
|
+
description: "Lifecycle trigger used to evaluate an assurance gate.",
|
|
957
|
+
examples: ["ci", "pre-release"],
|
|
958
|
+
},
|
|
959
|
+
gate: {
|
|
960
|
+
description: "Stable assurance gate id used to filter durable verdict history.",
|
|
961
|
+
examples: ["release-readiness"],
|
|
962
|
+
},
|
|
914
963
|
runId: {
|
|
915
964
|
description: "Background test run identifier.",
|
|
916
965
|
examples: ["tr-kq9x3f-93acde"],
|
|
@@ -979,6 +1028,10 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
979
1028
|
allowDuplicate: {
|
|
980
1029
|
description: "Explicitly proceed when strict similarity governance finds likely duplicate items.",
|
|
981
1030
|
},
|
|
1031
|
+
allowUnresolvedDeps: {
|
|
1032
|
+
description: "Permit unresolved local dependency targets while returning dependency_target_unresolved warning receipts. Cross-workspace references should use source_kind=external instead.",
|
|
1033
|
+
examples: [true],
|
|
1034
|
+
},
|
|
982
1035
|
requiredTypes: {
|
|
983
1036
|
description: "Restrict a custom field's requirement to specific item types (schema add-field).",
|
|
984
1037
|
examples: [["Bug"], ["Story", "Spike"]],
|
|
@@ -1074,7 +1127,7 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1074
1127
|
examples: [["error path covered by a regression test"]],
|
|
1075
1128
|
},
|
|
1076
1129
|
removeAc: {
|
|
1077
|
-
description: "Acceptance criteria removed individually by exact text match (one criterion per entry).",
|
|
1130
|
+
description: "Acceptance criteria removed individually by exact text match; the mutation fails atomically if any selector is unmatched (one criterion per entry).",
|
|
1078
1131
|
examples: [["superseded manual QA step"]],
|
|
1079
1132
|
},
|
|
1080
1133
|
removeTags: {
|
|
@@ -1106,7 +1159,7 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1106
1159
|
examples: [60, "120"],
|
|
1107
1160
|
},
|
|
1108
1161
|
acceptanceCriteria: {
|
|
1109
|
-
description: "
|
|
1162
|
+
description: "Complete acceptance-criteria text supplied while creating or replacing an item field.",
|
|
1110
1163
|
},
|
|
1111
1164
|
author: {
|
|
1112
1165
|
description: "Intentional mutation-author override. Agent harness identity is automatic when omitted.",
|
|
@@ -1159,6 +1212,17 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1159
1212
|
description: "One or more source paths whose referencing pm items should be returned by files lookup.",
|
|
1160
1213
|
examples: [["src/sdk/files.ts"], ["README.md", "docs/SDK.md"]],
|
|
1161
1214
|
},
|
|
1215
|
+
explain: {
|
|
1216
|
+
description: "Include ranked linked-file, rationale, and governing-decision evidence for a files lookup.",
|
|
1217
|
+
},
|
|
1218
|
+
lines: {
|
|
1219
|
+
description: "Inclusive start:end source-line range for Git contribution attribution; requires one lookup path.",
|
|
1220
|
+
examples: ["10:24"],
|
|
1221
|
+
},
|
|
1222
|
+
decisionDepth: {
|
|
1223
|
+
description: "Maximum typed relationship depth searched for a governing Decision during files lookup.",
|
|
1224
|
+
examples: [8],
|
|
1225
|
+
},
|
|
1162
1226
|
clearComments: {
|
|
1163
1227
|
description: "When true, clear item comments.",
|
|
1164
1228
|
},
|
|
@@ -1764,6 +1828,34 @@ export const PM_TOOL_PARAMETER_METADATA = {
|
|
|
1764
1828
|
* because its single `name` property must cover every action at once.
|
|
1765
1829
|
*/
|
|
1766
1830
|
export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
1831
|
+
assurance: {
|
|
1832
|
+
subcommand: {
|
|
1833
|
+
description: "Assurance operation: list, show, put, remove, run, or verdicts.",
|
|
1834
|
+
examples: ["list", "run", "verdicts"],
|
|
1835
|
+
},
|
|
1836
|
+
kind: {
|
|
1837
|
+
description: "Assurance declaration kind for registry operations: measurement, assertion, or gate.",
|
|
1838
|
+
examples: ["measurement", "assertion", "gate"],
|
|
1839
|
+
},
|
|
1840
|
+
id: {
|
|
1841
|
+
description: "Stable assurance declaration id or gate id, depending on subcommand.",
|
|
1842
|
+
examples: ["active-issues", "release-readiness"],
|
|
1843
|
+
},
|
|
1844
|
+
limit: {
|
|
1845
|
+
description: "Maximum number of newest assurance verdicts returned.",
|
|
1846
|
+
examples: [10, 25],
|
|
1847
|
+
},
|
|
1848
|
+
},
|
|
1849
|
+
update: {
|
|
1850
|
+
acceptanceCriteria: {
|
|
1851
|
+
description: "Complete acceptance-criteria replacement text. Use removeAc plus addAc together for an atomic one-entry repair that preserves unrelated criteria.",
|
|
1852
|
+
},
|
|
1853
|
+
},
|
|
1854
|
+
"update-many": {
|
|
1855
|
+
acceptanceCriteria: {
|
|
1856
|
+
description: "Complete acceptance-criteria replacement text. Use removeAc plus addAc together for an atomic one-entry repair that preserves unrelated criteria.",
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1767
1859
|
stats: {
|
|
1768
1860
|
since: {
|
|
1769
1861
|
description: "Inclusive ISO 8601 timestamp or negative duration lower bound for provenance and fleet analytics.",
|
|
@@ -1907,4 +1999,4 @@ export const PM_TOOL_ACTION_SCOPED_PARAMETER_METADATA = {
|
|
|
1907
1999
|
},
|
|
1908
2000
|
};
|
|
1909
2001
|
//# sourceMappingURL=tool-parameter-tables.js.map
|
|
1910
|
-
//# debugId=
|
|
2002
|
+
//# debugId=28d82e94-0359-5ae8-87f1-145f412df35e
|
|
@@ -91,14 +91,14 @@ export interface PmActionToolInputSchemaOptions {
|
|
|
91
91
|
*/
|
|
92
92
|
export declare function buildPmActionToolInputSchema(action: PmToolAction, options?: PmActionToolInputSchemaOptions): Record<string, unknown>;
|
|
93
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 the contract tests all bind to one constant instead of re-typing the `"4.0.2"` literal (pm-r9sz). 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.
|
|
94
|
+
export declare const PM_TOOL_PARAMETERS_SCHEMA_VERSION: "4.6.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]="9882d78a-8742-5d50-b345-debe47322b65")}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";
|
|
@@ -82,6 +82,7 @@ const PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS = {
|
|
|
82
82
|
append: ["fullChangedFields"],
|
|
83
83
|
"update-many": ["fullChangedFields"],
|
|
84
84
|
"close-many": ["fullChangedFields"],
|
|
85
|
+
assurance: ["fullChangedFields", "idOnly"],
|
|
85
86
|
};
|
|
86
87
|
/** Create-compatible metadata parameters reused by Plan materialization and CLI registration. */
|
|
87
88
|
export const PLAN_CREATE_METADATA_PARAMETER_KEYS = [
|
|
@@ -784,8 +785,21 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
784
785
|
required: ["id", "target"],
|
|
785
786
|
optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
|
|
786
787
|
},
|
|
787
|
-
update: {
|
|
788
|
-
|
|
788
|
+
update: {
|
|
789
|
+
required: ["id"],
|
|
790
|
+
optional: UPDATE_CONTRACT_PARAMETER_KEYS,
|
|
791
|
+
mutuallyExclusive: [
|
|
792
|
+
["acceptanceCriteria", "addAc"],
|
|
793
|
+
["acceptanceCriteria", "removeAc"],
|
|
794
|
+
],
|
|
795
|
+
},
|
|
796
|
+
"update-many": {
|
|
797
|
+
optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS,
|
|
798
|
+
mutuallyExclusive: [
|
|
799
|
+
["acceptanceCriteria", "addAc"],
|
|
800
|
+
["acceptanceCriteria", "removeAc"],
|
|
801
|
+
],
|
|
802
|
+
},
|
|
789
803
|
close: {
|
|
790
804
|
required: ["id"],
|
|
791
805
|
optional: [
|
|
@@ -876,6 +890,9 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
876
890
|
"offset",
|
|
877
891
|
"noTruncate",
|
|
878
892
|
"strictRead",
|
|
893
|
+
"explain",
|
|
894
|
+
"lines",
|
|
895
|
+
"decisionDepth",
|
|
879
896
|
...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS,
|
|
880
897
|
],
|
|
881
898
|
anyOfRequired: [["id"], ["lookupPath"]],
|
|
@@ -1086,6 +1103,32 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
1086
1103
|
"full",
|
|
1087
1104
|
],
|
|
1088
1105
|
},
|
|
1106
|
+
assurance: {
|
|
1107
|
+
required: ["subcommand"],
|
|
1108
|
+
optional: [
|
|
1109
|
+
"kind",
|
|
1110
|
+
"id",
|
|
1111
|
+
"definition",
|
|
1112
|
+
"trigger",
|
|
1113
|
+
"treeId",
|
|
1114
|
+
"gate",
|
|
1115
|
+
"limit",
|
|
1116
|
+
"dryRun",
|
|
1117
|
+
"author",
|
|
1118
|
+
"message",
|
|
1119
|
+
],
|
|
1120
|
+
conditionalRequired: [
|
|
1121
|
+
{ property: "subcommand", value: "list", required: ["kind"] },
|
|
1122
|
+
{ property: "subcommand", value: "show", required: ["kind", "id"] },
|
|
1123
|
+
{
|
|
1124
|
+
property: "subcommand",
|
|
1125
|
+
value: "put",
|
|
1126
|
+
required: ["kind", "id", "definition"],
|
|
1127
|
+
},
|
|
1128
|
+
{ property: "subcommand", value: "remove", required: ["kind", "id"] },
|
|
1129
|
+
{ property: "subcommand", value: "run", required: ["id", "trigger"] },
|
|
1130
|
+
],
|
|
1131
|
+
},
|
|
1089
1132
|
gc: { optional: ["dryRun", "gcScope"] },
|
|
1090
1133
|
contracts: {
|
|
1091
1134
|
optional: [
|
|
@@ -1430,14 +1473,14 @@ function createLazyContractSchema(build) {
|
|
|
1430
1473
|
});
|
|
1431
1474
|
}
|
|
1432
1475
|
/** 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 the contract tests all bind to one constant instead of re-typing the `"4.0.2"` literal (pm-r9sz). 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. */
|
|
1433
|
-
export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.
|
|
1476
|
+
export const PM_TOOL_PARAMETERS_SCHEMA_VERSION = "4.6.0";
|
|
1434
1477
|
/**
|
|
1435
1478
|
* Major component of {@link PM_TOOL_PARAMETERS_SCHEMA_VERSION}, used to build the
|
|
1436
1479
|
* schema `$id` slug so a breaking version bump renames the document in lockstep.
|
|
1437
1480
|
*/
|
|
1438
1481
|
export const PM_TOOL_PARAMETERS_SCHEMA_MAJOR = PM_TOOL_PARAMETERS_SCHEMA_VERSION.split(".")[0];
|
|
1439
1482
|
/** 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. */
|
|
1440
|
-
export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.
|
|
1483
|
+
export const PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION = "1.3.0";
|
|
1441
1484
|
/** Public contract for pm tool parameters schema, shared by SDK and presentation-layer consumers. */
|
|
1442
1485
|
export const PM_TOOL_PARAMETERS_SCHEMA = createLazyContractSchema(() => ({
|
|
1443
1486
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1512,4 +1555,4 @@ export const _testOnlyCliContracts = {
|
|
|
1512
1555
|
withFlagAliasMetadata,
|
|
1513
1556
|
};
|
|
1514
1557
|
//# sourceMappingURL=tool-schema.js.map
|
|
1515
|
-
//# debugId=
|
|
1558
|
+
//# debugId=9882d78a-8742-5d50-b345-debe47322b65
|
|
@@ -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";
|