nowaikit 2.6.0 → 3.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/dist/cli/index.js +89 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/direct/executor.d.ts +28 -0
- package/dist/direct/executor.d.ts.map +1 -0
- package/dist/direct/executor.js +228 -0
- package/dist/direct/executor.js.map +1 -0
- package/dist/direct/llm-client.d.ts +32 -0
- package/dist/direct/llm-client.d.ts.map +1 -0
- package/dist/direct/llm-client.js +122 -0
- package/dist/direct/llm-client.js.map +1 -0
- package/dist/prompts/capabilities/build-app.d.ts +4 -0
- package/dist/prompts/capabilities/build-app.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-app.js +238 -0
- package/dist/prompts/capabilities/build-app.js.map +1 -0
- package/dist/prompts/capabilities/build-business-rule.d.ts +4 -0
- package/dist/prompts/capabilities/build-business-rule.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-business-rule.js +93 -0
- package/dist/prompts/capabilities/build-business-rule.js.map +1 -0
- package/dist/prompts/capabilities/build-catalog.d.ts +4 -0
- package/dist/prompts/capabilities/build-catalog.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-catalog.js +350 -0
- package/dist/prompts/capabilities/build-catalog.js.map +1 -0
- package/dist/prompts/capabilities/build-client-script.d.ts +4 -0
- package/dist/prompts/capabilities/build-client-script.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-client-script.js +157 -0
- package/dist/prompts/capabilities/build-client-script.js.map +1 -0
- package/dist/prompts/capabilities/build-flow.d.ts +4 -0
- package/dist/prompts/capabilities/build-flow.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-flow.js +243 -0
- package/dist/prompts/capabilities/build-flow.js.map +1 -0
- package/dist/prompts/capabilities/build-portal.d.ts +4 -0
- package/dist/prompts/capabilities/build-portal.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-portal.js +250 -0
- package/dist/prompts/capabilities/build-portal.js.map +1 -0
- package/dist/prompts/capabilities/build-rest-api.d.ts +4 -0
- package/dist/prompts/capabilities/build-rest-api.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-rest-api.js +293 -0
- package/dist/prompts/capabilities/build-rest-api.js.map +1 -0
- package/dist/prompts/capabilities/build-test-plan.d.ts +4 -0
- package/dist/prompts/capabilities/build-test-plan.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-test-plan.js +162 -0
- package/dist/prompts/capabilities/build-test-plan.js.map +1 -0
- package/dist/prompts/capabilities/build-uib.d.ts +4 -0
- package/dist/prompts/capabilities/build-uib.d.ts.map +1 -0
- package/dist/prompts/capabilities/build-uib.js +309 -0
- package/dist/prompts/capabilities/build-uib.js.map +1 -0
- package/dist/prompts/capabilities/docs-app.d.ts +4 -0
- package/dist/prompts/capabilities/docs-app.d.ts.map +1 -0
- package/dist/prompts/capabilities/docs-app.js +234 -0
- package/dist/prompts/capabilities/docs-app.js.map +1 -0
- package/dist/prompts/capabilities/docs-release.d.ts +4 -0
- package/dist/prompts/capabilities/docs-release.d.ts.map +1 -0
- package/dist/prompts/capabilities/docs-release.js +197 -0
- package/dist/prompts/capabilities/docs-release.js.map +1 -0
- package/dist/prompts/capabilities/docs-runbook.d.ts +4 -0
- package/dist/prompts/capabilities/docs-runbook.d.ts.map +1 -0
- package/dist/prompts/capabilities/docs-runbook.js +223 -0
- package/dist/prompts/capabilities/docs-runbook.js.map +1 -0
- package/dist/prompts/capabilities/docs-script.d.ts +4 -0
- package/dist/prompts/capabilities/docs-script.d.ts.map +1 -0
- package/dist/prompts/capabilities/docs-script.js +242 -0
- package/dist/prompts/capabilities/docs-script.js.map +1 -0
- package/dist/prompts/capabilities/ops-deploy.d.ts +4 -0
- package/dist/prompts/capabilities/ops-deploy.d.ts.map +1 -0
- package/dist/prompts/capabilities/ops-deploy.js +193 -0
- package/dist/prompts/capabilities/ops-deploy.js.map +1 -0
- package/dist/prompts/capabilities/ops-risk.d.ts +4 -0
- package/dist/prompts/capabilities/ops-risk.d.ts.map +1 -0
- package/dist/prompts/capabilities/ops-risk.js +227 -0
- package/dist/prompts/capabilities/ops-risk.js.map +1 -0
- package/dist/prompts/capabilities/ops-triage.d.ts +4 -0
- package/dist/prompts/capabilities/ops-triage.d.ts.map +1 -0
- package/dist/prompts/capabilities/ops-triage.js +183 -0
- package/dist/prompts/capabilities/ops-triage.js.map +1 -0
- package/dist/prompts/capabilities/review-acls.d.ts +4 -0
- package/dist/prompts/capabilities/review-acls.d.ts.map +1 -0
- package/dist/prompts/capabilities/review-acls.js +142 -0
- package/dist/prompts/capabilities/review-acls.js.map +1 -0
- package/dist/prompts/capabilities/review-code.d.ts +4 -0
- package/dist/prompts/capabilities/review-code.d.ts.map +1 -0
- package/dist/prompts/capabilities/review-code.js +155 -0
- package/dist/prompts/capabilities/review-code.js.map +1 -0
- package/dist/prompts/capabilities/review-flows.d.ts +4 -0
- package/dist/prompts/capabilities/review-flows.d.ts.map +1 -0
- package/dist/prompts/capabilities/review-flows.js +413 -0
- package/dist/prompts/capabilities/review-flows.js.map +1 -0
- package/dist/prompts/capabilities/review-scripts.d.ts +4 -0
- package/dist/prompts/capabilities/review-scripts.d.ts.map +1 -0
- package/dist/prompts/capabilities/review-scripts.js +160 -0
- package/dist/prompts/capabilities/review-scripts.js.map +1 -0
- package/dist/prompts/capabilities/scan-automation.d.ts +4 -0
- package/dist/prompts/capabilities/scan-automation.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-automation.js +449 -0
- package/dist/prompts/capabilities/scan-automation.js.map +1 -0
- package/dist/prompts/capabilities/scan-cmdb.d.ts +4 -0
- package/dist/prompts/capabilities/scan-cmdb.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-cmdb.js +450 -0
- package/dist/prompts/capabilities/scan-cmdb.js.map +1 -0
- package/dist/prompts/capabilities/scan-debt.d.ts +4 -0
- package/dist/prompts/capabilities/scan-debt.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-debt.js +287 -0
- package/dist/prompts/capabilities/scan-debt.js.map +1 -0
- package/dist/prompts/capabilities/scan-health.d.ts +4 -0
- package/dist/prompts/capabilities/scan-health.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-health.js +235 -0
- package/dist/prompts/capabilities/scan-health.js.map +1 -0
- package/dist/prompts/capabilities/scan-security.d.ts +4 -0
- package/dist/prompts/capabilities/scan-security.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-security.js +370 -0
- package/dist/prompts/capabilities/scan-security.js.map +1 -0
- package/dist/prompts/capabilities/scan-upgrade.d.ts +4 -0
- package/dist/prompts/capabilities/scan-upgrade.d.ts.map +1 -0
- package/dist/prompts/capabilities/scan-upgrade.js +327 -0
- package/dist/prompts/capabilities/scan-upgrade.js.map +1 -0
- package/dist/prompts/index.d.ts +24 -2
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +160 -14
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/knowledge.d.ts +10 -0
- package/dist/prompts/knowledge.d.ts.map +1 -0
- package/dist/prompts/knowledge.js +604 -0
- package/dist/prompts/knowledge.js.map +1 -0
- package/dist/prompts/types.d.ts +38 -0
- package/dist/prompts/types.d.ts.map +1 -0
- package/dist/prompts/types.js +8 -0
- package/dist/prompts/types.js.map +1 -0
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/package.json +11 -3
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
const capability = {
|
|
2
|
+
name: 'build-rest-api',
|
|
3
|
+
title: 'Build Scripted REST API',
|
|
4
|
+
description: 'Guided Scripted REST API endpoint design — authentication, input validation, versioning, error responses',
|
|
5
|
+
category: 'build',
|
|
6
|
+
arguments: [
|
|
7
|
+
{
|
|
8
|
+
name: 'description',
|
|
9
|
+
description: 'what the API should do in plain language',
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'api_name',
|
|
14
|
+
description: 'desired API name (e.g. "Asset Lookup"). If omitted, one will be derived from the description',
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'http_methods',
|
|
19
|
+
description: 'comma-separated HTTP methods to implement: GET, POST, PUT, DELETE. Default: GET',
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
recommendedTools: [
|
|
24
|
+
'query_records',
|
|
25
|
+
'list_rest_messages',
|
|
26
|
+
'get_rest_message',
|
|
27
|
+
'create_rest_message',
|
|
28
|
+
'get_table_schema',
|
|
29
|
+
'create_script_include',
|
|
30
|
+
],
|
|
31
|
+
buildPrompt(args = {}) {
|
|
32
|
+
const desc = args.description ?? '<not provided>';
|
|
33
|
+
const apiName = args.api_name ?? '<derive from description>';
|
|
34
|
+
const methods = args.http_methods ?? 'GET';
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
role: 'user',
|
|
38
|
+
content: {
|
|
39
|
+
type: 'text',
|
|
40
|
+
text: [
|
|
41
|
+
`Build a Scripted REST API.`,
|
|
42
|
+
`**API Name:** ${apiName}`,
|
|
43
|
+
`**HTTP Methods:** ${methods}`,
|
|
44
|
+
`**Requirement:** ${desc}`,
|
|
45
|
+
'',
|
|
46
|
+
'Follow these steps exactly:',
|
|
47
|
+
'',
|
|
48
|
+
'### Step 1 — Understand the Requirement',
|
|
49
|
+
'Restate the API requirement in your own words. Identify:',
|
|
50
|
+
'- **Resources** — what entities does this API expose? (e.g., incidents, users, assets)',
|
|
51
|
+
'- **Operations** — which HTTP methods map to which actions? (GET=read, POST=create, PUT=update, DELETE=remove)',
|
|
52
|
+
'- **Consumers** — who will call this API? (external system, Service Portal, mobile app, MID Server)',
|
|
53
|
+
'- **Authentication type** — Basic Auth, OAuth 2.0, API Key via header, or session-based',
|
|
54
|
+
'- **Data volume** — expected request/response sizes, pagination needs',
|
|
55
|
+
'Call out ambiguities and ask for clarification if needed.',
|
|
56
|
+
'',
|
|
57
|
+
'### Step 2 — Check Existing Scripted REST APIs',
|
|
58
|
+
'Use **query_records** on `sys_ws_definition` (Scripted REST Services) to list all existing APIs.',
|
|
59
|
+
'Check for:',
|
|
60
|
+
'- **Namespace conflicts** — does an API with the same or similar name already exist?',
|
|
61
|
+
'- **Endpoint collisions** — will the new resource paths conflict with existing ones?',
|
|
62
|
+
'- **Reuse opportunities** — can an existing API be extended instead of creating a new one?',
|
|
63
|
+
'',
|
|
64
|
+
'Summarize existing APIs in a table:',
|
|
65
|
+
'| Name | Namespace | Base Path | Active | Resources |',
|
|
66
|
+
'|------|-----------|-----------|--------|-----------|',
|
|
67
|
+
'',
|
|
68
|
+
'### Step 3 — Design the API Structure',
|
|
69
|
+
'Design the full API structure following ServiceNow Scripted REST API best practices:',
|
|
70
|
+
'',
|
|
71
|
+
'**API Registration (sys_ws_definition):**',
|
|
72
|
+
'- **Name:** descriptive, PascalCase (e.g., `AssetLookupAPI`)',
|
|
73
|
+
'- **API ID:** lowercase with underscores (e.g., `asset_lookup_api`)',
|
|
74
|
+
'- **API Namespace:** use the scoped app namespace (e.g., `x_myapp`)',
|
|
75
|
+
'- **Base API Path:** `/api/x_myapp/v1/<resource>` — always version the API',
|
|
76
|
+
'',
|
|
77
|
+
'**Resource Design (sys_ws_operation):**',
|
|
78
|
+
'For each HTTP method, define:',
|
|
79
|
+
'| Method | Resource Path | Purpose | Example |',
|
|
80
|
+
'|--------|---------------|---------|---------|',
|
|
81
|
+
'| GET | `/<resource>` | List records (with pagination) | `GET /api/x_app/v1/assets?limit=20&offset=0` |',
|
|
82
|
+
'| GET | `/<resource>/{id}` | Get single record | `GET /api/x_app/v1/assets/abc123` |',
|
|
83
|
+
'| POST | `/<resource>` | Create record | `POST /api/x_app/v1/assets` with JSON body |',
|
|
84
|
+
'| PUT | `/<resource>/{id}` | Update record | `PUT /api/x_app/v1/assets/abc123` with JSON body |',
|
|
85
|
+
'| DELETE | `/<resource>/{id}` | Delete record | `DELETE /api/x_app/v1/assets/abc123` |',
|
|
86
|
+
'',
|
|
87
|
+
'**Versioning Strategy:**',
|
|
88
|
+
'- Use URL path versioning: `/api/x_app/v1/...`',
|
|
89
|
+
'- Never break existing consumers — add v2 alongside v1 when needed',
|
|
90
|
+
'- Deprecation headers: `X-API-Deprecated: true`, `X-API-Sunset: 2025-12-31`',
|
|
91
|
+
'',
|
|
92
|
+
'### Step 4 — Define Request/Response Schemas',
|
|
93
|
+
'For each resource endpoint, define:',
|
|
94
|
+
'',
|
|
95
|
+
'**Request Schema:**',
|
|
96
|
+
'- **Path parameters:** `{id}` — validate format (sys_id = 32-char hex)',
|
|
97
|
+
'- **Query parameters:** `limit` (default 20, max 100), `offset`, `fields`, `sysparm_query`, `orderBy`',
|
|
98
|
+
'- **Request body (POST/PUT):** JSON schema with required and optional fields',
|
|
99
|
+
'- **Headers:** `Content-Type: application/json`, `Accept: application/json`, custom auth headers',
|
|
100
|
+
'',
|
|
101
|
+
'**Input Validation Rules:**',
|
|
102
|
+
'- Validate sys_id format: `/^[a-f0-9]{32}$/`',
|
|
103
|
+
'- Validate numeric parameters: `limit` must be 1-100, `offset` must be >= 0',
|
|
104
|
+
'- Validate required body fields: return 400 with specific field errors',
|
|
105
|
+
'- Sanitize string inputs: strip HTML, enforce max length, prevent GlideRecord injection',
|
|
106
|
+
'- Validate enum values: only accept known values for choice fields',
|
|
107
|
+
'',
|
|
108
|
+
'**Response Schema:**',
|
|
109
|
+
'```json',
|
|
110
|
+
'{',
|
|
111
|
+
' "result": {',
|
|
112
|
+
' "status": "success",',
|
|
113
|
+
' "data": { ... },',
|
|
114
|
+
' "meta": {',
|
|
115
|
+
' "total": 150,',
|
|
116
|
+
' "limit": 20,',
|
|
117
|
+
' "offset": 0,',
|
|
118
|
+
' "next": "/api/x_app/v1/resource?limit=20&offset=20"',
|
|
119
|
+
' }',
|
|
120
|
+
' }',
|
|
121
|
+
'}',
|
|
122
|
+
'```',
|
|
123
|
+
'',
|
|
124
|
+
'**Error Response Schema:**',
|
|
125
|
+
'```json',
|
|
126
|
+
'{',
|
|
127
|
+
' "error": {',
|
|
128
|
+
' "message": "Record not found",',
|
|
129
|
+
' "detail": "No incident exists with sys_id abc123",',
|
|
130
|
+
' "status": "failure"',
|
|
131
|
+
' }',
|
|
132
|
+
'}',
|
|
133
|
+
'```',
|
|
134
|
+
'',
|
|
135
|
+
'### Step 5 — Generate Resource Scripts',
|
|
136
|
+
'Write the scripted REST resource scripts for each HTTP method. Apply these patterns:',
|
|
137
|
+
'',
|
|
138
|
+
'**Request Object API (`request`):**',
|
|
139
|
+
'- `request.pathParams` — map of URL path parameters (e.g., `{id}`)',
|
|
140
|
+
'- `request.queryParams` — map of query string parameters',
|
|
141
|
+
'- `request.body` — the parsed request body (RESTAPIRequestBody)',
|
|
142
|
+
'- `request.getHeader(name)` — read request headers',
|
|
143
|
+
'- `request.body.dataString` — raw body string',
|
|
144
|
+
'- `request.body.data` — parsed object from JSON body',
|
|
145
|
+
'- `request.body.nextEntry()` — iterate stream (for large payloads)',
|
|
146
|
+
'- `request.uri` — full request URI',
|
|
147
|
+
'',
|
|
148
|
+
'**Response Object API (`response`):**',
|
|
149
|
+
'- `response.setBody(obj)` — set JSON response body',
|
|
150
|
+
'- `response.setStatus(code)` — set HTTP status code',
|
|
151
|
+
'- `response.setHeader(name, value)` — set response headers',
|
|
152
|
+
'- `response.setContentType(type)` — set Content-Type header',
|
|
153
|
+
'',
|
|
154
|
+
'**GlideRecord Operations:**',
|
|
155
|
+
'- Use `GlideRecord` for CRUD, never raw SQL',
|
|
156
|
+
'- Always use `setValue()` / `getValue()` for field access',
|
|
157
|
+
'- Use `setLimit()` for list endpoints, enforce max of 100',
|
|
158
|
+
'- Use `addEncodedQuery()` for complex filters, but NEVER concatenate user input — validate first',
|
|
159
|
+
'- Use `chooseWindow(offset, offset + limit)` for pagination',
|
|
160
|
+
'- Use `getRowCount()` sparingly — prefer `GlideAggregate` for total counts',
|
|
161
|
+
'',
|
|
162
|
+
'**Script Structure Template:**',
|
|
163
|
+
'```javascript',
|
|
164
|
+
'(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {',
|
|
165
|
+
' // 1. Parse and validate input',
|
|
166
|
+
' // 2. Check authorization',
|
|
167
|
+
' // 3. Perform GlideRecord operation',
|
|
168
|
+
' // 4. Build response',
|
|
169
|
+
' // 5. Handle errors with try/catch',
|
|
170
|
+
'})(request, response);',
|
|
171
|
+
'```',
|
|
172
|
+
'',
|
|
173
|
+
'**Error Handling with sn_ws_err:**',
|
|
174
|
+
'- `new sn_ws_err.BadRequestError("message")` — 400',
|
|
175
|
+
'- `new sn_ws_err.NotFoundError("message")` — 404',
|
|
176
|
+
'- `new sn_ws_err.NotAcceptableError("message")` — 406',
|
|
177
|
+
'- `new sn_ws_err.ConflictError("message")` — 409',
|
|
178
|
+
'- `new sn_ws_err.UnsupportedMediaTypeError("message")` — 415',
|
|
179
|
+
'- `new sn_ws_err.ServiceError("message")` — 500',
|
|
180
|
+
'- For custom status codes: `response.setStatus(code); response.setBody({error: {...}});`',
|
|
181
|
+
'',
|
|
182
|
+
'### Step 6 — Implement Authentication & Authorization',
|
|
183
|
+
'Implement layered security:',
|
|
184
|
+
'',
|
|
185
|
+
'**Authentication (who is calling):**',
|
|
186
|
+
'- **Basic Auth:** ServiceNow handles natively; ensure HTTPS-only property is set',
|
|
187
|
+
'- **OAuth 2.0:** configure OAuth Application, grant type, scopes. Use `oauth_entity` table',
|
|
188
|
+
'- **API Key:** custom header validation (`X-API-Key`). Store key in `sys_properties` or credential store',
|
|
189
|
+
'- **Mutual Auth (mTLS):** for high-security integrations, configure certificate validation',
|
|
190
|
+
'',
|
|
191
|
+
'**Authorization (what can they do):**',
|
|
192
|
+
'- **ACL on the Scripted REST API:** set `Requires authentication` and `Requires role`',
|
|
193
|
+
'- **In-script role checks:** `gs.hasRole("x_myapp.api_user")` for fine-grained control',
|
|
194
|
+
'- **Row-level security:** filter GlideRecord results by caller\'s company/department/assignment_group',
|
|
195
|
+
'- **Field-level security:** only return fields the caller is authorized to see',
|
|
196
|
+
'- **Rate limiting:** check `request.getHeader("X-RateLimit-Remaining")` or implement custom throttling via properties',
|
|
197
|
+
'',
|
|
198
|
+
'**CORS Configuration:**',
|
|
199
|
+
'- Set `glide.rest.cors.enabled` to true if browser clients will call the API',
|
|
200
|
+
'- Configure allowed origins: `glide.rest.cors.rule.<name>.allowed_origins`',
|
|
201
|
+
'- Set appropriate methods and headers in CORS rules',
|
|
202
|
+
'',
|
|
203
|
+
'### Step 7 — Add Error Handling',
|
|
204
|
+
'Implement comprehensive error handling:',
|
|
205
|
+
'',
|
|
206
|
+
'**HTTP Status Code Map:**',
|
|
207
|
+
'| Code | Meaning | When to Use |',
|
|
208
|
+
'|------|---------|-------------|',
|
|
209
|
+
'| 200 | OK | Successful GET, PUT |',
|
|
210
|
+
'| 201 | Created | Successful POST |',
|
|
211
|
+
'| 204 | No Content | Successful DELETE |',
|
|
212
|
+
'| 400 | Bad Request | Invalid input, missing required fields |',
|
|
213
|
+
'| 401 | Unauthorized | Missing or invalid authentication |',
|
|
214
|
+
'| 403 | Forbidden | Authenticated but insufficient role/permissions |',
|
|
215
|
+
'| 404 | Not Found | Record does not exist |',
|
|
216
|
+
'| 405 | Method Not Allowed | HTTP method not supported on this resource |',
|
|
217
|
+
'| 409 | Conflict | Duplicate record or concurrent modification |',
|
|
218
|
+
'| 415 | Unsupported Media Type | Content-Type not application/json |',
|
|
219
|
+
'| 422 | Unprocessable Entity | Valid JSON but fails business validation |',
|
|
220
|
+
'| 429 | Too Many Requests | Rate limit exceeded |',
|
|
221
|
+
'| 500 | Internal Server Error | Unexpected error (log details, return generic message) |',
|
|
222
|
+
'',
|
|
223
|
+
'**Error Response Best Practices:**',
|
|
224
|
+
'- Always return a JSON error body, never raw text or HTML',
|
|
225
|
+
'- Include a human-readable `message` and a machine-readable `error_code`',
|
|
226
|
+
'- Never expose stack traces, sys_ids of internal records, or table names in error messages',
|
|
227
|
+
'- Log full error details server-side with `gs.error()` for debugging',
|
|
228
|
+
'- Wrap entire resource script in try/catch to prevent 500 errors from leaking implementation details',
|
|
229
|
+
'',
|
|
230
|
+
'### Step 8 — Create the Scripted REST API and Resources',
|
|
231
|
+
'Use **create_rest_message** or guide the user to create the artifacts:',
|
|
232
|
+
'',
|
|
233
|
+
'1. **Create the Scripted REST Service** (`sys_ws_definition`):',
|
|
234
|
+
' - Name, API ID, namespace, base path',
|
|
235
|
+
' - Set `Requires authentication: true`',
|
|
236
|
+
' - Set required roles',
|
|
237
|
+
'',
|
|
238
|
+
'2. **Create each Resource** (`sys_ws_operation`):',
|
|
239
|
+
' - One resource per HTTP method + path combination',
|
|
240
|
+
' - Attach the generated script',
|
|
241
|
+
' - Set the HTTP method and relative path',
|
|
242
|
+
' - Configure query parameters and path parameters',
|
|
243
|
+
'',
|
|
244
|
+
'3. **Create supporting Script Includes** (if needed):',
|
|
245
|
+
' - Shared validation utilities',
|
|
246
|
+
' - Response builder helpers',
|
|
247
|
+
' - Business logic that might be reused across resources',
|
|
248
|
+
'',
|
|
249
|
+
'Report the sys_id and name of every created artifact.',
|
|
250
|
+
'',
|
|
251
|
+
'### Step 9 — Generate API Documentation and Test Scenarios',
|
|
252
|
+
'',
|
|
253
|
+
'**API Documentation:**',
|
|
254
|
+
'Generate documentation in this format:',
|
|
255
|
+
'```',
|
|
256
|
+
'API: <name>',
|
|
257
|
+
'Base URL: /api/<namespace>/v1/<resource>',
|
|
258
|
+
'Authentication: <method>',
|
|
259
|
+
'Content-Type: application/json',
|
|
260
|
+
'',
|
|
261
|
+
'Endpoints:',
|
|
262
|
+
' <METHOD> <path> — <description>',
|
|
263
|
+
' Request: <schema>',
|
|
264
|
+
' Response: <schema>',
|
|
265
|
+
' Errors: <possible error codes>',
|
|
266
|
+
'```',
|
|
267
|
+
'',
|
|
268
|
+
'**Test Scenarios:**',
|
|
269
|
+
'Provide a comprehensive test matrix:',
|
|
270
|
+
'| # | Scenario | Method | Path | Body/Params | Expected Status | Expected Response |',
|
|
271
|
+
'|---|----------|--------|------|-------------|-----------------|-------------------|',
|
|
272
|
+
'Include at minimum:',
|
|
273
|
+
'- Happy-path for each HTTP method',
|
|
274
|
+
'- Missing required fields (400)',
|
|
275
|
+
'- Invalid sys_id format (400)',
|
|
276
|
+
'- Record not found (404)',
|
|
277
|
+
'- Unauthorized request (401)',
|
|
278
|
+
'- Forbidden — wrong role (403)',
|
|
279
|
+
'- Duplicate creation attempt (409)',
|
|
280
|
+
'- Pagination — first page, middle page, last page, beyond total',
|
|
281
|
+
'- Large response — verify limit enforcement',
|
|
282
|
+
'- Concurrent modification — optimistic locking if applicable',
|
|
283
|
+
'- Special characters in input — verify sanitization',
|
|
284
|
+
'- Empty body on POST/PUT (400)',
|
|
285
|
+
'- Wrong Content-Type header (415)',
|
|
286
|
+
].join('\n'),
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
];
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
export default capability;
|
|
293
|
+
//# sourceMappingURL=build-rest-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-rest-api.js","sourceRoot":"","sources":["../../../src/prompts/capabilities/build-rest-api.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAyB;IACvC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,0GAA0G;IAC5G,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE;QACT;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EACT,8FAA8F;YAChG,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,cAAc;YACpB,WAAW,EACT,iFAAiF;YACnF,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,gBAAgB,EAAE;QAChB,eAAe;QACf,oBAAoB;QACpB,kBAAkB;QAClB,qBAAqB;QACrB,kBAAkB;QAClB,uBAAuB;KACxB;IAC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;wBACZ,mCAAmC;wBACnC,uBAAuB;wBACvB,wBAAwB;wBACxB,oCAAoC;wBACpC,KAAK;wBACL,EAAE;wBACF,qBAAqB;wBACrB,sCAAsC;wBACtC,sFAAsF;wBACtF,sFAAsF;wBACtF,qBAAqB;wBACrB,mCAAmC;wBACnC,iCAAiC;wBACjC,+BAA+B;wBAC/B,0BAA0B;wBAC1B,8BAA8B;wBAC9B,gCAAgC;wBAChC,oCAAoC;wBACpC,iEAAiE;wBACjE,6CAA6C;wBAC7C,8DAA8D;wBAC9D,qDAAqD;wBACrD,gCAAgC;wBAChC,mCAAmC;qBACpC,CAAC,IAAI,CAAC,IAAI,CAAC;iBACb;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-test-plan.d.ts","sourceRoot":"","sources":["../../../src/prompts/capabilities/build-test-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,UAAU,EAAE,oBAkKjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
const capability = {
|
|
2
|
+
name: 'build-test-plan',
|
|
3
|
+
title: 'Build Test Plan',
|
|
4
|
+
description: 'Generate comprehensive ATF test suites from requirements or existing artifacts — covers all testable ServiceNow components',
|
|
5
|
+
category: 'build',
|
|
6
|
+
arguments: [
|
|
7
|
+
{
|
|
8
|
+
name: 'target',
|
|
9
|
+
description: 'business rule name/sys_id, script include, client script, flow, or describe the feature to test',
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'type',
|
|
14
|
+
description: 'unit, integration, regression, smoke. Default: integration',
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
recommendedTools: [
|
|
19
|
+
'run_atf_suite',
|
|
20
|
+
'run_atf_test',
|
|
21
|
+
'list_atf_suites',
|
|
22
|
+
'list_atf_tests',
|
|
23
|
+
'get_business_rule',
|
|
24
|
+
'get_script_include',
|
|
25
|
+
'get_client_script',
|
|
26
|
+
'query_records',
|
|
27
|
+
'get_table_schema',
|
|
28
|
+
],
|
|
29
|
+
buildPrompt(args = {}) {
|
|
30
|
+
const target = args.target ?? '<not provided>';
|
|
31
|
+
const type = args.type ?? 'integration';
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
role: 'user',
|
|
35
|
+
content: {
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: [
|
|
38
|
+
`Generate a comprehensive **${type}** test plan for: **${target}**`,
|
|
39
|
+
'',
|
|
40
|
+
'Follow these steps:',
|
|
41
|
+
'',
|
|
42
|
+
'### Step 1 — Identify the Artifact(s) Under Test',
|
|
43
|
+
`Determine what "${target}" refers to. Use the appropriate tool to retrieve details:`,
|
|
44
|
+
'- **get_business_rule** if it is a business rule name or sys_id.',
|
|
45
|
+
'- **get_script_include** if it is a script include.',
|
|
46
|
+
'- **get_client_script** if it is a client script.',
|
|
47
|
+
'- **query_records** on sys_hub_flow for flows, sys_ui_policy for UI policies, sys_security_acl for ACLs, sc_cat_item for catalog items.',
|
|
48
|
+
'- If the target is a plain-language feature description, identify ALL artifacts that implement the feature.',
|
|
49
|
+
'',
|
|
50
|
+
'Retrieve the full source code and configuration of each artifact. Use **get_table_schema** for tables involved.',
|
|
51
|
+
'',
|
|
52
|
+
'### Step 2 — Analyze Test Coverage Requirements',
|
|
53
|
+
`Based on the artifact type(s), apply the relevant test strategy below. Test type: **${type}**.`,
|
|
54
|
+
'',
|
|
55
|
+
'---',
|
|
56
|
+
'',
|
|
57
|
+
'#### Business Rules',
|
|
58
|
+
'- **Before rules (validation):** test that `setAbortAction` fires for invalid data and does NOT fire for valid data.',
|
|
59
|
+
'- **Before rules (data manipulation):** verify field values are correctly set/transformed before insert/update.',
|
|
60
|
+
'- **After rules:** verify downstream effects (related record updates, events generated, notifications sent).',
|
|
61
|
+
'- **Async rules:** verify the event is registered and the async processing completes correctly.',
|
|
62
|
+
'- **Condition evaluation:** test with records that match AND do not match the condition.',
|
|
63
|
+
'- **Update vs Insert:** test both operations if the rule fires on both.',
|
|
64
|
+
'',
|
|
65
|
+
'#### Script Includes',
|
|
66
|
+
'- Test each **public method** individually.',
|
|
67
|
+
'- Test with valid inputs, invalid inputs, null/undefined inputs, and boundary values.',
|
|
68
|
+
'- Test error handling paths — verify exceptions are thrown or handled gracefully.',
|
|
69
|
+
'- If the Script Include extends AbstractAjaxProcessor, test via GlideAjax simulation.',
|
|
70
|
+
'- Test any caching behavior or state management.',
|
|
71
|
+
'',
|
|
72
|
+
'#### Client Scripts',
|
|
73
|
+
'- **onChange:** test with various newValue/oldValue combinations including empty string and null.',
|
|
74
|
+
'- **onLoad:** verify form state after load (field visibility, mandatory states, default values).',
|
|
75
|
+
'- **onSubmit:** test that valid submissions proceed and invalid submissions are blocked.',
|
|
76
|
+
'- Use ATF **client-side test steps** (UI interaction steps) to simulate user behavior.',
|
|
77
|
+
'- Test with different user roles (admin vs non-admin) if behavior is role-dependent.',
|
|
78
|
+
'',
|
|
79
|
+
'#### UI Policies',
|
|
80
|
+
'- Verify field **visibility** states (visible/hidden) based on condition.',
|
|
81
|
+
'- Verify field **mandatory** states based on condition.',
|
|
82
|
+
'- Verify field **read-only** states based on condition.',
|
|
83
|
+
'- Test condition boundaries — one record that matches, one that does not.',
|
|
84
|
+
'- Test reverse behavior when condition becomes false (if "reverse if false" is enabled).',
|
|
85
|
+
'',
|
|
86
|
+
'#### Flows / Flow Designer',
|
|
87
|
+
'- Test **trigger conditions** — verify the flow fires for matching records and does NOT fire for non-matching.',
|
|
88
|
+
'- Test each **flow step/action** in isolation where possible.',
|
|
89
|
+
'- Test the **end-to-end flow** with realistic data.',
|
|
90
|
+
'- Test **error handling** — what happens when a step fails (fault handler, error output).',
|
|
91
|
+
'- Test **subflow** invocations with various inputs.',
|
|
92
|
+
'- Test **approval steps** with approve and reject paths.',
|
|
93
|
+
'',
|
|
94
|
+
'#### ACLs (Access Control Lists)',
|
|
95
|
+
'- Build a role matrix and test every combination:',
|
|
96
|
+
' - Admin user (should bypass ACLs).',
|
|
97
|
+
' - User with the required role(s).',
|
|
98
|
+
' - User WITHOUT the required role(s).',
|
|
99
|
+
' - User with partial roles (if multiple roles are required).',
|
|
100
|
+
'- Test all operations the ACL governs: read, write, create, delete.',
|
|
101
|
+
'- Test row-level conditions if the ACL has a script or condition.',
|
|
102
|
+
'',
|
|
103
|
+
'#### Catalog Items',
|
|
104
|
+
'- Test **variable validation** — mandatory variables, regex validators, reference qualifiers.',
|
|
105
|
+
'- Test **catalog client scripts** and **variable sets**.',
|
|
106
|
+
'- Test **approval flow** — verify approval is requested from the correct group/user.',
|
|
107
|
+
'- Test **fulfillment** — verify the requested item is provisioned correctly.',
|
|
108
|
+
'- Test **order guides** if the item is part of one.',
|
|
109
|
+
'',
|
|
110
|
+
'#### REST API (Scripted REST)',
|
|
111
|
+
'- Test each endpoint with valid payloads — verify response status and body.',
|
|
112
|
+
'- Test with invalid/malformed payloads — verify appropriate error responses.',
|
|
113
|
+
'- Test authentication — unauthenticated, basic auth, OAuth, API key.',
|
|
114
|
+
'- Test authorization — verify role enforcement.',
|
|
115
|
+
'- Test rate limiting and pagination if applicable.',
|
|
116
|
+
'',
|
|
117
|
+
'---',
|
|
118
|
+
'',
|
|
119
|
+
'### Step 3 — Generate the Test Suite Specification',
|
|
120
|
+
'For EACH test case, provide:',
|
|
121
|
+
'',
|
|
122
|
+
'| Field | Description |',
|
|
123
|
+
'|-------|-------------|',
|
|
124
|
+
'| **Test ID** | Unique identifier (e.g., TC-BR-001) |',
|
|
125
|
+
'| **Test Name** | Descriptive name |',
|
|
126
|
+
'| **Artifact** | The specific artifact under test |',
|
|
127
|
+
'| **Category** | unit / integration / regression / smoke |',
|
|
128
|
+
'| **Priority** | P1 (critical) / P2 (important) / P3 (nice-to-have) |',
|
|
129
|
+
'| **Setup Steps** | Create test data, impersonate users, set system properties |',
|
|
130
|
+
'| **Test Steps** | Step-by-step actions to trigger and verify behavior |',
|
|
131
|
+
'| **Expected Result** | Precise, verifiable assertion(s) |',
|
|
132
|
+
'| **Teardown Steps** | Delete test records, restore impersonation, reset properties |',
|
|
133
|
+
'| **Edge Cases** | Boundary conditions, null values, concurrent modifications |',
|
|
134
|
+
'',
|
|
135
|
+
'### Step 4 — Check for Existing Tests',
|
|
136
|
+
'Use **list_atf_suites** and **list_atf_tests** to find any existing tests for these artifacts. Report overlap and recommend whether to extend existing tests or create new ones.',
|
|
137
|
+
'',
|
|
138
|
+
'### Step 5 — Create and Run the ATF Suite',
|
|
139
|
+
'If the user wants to proceed with creation:',
|
|
140
|
+
'1. Use the ServiceNow ATF tools to create the test suite and individual test cases.',
|
|
141
|
+
'2. Use **run_atf_suite** to execute the suite.',
|
|
142
|
+
'3. Report results — pass/fail per test, execution time, any failures with details.',
|
|
143
|
+
'',
|
|
144
|
+
'### Step 6 — Output Summary',
|
|
145
|
+
'Provide a final summary table:',
|
|
146
|
+
'',
|
|
147
|
+
'| Metric | Value |',
|
|
148
|
+
'|--------|-------|',
|
|
149
|
+
'| Total test cases | N |',
|
|
150
|
+
'| P1 (critical) | N |',
|
|
151
|
+
'| P2 (important) | N |',
|
|
152
|
+
'| P3 (nice-to-have) | N |',
|
|
153
|
+
'| Artifact types covered | list |',
|
|
154
|
+
'| Estimated execution time | N min |',
|
|
155
|
+
].join('\n'),
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
];
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
export default capability;
|
|
162
|
+
//# sourceMappingURL=build-test-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-test-plan.js","sourceRoot":"","sources":["../../../src/prompts/capabilities/build-test-plan.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAyB;IACvC,IAAI,EAAE,i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wBAAwB;wBACxB,2BAA2B;wBAC3B,mCAAmC;wBACnC,sCAAsC;qBACvC,CAAC,IAAI,CAAC,IAAI,CAAC;iBACb;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-uib.d.ts","sourceRoot":"","sources":["../../../src/prompts/capabilities/build-uib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,QAAA,MAAM,UAAU,EAAE,oBAoTjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|