nowaikit 4.11.0 → 4.12.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 (77) hide show
  1. package/desktop/renderer/dist/assets/index-DIXajM0H.js +55 -0
  2. package/desktop/renderer/dist/index.html +1 -1
  3. package/dist/cli/config-store.d.ts +1 -1
  4. package/dist/cli/config-store.d.ts.map +1 -1
  5. package/dist/cli/detect-clients.d.ts +1 -1
  6. package/dist/cli/detect-clients.d.ts.map +1 -1
  7. package/dist/cli/detect-clients.js +56 -12
  8. package/dist/cli/detect-clients.js.map +1 -1
  9. package/dist/cli/setup.js +2 -2
  10. package/dist/cli/setup.js.map +1 -1
  11. package/dist/cli/writers/index.d.ts.map +1 -1
  12. package/dist/cli/writers/index.js +20 -0
  13. package/dist/cli/writers/index.js.map +1 -1
  14. package/dist/direct/llm-client.js +2 -2
  15. package/dist/direct/llm-client.js.map +1 -1
  16. package/dist/server.d.ts.map +1 -1
  17. package/dist/server.js +2 -1
  18. package/dist/server.js.map +1 -1
  19. package/dist/servicenow/client.d.ts +12 -0
  20. package/dist/servicenow/client.d.ts.map +1 -1
  21. package/dist/servicenow/client.js +54 -0
  22. package/dist/servicenow/client.js.map +1 -1
  23. package/dist/tools/access-admin.d.ts +162 -0
  24. package/dist/tools/access-admin.d.ts.map +1 -0
  25. package/dist/tools/access-admin.js +216 -0
  26. package/dist/tools/access-admin.js.map +1 -0
  27. package/dist/tools/ai-agent-exec.d.ts +70 -0
  28. package/dist/tools/ai-agent-exec.d.ts.map +1 -0
  29. package/dist/tools/ai-agent-exec.js +73 -0
  30. package/dist/tools/ai-agent-exec.js.map +1 -0
  31. package/dist/tools/approvals-extra.d.ts +202 -0
  32. package/dist/tools/approvals-extra.d.ts.map +1 -0
  33. package/dist/tools/approvals-extra.js +212 -0
  34. package/dist/tools/approvals-extra.js.map +1 -0
  35. package/dist/tools/catalog-fulfillment.d.ts +349 -0
  36. package/dist/tools/catalog-fulfillment.d.ts.map +1 -0
  37. package/dist/tools/catalog-fulfillment.js +222 -0
  38. package/dist/tools/catalog-fulfillment.js.map +1 -0
  39. package/dist/tools/grc-extra.d.ts +149 -0
  40. package/dist/tools/grc-extra.d.ts.map +1 -0
  41. package/dist/tools/grc-extra.js +115 -0
  42. package/dist/tools/grc-extra.js.map +1 -0
  43. package/dist/tools/index.d.ts +1600 -107
  44. package/dist/tools/index.d.ts.map +1 -1
  45. package/dist/tools/index.js +38 -0
  46. package/dist/tools/index.js.map +1 -1
  47. package/dist/tools/oncall.d.ts +165 -0
  48. package/dist/tools/oncall.d.ts.map +1 -0
  49. package/dist/tools/oncall.js +155 -0
  50. package/dist/tools/oncall.js.map +1 -0
  51. package/dist/tools/platform-ops.d.ts +156 -0
  52. package/dist/tools/platform-ops.d.ts.map +1 -0
  53. package/dist/tools/platform-ops.js +141 -0
  54. package/dist/tools/platform-ops.js.map +1 -0
  55. package/dist/tools/service-mapping.d.ts +108 -0
  56. package/dist/tools/service-mapping.d.ts.map +1 -0
  57. package/dist/tools/service-mapping.js +144 -0
  58. package/dist/tools/service-mapping.js.map +1 -0
  59. package/dist/tools/service-portfolio.d.ts +93 -0
  60. package/dist/tools/service-portfolio.d.ts.map +1 -0
  61. package/dist/tools/service-portfolio.js +86 -0
  62. package/dist/tools/service-portfolio.js.map +1 -0
  63. package/dist/tools/sla.d.ts +222 -0
  64. package/dist/tools/sla.d.ts.map +1 -0
  65. package/dist/tools/sla.js +160 -0
  66. package/dist/tools/sla.js.map +1 -0
  67. package/dist/tools/sn-parity.d.ts +239 -0
  68. package/dist/tools/sn-parity.d.ts.map +1 -0
  69. package/dist/tools/sn-parity.js +236 -0
  70. package/dist/tools/sn-parity.js.map +1 -0
  71. package/dist/tools/survey.d.ts +140 -0
  72. package/dist/tools/survey.d.ts.map +1 -0
  73. package/dist/tools/survey.js +118 -0
  74. package/dist/tools/survey.js.map +1 -0
  75. package/dist/tools-manifest.json +1537 -0
  76. package/package.json +15 -8
  77. package/desktop/renderer/dist/assets/index-BQ4P9VJR.js +0 -49
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Platform operations: Instance Scan findings, ECC queue, fix scripts.
3
+ * Read: Tier 0. Reprocess: Tier 1 (WRITE_ENABLED=true). Fix scripts: Tier 2 (SCRIPTING_ENABLED=true).
4
+ *
5
+ * Tables:
6
+ * scan_suite — Instance Scan suites
7
+ * scan_finding — Instance Scan best-practice findings
8
+ * ecc_queue — External Communication Channel queue (probes/sensors)
9
+ * sys_script_fix — fix scripts
10
+ */
11
+ import type { ServiceNowClient } from '../servicenow/client.js';
12
+ export declare function getPlatformOpsToolDefinitions(): ({
13
+ name: string;
14
+ description: string;
15
+ inputSchema: {
16
+ type: string;
17
+ properties: {
18
+ query: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ limit: {
23
+ type: string;
24
+ description: string;
25
+ };
26
+ check?: undefined;
27
+ suite_result?: undefined;
28
+ table?: undefined;
29
+ state?: undefined;
30
+ queue?: undefined;
31
+ agent?: undefined;
32
+ topic?: undefined;
33
+ sys_id?: undefined;
34
+ name?: undefined;
35
+ };
36
+ required: never[];
37
+ };
38
+ } | {
39
+ name: string;
40
+ description: string;
41
+ inputSchema: {
42
+ type: string;
43
+ properties: {
44
+ check: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ suite_result: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ table: {
53
+ type: string;
54
+ description: string;
55
+ };
56
+ limit: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ query?: undefined;
61
+ state?: undefined;
62
+ queue?: undefined;
63
+ agent?: undefined;
64
+ topic?: undefined;
65
+ sys_id?: undefined;
66
+ name?: undefined;
67
+ };
68
+ required: never[];
69
+ };
70
+ } | {
71
+ name: string;
72
+ description: string;
73
+ inputSchema: {
74
+ type: string;
75
+ properties: {
76
+ state: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ queue: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ agent: {
85
+ type: string;
86
+ description: string;
87
+ };
88
+ topic: {
89
+ type: string;
90
+ description: string;
91
+ };
92
+ limit: {
93
+ type: string;
94
+ description: string;
95
+ };
96
+ query?: undefined;
97
+ check?: undefined;
98
+ suite_result?: undefined;
99
+ table?: undefined;
100
+ sys_id?: undefined;
101
+ name?: undefined;
102
+ };
103
+ required: never[];
104
+ };
105
+ } | {
106
+ name: string;
107
+ description: string;
108
+ inputSchema: {
109
+ type: string;
110
+ properties: {
111
+ sys_id: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ query?: undefined;
116
+ limit?: undefined;
117
+ check?: undefined;
118
+ suite_result?: undefined;
119
+ table?: undefined;
120
+ state?: undefined;
121
+ queue?: undefined;
122
+ agent?: undefined;
123
+ topic?: undefined;
124
+ name?: undefined;
125
+ };
126
+ required: string[];
127
+ };
128
+ } | {
129
+ name: string;
130
+ description: string;
131
+ inputSchema: {
132
+ type: string;
133
+ properties: {
134
+ name: {
135
+ type: string;
136
+ description: string;
137
+ };
138
+ sys_id: {
139
+ type: string;
140
+ description: string;
141
+ };
142
+ query?: undefined;
143
+ limit?: undefined;
144
+ check?: undefined;
145
+ suite_result?: undefined;
146
+ table?: undefined;
147
+ state?: undefined;
148
+ queue?: undefined;
149
+ agent?: undefined;
150
+ topic?: undefined;
151
+ };
152
+ required: never[];
153
+ };
154
+ })[];
155
+ export declare function executePlatformOpsToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
156
+ //# sourceMappingURL=platform-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-ops.d.ts","sourceRoot":"","sources":["../../src/tools/platform-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmE5C;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CAyDd"}
@@ -0,0 +1,141 @@
1
+ import { ServiceNowError } from '../utils/errors.js';
2
+ import { requireWrite, requireScripting } from '../utils/permissions.js';
3
+ export function getPlatformOpsToolDefinitions() {
4
+ return [
5
+ {
6
+ name: 'list_scan_suites',
7
+ description: 'List Instance Scan suites (scan_suite) available to run',
8
+ inputSchema: {
9
+ type: 'object',
10
+ properties: {
11
+ query: { type: 'string', description: 'Search suites by name' },
12
+ limit: { type: 'number', description: 'Max records (default 50)' },
13
+ },
14
+ required: [],
15
+ },
16
+ },
17
+ {
18
+ name: 'get_instance_scan_findings',
19
+ description: 'List Instance Scan findings (scan_finding) — best-practice violations, optionally by check or suite result',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ check: { type: 'string', description: 'Filter by check name (contains)' },
24
+ suite_result: { type: 'string', description: 'Filter by scan suite result sys_id' },
25
+ table: { type: 'string', description: 'Filter by target table' },
26
+ limit: { type: 'number', description: 'Max records (default 50)' },
27
+ },
28
+ required: [],
29
+ },
30
+ },
31
+ {
32
+ name: 'get_ecc_queue',
33
+ description: 'Inspect the ECC queue (ecc_queue) — MID server probes/sensors, by state, agent, or topic',
34
+ inputSchema: {
35
+ type: 'object',
36
+ properties: {
37
+ state: { type: 'string', description: 'Filter by state (e.g. "ready", "processed", "error")' },
38
+ queue: { type: 'string', description: 'Direction: "input" or "output"' },
39
+ agent: { type: 'string', description: 'MID server agent name (contains)' },
40
+ topic: { type: 'string', description: 'Topic (contains)' },
41
+ limit: { type: 'number', description: 'Max records (default 50)' },
42
+ },
43
+ required: [],
44
+ },
45
+ },
46
+ {
47
+ name: 'resubmit_ecc_probe',
48
+ description: 'Re-queue an ECC probe/sensor by setting its state back to ready (ecc_queue). Requires WRITE_ENABLED=true',
49
+ inputSchema: {
50
+ type: 'object',
51
+ properties: {
52
+ sys_id: { type: 'string', description: 'sys_id of the ecc_queue record' },
53
+ },
54
+ required: ['sys_id'],
55
+ },
56
+ },
57
+ {
58
+ name: 'run_fix_script',
59
+ description: 'Execute a fix script (sys_script_fix) by name or sys_id on the server. Requires WRITE_ENABLED=true and SCRIPTING_ENABLED=true',
60
+ inputSchema: {
61
+ type: 'object',
62
+ properties: {
63
+ name: { type: 'string', description: 'Fix script name' },
64
+ sys_id: { type: 'string', description: 'sys_id of the fix script' },
65
+ },
66
+ required: [],
67
+ },
68
+ },
69
+ ];
70
+ }
71
+ export async function executePlatformOpsToolCall(client, name, args) {
72
+ switch (name) {
73
+ case 'list_scan_suites': {
74
+ const query = args.query ? `nameCONTAINS${args.query}` : '';
75
+ return await client.queryRecords({ table: 'scan_suite', query, limit: args.limit ?? 50 });
76
+ }
77
+ case 'get_instance_scan_findings': {
78
+ const parts = [];
79
+ if (args.check)
80
+ parts.push(`check.nameCONTAINS${args.check}`);
81
+ if (args.suite_result)
82
+ parts.push(`suite_result=${args.suite_result}`);
83
+ if (args.table)
84
+ parts.push(`table=${args.table}`);
85
+ return await client.queryRecords({
86
+ table: 'scan_finding',
87
+ query: parts.join('^') + (parts.length ? '^' : '') + 'ORDERBYDESCsys_created_on',
88
+ fields: 'check,check.name,table,document,description,suite_result',
89
+ limit: args.limit ?? 50,
90
+ });
91
+ }
92
+ case 'get_ecc_queue': {
93
+ const parts = [];
94
+ if (args.state)
95
+ parts.push(`state=${args.state}`);
96
+ if (args.queue)
97
+ parts.push(`queue=${args.queue}`);
98
+ if (args.agent)
99
+ parts.push(`agentCONTAINS${args.agent}`);
100
+ if (args.topic)
101
+ parts.push(`topicCONTAINS${args.topic}`);
102
+ return await client.queryRecords({
103
+ table: 'ecc_queue',
104
+ query: parts.join('^') + (parts.length ? '^' : '') + 'ORDERBYDESCsys_created_on',
105
+ fields: 'agent,topic,name,source,queue,state,processed,error_string',
106
+ limit: args.limit ?? 50,
107
+ });
108
+ }
109
+ case 'resubmit_ecc_probe': {
110
+ requireWrite();
111
+ if (!args.sys_id)
112
+ throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
113
+ const result = await client.updateRecord('ecc_queue', args.sys_id, { state: 'ready' });
114
+ return { ...result, summary: `Re-queued ECC record ${args.sys_id}` };
115
+ }
116
+ case 'run_fix_script': {
117
+ requireScripting();
118
+ let fix;
119
+ if (args.sys_id) {
120
+ fix = await client.getRecord('sys_script_fix', args.sys_id);
121
+ }
122
+ else if (args.name) {
123
+ const resp = await client.queryRecords({ table: 'sys_script_fix', query: `name=${args.name}`, limit: 1 });
124
+ if (resp.count === 0)
125
+ throw new ServiceNowError(`Fix script not found: ${args.name}`, 'NOT_FOUND');
126
+ fix = resp.records[0];
127
+ }
128
+ else {
129
+ throw new ServiceNowError('name or sys_id is required', 'INVALID_REQUEST');
130
+ }
131
+ const script = fix.script;
132
+ if (!script)
133
+ throw new ServiceNowError('Fix script has no script body', 'INVALID_REQUEST');
134
+ const output = await client.executeScript(script);
135
+ return { fix_script: fix.name, output, summary: `Executed fix script "${fix.name}"` };
136
+ }
137
+ default:
138
+ return null;
139
+ }
140
+ }
141
+ //# sourceMappingURL=platform-ops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-ops.js","sourceRoot":"","sources":["../../src/tools/platform-ops.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,yDAAyD;YACtE,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,E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CAAC,MAAM,CAAC;YACnC,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,eAAe,CAAC,+BAA+B,EAAE,iBAAiB,CAAC,CAAC;YAC3F,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAClD,OAAO,EAAE,UAAU,EAAG,GAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAyB,GAAW,CAAC,IAAI,GAAG,EAAE,CAAC;QAC1G,CAAC;QACD;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Service Mapping / application-service tools — parity with ServiceNow's first-party
3
+ * CMDB (Service Mapping) MCP server. Read: Tier 0. Create: Tier 1 (WRITE_ENABLED=true).
4
+ *
5
+ * Tables:
6
+ * cmdb_ci_service_auto — discovered application services
7
+ * svc_ci_assoc — CI ↔ application-service membership
8
+ * cmdb_rel_ci — CI relationships
9
+ * cmdb_class_info — CMDB class metadata (for class suggestion)
10
+ */
11
+ import type { ServiceNowClient } from '../servicenow/client.js';
12
+ export declare function getServiceMappingToolDefinitions(): ({
13
+ name: string;
14
+ description: string;
15
+ inputSchema: {
16
+ type: string;
17
+ properties: {
18
+ query: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ operational_status: {
23
+ type: string;
24
+ description: string;
25
+ };
26
+ limit: {
27
+ type: string;
28
+ description: string;
29
+ };
30
+ ci?: undefined;
31
+ ci_name?: undefined;
32
+ ci_class?: undefined;
33
+ keyword?: undefined;
34
+ };
35
+ required: never[];
36
+ };
37
+ } | {
38
+ name: string;
39
+ description: string;
40
+ inputSchema: {
41
+ type: string;
42
+ properties: {
43
+ ci: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ ci_name: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ limit: {
52
+ type: string;
53
+ description: string;
54
+ };
55
+ query?: undefined;
56
+ operational_status?: undefined;
57
+ ci_class?: undefined;
58
+ keyword?: undefined;
59
+ };
60
+ required: never[];
61
+ };
62
+ } | {
63
+ name: string;
64
+ description: string;
65
+ inputSchema: {
66
+ type: string;
67
+ properties: {
68
+ ci_class: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ limit: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ query?: undefined;
77
+ operational_status?: undefined;
78
+ ci?: undefined;
79
+ ci_name?: undefined;
80
+ keyword?: undefined;
81
+ };
82
+ required: never[];
83
+ };
84
+ } | {
85
+ name: string;
86
+ description: string;
87
+ inputSchema: {
88
+ type: string;
89
+ properties: {
90
+ keyword: {
91
+ type: string;
92
+ description: string;
93
+ };
94
+ limit: {
95
+ type: string;
96
+ description: string;
97
+ };
98
+ query?: undefined;
99
+ operational_status?: undefined;
100
+ ci?: undefined;
101
+ ci_name?: undefined;
102
+ ci_class?: undefined;
103
+ };
104
+ required: string[];
105
+ };
106
+ })[];
107
+ export declare function executeServiceMappingToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
108
+ //# sourceMappingURL=service-mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-mapping.d.ts","sourceRoot":"","sources":["../../src/tools/service-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,wBAAgB,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqD/C;AAED,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CA4Ed"}
@@ -0,0 +1,144 @@
1
+ import { ServiceNowError } from '../utils/errors.js';
2
+ export function getServiceMappingToolDefinitions() {
3
+ return [
4
+ {
5
+ name: 'list_application_services',
6
+ description: 'List discovered application services (cmdb_ci_service_auto), optionally by name or operational status. Parity with ServiceNow get_all_application_service_names',
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ query: { type: 'string', description: 'Search application services by name' },
11
+ operational_status: { type: 'string', description: 'Filter by operational_status value' },
12
+ limit: { type: 'number', description: 'Max records (default 50)' },
13
+ },
14
+ required: [],
15
+ },
16
+ },
17
+ {
18
+ name: 'cmdb_services_for_ci',
19
+ description: 'Reverse lookup: which application services contain a given CI/server (svc_ci_assoc). Parity with ServiceNow get_all_application_services_for_a_server',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ ci: { type: 'string', description: 'sys_id of the CI/server' },
24
+ ci_name: { type: 'string', description: 'CI name if sys_id not known' },
25
+ limit: { type: 'number', description: 'Max records (default 50)' },
26
+ },
27
+ required: [],
28
+ },
29
+ },
30
+ {
31
+ name: 'cmdb_find_unmapped_cis',
32
+ description: 'Find operational CIs that have relationships but belong to no application service (mapping gaps). Parity with ServiceNow get_unmapped_topology',
33
+ inputSchema: {
34
+ type: 'object',
35
+ properties: {
36
+ ci_class: { type: 'string', description: 'Restrict to a CI class/table (e.g. cmdb_ci_server)' },
37
+ limit: { type: 'number', description: 'Max CIs to scan/return (default 100)' },
38
+ },
39
+ required: [],
40
+ },
41
+ },
42
+ {
43
+ name: 'suggest_ci_class',
44
+ description: 'Suggest the correct CMDB CI class for a keyword before creating a CI (cmdb_class_info). Parity with ServiceNow Get_SimilarCI_Classes',
45
+ inputSchema: {
46
+ type: 'object',
47
+ properties: {
48
+ keyword: { type: 'string', description: 'Device/technology keyword, e.g. "linux server", "load balancer"' },
49
+ limit: { type: 'number', description: 'Max classes to return (default 10)' },
50
+ },
51
+ required: ['keyword'],
52
+ },
53
+ },
54
+ ];
55
+ }
56
+ export async function executeServiceMappingToolCall(client, name, args) {
57
+ switch (name) {
58
+ case 'list_application_services': {
59
+ const parts = [];
60
+ if (args.operational_status)
61
+ parts.push(`operational_status=${args.operational_status}`);
62
+ if (args.query)
63
+ parts.push(`nameCONTAINS${args.query}`);
64
+ return await client.queryRecords({
65
+ table: 'cmdb_ci_service_auto',
66
+ query: parts.join('^'),
67
+ fields: 'name,sys_id,operational_status,service_classification,busines_criticality,short_description',
68
+ limit: args.limit ?? 50,
69
+ });
70
+ }
71
+ case 'cmdb_services_for_ci': {
72
+ let ciId = args.ci;
73
+ if (!ciId && args.ci_name) {
74
+ const r = await client.queryRecords({ table: 'cmdb_ci', query: `name=${args.ci_name}`, limit: 1 });
75
+ if (r.count === 0)
76
+ throw new ServiceNowError(`CI not found: ${args.ci_name}`, 'NOT_FOUND');
77
+ ciId = r.records[0].sys_id;
78
+ }
79
+ if (!ciId)
80
+ throw new ServiceNowError('ci or ci_name is required', 'INVALID_REQUEST');
81
+ const assoc = await client.queryRecords({
82
+ table: 'svc_ci_assoc',
83
+ query: `ci_id=${ciId}`,
84
+ fields: 'cmdb_ci_service,cmdb_ci_service.name,ci_id,ci_id.name',
85
+ limit: args.limit ?? 50,
86
+ });
87
+ return { ci: ciId, services: assoc.records, count: assoc.count, note: 'Services this CI is a member of, via svc_ci_assoc.' };
88
+ }
89
+ case 'cmdb_find_unmapped_cis': {
90
+ const limit = args.limit ?? 100;
91
+ const ciQuery = ['operational_status=1'];
92
+ if (args.ci_class)
93
+ ciQuery.push(`sys_class_name=${args.ci_class}`);
94
+ const cis = await client.queryRecords({ table: 'cmdb_ci', query: ciQuery.join('^'), fields: 'sys_id,name,sys_class_name', limit });
95
+ const ciIds = cis.records.map((c) => c.sys_id);
96
+ if (ciIds.length === 0)
97
+ return { unmapped: [], count: 0, note: 'No operational CIs matched.' };
98
+ // Which of these CIs are already members of an application service?
99
+ const assoc = await client.queryRecords({ table: 'svc_ci_assoc', query: `ci_idIN${ciIds.join(',')}`, fields: 'ci_id', limit: 4000 }).catch(() => ({ records: [] }));
100
+ const mapped = new Set(assoc.records.map((r) => (r.ci_id && typeof r.ci_id === 'object' ? r.ci_id.value : r.ci_id)));
101
+ // Keep only CIs that have at least one relationship (i.e. real topology, just unmapped).
102
+ const rel = await client.queryRecords({ table: 'cmdb_rel_ci', query: `parentIN${ciIds.join(',')}^ORchildIN${ciIds.join(',')}`, fields: 'parent,child', limit: 4000 }).catch(() => ({ records: [] }));
103
+ const related = new Set();
104
+ for (const r of rel.records) {
105
+ for (const k of ['parent', 'child']) {
106
+ const v = r[k] && typeof r[k] === 'object' ? r[k].value : r[k];
107
+ if (v)
108
+ related.add(v);
109
+ }
110
+ }
111
+ const unmapped = cis.records.filter((c) => !mapped.has(c.sys_id) && related.has(c.sys_id));
112
+ return {
113
+ scanned: ciIds.length,
114
+ count: unmapped.length,
115
+ unmapped,
116
+ note: 'Operational CIs with relationships (cmdb_rel_ci) but no application-service membership (svc_ci_assoc). Approximated via Table API; ServiceNow also factors observed TCP traffic.',
117
+ };
118
+ }
119
+ case 'suggest_ci_class': {
120
+ if (!args.keyword)
121
+ throw new ServiceNowError('keyword is required', 'INVALID_REQUEST');
122
+ const kw = String(args.keyword).trim();
123
+ let resp = await client.queryRecords({
124
+ table: 'cmdb_class_info',
125
+ query: `labelLIKE${kw}^ORnameLIKE${kw}`,
126
+ fields: 'name,label,super_class,sys_id',
127
+ limit: args.limit ?? 10,
128
+ }).catch(() => null);
129
+ if (!resp || resp.count === 0) {
130
+ // Fall back to the dictionary of tables extending cmdb_ci.
131
+ resp = await client.queryRecords({
132
+ table: 'sys_db_object',
133
+ query: `nameSTARTSWITHcmdb_ci^labelLIKE${kw}`,
134
+ fields: 'name,label,super_class,sys_id',
135
+ limit: args.limit ?? 10,
136
+ });
137
+ }
138
+ return { keyword: kw, suggested_classes: resp.records, count: resp.count, note: 'Use the class "name" as the table for create_record. Check required attributes with get_table_schema.' };
139
+ }
140
+ default:
141
+ return null;
142
+ }
143
+ }
144
+ //# sourceMappingURL=service-mapping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-mapping.js","source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B,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAW,CAAC,CAAC;YAC5B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;gBAC9B,2DAA2D;gBAC3D,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,eAAe;oBACtB,KAAK,EAAE,kCAAkC,EAAE,EAAE;oBAC7C,MAAM,EAAE,+BAA+B;oBACvC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;iBACxB,CAAC,CAAC;YACL,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAG,IAAY,CAAC,OAAO,EAAE,KAAK,EAAG,IAAY,CAAC,KAAK,EAAE,IAAI,EAAE,uGAAuG,EAAE,CAAC;QAC9M,CAAC;QACD;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Service Portfolio modeling: business services & service offerings.
3
+ * Read: Tier 0. Create: Tier 1 (WRITE_ENABLED=true).
4
+ *
5
+ * Tables:
6
+ * cmdb_ci_service — business services
7
+ * service_offering — service offerings (child of a business service)
8
+ */
9
+ import type { ServiceNowClient } from '../servicenow/client.js';
10
+ export declare function getServicePortfolioToolDefinitions(): ({
11
+ name: string;
12
+ description: string;
13
+ inputSchema: {
14
+ type: string;
15
+ properties: {
16
+ name: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ owned_by: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ support_group: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ fields: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ parent?: undefined;
33
+ query?: undefined;
34
+ limit?: undefined;
35
+ };
36
+ required: string[];
37
+ };
38
+ } | {
39
+ name: string;
40
+ description: string;
41
+ inputSchema: {
42
+ type: string;
43
+ properties: {
44
+ name: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ parent: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ support_group: {
53
+ type: string;
54
+ description: string;
55
+ };
56
+ fields: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ owned_by?: undefined;
61
+ query?: undefined;
62
+ limit?: undefined;
63
+ };
64
+ required: string[];
65
+ };
66
+ } | {
67
+ name: string;
68
+ description: string;
69
+ inputSchema: {
70
+ type: string;
71
+ properties: {
72
+ parent: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ query: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ limit: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ name?: undefined;
85
+ owned_by?: undefined;
86
+ support_group?: undefined;
87
+ fields?: undefined;
88
+ };
89
+ required: never[];
90
+ };
91
+ })[];
92
+ export declare function executeServicePortfolioToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
93
+ //# sourceMappingURL=service-portfolio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-portfolio.d.ts","sourceRoot":"","sources":["../../src/tools/service-portfolio.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4CjD;AAED,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CA6Bd"}