nowaikit 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +10 -10
- package/README.md +8 -6
- package/desktop/renderer/dist/assets/index-D46KUWoj.js +49 -0
- package/desktop/renderer/dist/index.html +5 -5
- package/desktop/serve.cjs +134 -10
- package/dist/a2a/agent-card.d.ts +8 -0
- package/dist/a2a/agent-card.d.ts.map +1 -0
- package/dist/a2a/agent-card.js +82 -0
- package/dist/a2a/agent-card.js.map +1 -0
- package/dist/a2a/index.d.ts +13 -0
- package/dist/a2a/index.d.ts.map +1 -0
- package/dist/a2a/index.js +74 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/task-manager.d.ts +20 -0
- package/dist/a2a/task-manager.d.ts.map +1 -0
- package/dist/a2a/task-manager.js +148 -0
- package/dist/a2a/task-manager.js.map +1 -0
- package/dist/a2a/types.d.ts +73 -0
- package/dist/a2a/types.d.ts.map +1 -0
- package/dist/a2a/types.js +6 -0
- package/dist/a2a/types.js.map +1 -0
- package/dist/api/index.d.ts +16 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +106 -0
- package/dist/api/index.js.map +1 -0
- package/dist/cli/config-store.d.ts +31 -0
- package/dist/cli/config-store.d.ts.map +1 -1
- package/dist/cli/config-store.js +44 -1
- package/dist/cli/config-store.js.map +1 -1
- package/dist/cli/index.js +115 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +669 -49
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/shortcuts.d.ts +2 -0
- package/dist/cli/shortcuts.d.ts.map +1 -0
- package/dist/cli/shortcuts.js +122 -0
- package/dist/cli/shortcuts.js.map +1 -0
- package/dist/dashboard/index.d.ts +7 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +111 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/direct/llm-client.d.ts +1 -1
- package/dist/direct/llm-client.d.ts.map +1 -1
- package/dist/direct/llm-client.js +9 -4
- package/dist/direct/llm-client.js.map +1 -1
- package/dist/prompts/capabilities/build-app.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-app.js +2 -0
- package/dist/prompts/capabilities/build-app.js.map +1 -1
- package/dist/prompts/capabilities/build-atf-suite.d.ts +4 -0
- package/dist/prompts/capabilities/build-atf-suite.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-atf-suite.js +143 -0
- package/dist/prompts/capabilities/build-atf-suite.js.map +1 -0
- package/dist/prompts/capabilities/build-business-rule.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-business-rule.js +2 -0
- package/dist/prompts/capabilities/build-business-rule.js.map +1 -1
- package/dist/prompts/capabilities/build-catalog.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-catalog.js +2 -0
- package/dist/prompts/capabilities/build-catalog.js.map +1 -1
- package/dist/prompts/capabilities/build-client-script.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-client-script.js +2 -0
- package/dist/prompts/capabilities/build-client-script.js.map +1 -1
- package/dist/prompts/capabilities/build-flow.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-flow.js +2 -0
- package/dist/prompts/capabilities/build-flow.js.map +1 -1
- package/dist/prompts/capabilities/build-portal.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-portal.js +2 -0
- package/dist/prompts/capabilities/build-portal.js.map +1 -1
- package/dist/prompts/capabilities/build-rest-api.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-rest-api.js +2 -0
- package/dist/prompts/capabilities/build-rest-api.js.map +1 -1
- package/dist/prompts/capabilities/build-test-plan.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-test-plan.js +2 -0
- package/dist/prompts/capabilities/build-test-plan.js.map +1 -1
- package/dist/prompts/capabilities/build-uib.d.ts.map +1 -1
- package/dist/prompts/capabilities/build-uib.js +2 -0
- package/dist/prompts/capabilities/build-uib.js.map +1 -1
- package/dist/prompts/capabilities/docs-app.d.ts.map +1 -1
- package/dist/prompts/capabilities/docs-app.js +2 -0
- package/dist/prompts/capabilities/docs-app.js.map +1 -1
- package/dist/prompts/capabilities/docs-release.d.ts.map +1 -1
- package/dist/prompts/capabilities/docs-release.js +2 -0
- package/dist/prompts/capabilities/docs-release.js.map +1 -1
- package/dist/prompts/capabilities/docs-runbook.d.ts.map +1 -1
- package/dist/prompts/capabilities/docs-runbook.js +2 -0
- package/dist/prompts/capabilities/docs-runbook.js.map +1 -1
- package/dist/prompts/capabilities/docs-script.d.ts.map +1 -1
- package/dist/prompts/capabilities/docs-script.js +2 -0
- package/dist/prompts/capabilities/docs-script.js.map +1 -1
- package/dist/prompts/capabilities/ops-deploy.d.ts.map +1 -1
- package/dist/prompts/capabilities/ops-deploy.js +2 -0
- package/dist/prompts/capabilities/ops-deploy.js.map +1 -1
- package/dist/prompts/capabilities/ops-risk.d.ts.map +1 -1
- package/dist/prompts/capabilities/ops-risk.js +2 -0
- package/dist/prompts/capabilities/ops-risk.js.map +1 -1
- package/dist/prompts/capabilities/ops-triage.d.ts.map +1 -1
- package/dist/prompts/capabilities/ops-triage.js +2 -0
- package/dist/prompts/capabilities/ops-triage.js.map +1 -1
- package/dist/prompts/capabilities/review-acls.d.ts.map +1 -1
- package/dist/prompts/capabilities/review-acls.js +2 -0
- package/dist/prompts/capabilities/review-acls.js.map +1 -1
- package/dist/prompts/capabilities/review-code.d.ts.map +1 -1
- package/dist/prompts/capabilities/review-code.js +2 -0
- package/dist/prompts/capabilities/review-code.js.map +1 -1
- package/dist/prompts/capabilities/review-flows.d.ts.map +1 -1
- package/dist/prompts/capabilities/review-flows.js +2 -0
- package/dist/prompts/capabilities/review-flows.js.map +1 -1
- package/dist/prompts/capabilities/review-scripts.d.ts.map +1 -1
- package/dist/prompts/capabilities/review-scripts.js +2 -0
- package/dist/prompts/capabilities/review-scripts.js.map +1 -1
- package/dist/prompts/capabilities/scan-automation.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-automation.js +2 -0
- package/dist/prompts/capabilities/scan-automation.js.map +1 -1
- package/dist/prompts/capabilities/scan-cmdb.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-cmdb.js +2 -0
- package/dist/prompts/capabilities/scan-cmdb.js.map +1 -1
- package/dist/prompts/capabilities/scan-debt.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-debt.js +2 -0
- package/dist/prompts/capabilities/scan-debt.js.map +1 -1
- package/dist/prompts/capabilities/scan-health.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-health.js +2 -0
- package/dist/prompts/capabilities/scan-health.js.map +1 -1
- package/dist/prompts/capabilities/scan-security.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-security.js +2 -0
- package/dist/prompts/capabilities/scan-security.js.map +1 -1
- package/dist/prompts/capabilities/scan-upgrade.d.ts.map +1 -1
- package/dist/prompts/capabilities/scan-upgrade.js +2 -0
- package/dist/prompts/capabilities/scan-upgrade.js.map +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +47 -8
- package/dist/prompts/index.js.map +1 -1
- package/dist/reports/brand.d.ts +79 -0
- package/dist/reports/brand.d.ts.map +1 -0
- package/dist/reports/brand.js +204 -0
- package/dist/reports/brand.js.map +1 -0
- package/dist/reports/charts.d.ts +11 -0
- package/dist/reports/charts.d.ts.map +1 -0
- package/dist/reports/charts.js +91 -0
- package/dist/reports/charts.js.map +1 -0
- package/dist/reports/index.d.ts +13 -0
- package/dist/reports/index.d.ts.map +1 -0
- package/dist/reports/index.js +65 -0
- package/dist/reports/index.js.map +1 -0
- package/dist/reports/parser.d.ts +13 -0
- package/dist/reports/parser.d.ts.map +1 -0
- package/dist/reports/parser.js +202 -0
- package/dist/reports/parser.js.map +1 -0
- package/dist/reports/pdf-generator.d.ts +8 -0
- package/dist/reports/pdf-generator.d.ts.map +1 -0
- package/dist/reports/pdf-generator.js +244 -0
- package/dist/reports/pdf-generator.js.map +1 -0
- package/dist/reports/pptx-generator.d.ts +8 -0
- package/dist/reports/pptx-generator.d.ts.map +1 -0
- package/dist/reports/pptx-generator.js +273 -0
- package/dist/reports/pptx-generator.js.map +1 -0
- package/dist/reports/types.d.ts +60 -0
- package/dist/reports/types.d.ts.map +1 -0
- package/dist/reports/types.js +7 -0
- package/dist/reports/types.js.map +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +10 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/query-syntax.d.ts +6 -0
- package/dist/resources/query-syntax.d.ts.map +1 -0
- package/dist/resources/query-syntax.js +113 -0
- package/dist/resources/query-syntax.js.map +1 -0
- package/dist/sdk/index.d.ts +51 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +55 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/server.d.ts +2 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +103 -92
- package/dist/server.js.map +1 -1
- package/dist/servicenow/client.js +1 -1
- package/dist/servicenow/client.js.map +1 -1
- package/dist/tools/ai-agents.d.ts +145 -0
- package/dist/tools/ai-agents.d.ts.map +1 -0
- package/dist/tools/ai-agents.js +185 -0
- package/dist/tools/ai-agents.js.map +1 -0
- package/dist/tools/cmdb-reconciliation.d.ts +112 -0
- package/dist/tools/cmdb-reconciliation.d.ts.map +1 -0
- package/dist/tools/cmdb-reconciliation.js +267 -0
- package/dist/tools/cmdb-reconciliation.js.map +1 -0
- package/dist/tools/discovery.d.ts +34 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +168 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/fluent.d.ts +105 -11
- package/dist/tools/fluent.d.ts.map +1 -1
- package/dist/tools/fluent.js +118 -1
- package/dist/tools/fluent.js.map +1 -1
- package/dist/tools/index.d.ts +840 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +44 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/ml.d.ts +104 -0
- package/dist/tools/ml.d.ts.map +1 -1
- package/dist/tools/ml.js +139 -0
- package/dist/tools/ml.js.map +1 -1
- package/dist/tools/now-assist-skills.d.ts +129 -0
- package/dist/tools/now-assist-skills.d.ts.map +1 -0
- package/dist/tools/now-assist-skills.js +128 -0
- package/dist/tools/now-assist-skills.js.map +1 -0
- package/dist/tools/orchestration.d.ts +132 -0
- package/dist/tools/orchestration.d.ts.map +1 -0
- package/dist/tools/orchestration.js +320 -0
- package/dist/tools/orchestration.js.map +1 -0
- package/dist/tools/reporting.d.ts +127 -1
- package/dist/tools/reporting.d.ts.map +1 -1
- package/dist/tools/reporting.js +64 -0
- package/dist/tools/reporting.js.map +1 -1
- package/dist/tools/schema-cache.d.ts +44 -0
- package/dist/tools/schema-cache.d.ts.map +1 -0
- package/dist/tools/schema-cache.js +127 -0
- package/dist/tools/schema-cache.js.map +1 -0
- package/dist/tools-manifest.json +1250 -25
- package/dist/transport/auth-middleware.d.ts +16 -0
- package/dist/transport/auth-middleware.d.ts.map +1 -0
- package/dist/transport/auth-middleware.js +31 -0
- package/dist/transport/auth-middleware.js.map +1 -0
- package/dist/transport/http-server.d.ts +44 -0
- package/dist/transport/http-server.d.ts.map +1 -0
- package/dist/transport/http-server.js +172 -0
- package/dist/transport/http-server.js.map +1 -0
- package/dist/transport/index.d.ts +19 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +105 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/utils/permissions.d.ts +2 -0
- package/dist/utils/permissions.d.ts.map +1 -1
- package/dist/utils/permissions.js +8 -0
- package/dist/utils/permissions.js.map +1 -1
- package/package.json +27 -4
- package/desktop/renderer/dist/assets/index-B-6BYnh8.js +0 -49
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Now Assist Skills management tools — create, list, get, and test Now Assist skills.
|
|
3
|
+
* All tools require NOW_ASSIST_ENABLED=true (Tier AI).
|
|
4
|
+
* Write tools additionally require WRITE_ENABLED=true (Tier 1).
|
|
5
|
+
*/
|
|
6
|
+
import type { ServiceNowClient } from '../servicenow/client.js';
|
|
7
|
+
export declare function getNowAssistSkillsToolDefinitions(): ({
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
description: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
input_schema: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
output_schema: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
prompt_template: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
model: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
active?: undefined;
|
|
38
|
+
limit?: undefined;
|
|
39
|
+
query?: undefined;
|
|
40
|
+
sys_id?: undefined;
|
|
41
|
+
skill_sys_id?: undefined;
|
|
42
|
+
test_input?: undefined;
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
active: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
limit: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
query: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
name?: undefined;
|
|
65
|
+
description?: undefined;
|
|
66
|
+
input_schema?: undefined;
|
|
67
|
+
output_schema?: undefined;
|
|
68
|
+
prompt_template?: undefined;
|
|
69
|
+
model?: undefined;
|
|
70
|
+
sys_id?: undefined;
|
|
71
|
+
skill_sys_id?: undefined;
|
|
72
|
+
test_input?: undefined;
|
|
73
|
+
};
|
|
74
|
+
required: never[];
|
|
75
|
+
};
|
|
76
|
+
} | {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: string;
|
|
81
|
+
properties: {
|
|
82
|
+
sys_id: {
|
|
83
|
+
type: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
name?: undefined;
|
|
87
|
+
description?: undefined;
|
|
88
|
+
input_schema?: undefined;
|
|
89
|
+
output_schema?: undefined;
|
|
90
|
+
prompt_template?: undefined;
|
|
91
|
+
model?: undefined;
|
|
92
|
+
active?: undefined;
|
|
93
|
+
limit?: undefined;
|
|
94
|
+
query?: undefined;
|
|
95
|
+
skill_sys_id?: undefined;
|
|
96
|
+
test_input?: undefined;
|
|
97
|
+
};
|
|
98
|
+
required: string[];
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: string;
|
|
105
|
+
properties: {
|
|
106
|
+
skill_sys_id: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
test_input: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
name?: undefined;
|
|
115
|
+
description?: undefined;
|
|
116
|
+
input_schema?: undefined;
|
|
117
|
+
output_schema?: undefined;
|
|
118
|
+
prompt_template?: undefined;
|
|
119
|
+
model?: undefined;
|
|
120
|
+
active?: undefined;
|
|
121
|
+
limit?: undefined;
|
|
122
|
+
query?: undefined;
|
|
123
|
+
sys_id?: undefined;
|
|
124
|
+
};
|
|
125
|
+
required: string[];
|
|
126
|
+
};
|
|
127
|
+
})[];
|
|
128
|
+
export declare function executeNowAssistSkillsToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
|
|
129
|
+
//# sourceMappingURL=now-assist-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now-assist-skills.d.ts","sourceRoot":"","sources":["../../src/tools/now-assist-skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,wBAAgB,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDhD;AAMD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CA8Dd"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ServiceNowError } from '../utils/errors.js';
|
|
2
|
+
import { requireNowAssist, requireWrite } from '../utils/permissions.js';
|
|
3
|
+
export function getNowAssistSkillsToolDefinitions() {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
name: 'create_now_assist_skill',
|
|
7
|
+
description: 'Create a Now Assist skill definition (requires NOW_ASSIST_ENABLED + WRITE_ENABLED)',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
name: { type: 'string', description: 'Skill name' },
|
|
12
|
+
description: { type: 'string', description: 'Skill description' },
|
|
13
|
+
input_schema: { type: 'string', description: 'JSON schema string defining the skill input' },
|
|
14
|
+
output_schema: { type: 'string', description: 'JSON schema string defining the skill output' },
|
|
15
|
+
prompt_template: { type: 'string', description: 'Prompt template for the skill' },
|
|
16
|
+
model: { type: 'string', description: 'Optional model identifier to use for this skill' },
|
|
17
|
+
},
|
|
18
|
+
required: ['name', 'description', 'input_schema', 'output_schema', 'prompt_template'],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'list_now_assist_skills',
|
|
23
|
+
description: 'List Now Assist skill definitions (requires NOW_ASSIST_ENABLED)',
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
active: { type: 'boolean', description: 'Filter by active status' },
|
|
28
|
+
limit: { type: 'number', description: 'Max records to return (default 25)' },
|
|
29
|
+
query: { type: 'string', description: 'Additional encoded query string' },
|
|
30
|
+
},
|
|
31
|
+
required: [],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'get_now_assist_skill',
|
|
36
|
+
description: 'Get a single Now Assist skill definition by sys_id (requires NOW_ASSIST_ENABLED)',
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
sys_id: { type: 'string', description: 'System ID of the skill' },
|
|
41
|
+
},
|
|
42
|
+
required: ['sys_id'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'test_now_assist_skill',
|
|
47
|
+
description: 'Invoke a Now Assist skill with test input to verify behavior (requires NOW_ASSIST_ENABLED)',
|
|
48
|
+
inputSchema: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
properties: {
|
|
51
|
+
skill_sys_id: { type: 'string', description: 'System ID of the skill to test' },
|
|
52
|
+
test_input: { type: 'object', description: 'Test input payload to send to the skill' },
|
|
53
|
+
},
|
|
54
|
+
required: ['skill_sys_id', 'test_input'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
const SKILL_TOOL_NAMES = new Set([
|
|
60
|
+
'create_now_assist_skill', 'list_now_assist_skills', 'get_now_assist_skill', 'test_now_assist_skill',
|
|
61
|
+
]);
|
|
62
|
+
export async function executeNowAssistSkillsToolCall(client, name, args) {
|
|
63
|
+
if (!SKILL_TOOL_NAMES.has(name))
|
|
64
|
+
return null;
|
|
65
|
+
requireNowAssist();
|
|
66
|
+
switch (name) {
|
|
67
|
+
case 'create_now_assist_skill': {
|
|
68
|
+
requireWrite();
|
|
69
|
+
if (!args.name)
|
|
70
|
+
throw new ServiceNowError('name is required', 'INVALID_REQUEST');
|
|
71
|
+
if (!args.description)
|
|
72
|
+
throw new ServiceNowError('description is required', 'INVALID_REQUEST');
|
|
73
|
+
if (!args.input_schema)
|
|
74
|
+
throw new ServiceNowError('input_schema is required', 'INVALID_REQUEST');
|
|
75
|
+
if (!args.output_schema)
|
|
76
|
+
throw new ServiceNowError('output_schema is required', 'INVALID_REQUEST');
|
|
77
|
+
if (!args.prompt_template)
|
|
78
|
+
throw new ServiceNowError('prompt_template is required', 'INVALID_REQUEST');
|
|
79
|
+
const data = {
|
|
80
|
+
name: args.name,
|
|
81
|
+
description: args.description,
|
|
82
|
+
input_schema: args.input_schema,
|
|
83
|
+
output_schema: args.output_schema,
|
|
84
|
+
prompt_template: args.prompt_template,
|
|
85
|
+
active: true,
|
|
86
|
+
};
|
|
87
|
+
if (args.model)
|
|
88
|
+
data.model = args.model;
|
|
89
|
+
const record = await client.createRecord('sn_now_assist_skill', data);
|
|
90
|
+
return { message: 'Now Assist skill created', skill: record };
|
|
91
|
+
}
|
|
92
|
+
case 'list_now_assist_skills': {
|
|
93
|
+
const parts = [];
|
|
94
|
+
if (args.active !== undefined)
|
|
95
|
+
parts.push(`active=${args.active}`);
|
|
96
|
+
if (args.query)
|
|
97
|
+
parts.push(args.query);
|
|
98
|
+
const query = parts.length > 0 ? parts.join('^') : undefined;
|
|
99
|
+
const resp = await client.queryRecords({
|
|
100
|
+
table: 'sn_now_assist_skill',
|
|
101
|
+
query,
|
|
102
|
+
limit: args.limit || 25,
|
|
103
|
+
fields: 'sys_id,name,description,active,model,sys_updated_on',
|
|
104
|
+
});
|
|
105
|
+
return { count: resp.count, skills: resp.records };
|
|
106
|
+
}
|
|
107
|
+
case 'get_now_assist_skill': {
|
|
108
|
+
if (!args.sys_id)
|
|
109
|
+
throw new ServiceNowError('sys_id is required', 'INVALID_REQUEST');
|
|
110
|
+
const record = await client.getRecord('sn_now_assist_skill', args.sys_id);
|
|
111
|
+
return { skill: record };
|
|
112
|
+
}
|
|
113
|
+
case 'test_now_assist_skill': {
|
|
114
|
+
if (!args.skill_sys_id)
|
|
115
|
+
throw new ServiceNowError('skill_sys_id is required', 'INVALID_REQUEST');
|
|
116
|
+
if (!args.test_input)
|
|
117
|
+
throw new ServiceNowError('test_input is required', 'INVALID_REQUEST');
|
|
118
|
+
const result = await client.callNowAssist('/api/sn_assist/skill/invoke', {
|
|
119
|
+
skill: args.skill_sys_id,
|
|
120
|
+
input: args.test_input,
|
|
121
|
+
});
|
|
122
|
+
return { skill_sys_id: args.skill_sys_id, test_input: args.test_input, result };
|
|
123
|
+
}
|
|
124
|
+
default:
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=now-assist-skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now-assist-skills.js","sourceRoot":"","sources":["../../src/tools/now-assist-skills.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,UAAU,iCAAiC;IAC/C,OAAO;QACL;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,oFAAoF;YACjG,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;oBACnD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ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,eAAe,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;YACrF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,qBAAqB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAC3B,CAAC;QAED,KAAK,uBAAuB,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,YAAY;gBAAE,MAAM,IAAI,eAAe,CAAC,0BAA0B,EAAE,iBAAiB,CAAC,CAAC;YACjG,IAAI,CAAC,IAAI,CAAC,UAAU;gBAAE,MAAM,IAAI,eAAe,CAAC,wBAAwB,EAAE,iBAAiB,CAAC,CAAC;YAE7F,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,6BAA6B,EAAE;gBACvE,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,KAAK,EAAE,IAAI,CAAC,UAAU;aACvB,CAAC,CAAC;YACH,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAClF,CAAC;QAED;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration tools — create, list, and execute multi-step playbooks.
|
|
3
|
+
* Playbooks chain tool calls with conditional logic and error handling.
|
|
4
|
+
* Requires NOW_ASSIST_ENABLED (Tier AI). Write tools also require WRITE_ENABLED.
|
|
5
|
+
*/
|
|
6
|
+
import type { ServiceNowClient } from '../servicenow/client.js';
|
|
7
|
+
export declare function getOrchestrationToolDefinitions(): ({
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
description: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
steps: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
items: {
|
|
25
|
+
type: string;
|
|
26
|
+
properties: {
|
|
27
|
+
tool_name: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
args_template: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
condition: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
on_error: {
|
|
40
|
+
type: string;
|
|
41
|
+
enum: string[];
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
required: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
playbook?: undefined;
|
|
49
|
+
context?: undefined;
|
|
50
|
+
dry_run?: undefined;
|
|
51
|
+
limit?: undefined;
|
|
52
|
+
};
|
|
53
|
+
required: string[];
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: string;
|
|
60
|
+
properties: {
|
|
61
|
+
playbook: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
properties: {
|
|
65
|
+
name: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
description: {
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
steps: {
|
|
72
|
+
type: string;
|
|
73
|
+
items: {
|
|
74
|
+
type: string;
|
|
75
|
+
properties: {
|
|
76
|
+
tool_name: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
args_template: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
condition: {
|
|
83
|
+
type: string;
|
|
84
|
+
};
|
|
85
|
+
on_error: {
|
|
86
|
+
type: string;
|
|
87
|
+
enum: string[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
required: string[];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
required: string[];
|
|
95
|
+
};
|
|
96
|
+
context: {
|
|
97
|
+
type: string;
|
|
98
|
+
description: string;
|
|
99
|
+
};
|
|
100
|
+
dry_run: {
|
|
101
|
+
type: string;
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
name?: undefined;
|
|
105
|
+
description?: undefined;
|
|
106
|
+
steps?: undefined;
|
|
107
|
+
limit?: undefined;
|
|
108
|
+
};
|
|
109
|
+
required: string[];
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
name: string;
|
|
113
|
+
description: string;
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: string;
|
|
116
|
+
properties: {
|
|
117
|
+
limit: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
name?: undefined;
|
|
122
|
+
description?: undefined;
|
|
123
|
+
steps?: undefined;
|
|
124
|
+
playbook?: undefined;
|
|
125
|
+
context?: undefined;
|
|
126
|
+
dry_run?: undefined;
|
|
127
|
+
};
|
|
128
|
+
required: never[];
|
|
129
|
+
};
|
|
130
|
+
})[];
|
|
131
|
+
export declare function executeOrchestrationToolCall(client: ServiceNowClient, name: string, args: Record<string, any>): Promise<any>;
|
|
132
|
+
//# sourceMappingURL=orchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../../src/tools/orchestration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAoBhE,wBAAgB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0E9C;AA6GD,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,OAAO,CAAC,GAAG,CAAC,CAyJd"}
|