punchline-mcp 1.1.0 → 1.2.0
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/README.md +2 -2
- package/dist/index.js +0 -0
- package/dist/tools/tickets.js +15 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,10 +71,10 @@ the server twice under two names with two different keys, e.g. `punchline` (proj
|
|
|
71
71
|
|
|
72
72
|
| Tool | Available with | Description |
|
|
73
73
|
|---|---|---|
|
|
74
|
-
| `create_ticket` | project key | Create a ticket. `reporter_email` is required. Supports idempotent retries via `idempotency_key`, sent to the API as the `idempotencyKey` body field. |
|
|
74
|
+
| `create_ticket` | project key | Create a ticket. `reporter_email` is required. Supports idempotent retries via `idempotency_key`, sent to the API as the `idempotencyKey` body field. Optional `custom_fields` (sent as `customFields`) is an array of `{ name, value }` pairs; `name` must match a custom-field definition configured on the project or the request is rejected with 400. |
|
|
75
75
|
| `list_tickets` | project key | List tickets visible to the key (own tickets, or the whole project with `read:all`). Paginated. |
|
|
76
76
|
| `get_ticket` | project key | Fetch one ticket by display id (e.g. `ACM-7`). |
|
|
77
|
-
| `update_ticket` | project key | Change a ticket's workflow status and/or customer-facing public summary. |
|
|
77
|
+
| `update_ticket` | project key | Change a ticket's workflow status, its priority, and/or customer-facing public summary. Setting `priority` records a **triage ruling** — confirming the current value counts as one — which a project enforcing triage requires before a ticket can close. Priority is applied before status, so one call can triage and close. A ticket created through this API arrives untriaged: the priority sent at creation is the reporter's proposal, not a ruling. *(1.2.0+)* |
|
|
78
78
|
| `add_communication` | project key | Post a customer-facing communication (external comment) on a ticket. |
|
|
79
79
|
| `link_tickets` | project key | Link two tickets. `relation` is one of `BLOCKS`, `BLOCKED_BY`, `DUPLICATES`, `DUPLICATE_OF`, `RELATES_TO`, read from the perspective of the ticket in `display_id` — the same vocabulary `get_ticket` returns in `linkedTickets`, so a relation round-trips. ⚠️ `close_as_duplicate: true` also **closes the `display_id` ticket and emails its reporter**; it requires `relation=DUPLICATES` and is not undone by `unlink_tickets`. |
|
|
80
80
|
| `unlink_tickets` | project key | Remove a link. `relation` must match how the link reads from the ticket in `display_id`. |
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/tools/tickets.js
CHANGED
|
@@ -17,6 +17,9 @@ export function ticketPath(displayId) {
|
|
|
17
17
|
export function registerTicketTools(server, client) {
|
|
18
18
|
server.registerTool('create_ticket', {
|
|
19
19
|
description: 'Create a ticket in the project bound to the API key. Supports idempotent retries via idempotency_key.'
|
|
20
|
+
+ ' custom_fields lets you stamp name-keyed values that other project tooling (e.g. outbound webhooks) reads back'
|
|
21
|
+
+ ' later; each name must match a custom-field definition already configured on the project — an unknown name is'
|
|
22
|
+
+ ' rejected with a 400 error rather than silently ignored.'
|
|
20
23
|
+ CROSS_PROJECT_LINK_NOTE,
|
|
21
24
|
inputSchema: {
|
|
22
25
|
title: z.string().min(1).max(500).describe('Ticket title'),
|
|
@@ -31,6 +34,11 @@ export function registerTicketTools(server, client) {
|
|
|
31
34
|
app_version: z.string().max(100).optional(),
|
|
32
35
|
idempotency_key: z.string().max(255).optional()
|
|
33
36
|
.describe('Same key on the same API key returns the original ticket instead of creating a duplicate'),
|
|
37
|
+
custom_fields: z.array(z.object({
|
|
38
|
+
name: z.string().min(1).max(255).describe('Must match a custom-field name configured on the project'),
|
|
39
|
+
value: z.string().max(4096),
|
|
40
|
+
})).max(50).optional()
|
|
41
|
+
.describe('Name-keyed custom field values, e.g. [{ name: "rubedyne_user_id", value: "3172" }]. An unknown name is rejected with 400.'),
|
|
34
42
|
},
|
|
35
43
|
}, tool(async (a) => client.request('POST', TICKETS_PATH, {
|
|
36
44
|
body: {
|
|
@@ -45,6 +53,7 @@ export function registerTicketTools(server, client) {
|
|
|
45
53
|
userAgent: a.user_agent,
|
|
46
54
|
appVersion: a.app_version,
|
|
47
55
|
idempotencyKey: a.idempotency_key,
|
|
56
|
+
customFields: a.custom_fields,
|
|
48
57
|
},
|
|
49
58
|
})));
|
|
50
59
|
server.registerTool('list_tickets', {
|
|
@@ -78,19 +87,21 @@ export function registerTicketTools(server, client) {
|
|
|
78
87
|
},
|
|
79
88
|
}, tool(async (a) => client.request('GET', ticketPath(a.display_id))));
|
|
80
89
|
server.registerTool('update_ticket', {
|
|
81
|
-
description: 'Update a ticket: change its workflow status and/or the customer-facing public summary. At least one field is required; an empty public_summary clears it.'
|
|
90
|
+
description: 'Update a ticket: change its workflow status, its priority, and/or the customer-facing public summary. At least one field is required; an empty public_summary clears it. Setting priority records a triage ruling — confirming the existing value counts — which is what a project requiring triage before close demands. Priority is applied before status, so one call can triage and close.'
|
|
82
91
|
+ CROSS_PROJECT_LINK_NOTE,
|
|
83
92
|
inputSchema: {
|
|
84
93
|
display_id: z.string().min(1),
|
|
85
94
|
status: z.string().max(100).optional(),
|
|
86
95
|
public_summary: z.string().max(10000).optional(),
|
|
96
|
+
priority: z.enum(TICKET_PRIORITIES).optional()
|
|
97
|
+
.describe('Records a triage ruling. Required before closing in a project that enforces triage.'),
|
|
87
98
|
},
|
|
88
99
|
}, tool(async (a) => {
|
|
89
|
-
if (a.status === undefined && a.public_summary === undefined) {
|
|
90
|
-
throw new Error('Provide status and/or public_summary');
|
|
100
|
+
if (a.status === undefined && a.public_summary === undefined && a.priority === undefined) {
|
|
101
|
+
throw new Error('Provide status, priority and/or public_summary');
|
|
91
102
|
}
|
|
92
103
|
return client.request('PATCH', ticketPath(a.display_id), {
|
|
93
|
-
body: { status: a.status, publicSummary: a.public_summary },
|
|
104
|
+
body: { status: a.status, publicSummary: a.public_summary, priority: a.priority },
|
|
94
105
|
});
|
|
95
106
|
}));
|
|
96
107
|
}
|