@aaronsb/jira-cloud-mcp 0.11.0 → 0.11.1

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.
@@ -6,6 +6,7 @@
6
6
  * pass through unfiltered (no regression from pre-discovery behavior).
7
7
  */
8
8
  import { classifyFieldType } from './field-type-map.js';
9
+ import { routeForField } from '../extensions/index.js';
9
10
  // ── Constants ──────────────────────────────────────────────────────────
10
11
  const HARD_CAP = 30;
11
12
  const SPREAD_RATIO_THRESHOLD = 10;
@@ -14,6 +15,18 @@ const SCREEN_WEIGHT = 10;
14
15
  const RECENCY_WEIGHT = 5;
15
16
  const RECENCY_HALF_LIFE_DAYS = 30;
16
17
  // ── Field Discovery ────────────────────────────────────────────────────
18
+ /**
19
+ * True if an extension route owns a value-resolving write handler for this field (ADR-213 §B).
20
+ * Used to mark `writable: true` on a field whose Jira type our classifier can't map — e.g. Tempo
21
+ * Account reports an opaque schema (→ `unsupported` category) but `resolveTempoAccountWrite` turns
22
+ * a name into the numeric id the standard issue-edit endpoint accepts. Matches the route by field
23
+ * name first, then by schema-custom key. (#45 follow-up: keeps the catalog `writable` flag in
24
+ * step with what the write path actually does.)
25
+ */
26
+ function extensionCanWrite(fieldName, schemaCustom) {
27
+ const route = routeForField(fieldName) ?? (schemaCustom ? routeForField(schemaCustom) : undefined);
28
+ return route?.resolveWrite != null;
29
+ }
17
30
  /** Well-known locked fields identified by schema custom type */
18
31
  const WELL_KNOWN_FIELDS = {
19
32
  'com.pyxis.greenhopper.jira:gh-sprint': 'sprint',
@@ -427,7 +440,7 @@ export class FieldDiscovery {
427
440
  name: f.name,
428
441
  description: f.description,
429
442
  category: typeInfo.category,
430
- writable: typeInfo.writable,
443
+ writable: typeInfo.writable || extensionCanWrite(f.name, f.schemaCustom),
431
444
  jsonSchema: typeInfo.jsonSchema,
432
445
  schemaCustom: f.schemaCustom,
433
446
  screensCount: 0,
@@ -473,6 +486,10 @@ export class FieldDiscovery {
473
486
  continue;
474
487
  }
475
488
  // Filter: supported type
489
+ // NOTE: this also drops extension-handled fields whose Jira type our classifier can't map
490
+ // (e.g. Tempo Account on an admin tenant) — the unscored fallback keeps them and flags them
491
+ // writable via `extensionCanWrite`, but the scored path doesn't. Retaining them here is a
492
+ // larger change (it shifts what's in the curated catalog, not just a flag). See #45 / #57.
476
493
  const typeInfo = classifyFieldType(field.schemaType, field.schemaCustom || undefined, field.schemaItems || undefined);
477
494
  if (typeInfo.category === 'unsupported') {
478
495
  excludedUnsupportedType++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaronsb/jira-cloud-mcp",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "mcpName": "io.github.aaronsb/jira-cloud",
5
5
  "description": "Model Context Protocol (MCP) server for Jira Cloud - enables AI assistants to interact with Jira",
6
6
  "type": "module",