nowaikit 4.1.6 → 4.4.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.
- package/README.md +3 -3
- package/dist/embed.d.ts +37 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +75 -0
- package/dist/embed.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -2
- package/dist/server.js.map +1 -1
- package/dist/servicenow/client.d.ts +13 -0
- package/dist/servicenow/client.d.ts.map +1 -1
- package/dist/servicenow/client.js +65 -3
- package/dist/servicenow/client.js.map +1 -1
- package/dist/servicenow/instances.d.ts.map +1 -1
- package/dist/servicenow/instances.js +20 -0
- package/dist/servicenow/instances.js.map +1 -1
- package/dist/tools/blast-radius.d.ts +75 -0
- package/dist/tools/blast-radius.d.ts.map +1 -0
- package/dist/tools/blast-radius.js +205 -0
- package/dist/tools/blast-radius.js.map +1 -0
- package/dist/tools/catalog.d.ts.map +1 -1
- package/dist/tools/catalog.js +20 -3
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/core.js +2 -2
- package/dist/tools/core.js.map +1 -1
- package/dist/tools/index.d.ts +182 -145
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +16 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/knowledge.d.ts.map +1 -1
- package/dist/tools/knowledge.js +9 -3
- package/dist/tools/knowledge.js.map +1 -1
- package/dist/tools/local-sync.d.ts +83 -0
- package/dist/tools/local-sync.d.ts.map +1 -0
- package/dist/tools/local-sync.js +256 -0
- package/dist/tools/local-sync.js.map +1 -0
- package/dist/tools/ml.d.ts +1 -1
- package/dist/tools/now-assist.d.ts +11 -145
- package/dist/tools/now-assist.d.ts.map +1 -1
- package/dist/tools/now-assist.js +50 -110
- package/dist/tools/now-assist.js.map +1 -1
- package/dist/tools/reporting.d.ts +55 -17
- package/dist/tools/reporting.d.ts.map +1 -1
- package/dist/tools/reporting.js +24 -15
- package/dist/tools/reporting.js.map +1 -1
- package/dist/tools-manifest.json +208 -95
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/index.js +18 -2
- package/dist/transport/index.js.map +1 -1
- package/dist/utils/permissions.d.ts +11 -5
- package/dist/utils/permissions.d.ts.map +1 -1
- package/dist/utils/permissions.js +39 -20
- package/dist/utils/permissions.js.map +1 -1
- package/dist/utils/request-context.d.ts +28 -0
- package/dist/utils/request-context.d.ts.map +1 -0
- package/dist/utils/request-context.js +71 -0
- package/dist/utils/request-context.js.map +1 -0
- package/package.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsF1C;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsF1C;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CAqEd"}
|
package/dist/tools/knowledge.js
CHANGED
|
@@ -96,9 +96,15 @@ export async function executeKnowledgeToolCall(client, name, args) {
|
|
|
96
96
|
case 'search_knowledge': {
|
|
97
97
|
if (!args.query)
|
|
98
98
|
throw new ServiceNowError('query is required', 'INVALID_REQUEST');
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
// Zing full-text search (123TEXTQUERY321) gives relevance ranking and keeps the
|
|
100
|
+
// published filter as a proper AND. The previous LIKE^OR form let the OR break out
|
|
101
|
+
// of the workflow_state=published constraint and leak unpublished articles.
|
|
102
|
+
let query = `workflow_state=published^123TEXTQUERY321=${args.query}`;
|
|
103
|
+
if (args.knowledge_base) {
|
|
104
|
+
query += /^[0-9a-f]{32}$/i.test(args.knowledge_base)
|
|
105
|
+
? `^kb_knowledge_base=${args.knowledge_base}`
|
|
106
|
+
: `^kb_knowledge_base.title=${args.knowledge_base}`;
|
|
107
|
+
}
|
|
102
108
|
const resp = await client.queryRecords({ table: 'kb_knowledge', query, limit: args.limit || 10, fields: 'sys_id,number,short_description,workflow_state,kb_knowledge_base,view_count' });
|
|
103
109
|
return { count: resp.count, articles: resp.records };
|
|
104
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,UAAU,2BAA2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export declare function getLocalSyncToolDefinitions(): ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
table?: undefined;
|
|
9
|
+
sys_id?: undefined;
|
|
10
|
+
fields?: undefined;
|
|
11
|
+
expected_updated_on?: undefined;
|
|
12
|
+
};
|
|
13
|
+
required: never[];
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
table: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
sys_id: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
fields?: undefined;
|
|
30
|
+
expected_updated_on?: undefined;
|
|
31
|
+
};
|
|
32
|
+
required: string[];
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: string;
|
|
39
|
+
properties: {
|
|
40
|
+
table: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
sys_id: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
fields: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
expected_updated_on: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
required: string[];
|
|
58
|
+
};
|
|
59
|
+
} | {
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: string;
|
|
64
|
+
properties: {
|
|
65
|
+
table: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
sys_id: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
fields: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
expected_updated_on?: undefined;
|
|
78
|
+
};
|
|
79
|
+
required: string[];
|
|
80
|
+
};
|
|
81
|
+
})[];
|
|
82
|
+
export declare function executeLocalSyncToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
|
|
83
|
+
//# sourceMappingURL=local-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-sync.d.ts","sourceRoot":"","sources":["../../src/tools/local-sync.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAmChE,wBAAgB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+C1C;AAmBD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CA4Id"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local Sync — pull large ServiceNow artifacts (widgets, script includes, UI pages…)
|
|
3
|
+
* to local files, edit them, and push them back. Avoids stuffing huge script/HTML
|
|
4
|
+
* bodies through the model, and gives a git-style edit loop for pro-code work.
|
|
5
|
+
*
|
|
6
|
+
* File writes are confined to the directory in NOWAIKIT_SYNC_DIR. When that env var is
|
|
7
|
+
* not set (e.g. a hosted multi-tenant server), pull returns content inline and push
|
|
8
|
+
* expects the fields in the call — nothing touches the server filesystem.
|
|
9
|
+
*/
|
|
10
|
+
import { writeFileSync, readFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
11
|
+
import { join, resolve } from 'node:path';
|
|
12
|
+
import { ServiceNowError } from '../utils/errors.js';
|
|
13
|
+
import { requireWrite } from '../utils/permissions.js';
|
|
14
|
+
const LOCAL_SYNC_TOOL_NAMES = new Set([
|
|
15
|
+
'list_supported_artifacts', 'pull_artifact', 'push_artifact', 'sync_status',
|
|
16
|
+
]);
|
|
17
|
+
/** table -> { name field, syncable field -> file extension } */
|
|
18
|
+
const SUPPORTED = {
|
|
19
|
+
sp_widget: { nameField: 'name', fields: { template: 'html', css: 'css', script: 'js', client_script: 'js', link: 'js', option_schema: 'json', demo_data: 'json' } },
|
|
20
|
+
sys_script_include: { nameField: 'name', fields: { script: 'js' } },
|
|
21
|
+
sys_script: { nameField: 'name', fields: { script: 'js' } },
|
|
22
|
+
sys_script_client: { nameField: 'name', fields: { script: 'js' } },
|
|
23
|
+
sys_ui_action: { nameField: 'name', fields: { script: 'js' } },
|
|
24
|
+
sys_ui_page: { nameField: 'name', fields: { html: 'html', client_script: 'js', processing_script: 'js' } },
|
|
25
|
+
sys_ui_script: { nameField: 'name', fields: { script: 'js' } },
|
|
26
|
+
sysauto_script: { nameField: 'name', fields: { script: 'js' } },
|
|
27
|
+
sys_script_fix: { nameField: 'name', fields: { script: 'js' } },
|
|
28
|
+
};
|
|
29
|
+
function asString(v) {
|
|
30
|
+
if (v == null)
|
|
31
|
+
return '';
|
|
32
|
+
if (typeof v === 'object')
|
|
33
|
+
return String(v.value ?? v.display_value ?? '');
|
|
34
|
+
return String(v);
|
|
35
|
+
}
|
|
36
|
+
function syncDirFor(table, sysId) {
|
|
37
|
+
const base = process.env.NOWAIKIT_SYNC_DIR;
|
|
38
|
+
if (!base)
|
|
39
|
+
return null;
|
|
40
|
+
if (!/^[0-9a-f]{32}$/i.test(sysId))
|
|
41
|
+
throw new ServiceNowError('sys_id must be a 32-char hex value for local sync', 'VALIDATION_ERROR');
|
|
42
|
+
if (!/^[a-z0-9_]+$/i.test(table))
|
|
43
|
+
throw new ServiceNowError('invalid table name for local sync', 'VALIDATION_ERROR');
|
|
44
|
+
return resolve(join(base, table, sysId));
|
|
45
|
+
}
|
|
46
|
+
export function getLocalSyncToolDefinitions() {
|
|
47
|
+
return [
|
|
48
|
+
{
|
|
49
|
+
name: 'list_supported_artifacts',
|
|
50
|
+
description: 'Local sync: list the artifact types (tables) that support pull/push to local files and which fields sync for each.',
|
|
51
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'pull_artifact',
|
|
55
|
+
description: 'Local sync: fetch an artifact\'s editable fields (e.g. a Service Portal widget\'s template/css/script) for local editing. Returns the content inline; when NOWAIKIT_SYNC_DIR is set it also writes one file per field and returns the paths. This is config/pro-code editing of a single artifact, not an update-set export.',
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
table: { type: 'string', description: 'Artifact table, e.g. "sp_widget", "sys_script_include"' },
|
|
60
|
+
sys_id: { type: 'string', description: 'sys_id OR name of the record (a name is resolved to its sys_id)' },
|
|
61
|
+
},
|
|
62
|
+
required: ['table', 'sys_id'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'push_artifact',
|
|
67
|
+
description: 'Local sync: write edited fields back to an artifact (requires WRITE_ENABLED=true). Pass fields inline as {field:value}; if omitted and NOWAIKIT_SYNC_DIR is set, reads them from the pulled files on disk. Overwrites the listed fields with NO merge — run sync_status first, and pass expected_updated_on to abort if the instance changed since you pulled.',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
table: { type: 'string', description: 'Artifact table' },
|
|
72
|
+
sys_id: { type: 'string', description: 'sys_id OR name of the record' },
|
|
73
|
+
fields: { type: 'object', description: 'Optional map of {field: newValue} to update; defaults to the on-disk files under NOWAIKIT_SYNC_DIR' },
|
|
74
|
+
expected_updated_on: { type: 'string', description: 'Optional sys_updated_on from your last pull/sync_status; the push aborts with a CONFLICT if the record has changed since.' },
|
|
75
|
+
},
|
|
76
|
+
required: ['table', 'sys_id'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'sync_status',
|
|
81
|
+
description: 'Local sync: compare an artifact\'s current instance content against your local/edited content field-by-field. Each field reports unchanged | changed | not_local (no local copy to compare). Also returns sys_updated_on to feed into push_artifact\'s conflict check.',
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: 'object',
|
|
84
|
+
properties: {
|
|
85
|
+
table: { type: 'string', description: 'Artifact table' },
|
|
86
|
+
sys_id: { type: 'string', description: 'sys_id OR name of the record' },
|
|
87
|
+
fields: { type: 'object', description: 'Optional {field: localValue} to compare; defaults to files under NOWAIKIT_SYNC_DIR' },
|
|
88
|
+
},
|
|
89
|
+
required: ['table', 'sys_id'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
function specFor(table) {
|
|
95
|
+
const spec = SUPPORTED[table];
|
|
96
|
+
if (!spec) {
|
|
97
|
+
throw new ServiceNowError(`Artifact table not supported for local sync: ${table}. Call list_supported_artifacts.`, 'INVALID_REQUEST');
|
|
98
|
+
}
|
|
99
|
+
return spec;
|
|
100
|
+
}
|
|
101
|
+
/** Accept a sys_id or a name; resolve a name to its sys_id via the table's name field. */
|
|
102
|
+
async function resolveSysId(client, table, nameField, idOrName) {
|
|
103
|
+
if (/^[0-9a-f]{32}$/i.test(idOrName))
|
|
104
|
+
return idOrName;
|
|
105
|
+
if (/[\^=,]/.test(idOrName))
|
|
106
|
+
throw new ServiceNowError('Invalid artifact name.', 'VALIDATION_ERROR');
|
|
107
|
+
const found = await client.queryRecords({ table, query: `${nameField}=${idOrName}`, fields: 'sys_id', limit: 1 });
|
|
108
|
+
if (!found.count)
|
|
109
|
+
throw new ServiceNowError(`Artifact not found by name "${idOrName}" in ${table}. Pass a sys_id, or find it with query_records first.`, 'NOT_FOUND');
|
|
110
|
+
return String(found.records[0].sys_id);
|
|
111
|
+
}
|
|
112
|
+
export async function executeLocalSyncToolCall(client, name, args) {
|
|
113
|
+
if (!LOCAL_SYNC_TOOL_NAMES.has(name))
|
|
114
|
+
return null;
|
|
115
|
+
switch (name) {
|
|
116
|
+
case 'list_supported_artifacts': {
|
|
117
|
+
const dir = process.env.NOWAIKIT_SYNC_DIR || null;
|
|
118
|
+
return {
|
|
119
|
+
sync_dir: dir,
|
|
120
|
+
mode: dir ? 'files' : 'inline',
|
|
121
|
+
artifacts: Object.entries(SUPPORTED).map(([table, spec]) => ({
|
|
122
|
+
table,
|
|
123
|
+
fields: spec.fields,
|
|
124
|
+
})),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
case 'pull_artifact': {
|
|
128
|
+
if (!args.table || !args.sys_id)
|
|
129
|
+
throw new ServiceNowError('table and sys_id are required', 'INVALID_REQUEST');
|
|
130
|
+
const table = String(args.table);
|
|
131
|
+
const spec = specFor(table);
|
|
132
|
+
const fieldNames = Object.keys(spec.fields);
|
|
133
|
+
const sysId = await resolveSysId(client, table, spec.nameField, String(args.sys_id));
|
|
134
|
+
const record = await client.getRecord(table, sysId, [spec.nameField, ...fieldNames].join(','));
|
|
135
|
+
const content = {};
|
|
136
|
+
for (const f of fieldNames)
|
|
137
|
+
content[f] = asString(record[f]);
|
|
138
|
+
const dir = syncDirFor(table, sysId);
|
|
139
|
+
let files;
|
|
140
|
+
if (dir) {
|
|
141
|
+
mkdirSync(dir, { recursive: true });
|
|
142
|
+
files = [];
|
|
143
|
+
for (const f of fieldNames) {
|
|
144
|
+
const path = join(dir, `${f}.${spec.fields[f]}`);
|
|
145
|
+
writeFileSync(path, content[f], 'utf8');
|
|
146
|
+
files.push(path);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
table,
|
|
151
|
+
sys_id: sysId,
|
|
152
|
+
name: asString(record[spec.nameField]),
|
|
153
|
+
fields: content,
|
|
154
|
+
files,
|
|
155
|
+
note: dir ? `Wrote ${fieldNames.length} files under ${dir}` : 'NOWAIKIT_SYNC_DIR not set; content returned inline only.',
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
case 'push_artifact': {
|
|
159
|
+
requireWrite();
|
|
160
|
+
if (!args.table || !args.sys_id)
|
|
161
|
+
throw new ServiceNowError('table and sys_id are required', 'INVALID_REQUEST');
|
|
162
|
+
const table = String(args.table);
|
|
163
|
+
const spec = specFor(table);
|
|
164
|
+
const fieldNames = Object.keys(spec.fields);
|
|
165
|
+
const sysId = await resolveSysId(client, table, spec.nameField, String(args.sys_id));
|
|
166
|
+
const updates = {};
|
|
167
|
+
const ignored = [];
|
|
168
|
+
let source = 'inline';
|
|
169
|
+
if (args.fields && typeof args.fields === 'object') {
|
|
170
|
+
for (const [k, v] of Object.entries(args.fields)) {
|
|
171
|
+
if (fieldNames.includes(k))
|
|
172
|
+
updates[k] = asString(v);
|
|
173
|
+
else
|
|
174
|
+
ignored.push(k);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
const dir = syncDirFor(table, sysId);
|
|
179
|
+
if (!dir)
|
|
180
|
+
throw new ServiceNowError('Provide fields inline, or set NOWAIKIT_SYNC_DIR and pull_artifact first.', 'INVALID_REQUEST');
|
|
181
|
+
source = dir;
|
|
182
|
+
for (const f of fieldNames) {
|
|
183
|
+
const path = join(dir, `${f}.${spec.fields[f]}`);
|
|
184
|
+
if (existsSync(path))
|
|
185
|
+
updates[f] = readFileSync(path, 'utf8');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (Object.keys(updates).length === 0)
|
|
189
|
+
throw new ServiceNowError('No syncable fields to push.', 'INVALID_REQUEST');
|
|
190
|
+
// Dirty-check: refuse to clobber the instance if it changed since it was pulled.
|
|
191
|
+
if (args.expected_updated_on) {
|
|
192
|
+
const cur = await client.getRecord(table, sysId, 'sys_updated_on');
|
|
193
|
+
const curUpdated = asString(cur.sys_updated_on);
|
|
194
|
+
if (curUpdated && curUpdated !== String(args.expected_updated_on)) {
|
|
195
|
+
throw new ServiceNowError(`Instance changed since pull (sys_updated_on is ${curUpdated}, expected ${args.expected_updated_on}). Re-pull, re-apply your edits, then push again (or omit expected_updated_on to force).`, 'CONFLICT');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
await client.updateRecord(table, sysId, updates);
|
|
199
|
+
return {
|
|
200
|
+
table,
|
|
201
|
+
sys_id: sysId,
|
|
202
|
+
updated_fields: Object.keys(updates),
|
|
203
|
+
ignored_fields: ignored,
|
|
204
|
+
source,
|
|
205
|
+
note: `Overwrote ${Object.keys(updates).length} field(s) from ${source === 'inline' ? 'inline args' : source}. No merge was performed.`,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
case 'sync_status': {
|
|
209
|
+
if (!args.table || !args.sys_id)
|
|
210
|
+
throw new ServiceNowError('table and sys_id are required', 'INVALID_REQUEST');
|
|
211
|
+
const table = String(args.table);
|
|
212
|
+
const spec = specFor(table);
|
|
213
|
+
const fieldNames = Object.keys(spec.fields);
|
|
214
|
+
const sysId = await resolveSysId(client, table, spec.nameField, String(args.sys_id));
|
|
215
|
+
const record = await client.getRecord(table, sysId, [...fieldNames, 'sys_updated_on'].join(','));
|
|
216
|
+
let local = null;
|
|
217
|
+
if (args.fields && typeof args.fields === 'object') {
|
|
218
|
+
local = {};
|
|
219
|
+
for (const [k, v] of Object.entries(args.fields))
|
|
220
|
+
if (fieldNames.includes(k))
|
|
221
|
+
local[k] = asString(v);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
const dir = syncDirFor(table, sysId);
|
|
225
|
+
if (dir) {
|
|
226
|
+
local = {};
|
|
227
|
+
for (const f of fieldNames) {
|
|
228
|
+
const path = join(dir, `${f}.${spec.fields[f]}`);
|
|
229
|
+
if (existsSync(path))
|
|
230
|
+
local[f] = readFileSync(path, 'utf8');
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (!local)
|
|
235
|
+
throw new ServiceNowError('Provide fields inline, or set NOWAIKIT_SYNC_DIR.', 'INVALID_REQUEST');
|
|
236
|
+
const status = fieldNames.map((f) => {
|
|
237
|
+
const instance = asString(record[f]);
|
|
238
|
+
const localVal = local[f];
|
|
239
|
+
return {
|
|
240
|
+
field: f,
|
|
241
|
+
state: localVal === undefined ? 'not_local' : localVal === instance ? 'unchanged' : 'changed',
|
|
242
|
+
};
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
table,
|
|
246
|
+
sys_id: sysId,
|
|
247
|
+
sys_updated_on: asString(record.sys_updated_on),
|
|
248
|
+
changed: status.filter((s) => s.state === 'changed').map((s) => s.field),
|
|
249
|
+
status,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
default:
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=local-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-sync.js","sourceRoot":"","sources":["../../src/tools/local-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,0BAA0B,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa;CAC5E,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,SAAS,GAA0E;IACvF,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KA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EAAE,KAAK;gBACb,cAAc,EAAE,QAAQ,CAAE,MAAc,CAAC,cAAc,CAAC;gBACxD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;gBACxE,MAAM;aACP,CAAC;QACJ,CAAC;QAED;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/tools/ml.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* incident forecasting, model training, NLU analysis, process optimization.
|
|
4
4
|
*
|
|
5
5
|
* NOTE: Does NOT duplicate existing Now Assist tools (categorize_incident,
|
|
6
|
-
*
|
|
6
|
+
* ai_search, get_pi_models). These ML tools focus on
|
|
7
7
|
* ServiceNow Predictive Intelligence and ML Workbench capabilities.
|
|
8
8
|
*
|
|
9
9
|
* ServiceNow tables: ml_solution, ml_solution_version, sys_cs_conversation
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ServiceNow AI / Predictive Intelligence tools.
|
|
3
3
|
* All tools require NOW_ASSIST_ENABLED=true (Tier AI).
|
|
4
4
|
*
|
|
5
|
-
* ServiceNow
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
5
|
+
* A note on scope: ServiceNow does not expose a public inbound REST API for running
|
|
6
|
+
* Now Assist skills (summarize / resolution suggestion / work-note drafting) or for
|
|
7
|
+
* triggering Agentic workflows — those run through server-side script APIs
|
|
8
|
+
* (sn_one_extend.OneExtendUtil / AiAgentRuntimeUtil) that a customer must wrap in a
|
|
9
|
+
* Scripted REST resource. So instead of calling fabricated endpoints, the tools here
|
|
10
|
+
* read real ServiceNow tables:
|
|
11
|
+
* - Predictive Intelligence solutions: ml_solution table
|
|
12
|
+
* - Virtual Agent / Copilot topics: sys_cs_topic table
|
|
13
|
+
* - Incident categorization suggestion: similar resolved incidents (Table API heuristic)
|
|
14
|
+
* - AI Search / NLQ: ServiceNow search APIs
|
|
13
15
|
*/
|
|
14
16
|
import type { ServiceNowClient } from '../servicenow/client.js';
|
|
15
17
|
export declare function getNowAssistToolDefinitions(): ({
|
|
@@ -32,14 +34,10 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
32
34
|
};
|
|
33
35
|
query?: undefined;
|
|
34
36
|
sources?: undefined;
|
|
35
|
-
sys_id?: undefined;
|
|
36
|
-
incident_sys_id?: undefined;
|
|
37
37
|
short_description?: undefined;
|
|
38
38
|
description?: undefined;
|
|
39
39
|
active?: undefined;
|
|
40
40
|
category?: undefined;
|
|
41
|
-
playbook_sys_id?: undefined;
|
|
42
|
-
context?: undefined;
|
|
43
41
|
};
|
|
44
42
|
required: string[];
|
|
45
43
|
};
|
|
@@ -66,67 +64,10 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
66
64
|
};
|
|
67
65
|
question?: undefined;
|
|
68
66
|
table?: undefined;
|
|
69
|
-
sys_id?: undefined;
|
|
70
|
-
incident_sys_id?: undefined;
|
|
71
67
|
short_description?: undefined;
|
|
72
68
|
description?: undefined;
|
|
73
69
|
active?: undefined;
|
|
74
70
|
category?: undefined;
|
|
75
|
-
playbook_sys_id?: undefined;
|
|
76
|
-
context?: undefined;
|
|
77
|
-
};
|
|
78
|
-
required: string[];
|
|
79
|
-
};
|
|
80
|
-
} | {
|
|
81
|
-
name: string;
|
|
82
|
-
description: string;
|
|
83
|
-
inputSchema: {
|
|
84
|
-
type: string;
|
|
85
|
-
properties: {
|
|
86
|
-
table: {
|
|
87
|
-
type: string;
|
|
88
|
-
description: string;
|
|
89
|
-
};
|
|
90
|
-
sys_id: {
|
|
91
|
-
type: string;
|
|
92
|
-
description: string;
|
|
93
|
-
};
|
|
94
|
-
question?: undefined;
|
|
95
|
-
limit?: undefined;
|
|
96
|
-
query?: undefined;
|
|
97
|
-
sources?: undefined;
|
|
98
|
-
incident_sys_id?: undefined;
|
|
99
|
-
short_description?: undefined;
|
|
100
|
-
description?: undefined;
|
|
101
|
-
active?: undefined;
|
|
102
|
-
category?: undefined;
|
|
103
|
-
playbook_sys_id?: undefined;
|
|
104
|
-
context?: undefined;
|
|
105
|
-
};
|
|
106
|
-
required: string[];
|
|
107
|
-
};
|
|
108
|
-
} | {
|
|
109
|
-
name: string;
|
|
110
|
-
description: string;
|
|
111
|
-
inputSchema: {
|
|
112
|
-
type: string;
|
|
113
|
-
properties: {
|
|
114
|
-
incident_sys_id: {
|
|
115
|
-
type: string;
|
|
116
|
-
description: string;
|
|
117
|
-
};
|
|
118
|
-
question?: undefined;
|
|
119
|
-
table?: undefined;
|
|
120
|
-
limit?: undefined;
|
|
121
|
-
query?: undefined;
|
|
122
|
-
sources?: undefined;
|
|
123
|
-
sys_id?: undefined;
|
|
124
|
-
short_description?: undefined;
|
|
125
|
-
description?: undefined;
|
|
126
|
-
active?: undefined;
|
|
127
|
-
category?: undefined;
|
|
128
|
-
playbook_sys_id?: undefined;
|
|
129
|
-
context?: undefined;
|
|
130
71
|
};
|
|
131
72
|
required: string[];
|
|
132
73
|
};
|
|
@@ -149,12 +90,8 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
149
90
|
limit?: undefined;
|
|
150
91
|
query?: undefined;
|
|
151
92
|
sources?: undefined;
|
|
152
|
-
sys_id?: undefined;
|
|
153
|
-
incident_sys_id?: undefined;
|
|
154
93
|
active?: undefined;
|
|
155
94
|
category?: undefined;
|
|
156
|
-
playbook_sys_id?: undefined;
|
|
157
|
-
context?: undefined;
|
|
158
95
|
};
|
|
159
96
|
required: string[];
|
|
160
97
|
};
|
|
@@ -180,43 +117,11 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
180
117
|
table?: undefined;
|
|
181
118
|
query?: undefined;
|
|
182
119
|
sources?: undefined;
|
|
183
|
-
sys_id?: undefined;
|
|
184
|
-
incident_sys_id?: undefined;
|
|
185
120
|
short_description?: undefined;
|
|
186
121
|
description?: undefined;
|
|
187
|
-
playbook_sys_id?: undefined;
|
|
188
|
-
context?: undefined;
|
|
189
122
|
};
|
|
190
123
|
required: never[];
|
|
191
124
|
};
|
|
192
|
-
} | {
|
|
193
|
-
name: string;
|
|
194
|
-
description: string;
|
|
195
|
-
inputSchema: {
|
|
196
|
-
type: string;
|
|
197
|
-
properties: {
|
|
198
|
-
playbook_sys_id: {
|
|
199
|
-
type: string;
|
|
200
|
-
description: string;
|
|
201
|
-
};
|
|
202
|
-
context: {
|
|
203
|
-
type: string;
|
|
204
|
-
description: string;
|
|
205
|
-
};
|
|
206
|
-
question?: undefined;
|
|
207
|
-
table?: undefined;
|
|
208
|
-
limit?: undefined;
|
|
209
|
-
query?: undefined;
|
|
210
|
-
sources?: undefined;
|
|
211
|
-
sys_id?: undefined;
|
|
212
|
-
incident_sys_id?: undefined;
|
|
213
|
-
short_description?: undefined;
|
|
214
|
-
description?: undefined;
|
|
215
|
-
active?: undefined;
|
|
216
|
-
category?: undefined;
|
|
217
|
-
};
|
|
218
|
-
required: string[];
|
|
219
|
-
};
|
|
220
125
|
} | {
|
|
221
126
|
name: string;
|
|
222
127
|
description: string;
|
|
@@ -231,48 +136,13 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
231
136
|
table?: undefined;
|
|
232
137
|
query?: undefined;
|
|
233
138
|
sources?: undefined;
|
|
234
|
-
sys_id?: undefined;
|
|
235
|
-
incident_sys_id?: undefined;
|
|
236
139
|
short_description?: undefined;
|
|
237
140
|
description?: undefined;
|
|
238
141
|
active?: undefined;
|
|
239
142
|
category?: undefined;
|
|
240
|
-
playbook_sys_id?: undefined;
|
|
241
|
-
context?: undefined;
|
|
242
143
|
};
|
|
243
144
|
required: never[];
|
|
244
145
|
};
|
|
245
|
-
} | {
|
|
246
|
-
name: string;
|
|
247
|
-
description: string;
|
|
248
|
-
inputSchema: {
|
|
249
|
-
type: string;
|
|
250
|
-
properties: {
|
|
251
|
-
table: {
|
|
252
|
-
type: string;
|
|
253
|
-
description: string;
|
|
254
|
-
};
|
|
255
|
-
sys_id: {
|
|
256
|
-
type: string;
|
|
257
|
-
description: string;
|
|
258
|
-
};
|
|
259
|
-
context: {
|
|
260
|
-
type: string;
|
|
261
|
-
description: string;
|
|
262
|
-
};
|
|
263
|
-
question?: undefined;
|
|
264
|
-
limit?: undefined;
|
|
265
|
-
query?: undefined;
|
|
266
|
-
sources?: undefined;
|
|
267
|
-
incident_sys_id?: undefined;
|
|
268
|
-
short_description?: undefined;
|
|
269
|
-
description?: undefined;
|
|
270
|
-
active?: undefined;
|
|
271
|
-
category?: undefined;
|
|
272
|
-
playbook_sys_id?: undefined;
|
|
273
|
-
};
|
|
274
|
-
required: string[];
|
|
275
|
-
};
|
|
276
146
|
} | {
|
|
277
147
|
name: string;
|
|
278
148
|
description: string;
|
|
@@ -284,14 +154,10 @@ export declare function getNowAssistToolDefinitions(): ({
|
|
|
284
154
|
limit?: undefined;
|
|
285
155
|
query?: undefined;
|
|
286
156
|
sources?: undefined;
|
|
287
|
-
sys_id?: undefined;
|
|
288
|
-
incident_sys_id?: undefined;
|
|
289
157
|
short_description?: undefined;
|
|
290
158
|
description?: undefined;
|
|
291
159
|
active?: undefined;
|
|
292
160
|
category?: undefined;
|
|
293
|
-
playbook_sys_id?: undefined;
|
|
294
|
-
context?: undefined;
|
|
295
161
|
};
|
|
296
162
|
required: never[];
|
|
297
163
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"now-assist.d.ts","sourceRoot":"","sources":["../../src/tools/now-assist.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"now-assist.d.ts","sourceRoot":"","sources":["../../src/tools/now-assist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0E1C;AAOD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CAqFd"}
|