@wilnertech/halopsa-mcp-server 1.4.0 → 1.6.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.
Files changed (51) hide show
  1. package/README.md +8 -1
  2. package/dist/api/client.d.ts +51 -2
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +124 -9
  5. package/dist/api/client.js.map +1 -1
  6. package/dist/api/errors.d.ts +16 -3
  7. package/dist/api/errors.d.ts.map +1 -1
  8. package/dist/api/errors.js +107 -30
  9. package/dist/api/errors.js.map +1 -1
  10. package/dist/cache/memory-cache.d.ts +1 -0
  11. package/dist/cache/memory-cache.d.ts.map +1 -1
  12. package/dist/cache/memory-cache.js +6 -0
  13. package/dist/cache/memory-cache.js.map +1 -1
  14. package/dist/cache/prewarm.d.ts +1 -0
  15. package/dist/cache/prewarm.d.ts.map +1 -1
  16. package/dist/cache/prewarm.js +8 -0
  17. package/dist/cache/prewarm.js.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +12 -4
  20. package/dist/index.js.map +1 -1
  21. package/dist/tools/batch-operations.js +10 -10
  22. package/dist/tools/batch-operations.js.map +1 -1
  23. package/dist/tools/budgets.d.ts.map +1 -1
  24. package/dist/tools/budgets.js +7 -4
  25. package/dist/tools/budgets.js.map +1 -1
  26. package/dist/tools/milestones.d.ts.map +1 -1
  27. package/dist/tools/milestones.js +12 -9
  28. package/dist/tools/milestones.js.map +1 -1
  29. package/dist/tools/registrations.d.ts +8 -3
  30. package/dist/tools/registrations.d.ts.map +1 -1
  31. package/dist/tools/registrations.js +21 -12
  32. package/dist/tools/registrations.js.map +1 -1
  33. package/dist/tools/ticket-actions.d.ts +46 -0
  34. package/dist/tools/ticket-actions.d.ts.map +1 -1
  35. package/dist/tools/ticket-actions.js +236 -32
  36. package/dist/tools/ticket-actions.js.map +1 -1
  37. package/dist/tools/ticket-reference-data.d.ts +70 -1
  38. package/dist/tools/ticket-reference-data.d.ts.map +1 -1
  39. package/dist/tools/ticket-reference-data.js +340 -11
  40. package/dist/tools/ticket-reference-data.js.map +1 -1
  41. package/dist/tools/tickets.d.ts +53 -0
  42. package/dist/tools/tickets.d.ts.map +1 -1
  43. package/dist/tools/tickets.js +394 -22
  44. package/dist/tools/tickets.js.map +1 -1
  45. package/dist/types/tickets.d.ts +127 -0
  46. package/dist/types/tickets.d.ts.map +1 -1
  47. package/dist/utils/formatter.d.ts +18 -0
  48. package/dist/utils/formatter.d.ts.map +1 -1
  49. package/dist/utils/formatter.js +108 -22
  50. package/dist/utils/formatter.js.map +1 -1
  51. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  * HaloPSA Ticket Reference Data tools.
3
3
  *
4
4
  * Mirrors the existing pattern in `src/tools/reference-data.ts` for asset
5
- * reference data. All five tools default to compact responses (token
5
+ * reference data. All six tools default to compact responses (token
6
6
  * optimization) and use 1-hour cache TTLs because reference data on a
7
7
  * Halo tenant changes infrequently — most reads should hit cache.
8
8
  *
@@ -10,10 +10,18 @@
10
10
  * standard `format_options` block so callers can choose their style:
11
11
  * `{ full: true }` is the path-of-least-surprise for ad-hoc lookups,
12
12
  * while `format_options` keeps parity with the rest of the MCP surface.
13
+ *
14
+ * v1.5.0 changes:
15
+ * - Bug 3 (P0): Added list_halopsa_ticket_outcomes + getOutcomeByName helper.
16
+ * - Bug 6 (P1): list_halopsa_ticket_priorities now exposes slaid and accepts
17
+ * optional tickettype_id for default-SLA scoping.
18
+ * - Bug 7 (P1): list_halopsa_ticket_categories replaced per-tickettype loop
19
+ * with a single GET /Category call; no more hang.
13
20
  */
14
21
  import { z } from 'zod';
15
22
  import type { HaloPSAAPIClient } from '../api/client.js';
16
23
  import type { ZodToolDefinition } from './registry.js';
24
+ import type { HaloPSATicketOutcomeCompact } from '../types/tickets.js';
17
25
  declare const ListTicketTypesArgsSchema: z.ZodObject<{
18
26
  full: z.ZodOptional<z.ZodBoolean>;
19
27
  format_options: z.ZodOptional<z.ZodObject<{
@@ -51,6 +59,7 @@ declare const ListTicketStatusesArgsSchema: z.ZodObject<{
51
59
  }, z.core.$strip>>;
52
60
  }, z.core.$strip>;
53
61
  declare const ListTicketPrioritiesArgsSchema: z.ZodObject<{
62
+ tickettype_id: z.ZodOptional<z.ZodNumber>;
54
63
  full: z.ZodOptional<z.ZodBoolean>;
55
64
  format_options: z.ZodOptional<z.ZodObject<{
56
65
  format: z.ZodOptional<z.ZodEnum<{
@@ -63,6 +72,7 @@ declare const ListTicketPrioritiesArgsSchema: z.ZodObject<{
63
72
  }, z.core.$strip>>;
64
73
  }, z.core.$strip>;
65
74
  declare const ListTicketCategoriesArgsSchema: z.ZodObject<{
75
+ tickettype_id: z.ZodOptional<z.ZodNumber>;
66
76
  full: z.ZodOptional<z.ZodBoolean>;
67
77
  format_options: z.ZodOptional<z.ZodObject<{
68
78
  format: z.ZodOptional<z.ZodEnum<{
@@ -74,15 +84,74 @@ declare const ListTicketCategoriesArgsSchema: z.ZodObject<{
74
84
  omit_empty: z.ZodOptional<z.ZodBoolean>;
75
85
  }, z.core.$strip>>;
76
86
  }, z.core.$strip>;
87
+ declare const ListTicketOutcomesArgsSchema: z.ZodObject<{
88
+ tickettype_id: z.ZodOptional<z.ZodNumber>;
89
+ agent_id: z.ZodOptional<z.ZodNumber>;
90
+ format_options: z.ZodOptional<z.ZodObject<{
91
+ format: z.ZodOptional<z.ZodEnum<{
92
+ compact: "compact";
93
+ standard: "standard";
94
+ detailed: "detailed";
95
+ }>>;
96
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
97
+ omit_empty: z.ZodOptional<z.ZodBoolean>;
98
+ }, z.core.$strip>>;
99
+ }, z.core.$strip>;
100
+ /**
101
+ * Shared helper: fetch and optionally filter the outcomes for a given
102
+ * tickettype_id. Used by both listTicketOutcomes (tool handler) and
103
+ * buildOutcomeDiscoveryRefusal (ticket-actions.ts diagnostic builder).
104
+ *
105
+ * Returns HaloPSATicketOutcomeCompact[] (not the accessible-annotated form)
106
+ * so the caller can apply its own ACL logic.
107
+ *
108
+ * S4 fix: inactive outcomes (inactive === true) are always excluded regardless
109
+ * of agent_id. Active outcomes (inactive === false or absent) qualify. This
110
+ * prevents admin-disabled outcomes from appearing in valid_outcomes_hint.
111
+ *
112
+ * When agent_id is supplied, outcomes with accessible===false are also excluded.
113
+ * Outcomes with accessible==="unknown" are always included.
114
+ *
115
+ * @param client - HaloPSA API client
116
+ * @param tickettypeId - Ticket type ID to filter outcomes to (optional)
117
+ * @param agentId - Agent ID for ACL filtering (optional)
118
+ */
119
+ export declare function getOutcomesForTicketType(client: HaloPSAAPIClient, tickettypeId: number | undefined, agentId?: number): Promise<HaloPSATicketOutcomeCompact[]>;
77
120
  export declare function listTicketTypes(client: HaloPSAAPIClient, args: z.infer<typeof ListTicketTypesArgsSchema>): Promise<string>;
78
121
  export declare function getTicketType(client: HaloPSAAPIClient, args: z.infer<typeof GetTicketTypeArgsSchema>): Promise<string>;
79
122
  export declare function listTicketStatuses(client: HaloPSAAPIClient, args: z.infer<typeof ListTicketStatusesArgsSchema>): Promise<string>;
80
123
  export declare function listTicketPriorities(client: HaloPSAAPIClient, args: z.infer<typeof ListTicketPrioritiesArgsSchema>): Promise<string>;
81
124
  export declare function listTicketCategories(client: HaloPSAAPIClient, args: z.infer<typeof ListTicketCategoriesArgsSchema>): Promise<string>;
125
+ /**
126
+ * List all ticket outcomes from GET /Outcome (cached 1h).
127
+ *
128
+ * If tickettype_id is supplied, fetches the ticket type with includedetails=true
129
+ * and filters to the outcome IDs in its `outcomes[]` array.
130
+ *
131
+ * Inactive outcomes (inactive === true) are always excluded — admin-disabled
132
+ * outcomes are never surfaced to the LLM.
133
+ *
134
+ * If agent_id is supplied, performs ACL filtering: outcomes with
135
+ * accessible=false are dropped. When agent_id is omitted, no ACL filtering
136
+ * is applied and the `accessible` field is omitted from each row.
137
+ *
138
+ * NOTE: The /Outcome endpoint does not support server-side tickettype filtering.
139
+ * Scoping is always performed client-side.
140
+ */
141
+ export declare function listTicketOutcomes(client: HaloPSAAPIClient, args: z.infer<typeof ListTicketOutcomesArgsSchema>): Promise<string>;
142
+ /**
143
+ * Look up a single outcome by name (case-insensitive, first match).
144
+ *
145
+ * Returns null if no matching outcome is found. Used internally by ticket
146
+ * action tools that need to resolve an outcome name to its ID (e.g., SLA
147
+ * hold/release tools in ticket-actions.ts).
148
+ */
149
+ export declare function getOutcomeByName(client: HaloPSAAPIClient, name: string): Promise<HaloPSATicketOutcomeCompact | null>;
82
150
  export declare const listTicketTypesTool: ZodToolDefinition;
83
151
  export declare const getTicketTypeTool: ZodToolDefinition;
84
152
  export declare const listTicketStatusesTool: ZodToolDefinition;
85
153
  export declare const listTicketPrioritiesTool: ZodToolDefinition;
86
154
  export declare const listTicketCategoriesTool: ZodToolDefinition;
155
+ export declare const listTicketOutcomesTool: ZodToolDefinition;
87
156
  export {};
88
157
  //# sourceMappingURL=ticket-reference-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ticket-reference-data.d.ts","sourceRoot":"","sources":["../../src/tools/ticket-reference-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAoBvD,QAAA,MAAM,yBAAyB;;;;;;;;;;;iBAI7B,CAAC;AAEH,QAAA,MAAM,uBAAuB;;;;;;;;;;;iBAI3B,CAAC;AAEH,QAAA,MAAM,4BAA4B;;;;;;;;;;;iBAIhC,CAAC;AAEH,QAAA,MAAM,8BAA8B;;;;;;;;;;;iBAIlC,CAAC;AAEH,QAAA,MAAM,8BAA8B;;;;;;;;;;;iBAIlC,CAAC;AAqEH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAy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CA4BjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,GACjD,OAAO,CAAC,MAAM,CAAC,CAwFjB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC,CAe7C;AAMD,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAKpC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAKtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAKtC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAKpC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * HaloPSA Ticket Reference Data tools.
3
3
  *
4
4
  * Mirrors the existing pattern in `src/tools/reference-data.ts` for asset
5
- * reference data. All five tools default to compact responses (token
5
+ * reference data. All six tools default to compact responses (token
6
6
  * optimization) and use 1-hour cache TTLs because reference data on a
7
7
  * Halo tenant changes infrequently — most reads should hit cache.
8
8
  *
@@ -10,9 +10,16 @@
10
10
  * standard `format_options` block so callers can choose their style:
11
11
  * `{ full: true }` is the path-of-least-surprise for ad-hoc lookups,
12
12
  * while `format_options` keeps parity with the rest of the MCP surface.
13
+ *
14
+ * v1.5.0 changes:
15
+ * - Bug 3 (P0): Added list_halopsa_ticket_outcomes + getOutcomeByName helper.
16
+ * - Bug 6 (P1): list_halopsa_ticket_priorities now exposes slaid and accepts
17
+ * optional tickettype_id for default-SLA scoping.
18
+ * - Bug 7 (P1): list_halopsa_ticket_categories replaced per-tickettype loop
19
+ * with a single GET /Category call; no more hang.
13
20
  */
14
21
  import { z } from 'zod';
15
- import { formatResponse } from '../utils/formatter.js';
22
+ import { formatResponse, withCompactDefaults } from '../utils/formatter.js';
16
23
  import { TTL } from '../cache/memory-cache.js';
17
24
  import { FormatOptionsSchema } from '../schemas/common.js';
18
25
  // =============================================================================
@@ -34,15 +41,35 @@ const ListTicketStatusesArgsSchema = z.object({
34
41
  format_options: FormatOptionsSchema,
35
42
  });
36
43
  const ListTicketPrioritiesArgsSchema = z.object({
44
+ tickettype_id: z.number().int().optional()
45
+ .describe('Optional. When supplied, fetches the ticket type and filters priorities to the default SLA ' +
46
+ 'for that ticket type. Falls back to all 12 records if the ticket type has no default SLA. ' +
47
+ "Halo priorities are SLA-scoped — pass tickettype_id to narrow to the relevant SLA, or " +
48
+ 'inspect slaid on each record yourself.'),
37
49
  full: z.boolean().optional()
38
50
  .describe('Return full records instead of compact (default false).'),
39
51
  format_options: FormatOptionsSchema,
40
52
  });
41
53
  const ListTicketCategoriesArgsSchema = z.object({
54
+ tickettype_id: z.number().int().optional()
55
+ .describe('Optional. When supplied, filters categories to those whose type_id matches this ticket type ID ' +
56
+ '(client-side filter — Halo returns all categories regardless of server-side params).'),
42
57
  full: z.boolean().optional()
43
58
  .describe('Return full records instead of compact (default false).'),
44
59
  format_options: FormatOptionsSchema,
45
60
  });
61
+ const ListTicketOutcomesArgsSchema = z.object({
62
+ tickettype_id: z.number().int().optional()
63
+ .describe('Optional. When supplied, fetches the ticket type (with includedetails=true) and filters ' +
64
+ 'the global outcome list to the IDs in the tickettype\'s allowed_actions[] (documented ' +
65
+ 'Halo field) or outcomes[] (legacy fallback). The /Outcome endpoint does not support ' +
66
+ 'server-side tickettype filtering — scoping is client-side.'),
67
+ agent_id: z.number().int().positive().optional()
68
+ .describe('Optional. Accepted for future per-agent ACL filtering (access_control[], enduser_role_ids). ' +
69
+ 'Current filter is tenant-global (actionvisibility boolean only): actionvisibility===false ' +
70
+ 'outcomes are excluded. Outcomes with other ACL restrictions return without accessible field.'),
71
+ format_options: FormatOptionsSchema,
72
+ });
46
73
  // =============================================================================
47
74
  // Helpers
48
75
  // =============================================================================
@@ -70,6 +97,7 @@ function resolveFormat(full, formatOptions) {
70
97
  *
71
98
  * We promote `priorityid` to `id` and expose the GUID as `sla_priority_id`
72
99
  * to prevent callers from accidentally passing the GUID as priority_id.
100
+ * `slaid` is preserved so callers can disambiguate same-name priorities.
73
101
  */
74
102
  function normalizePriority(p) {
75
103
  return {
@@ -96,6 +124,164 @@ function unwrapList(response, preferredKey) {
96
124
  const record_count = wrapped.record_count ?? items.length;
97
125
  return { items, record_count };
98
126
  }
127
+ /**
128
+ * Default compact fields for list_halopsa_ticket_categories.
129
+ * Ensures callers always see name and tickettype_id (type_id) in compact mode
130
+ * even though those fields are absent from the legacy compactItem() heuristic.
131
+ *
132
+ * Both 'name' and 'value' are included: Halo uses 'value' on some endpoints
133
+ * and 'name' on others depending on version. Both 'tickettype_id' and 'type_id'
134
+ * are included: the MCP uses tickettype_id while Halo uses type_id internally.
135
+ * Fields not present on the raw response are null-filled (Bug 7 null-fill).
136
+ */
137
+ const CATEGORIES_COMPACT_DEFAULTS = [
138
+ 'id', 'name', 'value', 'type_id', 'tickettype_id',
139
+ ];
140
+ /**
141
+ * Default compact fields for list_halopsa_ticket_outcomes.
142
+ * NOTE: `accessible` is intentionally NOT in this list. S2 fix: `accessible` is
143
+ * only attached to a row when it is deterministically true or false (i.e., when
144
+ * ACL filtering was actually applied). Including it here would cause filterFields()
145
+ * to null-fill rows where it should be absent, defeating the honest-omission policy.
146
+ * The formatter's Branch 2 returns the full compact object including `accessible`
147
+ * when it exists because filterFields() projects from the already-annotated object.
148
+ */
149
+ const OUTCOMES_COMPACT_DEFAULTS = [
150
+ 'id', 'name', 'button', 'sequence', 'hidden',
151
+ 'is_resolution', 'is_internal_note',
152
+ ];
153
+ /**
154
+ * Compact an outcome record into the token-efficient shape.
155
+ *
156
+ * is_resolution heuristic: name contains "Resolved", "Closed", or "Completed"
157
+ * (case-insensitive), OR systemid is a non-zero value (closure outcomes in
158
+ * Halo carry a non-zero systemid).
159
+ *
160
+ * is_internal_note heuristic: respondtype === 2.
161
+ *
162
+ * NOTE: both flags are heuristics. Verify against your tenant's outcome
163
+ * configuration before relying on them for automation.
164
+ */
165
+ function compactOutcome(o) {
166
+ const resolutionNames = /resolved|closed|completed/i;
167
+ const is_resolution = resolutionNames.test(o.outcome ?? '') || ((o.systemid ?? 0) > 0);
168
+ const is_internal_note = o.respondtype === 2;
169
+ return {
170
+ id: o.id,
171
+ name: o.outcome,
172
+ button: o.buttonname,
173
+ sequence: o.sequence,
174
+ hidden: o.hidden,
175
+ is_resolution,
176
+ is_internal_note,
177
+ };
178
+ }
179
+ /**
180
+ * Compute the accessible flag for a single outcome given optional agent_id.
181
+ *
182
+ * actionvisibility is a boolean in Halo's schema (verified 2026-05-12 against
183
+ * components.schemas.TOutcome.properties.actionvisibility in halopsa-swagger.json:
184
+ * { "type": "boolean", "nullable": true }). Prior code used 0/1/2 integer enum
185
+ * branches — those never matched a runtime boolean value and were a silent no-op.
186
+ *
187
+ * inactive === true → accessible: false (always)
188
+ * actionvisibility === false → accessible: false (hidden from action menu)
189
+ * actionvisibility === true, null, or undefined → 'unknown' (permissive by this
190
+ * gate, but other ACL fields not yet checked client-side)
191
+ *
192
+ * Note: the current actionvisibility-based filter is tenant-global (applies equally
193
+ * to all agents). Per-agent ACL filtering via access_control[] / enduser_role_ids
194
+ * requires agent_id and role lookup — deferred to a future iteration.
195
+ *
196
+ * @param o - The raw outcome from GET /Outcome
197
+ * @param _agentId - Reserved for future per-agent ACL; currently unused
198
+ */
199
+ function computeAccessible(o, _agentId) {
200
+ if (o.inactive === true) {
201
+ return false;
202
+ }
203
+ // actionvisibility is a boolean in Halo's OpenAPI schema (TOutcome in
204
+ // halopsa-swagger.json: { "type": "boolean", "nullable": true }).
205
+ // false = hidden from the action menu (not accessible).
206
+ // true, null, or undefined = visible by this gate.
207
+ if (o.actionvisibility === false) {
208
+ return false;
209
+ }
210
+ // We cannot deterministically confirm full accessibility without resolving
211
+ // the agent's role memberships against access_control[] and enduser_role_ids.
212
+ // Return 'unknown' rather than a misleading 'true'.
213
+ return 'unknown';
214
+ }
215
+ /**
216
+ * Shared helper: fetch and optionally filter the outcomes for a given
217
+ * tickettype_id. Used by both listTicketOutcomes (tool handler) and
218
+ * buildOutcomeDiscoveryRefusal (ticket-actions.ts diagnostic builder).
219
+ *
220
+ * Returns HaloPSATicketOutcomeCompact[] (not the accessible-annotated form)
221
+ * so the caller can apply its own ACL logic.
222
+ *
223
+ * S4 fix: inactive outcomes (inactive === true) are always excluded regardless
224
+ * of agent_id. Active outcomes (inactive === false or absent) qualify. This
225
+ * prevents admin-disabled outcomes from appearing in valid_outcomes_hint.
226
+ *
227
+ * When agent_id is supplied, outcomes with accessible===false are also excluded.
228
+ * Outcomes with accessible==="unknown" are always included.
229
+ *
230
+ * @param client - HaloPSA API client
231
+ * @param tickettypeId - Ticket type ID to filter outcomes to (optional)
232
+ * @param agentId - Agent ID for ACL filtering (optional)
233
+ */
234
+ export async function getOutcomesForTicketType(client, tickettypeId, agentId) {
235
+ // Fetch global outcome list (cached 1h)
236
+ const response = await client.getCached('/Outcome', { count: 200 }, {
237
+ enabled: true,
238
+ ttl: TTL.TICKET_OUTCOMES,
239
+ keyPrefix: 'ticketoutcomes:all',
240
+ });
241
+ let { items } = unwrapList(response, 'outcomes');
242
+ // S4 fix: always exclude inactive outcomes — admin-disabled outcomes should
243
+ // never appear in valid_outcomes_hint or resolution-outcome detection.
244
+ items = items.filter((o) => o.inactive !== true);
245
+ // Client-side filter to the tickettype's outcome allowlist.
246
+ // PRIMARY: RequestType.allowed_actions[] + allowall_actions (boolean) — the
247
+ // documented Halo schema (verified 2026-05-12 against RequestType in
248
+ // halopsa-swagger.json: 423 properties, zero named "outcomes").
249
+ // FALLBACK: ttResponse.outcomes[] — undocumented field some tenants surface
250
+ // with includedetails=true; kept for backward compatibility.
251
+ if (tickettypeId !== undefined) {
252
+ const ttResponse = await client.getCached(`/TicketType/${tickettypeId}`, { includedetails: true }, {
253
+ enabled: true,
254
+ ttl: TTL.TICKET_TYPES,
255
+ keyPrefix: `tickettype:${tickettypeId}:details`,
256
+ });
257
+ if (ttResponse.allowall_actions !== true) {
258
+ // Documented path: filter by allowed_actions[].id (Restriction schema).
259
+ const allowed = ttResponse.allowed_actions;
260
+ if (Array.isArray(allowed) && allowed.length > 0) {
261
+ const idSet = new Set(allowed.map((r) => r.id));
262
+ items = items.filter((o) => idSet.has(o.id));
263
+ }
264
+ else {
265
+ // Fallback: undocumented outcomes[] some tenants surface with includedetails=true.
266
+ const legacy = ttResponse.outcomes;
267
+ if (Array.isArray(legacy) && legacy.length > 0) {
268
+ const idSet = new Set(legacy);
269
+ items = items.filter((o) => idSet.has(o.id));
270
+ }
271
+ // If neither field is present, return the full active list (permissive fallback).
272
+ }
273
+ }
274
+ // allowall_actions === true → no restriction; return all active outcomes.
275
+ }
276
+ // Apply ACL filtering when agent_id is provided: drop false, keep true + unknown
277
+ if (agentId !== undefined) {
278
+ items = items.filter((o) => {
279
+ const accessible = computeAccessible(o, agentId);
280
+ return accessible !== false;
281
+ });
282
+ }
283
+ return items.map(compactOutcome);
284
+ }
99
285
  // =============================================================================
100
286
  // Implementations
101
287
  // =============================================================================
@@ -130,25 +316,162 @@ export async function listTicketStatuses(client, args) {
130
316
  }
131
317
  export async function listTicketPriorities(client, args) {
132
318
  const formatOpts = resolveFormat(args.full, args.format_options);
319
+ // Fetch global priority list (12 records = 3 SLAs x 4 levels).
133
320
  const response = await client.getCached('/Priority', { count: 500 }, {
134
321
  enabled: true,
135
322
  ttl: TTL.TICKET_PRIORITIES,
136
323
  keyPrefix: 'ticketpriorities:all',
137
324
  });
138
- const { items: rawItems, record_count } = unwrapList(response, 'priorities');
139
- const items = rawItems.map(normalizePriority);
140
- return formatResponse(items, formatOpts, { record_count });
325
+ const { items: rawItems } = unwrapList(response, 'priorities');
326
+ let normalized = rawItems.map(normalizePriority);
327
+ // Bug 6 fix: if tickettype_id supplied, scope to that type's default SLA.
328
+ if (args.tickettype_id !== undefined) {
329
+ const ttResponse = await client.getCached(`/TicketType/${args.tickettype_id}`, { includedetails: true }, {
330
+ enabled: true,
331
+ ttl: TTL.TICKET_TYPES,
332
+ keyPrefix: `tickettype:${args.tickettype_id}:details`,
333
+ });
334
+ // Support both field names Halo uses across versions.
335
+ const defaultSla = ttResponse.default_sla ?? ttResponse.sla_id;
336
+ if (defaultSla !== undefined && defaultSla !== null) {
337
+ const filtered = normalized.filter((p) => p.slaid === defaultSla);
338
+ // Fall back to all records if the SLA filter yields nothing (e.g. tenant
339
+ // uses a different field name we have not mapped).
340
+ if (filtered.length > 0) {
341
+ normalized = filtered;
342
+ }
343
+ }
344
+ // If no default SLA on the tickettype, return all 12 (documented fallback).
345
+ }
346
+ return formatResponse(normalized, formatOpts, { record_count: normalized.length });
141
347
  }
142
348
  export async function listTicketCategories(client, args) {
143
- const formatOpts = resolveFormat(args.full, args.format_options);
144
- const response = await client.getCached('/Category', { count: 500 }, {
349
+ const resolvedFormat = resolveFormat(args.full, args.format_options);
350
+ // Wire per-tool compact defaults so compact mode returns name + tickettype_id
351
+ // instead of the legacy compactItem() heuristic (Bug 3).
352
+ const formatOpts = withCompactDefaults(resolvedFormat, CATEGORIES_COMPACT_DEFAULTS);
353
+ // Bug 7 fix: single GET /Category — no loop, no per-tickettype fetching.
354
+ // The Halo endpoint ignores count/tickettype_id params and always returns
355
+ // the full list (~90 records). Caching prevents repeat hits.
356
+ const response = await client.getCached('/Category', {}, {
145
357
  enabled: true,
146
358
  ttl: TTL.TICKET_CATEGORIES,
147
359
  keyPrefix: 'ticketcategories:all',
148
360
  });
149
- const { items, record_count } = unwrapList(response, 'categories');
361
+ let { items, record_count } = unwrapList(response, 'categories');
362
+ // Optional client-side filter by type_id (== tickettype_id in Halo's schema).
363
+ if (args.tickettype_id !== undefined) {
364
+ items = items.filter((c) => c.type_id === args.tickettype_id);
365
+ record_count = items.length;
366
+ }
150
367
  return formatResponse(items, formatOpts, { record_count });
151
368
  }
369
+ /**
370
+ * List all ticket outcomes from GET /Outcome (cached 1h).
371
+ *
372
+ * If tickettype_id is supplied, fetches the ticket type with includedetails=true
373
+ * and filters to the outcome IDs in its `outcomes[]` array.
374
+ *
375
+ * Inactive outcomes (inactive === true) are always excluded — admin-disabled
376
+ * outcomes are never surfaced to the LLM.
377
+ *
378
+ * If agent_id is supplied, performs ACL filtering: outcomes with
379
+ * accessible=false are dropped. When agent_id is omitted, no ACL filtering
380
+ * is applied and the `accessible` field is omitted from each row.
381
+ *
382
+ * NOTE: The /Outcome endpoint does not support server-side tickettype filtering.
383
+ * Scoping is always performed client-side.
384
+ */
385
+ export async function listTicketOutcomes(client, args) {
386
+ // Wire per-tool compact defaults so accessible field is not stripped by
387
+ // legacy compactItem() (which would strip it since outcomes have id + name).
388
+ const formatOpts = withCompactDefaults(args.format_options ?? { format: 'compact' }, OUTCOMES_COMPACT_DEFAULTS);
389
+ // Fetch global outcome list.
390
+ const response = await client.getCached('/Outcome', { count: 200 }, {
391
+ enabled: true,
392
+ ttl: TTL.TICKET_OUTCOMES,
393
+ keyPrefix: 'ticketoutcomes:all',
394
+ });
395
+ let { items } = unwrapList(response, 'outcomes');
396
+ // Always exclude inactive outcomes — admin-disabled outcomes must not reach
397
+ // the LLM regardless of tickettype_id or agent_id (matches getOutcomesForTicketType).
398
+ items = items.filter((o) => o.inactive !== true);
399
+ // Optional client-side filter to the tickettype's outcome allowlist.
400
+ // PRIMARY: RequestType.allowed_actions[] + allowall_actions (boolean) — the
401
+ // documented Halo schema (verified 2026-05-12 against RequestType in
402
+ // halopsa-swagger.json: 423 properties, zero named "outcomes").
403
+ // FALLBACK: ttResponse.outcomes[] — undocumented field some tenants surface
404
+ // with includedetails=true; kept for backward compatibility.
405
+ if (args.tickettype_id !== undefined) {
406
+ const ttResponse = await client.getCached(`/TicketType/${args.tickettype_id}`, { includedetails: true }, {
407
+ enabled: true,
408
+ ttl: TTL.TICKET_TYPES,
409
+ keyPrefix: `tickettype:${args.tickettype_id}:details`,
410
+ });
411
+ if (ttResponse.allowall_actions !== true) {
412
+ // Documented path: filter by allowed_actions[].id (Restriction schema).
413
+ const allowed = ttResponse.allowed_actions;
414
+ if (Array.isArray(allowed) && allowed.length > 0) {
415
+ const idSet = new Set(allowed.map((r) => r.id));
416
+ items = items.filter((o) => idSet.has(o.id));
417
+ }
418
+ else {
419
+ // Fallback: undocumented outcomes[] some tenants surface with includedetails=true.
420
+ const legacy = ttResponse.outcomes;
421
+ if (Array.isArray(legacy) && legacy.length > 0) {
422
+ const idSet = new Set(legacy);
423
+ items = items.filter((o) => idSet.has(o.id));
424
+ }
425
+ // If neither field is present, return the full active list (permissive fallback).
426
+ }
427
+ }
428
+ // allowall_actions === true → no restriction; return all active outcomes.
429
+ }
430
+ // Build accessible-annotated compacted rows.
431
+ // S2 fix: only attach the `accessible` field when its value is meaningful
432
+ // (true or false — i.e., when ACL filtering was actually applied). The
433
+ // 'unknown' placeholder is dropped entirely to avoid token waste and to
434
+ // prevent callers from treating it as a usable filter signal.
435
+ // When agent_id is supplied: also drop outcomes with accessible===false.
436
+ // When agent_id is absent: include all rows but omit the `accessible` key
437
+ // (no filtering was applied, so the field carries no information).
438
+ const annotated = items
439
+ .map((o) => {
440
+ const compact = compactOutcome(o);
441
+ const accessible = computeAccessible(o, args.agent_id);
442
+ if (accessible === 'unknown') {
443
+ // Drop the field — honest: no filter was applied for this row
444
+ return compact;
445
+ }
446
+ return { ...compact, accessible };
447
+ })
448
+ .filter((row) => {
449
+ // When agent_id provided, drop deterministically inaccessible outcomes
450
+ if (args.agent_id !== undefined) {
451
+ return row.accessible !== false;
452
+ }
453
+ return true;
454
+ });
455
+ return formatResponse(annotated, formatOpts, { record_count: annotated.length });
456
+ }
457
+ /**
458
+ * Look up a single outcome by name (case-insensitive, first match).
459
+ *
460
+ * Returns null if no matching outcome is found. Used internally by ticket
461
+ * action tools that need to resolve an outcome name to its ID (e.g., SLA
462
+ * hold/release tools in ticket-actions.ts).
463
+ */
464
+ export async function getOutcomeByName(client, name) {
465
+ const response = await client.getCached('/Outcome', { count: 200 }, {
466
+ enabled: true,
467
+ ttl: TTL.TICKET_OUTCOMES,
468
+ keyPrefix: 'ticketoutcomes:all',
469
+ });
470
+ const { items } = unwrapList(response, 'outcomes');
471
+ const lower = name.toLowerCase();
472
+ const match = items.find((o) => (o.outcome ?? '').toLowerCase() === lower);
473
+ return match ? compactOutcome(match) : null;
474
+ }
152
475
  // =============================================================================
153
476
  // Tool Definitions
154
477
  // =============================================================================
@@ -166,20 +489,26 @@ export const getTicketTypeTool = {
166
489
  };
167
490
  export const listTicketStatusesTool = {
168
491
  name: 'list_halopsa_ticket_statuses',
169
- description: 'List HaloPSA ticket statuses. Each record carries `type` (0=regular ticket statuses, 1=Order, 2=Item, 3=Action Required/Invoiced/With CAB) and `sequence` (UI ordering). NOTE: the API does NOT return `complete` / `is_closed` / `is_active` flags despite some prior documentation. To find the canonical Closed status, match `name === "Closed" && type === 0` (returns id=9 on this tenant). For Order/Item flavours, see id=13 "Closed Order" (type=1) and id=15 "Closed Item" (type=2). Cached 1h.',
492
+ description: 'List ticket statuses. Each carries `type` (0=ticket, 1=Order, 2=Item, 3=other) and `sequence`. Canonical closed = name==="Closed" && type===0. Cached 1h.',
170
493
  schema: ListTicketStatusesArgsSchema,
171
494
  handler: listTicketStatuses,
172
495
  };
173
496
  export const listTicketPrioritiesTool = {
174
497
  name: 'list_halopsa_ticket_priorities',
175
- description: 'List HaloPSA ticket priorities. The `id` field is the integer priority value (1-4) that maps to `Faults.priority_id` on ticket creates — NOT the underlying GUID, which is per-SLA and exposed as `sla_priority_id`. Pass `id` to create/update_halopsa_ticket. Names duplicate across SLAs (3 Critical, 3 High, 3 Medium, 3 Low — one per SLA). Includes fix/response time hints. Cached 1h.',
498
+ description: 'List ticket priorities. Halo priorities are SLA-scoped; `id` is the int (1-4) to pass as priority_id, `slaid` disambiguates. Pass tickettype_id to scope to that type\'s default SLA. Cached 1h.',
176
499
  schema: ListTicketPrioritiesArgsSchema,
177
500
  handler: listTicketPriorities,
178
501
  };
179
502
  export const listTicketCategoriesTool = {
180
503
  name: 'list_halopsa_ticket_categories',
181
- description: 'List all HaloPSA ticket categories (used for category_1..category_4 fields on tickets). Cached 1h.',
504
+ description: 'List all HaloPSA ticket categories (used for category_1..category_4 fields on tickets). Fetches GET /Category once and returns all categories (~90 records). Pass optional tickettype_id for client-side filtering by type_id. Cached 1h.',
182
505
  schema: ListTicketCategoriesArgsSchema,
183
506
  handler: listTicketCategories,
184
507
  };
508
+ export const listTicketOutcomesTool = {
509
+ name: 'list_halopsa_ticket_outcomes',
510
+ description: 'List ticket outcomes (Triage/Resolved/Closed/etc). Returns {id, name, button, sequence, hidden, is_resolution, is_internal_note}. Optional tickettype_id (client-side filter), agent_id (ACL filter). Active outcomes only. Cached 1h.',
511
+ schema: ListTicketOutcomesArgsSchema,
512
+ handler: listTicketOutcomes,
513
+ };
185
514
  //# sourceMappingURL=ticket-reference-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ticket-reference-data.js","sourceRoot":"","sources":["../../src/tools/ticket-reference-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,OAAO,EAAE,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SACzB,QAAQ,CAAC,yGAAyG,CAAC;IACtH,cAAc,EAAE,mBAAmB;CACpC,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAAC,C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