norn-cli 2.9.8 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CLAUDE.md +68 -0
  2. package/NOW.md +170 -21
  3. package/README.md +226 -2
  4. package/demos/agent-workbench/README.md +156 -0
  5. package/demos/agent-workbench/agents.nornagent +87 -0
  6. package/demos/agent-workbench/contracts/domain-answer.schema.json +28 -0
  7. package/demos/agent-workbench/contracts/domain-question.schema.json +34 -0
  8. package/demos/agent-workbench/contracts/router-verdict.schema.json +43 -0
  9. package/demos/agent-workbench/contracts/ticket.schema.json +29 -0
  10. package/demos/agent-workbench/contracts/verdict.schema.json +48 -0
  11. package/demos/agent-workbench/fake-openai-server.js +128 -0
  12. package/demos/agent-workbench/fixtures/aligned-ticket.json +10 -0
  13. package/demos/agent-workbench/fixtures/cross-domain-ticket.json +10 -0
  14. package/demos/agent-workbench/fixtures/invalid-output-ticket.json +8 -0
  15. package/demos/agent-workbench/norn.config.json +15 -0
  16. package/demos/agent-workbench/prompts/ticket-router.md +11 -0
  17. package/demos/agent-workbench/workbench.norn +32 -0
  18. package/demos/mcp-ticket-testing/README.md +114 -0
  19. package/demos/mcp-ticket-testing/agents.nornagent +77 -0
  20. package/demos/mcp-ticket-testing/contracts/test-run.schema.json +31 -0
  21. package/demos/mcp-ticket-testing/expectations/proj-142.md +12 -0
  22. package/demos/mcp-ticket-testing/fixtures/proj-142.json +13 -0
  23. package/demos/mcp-ticket-testing/prompts/backend-tester.md +12 -0
  24. package/demos/mcp-ticket-testing/prompts/frontend-tester.md +14 -0
  25. package/demos/mcp-ticket-testing/prompts/reporter.md +10 -0
  26. package/demos/mcp-ticket-testing/servers/browser-server.js +133 -0
  27. package/demos/mcp-ticket-testing/servers/house-server.js +125 -0
  28. package/demos/mcp-ticket-testing/tickets.norn +32 -0
  29. package/dist/cli.js +185429 -111460
  30. package/package.json +71 -4
  31. package/playground/ai.norn +15 -0
  32. package/playground/ai_orchastration.nornagent +29 -0
  33. package/playground/knowedge_base/nexus_system_prompt.md +1 -0
  34. package/schemas/norn.config.schema.json +223 -0
  35. package/CHANGELOG.md +0 -1506
package/CHANGELOG.md DELETED
@@ -1,1506 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to the "Norn" extension will be documented in this file.
4
-
5
- ## [2.9.1] - 2026-06-22
6
-
7
- ### Fixed
8
- - **Windows PTY terminal packaging** - packaged VSIX builds now include the Windows `node-pty` `conpty.node` prebuilds, fixing Norn Terminal startup failures that reported `Failed to load native module: conpty.node`.
9
- - **Windows terminal command cleanup** - intercepted commands such as `:pin` and completed shell commands now clear from the compact terminal input on Windows before appearing in the main terminal timeline.
10
-
11
- ### Changed
12
- - **Native PTY staging** - `vscode:prepublish` now stages the external `node-pty` runtime, stages available npm prebuilds by default, excludes Windows `.pdb` debug files from packages, and keeps explicit `--platform` / `--arch` staging available for platform-specific proof builds.
13
-
14
- ### Testing
15
- - **Release verification** - `npm test` passed with 80 Extension Host tests. `npm run test:regression` ran 195 CLI regression sequences with 195 passing.
16
- - **Website docs review** - no website changes were needed for this Windows terminal-fix release.
17
-
18
- ## [2.9.0] - 2026-06-21
19
-
20
- ### Added
21
- - **Git status terminal bloom** - bare `git status` commands in Norn Terminal now render a status-first graph that shows upstream divergence, HEAD, working-tree buckets, conflicts, detached/unborn states, and preserved raw output fallback while leaving scoped status commands such as `git status -s`, pathspecs, and shell pipelines untouched.
22
- - **Live Git status tile** - `:pin` / `:dash` can pin the latest Git status bloom into the terminal live rail, where it refreshes against the current working directory.
23
-
24
- ### Changed
25
- - **Terminal bloom documentation** - updated the website docs, local terminal guidance, and prototype notes for the Git status bloom behavior and limits.
26
-
27
- ### Testing
28
- - **Release verification** - `npm test` passed with 78 Extension Host tests. `npm run test:regression` ran 195 CLI regression sequences with 195 passing.
29
- - **Website docs review** - updated website docs for the Git status bloom and `npm run build` passed in the website repo.
30
-
31
- ## [2.8.2] - 2026-06-21
32
-
33
- ### Changed
34
- - **Norn Terminal command viewport** — the compact xterm dock now expands while ordinary commands are running, preserving terminal-native animations and interactive prompts, then collapses back into the semantic timeline once the command completes.
35
-
36
- ### Fixed
37
- - **Interactive terminal history** — cleaned semantic command previews for PowerShell/readline-style prompts so carriage returns, escape sequences, and progressive input redraws no longer appear as stray `=`, `P`, or duplicated input fragments.
38
- - **Terminal transcript selection** — fixed main-view copy behavior so selecting transcript text is not immediately interrupted by xterm focus restoration.
39
-
40
- ### Testing
41
- - **Release verification** — `npm test` passed. `npm run test:regression` ran 195 CLI regression sequences with 195 passing.
42
- - **Website docs review** — no website changes were needed for this bug-fix release.
43
-
44
- ## [2.8.1] - 2026-06-20
45
-
46
- ### Changed
47
- - **Norn Terminal agent focus** — hid the raw terminal dock, resize grip, and session selector while a Claude/Codex chat is focused, and restyled the reply composer/session tabs around the Norn Aurora surface.
48
- - **Agent activity indicator** — replaced the CSS keyframe-only network mark with a reduced-motion-aware orbiting activity mark that only animates while visible.
49
-
50
- ### Fixed
51
- - **Per-session agent rail** — scoped agent rail cards and focus cycling to the terminal session that launched them, preventing agents from other terminal tabs from showing or keeping focus when switching sessions.
52
-
53
- ### Testing
54
- - **Release verification** — `npm test` passed with 72 Extension Host tests. `npm run test:regression` ran 195 CLI regression sequences with 195 passing.
55
- - **Website docs review** — no website changes were needed; `npm run build` passed in the website repo.
56
-
57
- ## [2.8.0] - 2026-06-20
58
-
59
- ### Changed
60
- - **PTY-backed Norn Terminal** — promoted the PTY-backed terminal to the only registered `Norn: Open Terminal` route, removed the experimental PTY command and setting, and kept interactive commands inside Norn's raw PTY surface instead of handing them off to a separate VS Code terminal.
61
- - **Native terminal agents** — refined Codex and Claude terminal sessions with earlier thinking indicators, persisted session replay, native agent launch/focus behavior, and bounded command/file/tool transcript cards that stay readable in the terminal rail.
62
- - **Terminal documentation** — updated the project terminal skills, rollout plan, and website docs for the promoted PTY route and removed experimental toggle.
63
-
64
- ### Fixed
65
- - **Agent transcript replay** — restored saved shell/tool activity as command and file-edit cards instead of generic tool blobs, including large edit diffs that previously lost their diff rendering after truncation.
66
- - **Terminal layout polish** — contained long assistant text, command output, code, and diffs so focused agent panes do not paint under the rail or collapse during long restored sessions.
67
-
68
- ### Testing
69
- - **Release verification** — `npm test` passed with 69 Extension Host tests. `npm run test:regression` ran 195 CLI regression sequences with 193 passing; Peter explicitly accepted the two known local SQL Server fixture connection failures (`SmokeLiveSqlServerSql`, `SeedLiveSqlServerDummyData`) at `127.0.0.1:14333`.
70
- - **Website docs review** — updated `src/pages/docs/kubernetes.astro` and `src/pages/docs/vscode.astro` in the website repo; `npm run build` passed there.
71
-
72
- ## [2.7.0] - 2026-06-14
73
-
74
- ### Added
75
- - **Kubernetes runbooks (VS Code + CLI)** — added the `.nornk8s` file type with syntax highlighting, a Kubernetes-inspired file icon, standalone commands, reusable `sequence` helpers, automatic `runbook sequence` CLI entry points, context selection, `.nornenv` variables, label-selector pod capture, and confirmed deployment restarts.
76
- - **Live Kubernetes views** — standalone `get pods`, `describe pod`, and `logs` commands now open styled VS Code views with unhealthy-first pod sorting, pod details and events, live pod watches, live log following, level filters, folded stack traces, pause/resume, and snapshot refresh while paused.
77
- - **Norn Terminal** — added an editor-area terminal that upgrades supported pod, log, event, restart, and rollout commands into structured blooms and live tiles while preserving normal shell fallback. Compact terminal tabs retain independent transcripts, working directories, environments, Kubernetes scopes, running tasks, and live views, with rename and close controls.
78
- - **Kubernetes IntelliSense** — added cached namespace, pod, and deployment suggestions scoped by context and file namespace, `get pods` and `logs` flag suggestions, common `--tail` values, chained suggestions, and complete sequence-block insertion.
79
-
80
- ### Changed
81
- - **CLI regression reliability** — replaced external httpbin.org and Docker MCP dependencies with deterministic local HTTP and MCP fixtures.
82
- - **Environment selection UI** — removed the global Norn environment selector from the VS Code status bar; environments remain selectable through CodeLens, `.nornenv` actions, and `Norn: Select Environment`.
83
- - **Product metadata and docs** — updated Norn descriptions and documentation to cover API tests, database checks, and Kubernetes runbooks.
84
-
85
- ### Fixed
86
- - **Kubernetes completion replacement** — multiword completions replace the full typed command prefix instead of producing duplicated text such as `get get pods`.
87
- - **Kubernetes live scope** — selector-filtered pod dashboards preserve selectors across watch updates and panel navigation.
88
- - **Kubernetes CLI output safety** — complete kubectl output is redacted before printing, and empty `.nornk8s --json` runs now emit valid JSON.
89
- - **Release packaging** — excluded caches, environment files, internal Docs, agent instructions, and development scripts from published artifacts.
90
-
91
- ### Testing
92
- - **Kubernetes runtime coverage** — added Extension Host coverage for parsing, execution, safety, live views, caches, permission fallbacks, CLI behavior, and IntelliSense.
93
-
94
- ## [2.6.1] - 2026-05-30
95
-
96
- ### Changed
97
- - **VS Code webview theme polish** — response, coverage, and Postman panels now use theme-aware colors for JSON, cards, tabs, request details, and inline assertion values so light and high-contrast themes render more consistently.
98
- - **Response panel layout polish** — long assertion expected/actual values now wrap inside their panels, and request detail/tabs spacing was tightened to reduce visual crowding.
99
-
100
- ## [2.6.0] - 2026-05-28
101
-
102
- ### Added
103
- - **Verbatim string literals** — added C#-style `@"..."` strings for Norn values, assertions, regex patterns, request URLs, sequence arguments/defaults, SQL arguments, schema paths, assertion messages, and `@data` values. Backslashes are literal, doubled quotes decode to a single quote, and `{{...}}` tokens inside verbatim strings are not interpolated.
104
- - **Escape-aware highlighting** — `.norn` syntax highlighting now distinguishes decoded escapes from ordinary backslash text, including escaped quotes/backslashes in normal strings, regex escapes in `matches` patterns, doubled quotes in verbatim strings, and valid JSON escapes in request bodies.
105
- - **Configurable HTTP request timeouts** — added a shared `http.timeoutMs` option in `norn.config.json`, a VS Code `norn.request.timeoutMs` setting for local overrides, and CLI `--timeout` duration parsing for values such as `180s`, `3m`, and `300000ms`.
106
-
107
- ### Changed
108
- - **Regex assertion authoring** — `matches` patterns are now guided toward quoted string patterns, with `@"..."` recommended for regexes that contain many backslashes or literal quotes.
109
- - **Starter config output** — generated `norn.config.json` files now stay minimal and rely on schema-backed IntelliSense instead of inline `_comment` guidance fields.
110
-
111
- ### Fixed
112
- - **Quoted string handling** — escaped quotes and backslashes are decoded consistently across variables, request URLs, run arguments, sequence defaults, SQL arguments, `@data` values, `matchesSchema` paths, and assertion messages while preserving unknown escapes such as `\A` as literal text.
113
- - **Editor assistance with verbatim strings** — diagnostics, inlay hints, and hover providers no longer treat `{{...}}` inside verbatim strings as interpolated Norn variables.
114
- - **Sequence tag diagnostics** — `@smoke`, `@team(...)`, and other sequence tags are recognized by editor diagnostics again instead of being reported as unknown statements.
115
- - **Failure output expected values** — CLI, HTML/JUnit reports, and the response panel now prefer the resolved expected value for failed assertions instead of falling back to the raw expression text.
116
- - **Test Explorer environment resolution** — Test Explorer now uses the only available `.nornenv` environment for isolated single-env fixtures when no active environment has been selected, fixing nested regression cases such as encrypted env imports.
117
-
118
- ### Testing
119
- - **Editor diagnostics automation** — added an Extension Host suite that discovers `tests/EditorDiagnostics/valid` and `tests/EditorDiagnostics/negative`, keeping clean fixtures at zero diagnostics and intentional error fixtures at exact expected counts.
120
- - **Runtime negative automation** — converted former manual runtime error cases into `tests/RuntimeNegative` scenarios that assert CLI exit codes and stable error guidance.
121
- - **Test Explorer automation** — added Extension Host checks for Test Explorer fixture exclusion patterns and single-env `.nornenv` resolution.
122
- - **Pre-release verification** — added `npm run test:prerelease` and updated release verification to run Extension Host automation plus the local CLI Regression suite.
123
- - **Test suite cleanup** — moved reusable `.nornenv` import and contract fixtures into Regression, moved API coverage fixtures into `tests/ApiCoverage`, and removed stale scratch/demo test folders.
124
-
125
- ## [2.4.0] - 2026-05-25
126
-
127
- ### Added
128
- - **Per-folder and persisted active environment** — the active env is now tracked per `.nornenv` file (keyed by absolute path) and persisted to the workspace memento. In monorepos each folder remembers its own selection, and selections survive VS Code restart. The status bar shows the env for the current editor's nearest `.nornenv`. Stale entries (deleted `.nornenv` files) are pruned on load.
129
- - **Region-pattern refactor** — when a `.nornenv` contains a flat `[env:STAGE_REGION]` matrix (e.g. `dev_us`, `dev_uk`, `prod_us`, `prod_uk`), the top of the file shows a "Refactor N envs into S+R templates" CodeLens. Clicking it classifies each variable by axis (stage / region / leaf-specific) and lifts shared values into `[template:STAGE]` + `[template:REGION]` blocks, leaving only true leaf-specific overrides in the env sections. Missing values and `connectionString` declarations stay leaf-specific, per-declaration `secret` keywords are preserved, and the same generator is available in the CLI via `--refactor-region-pattern` / `--write`. The VS Code refactor is one `WorkspaceEdit` so a single Cmd+Z reverses it.
130
-
131
- ## [2.3.0] - 2026-05-20
132
-
133
- ### Added
134
- - **Inlay hints + hover across every Norn file type**:
135
- - `.norn`: every `{{name}}` / `{{$env.name}}` token resolves under the active env, with three-scope precedence — sequence-local `var` declarations ← file-level `var` declarations ← active env's effective vars. Runtime values (`$1.body.x`, `run X()`, request captures) are intentionally not rendered inline; hover narrates them with source line.
136
- - `.nornapi`: every `{{...}}` token in headers groups and endpoint definitions resolves under the active env.
137
- - `.nornsql`: the `connection NAME` line shows the resolved `NAME_connectionString` from `.nornenv` (masked if a `secret connectionString`). Hover narrates the source. Any `{{...}}` in SQL bodies is handled for parity.
138
- - Resolution and reference parsing live in `src/inlayHintResolver.ts` so every provider behaves identically.
139
- - **`.nornenv` Templates And Extends (Extension + CLI)**:
140
- - Added `[template:NAME]` sections and multi-parent template `extends` on `[env:...]` / `[template:...]` headers.
141
- - Resolved env values as `common <- template1 <- template2 <- self`; templates compose into envs but are not selectable in the status bar or CLI `-e`.
142
- - Added `.nornenv` Activate/Deactivate and Peek inherited CodeLens actions, folding ranges, smart header decorations, hover resolution chains, inlay hints for `{{...}}`, and inherited-variable completions.
143
- - Added diagnostics for unknown extends parents, invalid env parents, extends cycles, out-of-scope cross-section references, and typo-like override names.
144
-
145
- ### Fixed
146
- - Endpoint path arguments now keep bare `.nornenv` names as literal path values unless the reference is explicit (`{{name}}` / `{{$env.name}}`), while declared file/sequence variables still resolve in endpoint calls.
147
-
148
- ## [2.2.0] - 2026-05-09
149
-
150
- ### Added
151
- - **Starter Catalogue (VS Code)**:
152
- - Added a Project Setup starter catalogue in the sidebar with a Back button and readable stacked sample titles/descriptions.
153
- - Added Explorer folder context-menu parity for opening the same starter catalogue.
154
- - Added self-contained generated starter folders for simple requests, scripts plus JSON data, a runnable SQL demo, a real SQL connection starter, and an advanced end-to-end flow with `.nornenv`, `.nornapi`, helper sequences, tests, and schema contracts.
155
-
156
- ### Fixed
157
- - **Environment Template Diagnostics (VS Code)**:
158
- - Allowed `.nornenv` variables such as `{{primaryUserId}}` and `{{postTitle}}` in assertion and condition expression contexts when those values are intentionally resolved from the environment file.
159
- - Kept the bare-variable diagnostic for local, file, and sequence variables so runtime values are still read directly in expressions.
160
-
161
- - **Sequence Argument Resolution (Extension + CLI)**:
162
- - Resolved bare variable paths such as `user.id` and array-indexed paths such as `todosResponse.body[0]` before binding `run SomeSequence(...)` parameters.
163
- - Fixed advanced schema-validation flows where unresolved literal argument text could produce empty responses and misleading `matchesSchema` object errors.
164
-
165
- ### Changed
166
- - **Website Docs and Skills**:
167
- - Updated website VS Code docs for the starter catalogue, self-contained samples, SQL starter split, advanced flow, and Explorer context-menu behavior.
168
- - Added starter-catalog maintenance guidance and updated value-resolution guidance for sequence argument binding.
169
-
170
- ## [2.1.0] - 2026-05-08
171
-
172
- ### Improved
173
- - **Contract Validation Results (Extension + CLI)**:
174
- - Replaced raw `matchesSchema` assertion text in CLI, Test Explorer, and Response Panel output with schema names and property/path-level validation counts.
175
- - Added richer Response Panel contract cards with validation pills, validated-property details, concise issue summaries, warning-only styling, and direct `View Contract Details` navigation.
176
- - Added a validated-properties tab and `Back to Results` navigation to Contract Details.
177
-
178
- - **`.nornapi` Authoring (VS Code)**:
179
- - Added diagnostics for unresolved endpoint variables such as `{{baseUrl}}` when the nearest `.nornenv` file does not define them.
180
- - Added active-environment diagnostics for `{{$env.name}}` references in endpoint URLs and header groups.
181
- - Updated `.nornapi` syntax highlighting so `{{...}}` interpolation matches `.norn` coloring while path parameters such as `{id}` stay distinct.
182
-
183
- ### Fixed
184
- - **Response Panel Stability**:
185
- - Fixed contract-result rendering paths that could leave the sequence response panel stuck on the initial spinner or after returning from Contract Details.
186
- - Preserved the completed result header styling when rebuilding result pages for contract navigation.
187
-
188
- - **Contract Validation Noise**:
189
- - Suppressed Ajv warnings for OpenAPI numeric formats such as `int32`, `int64`, `float`, and `double`.
190
- - Cleaned up Contract Details display for root-level and missing-property errors so it no longer shows placeholder paths or fake missing actual values.
191
- - Removed the extension activation debug log from the VS Code debug console.
192
-
193
- ### Changed
194
- - **Website Docs**:
195
- - Updated website documentation and the website `.nornapi` grammar copy for the new contract-result and authoring behavior.
196
-
197
- ## [2.0.1] - 2026-04-30
198
-
199
- ### Changed
200
- - **Norn Icon Refresh**:
201
- - Updated the extension package icon to match the Norn API/network mark used on the website and Activity Bar.
202
- - Replaced the stylized `.norn` file icon with a teal-blue test tube icon.
203
- - Recolored `.nornapi`, `.nornsql`, and `.nornenv` file icons to use the Norn teal-blue brand palette.
204
-
205
- ## [2.0.0] - 2026-04-29
206
-
207
- ### Added
208
- - **SQL Environment Templates (Extension + CLI)**:
209
- - Added `.nornenv` template interpolation for SQL connection/profile values using `{{name}}` and `{{$env.name}}` references.
210
- - Resolved SQL connection templates from the active merged `.nornenv`, including imported files and selected `[env:...]` overrides.
211
- - Added CLI redaction support for resolved secret-derived template values.
212
- - Added regression coverage for imported `.nornenv` template variables and live SQL Server execution.
213
-
214
- ### Improved
215
- - **`.nornenv` Authoring (VS Code)**:
216
- - Added template-variable IntelliSense inside `.nornenv` values, including single-brace completion to `{{name}}`.
217
- - Added syntax highlighting for `{{...}}` template references inside environment values and connection strings.
218
- - Added diagnostics for unsupported, missing, and invalid-scope `.nornenv` template references.
219
-
220
- ### Changed
221
- - **Breaking Config Consolidation**:
222
- - Replaced separate SQL and MCP project config files with a single `norn.config.json` file.
223
- - Moved SQL connection aliases and custom SQL adapters under `sql.connections` and `sql.adapters`.
224
- - Moved MCP server aliases under `mcp.servers` and updated schema-backed IntelliSense for the unified config file.
225
-
226
- ### Fixed
227
- - **SQL Connection Safety**:
228
- - Rejected invalid environment-to-environment SQL connection template references before adapter invocation.
229
- - Masked the SQL environment-template regression fixture output so sample secrets are not printed in CLI logs.
230
-
231
- ## [1.13.1] - 2026-04-28
232
-
233
- ### Improved
234
- - **MCP Tool Discovery Display (VS Code)**:
235
- - Replaced raw JSON rendering for `run mcp list` steps in the response panel with a readable tool directory showing names, descriptions, parameter metadata, required markers, and structured-output badges.
236
- - Kept the underlying captured `tools` value unchanged for assertions, runtime variables, reports, and CLI parity.
237
-
238
- - **Variable IntelliSense (VS Code)**:
239
- - Added sequence-local variables and sequence parameters to `{{...}}` interpolation completions, including single-brace partial typing such as `{s`.
240
- - Added completion fallback for `.nornenv` variable names when no active environment is selected.
241
- - Fixed completion replacement ranges so selected interpolation suggestions apply on the current cursor line.
242
-
243
- ### Fixed
244
- - **Norn API IntelliSense (VS Code)**:
245
- - Fixed `.nornapi` block detection so top-level `headers` suggestions appear after `end endpoints`, while header-name suggestions still work inside `headers ... end headers` blocks.
246
-
247
- ## [1.13.0] - 2026-04-26
248
-
249
- ### Added
250
- - **Cached API Response IntelliSense (VS Code)**:
251
- - Added sampled response-shape caching in `.norn-cache/api-response-intellisense.json` after successful `Send Request` and `Run Sequence` runs.
252
- - Added cached property completions for `$N.body.` and captured response variables such as `user.body.`, including nested object paths.
253
- - Added source-aware and environment-aware response-shape reuse for later body-path authoring in the editor.
254
-
255
- ### Improved
256
- - **Response Authoring and Diagnostics (VS Code)**:
257
- - Improved response-property completions so partial property names filter correctly for captured responses, body paths, and common headers.
258
- - Added undefined-base-variable diagnostics for bare `assert`, `if`, `return`, `print`, and property-assignment expressions without flagging runtime-shaped JSON paths when the base variable exists.
259
- - Added clearer print diagnostics when a plain word is interpreted as an undefined variable instead of a quoted string literal.
260
-
261
- ### Changed
262
- - **Website Docs**:
263
- - Added website docs for cached response-body IntelliSense, cache privacy boundaries, and the VS Code sequence authoring workflow.
264
-
265
- ## [1.12.0] - 2026-04-20
266
-
267
- ### Added
268
- - **MCP Tool Arguments (Extension + CLI)**:
269
- - Added positional MCP tool arguments for `run mcp call <alias> <tool>(...)`, bound in tool-schema order alongside existing named arguments.
270
- - Added schema-aware MCP tool resolution before tool execution so required, duplicate, and unknown parameter checks use the server's declared input schema consistently.
271
- - Added regression coverage for positional and mixed MCP argument calls in both the fake MCP fixtures and the docker-backed MCP regression.
272
-
273
- ### Improved
274
- - **MCP Editor Authoring (VS Code)**:
275
- - Added config-scoped `.norn-cache` persistence for listed MCP tool metadata so tool-name completions and parameter hints work from cached discovery data.
276
- - Added compact MCP parameter hints with schema-backed descriptions for the active parameter and cleaner tool insertion with `()`.
277
- - Suppressed unrelated bare-variable suggestions while typing inside MCP tool argument lists.
278
-
279
- ### Fixed
280
- - **MCP Diagnostics and Fixture Metadata**:
281
- - Fixed diagnostics so positional MCP tool arguments are not treated like duplicate named arguments.
282
- - Enriched the fake MCP regression tool schemas with parameter descriptions so cached hint text stays meaningful during local testing.
283
-
284
- ## [1.11.0] - 2026-04-19
285
-
286
- ### Added
287
- - **Deterministic MCP Tools (Extension + CLI)**:
288
- - Added `norn.mcp.json` project config with nearest-file resolution, stdio and HTTP transports, and shared alias-based runtime behavior.
289
- - Added `run mcp list <alias>` and `run mcp call <alias> <tool>(name: value)` with variable capture support in both VS Code and the CLI.
290
- - Added deterministic MCP session reuse per resolved config file plus alias for the lifetime of a sequence run, including nested and imported sequences.
291
- - Added MCP tool output-schema validation, paginated `tools/list` draining, dedicated CLI/report output, response-panel rendering, and regression fixtures for stdio and HTTP MCP servers.
292
-
293
- ### Improved
294
- - **Project Setup UX (VS Code)**:
295
- - Added `Create SQL starter files` and `Create MCP starter config` commands to the Norn sidebar and Explorer folder context menu.
296
- - Added starter `norn.mcp.json` content with inline `_comment` guidance fields for alias usage, local vs remote servers, and optional config fields.
297
- - Added MCP-specific response panel styling so MCP steps no longer reuse SQL visuals.
298
-
299
- ### Fixed
300
- - **Array Count Path Access**:
301
- - Fixed structured path resolution so array values can be asserted with `.count` consistently across captured variables, response-body paths, and MCP tool lists.
302
-
303
- ### Changed
304
- - **Website Docs**:
305
- - Added MCP documentation to the website, including config setup, `run mcp` usage, CLI parity notes, and VS Code project-setup flows.
306
-
307
- ## [1.10.6] - 2026-03-28
308
-
309
- ### Fixed
310
- - **Structured Variable Storage**:
311
- - Kept structured runtime values as real objects instead of JSON strings so the debugger, assertions, and path access all see the same types.
312
- - Preserved compatibility for existing string-backed values when resolving paths.
313
-
314
- ### Changed
315
- - **Docs**:
316
- - Updated the advanced website docs to note that structured values stay as objects in memory.
317
-
318
- ## [1.10.5] - 2026-03-28
319
-
320
- ### Improved
321
- - **URL-Encoded Request Bodies (Extension + CLI)**:
322
- - Added stricter shared validation for `application/x-www-form-urlencoded` request bodies so malformed lines now fail fast with clear preflight errors in both the editor and CLI.
323
- - Added support for single-line ampersand-delimited form bodies such as `key1=value1&key2=value2`.
324
- - Preserved raw-request header-group workflows by stripping standalone header-group lines from the request body before validation and send.
325
-
326
- ### Fixed
327
- - **Imported Parameterized Sequences**:
328
- - Fixed `.norn` import resolution so imported helper sequences keep their parameter lists and can be invoked correctly from other files.
329
-
330
- - **Form Body Syntax Highlighting**:
331
- - Fixed `.norn` syntax coloring so URL-encoded body lines are highlighted correctly after inline headers in raw request blocks.
332
-
333
- ## [1.10.4] - 2026-03-21
334
-
335
- ### Improved
336
- - **Request Failure Response Panel**:
337
- - Refreshed request-failure views with a clearer error summary, request context bar, structured issue cards, and common-cause guidance.
338
-
339
- ### Changed
340
- - **Regression + Contributor Tooling**:
341
- - Standardized regression test docs and scripts around `node ./dist/cli.js`, added `npm run validate:skills`, and refreshed bundled skill/demo assets.
342
-
343
- ### Fixed
344
- - **SQL Server Live Regression Fixture**:
345
- - Made the SQL Server Docker regression setup safe to rerun during repeated local release verification.
346
-
347
- ## [1.10.2] - 2026-03-15
348
-
349
- ### Fixed
350
- - **Sequence Return + Response Panel UX**:
351
- - Fixed `var result = run SomeSequence` so single-value returns can capture literal values like `return "Bar"` instead of resolving to empty output.
352
- - Fixed streaming/final response panel step timers so print/SQL rows show per-step duration instead of elapsed-from-start totals.
353
- - Fixed the streaming step counter so hidden `wait` steps no longer inflate the top-bar step total.
354
- - Fixed `.norn` syntax highlighting so quoted string literals after `return` use normal string coloring.
355
-
356
- - **Request Parsing + CLI Error Output**:
357
- - Fixed request parsing to stop bodies at the next Norn block boundary, preventing later named requests or sequence declarations from leaking into request bodies.
358
- - Fixed CLI text and HTML reports to preserve multiline request/sequence error details instead of collapsing them into single-line output.
359
-
360
- - **API Coverage + Import UX**:
361
- - Fixed API coverage to follow status assertions on captured request variables and named requests that call `.nornapi` endpoints.
362
- - Fixed the OpenAPI import section picker so selecting `All` stays mutually exclusive with individual section selections.
363
-
364
- ## [1.7.0] - 2026-03-07
365
-
366
- ### Added
367
- - **Explicit Environment Lookup (Extension + CLI)**:
368
- - Added `{{$env.name}}` so tests, sequences, endpoints, header groups, and interpolated strings can read directly from the active environment even when a file variable, local variable, or sequence parameter uses the same name.
369
- - Added IntelliSense for the `$env` namespace and environment variable suggestions after typing `{{$env.`.
370
- - Added diagnostics for invalid `{{$env...}}` references and warnings when local/file/parameter variables shadow environment variables.
371
-
372
- ### Fixed
373
- - **Assertion String Literal Escaping**:
374
- - Fixed escaped quotes in assertion string literals and quoted `var` expressions so values like `\"{orderId}\"` compare correctly instead of failing with visually identical expected/actual output.
375
-
376
- - **Parameterized Test Snippet UX**:
377
- - Updated `@data` completion to insert `data()` with the cursor inside the parentheses instead of placeholder values.
378
-
379
- - **Decorator Syntax Highlighting**:
380
- - Fixed `.norn` syntax coloring so decorator lines such as `@data(...)` keep their highlighting when they follow request blocks like `DELETE ...`.
381
-
382
- ## [1.6.2] - 2026-03-07
383
-
384
- ### Fixed
385
- - **`.nornenv` IntelliSense and Diagnostics**:
386
- - Fixed `[env:` completion in `.nornenv` files so accepting the suggestion after typing `[` no longer inserts `[[env:`.
387
- - Fixed `.nornenv` diagnostics and syntax highlighting so secret names that start with `var` (for example `secret varnaCityApiKey = ...`) are no longer flagged as invalid.
388
-
389
- - **Encrypted Secret UX (Extension + CLI)**:
390
- - Fixed secret-key cache placement so new secret-key caches are created in the project root `.norn-cache` instead of nested folders beside individual `.nornenv` files.
391
- - Reused an existing secret-key cache when one is already present in the project, avoiding duplicate `.norn-cache` folders.
392
- - Fixed Windows CRLF handling for `.nornenv` secret parsing so the `Encrypt Secret` CodeLens remains available reliably on Windows and secret rewrites preserve the file's original line endings.
393
-
394
- ## [1.6.1] - 2026-03-04
395
-
396
- ### Fixed
397
- - **Parameterized Debug Launch (VS Code)**:
398
- - Fixed `Debug Sequence` launch from editor/CodeLens so `@data` / `@theory` case arguments are passed into the debug session.
399
- - Added case selection prompt when multiple parameterized cases exist, so a single concrete case is debugged without unresolved placeholders.
400
-
401
- - **CLI `--sequence` Parameterized Execution**:
402
- - Fixed `node ./dist/cli.js <file> -s <sequence>` to execute `@data` / `@theory` cases (instead of ignoring case args and failing on unresolved variables).
403
- - Aligned `--sequence` behavior with full test execution mode for parameterized sequences.
404
-
405
- ## [1.6.0] - 2026-03-04
406
-
407
- ### Added
408
- - **Native VS Code Debugger for `.norn` Sequences (v1)**:
409
- - Added Debug Adapter Protocol integration for debug type `norn`.
410
- - Added line breakpoints in `.norn` files, including imported sequence sources.
411
- - Added stepping controls: continue, pause, step over, step into sequence calls, step out, and stop.
412
- - Added debugger variable scopes for runtime variables and response history (`$1`, `$2`, ...).
413
- - Added launch support via `launch.json` with `file`, `sequence`, optional `env`, and `stopOnEntry`.
414
-
415
- - **Debugger Entry Points**:
416
- - Added `Debug Sequence` command (`norn.debugSequence`).
417
- - Added `▷ Debug Sequence` CodeLens on runnable sequences.
418
- - Added Testing sidebar `Debug Tests` profile (single-target debug in v1).
419
-
420
- ### Improved
421
- - **Debugger Runtime Behavior**:
422
- - Added breakpoint line verification/auto-adjust to nearest executable step in the same sequence.
423
- - Added failure-stop behavior for request/assertion failures before session termination.
424
- - Added source/line mapping across root and imported sequence files for call stack and stepping.
425
- - Added smart launch default for `stopOnEntry` in command/test-driven debug starts (disabled when breakpoints already exist).
426
-
427
- - **Documentation and Skills**:
428
- - Added README debugger usage and `launch.json` example.
429
- - Added debugger integration skill docs under `.github/skills/norn-debugger-integration`.
430
- - Documented debugger as a VS Code-only v1 exception to CLI feature parity policy.
431
-
432
- ## [1.5.4] - 2026-03-02
433
-
434
- ### Improved
435
- - **Norn Cache Git Ignore Behavior**:
436
- - Stopped modifying the repository root `.gitignore` when secret keys are cached.
437
- - Added local cache-level ignore behavior by writing `.norn-cache/.gitignore` with `*`.
438
- - Keeps `.norn-cache` contents out of Git without mutating user-managed root ignore files.
439
-
440
- ## [1.5.3] - 2026-03-02
441
-
442
- ### Added
443
- - **Native Encrypted `.nornenv` Secrets (Extension + CLI)**:
444
- - Added encrypted secret format support: `secret name = ENC[NORN_AGE_V1:kid=<id>:<payload>]`.
445
- - Added automatic secret decryption during environment resolution for both VS Code execution and CLI runs.
446
- - Added `norn secrets` command group: `keygen`, `import-key`, `encrypt`, `rotate`, `rekey`, `audit`, `keys`, `forget`.
447
- - Added `.nornenv` CodeLens actions: `Encrypt Secret`, `View Decrypted`, `Rotate Secret`, `Delete Secret`.
448
- - Added encrypted environment regression coverage with chained `.nornenv` imports.
449
-
450
- - **TLS Certificate Verification Toggle (Extension + CLI)**:
451
- - Added VS Code setting `norn.security.verifyTlsCertificates` (default `true`) to control TLS certificate verification for HTTPS requests and Swagger/OpenAPI fetches.
452
- - Added CLI flag `--insecure` to disable TLS certificate verification for local/self-signed development environments.
453
- - Wired shared runtime TLS behavior so extension request execution, CLI execution, Swagger imports, schema extraction, coverage refresh, and chat Swagger fetches use the same verification mode.
454
-
455
- ### Improved
456
- - **Secrets UX and Safety**:
457
- - Added known `kid` picker so users can select previously used key IDs instead of typing each time.
458
- - Added first-time encryption flow to generate a new shared key once (or use an existing key from vault), then cache locally.
459
- - Improved decrypted secret display to a secure modal flow with masked preview, explicit reveal, and copy action (no plaintext editor tab).
460
- - Added best-effort auto-ignore for `.norn-cache/` in repo `.gitignore` when secret keys are first cached.
461
-
462
- ## [1.5.2] - 2026-02-28
463
-
464
- ### Improved
465
- - **Premium Aurora UI Design**:
466
- - Updated Home sidebar with aurora gradient welcome card, styled file type pills, and resource links.
467
- - Updated response panels with aurora-styled headers, status badges, and tabbed navigation.
468
- - Updated assertion failure details with gradient backgrounds and styled error highlighting.
469
- - Updated API Coverage panel with gradient headers, progress bars, and styled endpoint sections.
470
- - Updated Contract Report panel with gradient summary cards and styled issue lists.
471
- - Added consistent 3D-style colored icons for print, script, timer, and sequence group steps.
472
-
473
- ## [1.5.1] - 2026-02-28
474
-
475
- ### Improved
476
- - **Path IntelliSense (Import + Scripts)**:
477
- - Added relative path completions for `import` statements and script commands (`run bash`, `run powershell`, `run js`, `run readJson`) in `.norn` files.
478
- - Suggestions now resolve from the active file directory and continue navigation on `/`.
479
- - File suggestions prioritize relevant extensions by context (for example `.norn`/`.nornapi` for imports, `.ps1` for PowerShell, `.js` for JS).
480
-
481
- - **.nornenv IntelliSense**:
482
- - Added relative import path IntelliSense in `.nornenv` files.
483
- - `.nornenv` is now visible in path suggestions by default, even when hidden files are not explicitly prefixed.
484
-
485
- - **Suggestion Icon Consistency**:
486
- - Path completion entries now consistently use file/folder icons in suggest lists to avoid iconless entries.
487
-
488
- ## [1.5.0] - 2026-02-26
489
-
490
- ### Added
491
- - **Postman Import (VS Code, v1)**:
492
- - Added a new `Norn` Activity Bar sidebar entry with `Postman Imports` actions for collection and environment JSON imports.
493
- - Added a review-before-write import wizard flow (`Select -> Review -> Result`) for safer migration into Norn files.
494
- - Added Postman import generation for `.nornapi`, `.norn`, and `.nornenv` outputs with warnings/blockers surfaced before writes.
495
- - Added Postman import test fixtures under `tests/PostmanImport/`.
496
-
497
- ### Improved
498
- - **Postman Import Conversion Output**:
499
- - Collection-level Postman variables now generate into top-level global entries in `.nornenv` instead of being duplicated in each `.norn` file.
500
- - Path/query placeholders are converted into endpoint parameters while base URL placeholders remain environment-driven variables.
501
- - Environment imports now append into an existing `.nornenv` (with warnings for duplicate env names) instead of blocking import.
502
-
503
- ## [1.4.5] - 2026-02-24
504
-
505
- ### Fixed
506
- - **Diagnostics False Positive (JSON Property Assignment)**:
507
- - Fixed editor squiggles on valid JSON property assignments with array indexing, for example `config.users[0].name = "Updated Alice"`.
508
-
509
- ## [1.4.4] - 2026-02-24
510
-
511
- ### Improved
512
- - **Error UX (Extension + CLI)**:
513
- - Added structured, more actionable request/sequence error messages with environment-aware hints.
514
- - Improved preflight validation so unresolved variables and invalid URLs are caught before request execution.
515
- - Standardized error formatting across extension response panel and CLI output.
516
-
517
- - **Response Panel Error Readability**:
518
- - Sequence errors/warnings now render as timeline entries (same visual style as execution steps) and appear at the end of the run.
519
- - Error details are grouped into clearer sections with primary fields surfaced first.
520
-
521
- - **Diagnostics Coverage and Persistence**:
522
- - Expanded `.norn` editor diagnostics for malformed statements and invalid command combinations.
523
- - Added workspace-wide diagnostic refresh so Explorer error badges persist after files are closed.
524
-
525
- ### Fixed
526
- - **Diagnostics False Positives**:
527
- - Fixed false squiggles for valid request body variable lines (for example `payload` used as a request body).
528
- - Fixed false squiggles for endpoint calls with parameters (for example `GET MultiParam(hello, world)` and named args).
529
- - Fixed false squiggles for commented-out empty variable references (`{{}}`) in comment lines.
530
-
531
- - **Preflight Validation Regression**:
532
- - Fixed request preflight validation incorrectly blocking some `GET`/`HEAD` requests due to unresolved placeholders detected in parsed body content.
533
-
534
- ## [1.4.3] - 2026-02-22
535
-
536
- ### Improved
537
- - **@norn Chat Context Efficiency**:
538
- - Chat participant now sends heavyweight grounding context only on the first turn of a conversation.
539
- - Follow-up turns reuse conversation history without re-injecting full system prompt and active-file payload each message.
540
- - Reduces token usage and improves chat responsiveness in multi-turn sessions.
541
-
542
- ## [1.4.2] - 2026-02-21
543
-
544
- ### Fixed
545
- - **API Coverage (Template Path Segments)**:
546
- - Fixed endpoint path normalization for coverage when `.nornapi` endpoint URLs contain multiple leading template variables, e.g. `{{baseUrl}}/{{version}}/pet/{petId}`.
547
- - Prevents false 0% coverage in workspace samples where endpoint URLs are composed from `baseUrl` + `version` path segments.
548
-
549
- ### Added
550
- - **Regression Fixture (Coverage Scope)**:
551
- - Added `tests/ApiCoverage/coverage-scope/template-version.nornapi` and `tests/ApiCoverage/coverage-scope/template-version-covered.norn` to lock in template-path coverage behavior.
552
-
553
- ## [1.4.1] - 2026-02-21
554
-
555
- ### Changed
556
- - Updated logo icon
557
-
558
- ## [1.4.0] - 2026-02-21
559
-
560
- ### Added
561
- - **@norn Copilot Chat Participant**:
562
- - New `@norn` chat participant for GitHub Copilot Chat integration.
563
- - Slash commands: `/generate` (create Norn requests/sequences), `/explain` (understand existing code), `/convert` (cURL/HTTP to Norn).
564
- - Inline LLM tools for file editing, workspace reading, Swagger parsing, diagnostics inspection, and test execution.
565
- - `norn_runTest` tool allows the AI to run test sequences and report results directly in chat.
566
- - `norn_applyEdit` and `norn_createFile` tools let the AI modify or create `.norn`, `.nornapi`, and `.nornenv` files.
567
- - `norn_readSwagger` tool parses OpenAPI specs to help generate tests for APIs.
568
- - `norn_getDiagnostics` tool inspects current errors/warnings in Norn files.
569
- - Comprehensive system prompt teaches the AI the full Norn language specification.
570
- - Gracefully skipped when GitHub Copilot is not installed.
571
-
572
- ### Improved
573
- - **Test Execution (Chat Tools)**:
574
- - Environment resolution for `norn_runTest` now auto-selects the first available environment when none is active.
575
- - Test results in chat now display the environment used and available alternatives.
576
- - Clear error messages when environment-specific variables fail to resolve.
577
-
578
- ### Fixed
579
- - **Chat Participant Robustness**:
580
- - Added cancellation token checks to prevent runaway tool-calling loops.
581
- - Ambiguous `searchText` in `norn_applyEdit` replace action now returns an error instead of silently replacing the first match.
582
- - Glob pattern normalization in `norn_readWorkspaceFile` prevents double `**/` prefixes.
583
-
584
- ## [1.3.21] - 2026-02-17
585
-
586
- ### Fixed
587
- - **API Coverage Scope (Swagger CodeLens/Panel)**:
588
- - Coverage for a `.nornapi` file now only includes `.norn` tests in that file's directory and descendants.
589
- - Parent/sibling directories are no longer counted when opening coverage from a specific `.nornapi` file.
590
- - `run SequenceName` resolution for coverage is now scoped by directory tree to avoid cross-folder name collisions.
591
- - **Endpoint Path Mapping for Coverage**:
592
- - Fixed coverage endpoint mapping when `.nornapi` endpoints use variable-prefixed URLs such as `{{baseUrl}}/path`.
593
- - This prevents false 0% coverage in isolated folder setups.
594
- - **Coverage UI Accuracy**:
595
- - Swagger coverage CodeLens now shows a stable `Show Coverage` action instead of stale global percentages.
596
- - Coverage status bar now behaves as a context-aware action button and no longer shows drifting percentage values.
597
- - Status bar click target now follows the active `.nornapi` editor context.
598
- - **Diagnostics – Invalid JSON Body Shape**:
599
- - Added `.norn` diagnostic for JSON-like request body properties missing surrounding `{ }` in `POST`/`PUT`/`PATCH` requests.
600
- - Example now flagged: property lines like `"username": "value"` directly under a request without an object wrapper.
601
- - Diagnostic correctly skips form-style bodies when `Content-Type` is `application/x-www-form-urlencoded` or `multipart/form-data` (inline header or header group).
602
-
603
- ## [1.3.20] - 2026-02-15
604
-
605
- ### Fixed
606
- - **API Coverage (Run Sequences)**:
607
- - Status assertions written after `run` calls are now applied to the returned request from the called sequence.
608
- - Coverage now correctly reflects patterns like `var user = run GetUser` followed by `assert user.status == 200`.
609
- - **Coverage Assertion Scanning**:
610
- - Improved scan boundaries so assertions do not leak across `var ... = run ...` step boundaries.
611
- - **Compile Compatibility (Node 16)**:
612
- - Added compatibility shims in ESLint config for `structuredClone` and `AbortSignal.throwIfAborted` so `npm run compile` succeeds on older Node runtimes.
613
-
614
- ## [1.3.19] - 2026-02-15
615
-
616
- ### Added
617
- - **Swagger Request Body IntelliSense (Endpoint Calls)**:
618
- - Added request body template insertion for `POST`/`PUT`/`PATCH` endpoint calls backed by Swagger metadata.
619
- - Added inline JSON key suggestions inside request bodies using cached Swagger request schemas.
620
- - Added persistent request-schema cache in `.norn-cache/swagger-body-intellisense.json`.
621
-
622
- ### Improved
623
- - **Swagger Schema Cache Availability**:
624
- - Extension now warms request-body schema cache from `.nornapi` `swagger` URLs on startup and on `.nornapi` save.
625
-
626
- ### Fixed
627
- - **Request Body Completions**:
628
- - Fixed endpoint-to-swagger path mapping when endpoint URLs use variable prefixes like `{{baseUrl}}/...`.
629
- - Fixed body-start completion filtering so template suggestions appear reliably when typing `{` / `[`.
630
- - Fixed template insertion indentation and fallback behavior when schema has no required fields.
631
-
632
- ## [1.3.18] - 2026-02-15
633
-
634
- ### Improved
635
- - **Environment Resolution (Extension + CLI)**: `.nornenv` resolution is now file-aware and uses the closest ancestor file.
636
- - VS Code execution paths now resolve env variables from the current document path.
637
- - CLI directory runs now resolve environments per test file path (including nested folders).
638
- - CodeLens and environment status now reflect the active editor/file context.
639
-
640
- ### Fixed
641
- - **IntelliSense in Request Bodies**:
642
- - Header completions are suppressed when starting JSON body lines (`{` or `[`).
643
- - Header suggestions remain available for non-body lines, including raw URL requests (e.g., `POST "https://..."`).
644
- - **Syntax Highlighting**:
645
- - Fixed header coloring after endpoint calls where header-group token matching could break on `Content-Type`.
646
- - Improved assert string highlighting with variable interpolation inside quoted strings.
647
-
648
- ### Added
649
- - **Regression Coverage**:
650
- - Added env-resolution regression tests for parent vs nested `.nornenv` precedence.
651
-
652
- ## [1.3.17] - 2026-02-14
653
-
654
- ### Fixed
655
- - **Import Resolution**: Improved duplicate import handling while preserving circular import detection
656
- - Re-importing already loaded files is now treated as a no-op instead of a false circular error
657
- - True cycles are still detected via active import stack tracking
658
- - **Sequence Var-Request Parsing**: Fixed multi-line `var x = METHOD ...` request collection
659
- - Headers and JSON/form bodies are now preserved until the next real command boundary
660
- - Body-only shorthand continues to parse correctly
661
- - **Syntax Highlighting**: Improved `var` request URL/header/body highlighting in `.norn` files
662
- - Better distinction between endpoint captures and raw URL captures
663
- - Header groups and body lines now color consistently in URL-style var requests
664
-
665
- ## [1.3.16] - 2026-02-13
666
-
667
- ### Fixed
668
- - **IntelliSense**: Additional completion fixes and reliability improvements
669
-
670
- ## [1.3.15] - 2026-02-13
671
-
672
- ### Fixed
673
- - **IntelliSense**: Applied fixes to improve completion reliability and keyword suggestions
674
- - **Regression Stability**: Updated Petstore contract schema for `findByStatus` to handle responses where `photoUrls` may be omitted
675
-
676
- ## [1.3.14] - 2026-02-12
677
-
678
- ### Fixed
679
- - **Assertion Equality for Objects/Arrays**: `==` and `!=` now perform deep structural comparison for objects and arrays
680
- - `assert $1.body.args == {}` now correctly passes for empty-object payloads
681
- - Scalar comparisons retain existing coercion behavior
682
- - **Regression Stability**: Updated empty-literals regression coverage for current `httpbin` behavior
683
- - `files` in `GET /get` may be omitted, so the test now asserts `!exists`
684
-
685
- ## [1.3.13] - 2026-02-10
686
-
687
- ### Fixed
688
- - **Script Variable Resolution**: Fixed `print` showing raw command text instead of script output
689
- - `extractVariables` now skips runtime-computed values (`var x = run ...`, `var x = $1...`, `var x = METHOD url`)
690
- - Variables are only pre-populated for static assignments, not scripts/captures
691
- - **Test Explorer Script Paths**: Fixed script path resolution when running tests through Test Explorer
692
- - Scripts in imported sequences now resolve relative to the imported file, not the importing file
693
- - Added `sequenceSources` parameter to Test Explorer execution path
694
-
695
- ## [1.3.12] - 2026-02-10
696
-
697
- ### Fixed
698
- - **Variable Request with Form Body**: Fixed `var x = POST EndpointName HeaderGroup` not passing URL-encoded body
699
- - Body lines following the var request command are now correctly collected and sent
700
- - Example: `var result = POST PostFormData FormData` followed by `key=value` lines now works
701
-
702
- ## [1.3.11] - 2026-02-09
703
-
704
- ### Fixed
705
- - **Syntax Highlighting**: Fixed header value colors in sequences
706
- - `Content-Type: application/json` now correctly colors the entire value
707
- - `/json` part no longer incorrectly highlighted as URL
708
- - **Syntax Highlighting**: Fixed numbers in variable names being highlighted separately
709
- - `item3.status` now shows as single variable color instead of `item` + `3` in different colors
710
- - Added proper variable pattern matching in assert statements
711
-
712
- ## [1.3.10] - 2026-02-09
713
-
714
- ### Fixed
715
- - **Type Preservation in Property Assignments**: Bare variables now preserve their original type
716
- - `payload.userId = myNumericVar` keeps the number type instead of converting to string
717
- - Script outputs that are valid JSON (numbers, booleans, objects) are now properly typed
718
- - Use `payload.field = "{{var}}"` to force string type when needed
719
-
720
- ## [1.3.9] - 2026-02-09
721
-
722
- ### Added
723
- - **`pwsh` Script Type**: Added `pwsh` as an alias for `powershell` in script commands
724
- - `var x = run pwsh "./script.ps1"` now works alongside `run powershell`
725
- - **Bare Variable Support in Property Assignments**: Variables can be assigned without `{{}}` syntax
726
- - `payload.userId = dynamicUserId` now works (previously required `{{dynamicUserId}}`)
727
- - **Request Body in Verbose Output**: CLI `-v` flag now shows the actual request body and headers sent
728
- - Helps debug payload issues by showing exactly what was transmitted
729
-
730
- ### Fixed
731
- - **Script Output Capture**: Fixed variable shadowing bug that could affect JSON parsing of script output
732
-
733
- ## [1.3.8] - 2026-02-09
734
-
735
- ### Fixed
736
- - **Named Requests with Endpoint Syntax**: Fixed `run RequestName` failing when the named request uses `.nornapi` endpoint syntax
737
- - `[PostFormWithEndpoint]` with `POST HttpBinPost Form` now works correctly when invoked via `run PostFormWithEndpoint`
738
- - Endpoint is resolved and headers/body are properly applied
739
-
740
- ## [1.3.7] - 2026-02-09
741
-
742
- ### Fixed
743
- - **Named Requests with Header Groups**: Fixed `run RequestName` failing when the named request uses header groups
744
- - `run GetWithJsonHeader` now correctly applies the `Json` header group instead of appending it to the URL
745
- - Regression from 1.3.4 header groups fix
746
-
747
- ## [1.3.6] - 2026-02-09
748
-
749
- ### Added
750
- - **Empty Array and Object Assertions**: Support for asserting against empty literals
751
- - `assert $1.body.items == []` now works for empty array comparison
752
- - `assert $1.body.data == {}` now works for empty object comparison
753
-
754
- ## [1.3.5] - 2026-02-09
755
-
756
- ### Fixed
757
- - **Endpoint Syntax Body Extraction**: Fixed form body not being sent with named requests using endpoint syntax
758
- - `[PostFormWithEndpoint]` followed by `POST HttpBinPost Form` and body lines now works correctly
759
- - Applies to standalone named requests (outside sequences) using `.nornapi` endpoints
760
- - **Header Group Syntax Highlighting**: Fixed header group not showing green when on same line as URL
761
- - `POST {{url}}/post Form` now correctly colors `Form` as header group
762
-
763
- ## [1.3.4] - 2026-02-09
764
-
765
- ### Fixed
766
- - **Header Groups with Raw URLs**: Header groups now work with regular URL requests, not just endpoint syntax
767
- - `GET https://example.com/api Json` now correctly applies the Json header group
768
- - Header groups on separate lines after URL also work
769
- - Both extension and CLI support this fix
770
- - Named requests (`[RequestName]`) also support header groups with raw URLs
771
- - **CLI Named Requests with Endpoints**: Fixed body not being sent when using endpoint syntax
772
- - `POST HttpBinPost Form` with body lines now correctly sends the form data
773
- - **Syntax Highlighting for Form Parameters**: Added proper coloring for URL-encoded form body parameters
774
- - `firstname=Alice` now shows key as parameter (purple), `=` as operator, value as string
775
-
776
- ## [1.3.3] - 2026-02-08
777
-
778
- ### Fixed
779
- - **Contract View Panel**: Fixed webview rendering issue that showed raw JavaScript code
780
- - Removed embedded script tags that broke HTML parsing
781
- - "View Contract Details" button now works correctly
782
- - **Contract View Styling**: Unified appearance with Contract Report
783
- - Response JSON now has proper syntax highlighting (colored keys, strings, numbers)
784
- - Schema JSON has consistent styling without background highlight artifacts
785
- - **Gutter Decorations**: Removed contract gutter icons and line highlights for cleaner editor appearance
786
-
787
- ## [1.3.2] - 2026-02-08
788
-
789
- ### Improved
790
- - **Contract Report View**: Enhanced property highlighting in the annotated JSON view
791
- - Color-coded property highlights (green=valid, yellow=warning, red=error)
792
- - Highlights wrap only the property content, not the entire line
793
- - Selection-style highlighting similar to assert hover
794
- - Improved indentation and spacing
795
-
796
- ### Fixed
797
- - **Syntax Highlighting**: Fixed JSON body coloring after nested objects
798
- - Properties following `{ }` objects now correctly colored
799
- - **matchesSchema Keyword**: Fixed partial coloring issue
800
- - Entire keyword now highlights as operator (was matching "matches" first)
801
-
802
- ## [1.3.1] - 2026-02-08
803
-
804
- - **Clickable JSON Properties**: Click any JSON value in the response panel to generate an assertion
805
- - Hover over any value (string, number, boolean, null) to highlight it
806
- - Click to automatically insert `assert $var.body.path == value` at the end of the sequence
807
- - Works with nested objects and arrays (e.g., `body.user.address.city`, `body.items[0].name`)
808
- - String values are properly escaped with quotes
809
- - Toast notification confirms assertion added
810
-
811
- - **Response Comparison**: Compare any two API responses with VS Code's built-in diff view
812
- - New "⇄ Compare" button next to "📋 Copy" on response bodies
813
- - Click on first response, then click another to open side-by-side diff
814
- - Responses are pretty-printed JSON for easy comparison
815
- - Toast notification guides user: "Select another response to compare"
816
- - Works in both sequence results and single request views
817
- - State resets automatically after diff opens
818
-
819
- ## [1.3.0] - 2026-02-07
820
-
821
- ### Added- **Retry and Backoff**: Automatically retry failed HTTP requests with configurable backoff
822
- - Syntax: `GET url retry 3 backoff 200 ms` (retry up to 3 times with 200ms linear backoff)
823
- - Works with direct URLs, named endpoints, and named requests
824
- - Supports time units: `ms`, `s`, `seconds`, `milliseconds`
825
- - Response panel shows retry indicator: 🔄 `retried 2x`
826
- - CLI shows retry attempts in real-time
827
- - Retries on 5xx errors, 429 rate limiting, and network failures
828
-
829
- ### Improved
830
- - **Syntax highlighting**: Variable references `{{var}}` now highlighted inside print strings
831
- - **Better pattern recognition**: `test sequence` correctly terminates request blocks in all contexts
832
-
833
- ## [1.2.5] - 2026-02-07
834
-
835
- ### Improved
836
- - **Rich HTML Reports**: Completely redesigned HTML report output for QA professionals
837
- - **Pass rate badge**: Large visual indicator showing pass percentage (green/yellow/red)
838
- - **Filter bar**: Search tests by name, filter by All/Passed/Failed
839
- - **Clickable stat cards**: Click total/passed/failed to filter results
840
- - **Expand/Collapse All**: Buttons to quickly expand or collapse all test details
841
- - **Failures first**: Failed tests automatically sorted to top and expanded
842
- - **Friendly assertion names**: Shows `user.body.status` instead of `$1.body.status`
843
- - **JSON path context**: Failed assertions show the path that failed
844
- - **Variable labels on requests**: Shows `user = GET /api/users` instead of `$1`
845
- - **Environment display**: Shows which environment was used in report header
846
-
847
- ## [1.2.4] - 2026-02-07
848
-
849
- ### Improved
850
- - **Enhanced failure experience**: Failed assertions now display much richer context
851
- - **Friendly variable names**: Shows `user.body.status` instead of `$1.body.status` when response was assigned to a variable
852
- - **Auto-expand failures**: Failed assertions automatically expand to show details
853
- - **Inline response preview**: Failed assertions include a collapsible preview of the related response body
854
- - **JSON path highlighting**: The failing field is highlighted in the response preview
855
- - **Request labels**: Request steps in sequences show variable names (e.g., `user`) instead of `$1`
856
- - Same improvements apply to CLI output and Test Explorer
857
-
858
- ## [1.2.3] - 2026-02-07
859
-
860
- ### Added
861
- - **Duplicate import detection**: Errors shown when importing files with duplicate definitions
862
- - Header groups and endpoints from `.nornapi` files
863
- - Named requests and sequences from `.norn` files
864
- - Blocks execution in CLI, VS Code, and Test Explorer
865
- - Red squiggly on import line with descriptive error message
866
-
867
- ### Fixed
868
- - **.nornenv validation**: `secret var = value` now shows error (use `secret name = value` instead)
869
- - Syntax highlighting marks invalid pattern in red
870
- - Diagnostic message explains correct usage
871
- - **IntelliSense context**: Script types (`bash`, `powershell`, `js`, `readJson`) only appear after `run` keyword
872
- - **var keyword highlighting**: `var` keyword stays colored while typing variable name
873
-
874
- ## [1.2.2] - 2026-02-05
875
-
876
- ### Added
877
- - **Coverage for sub-sequences**: Coverage now follows `run SequenceName` calls to track API calls in nested sequences
878
- - **Coverage for named request blocks**: Named request blocks (`[RequestName]`) with hardcoded URLs are now matched to swagger endpoints by URL path
879
- - **Auto-refresh coverage on save**: Coverage panel updates automatically when `.norn` or `.nornapi` files are saved
880
-
881
- ### Improved
882
- - **IntelliSense for .nornapi files**: Content-Type header completions now work in `.nornapi` files (previously only worked in `.norn`)
883
-
884
- ## [1.2.1] - 2026-02-03
885
-
886
- ### Added
887
- - **Inline headers for API endpoints**: Stack custom headers below endpoint calls from `.nornapi` files
888
- - Example: `GET Login` followed by `x-api-key: "my-key"` on the next line
889
- - Mix inline headers with header groups (e.g., `Common`)
890
- - Inline headers take precedence over header group values
891
- - Syntax highlighting for inline headers after API endpoint calls
892
-
893
- ### Improved
894
- - **IntelliSense for header values**: After selecting `Content-Type`, IntelliSense automatically triggers to show content type options (`application/json`, etc.)
895
- - **Removed snippet tab stops**: Header completions no longer leave you in snippet mode requiring Tab to exit
896
- - **Better trigger characters**: Added `:` as trigger character for immediate header value suggestions
897
-
898
- ## [1.2.0] - 2026-02-02
899
-
900
- ### Added
901
- - **Swagger API Coverage**: See percentage coverage of your OpenAPI/Swagger endpoints
902
- - Status bar indicator shows coverage percentage when swagger specs are detected
903
- - Click to open detailed coverage panel with per-endpoint breakdown
904
- - Coverage tracks asserted status codes (200, 400, 404, etc.) per endpoint
905
- - Supports wildcard matching (2xx, 4xx, 5xx)
906
- - Only counts `test sequence` blocks toward coverage
907
- - CodeLens on swagger lines shows coverage at a glance
908
- - Automatic recalculation after test execution
909
- - Caches swagger specs for performance
910
-
911
- ## [1.1.4] - 2026-02-02
912
-
913
- ### Fixed
914
- - **Inline comments**: Fixed syntax highlighting and execution for inline comments
915
- - **URL highlighting**: URLs now colored as strings with variable interpolation support
916
- - **Duplicate detection**: Diagnostics for duplicate variables, named requests, and sequences
917
-
918
- ## [1.1.3] - 2026-02-01
919
-
920
- ### Fixed
921
- - **@data shorthand for single parameter**: `@data(1, 2, 3)` with a single parameter now correctly creates 3 test cases instead of 1 case with 3 values
922
- - Example: `@data(1, 2, 3) test sequence Foo(id)` now runs 3 times with `id=1`, `id=2`, `id=3`
923
- - Multi-parameter syntax unchanged: `@data(1, "a")` per line for each test case
924
-
925
- ## [1.1.2] - 2026-02-01
926
-
927
- ### Added
928
- - **VS Code Test Explorer Integration**: Run test sequences from the Testing sidebar
929
- - Automatic test discovery for all `.norn` files
930
- - Tests grouped by tag (`@smoke`, `@regression`, etc.)
931
- - Colorful streaming output with ANSI colors
932
- - Persistent output when selecting tests
933
- - Detailed failure info with expected vs actual diffs
934
- - Request/response details for failed HTTP calls
935
-
936
- - **Parameterized Tests**: Data-driven testing with `@data` and `@theory` annotations
937
- - `@data(1, "Widget")` syntax for inline test data
938
- - `@theory("./testdata.json")` for external data files
939
- - Typed value parsing (numbers, booleans, strings)
940
- - Each data row creates a separate test case in Test Explorer
941
- - Example: `@data(1, 200)` with `test sequence ValidateStatus(id, expectedStatus)`
942
-
943
- - **Test Sequence Validation**: Diagnostics for test annotations
944
- - Error if `@data`/`@theory` used on regular sequences (must use `test sequence`)
945
- - Error if tags like `@smoke` used on regular sequences
946
- - Error if test sequence has required params but no `@data`/`@theory`
947
-
948
- ### Improved
949
- - **Test Explorer Output**: Rich colorized output with icons
950
- - HTTP methods in cyan, status codes color-coded (green/red/yellow)
951
- - Checkmarks for passed assertions, X for failures
952
- - Clear test headers when running multiple tests
953
- - Duration shown for each test
954
-
955
- ## [1.1.0] - 2026-02-01
956
-
957
- ### Added
958
- - **Test Sequences**: Mark sequences as tests with `test sequence Name` syntax
959
- - Only `test sequence` blocks run from CLI; plain `sequence` blocks are helpers
960
- - Use helpers for shared setup/utility sequences called by tests
961
- - Example: `test sequence AuthFlow` runs from CLI, `sequence SetupUser` is a helper
962
-
963
- - **Directory Discovery**: Run all test sequences in a directory tree
964
- - `npx norn tests/` recursively finds and runs all `.norn` files
965
- - Aggregates results across all files with combined summary
966
- - Only `test sequence` blocks are executed
967
-
968
- - **Output Directory**: Save reports to a custom location with timestamped filenames
969
- - `--output-dir ./reports` saves results to specified directory
970
- - Auto-generates timestamped filenames: `tests-2026-02-01-120000-results.xml`
971
- - Works with `--junit` and `--html` reporters
972
-
973
- - **Secret Variables**: Mark sensitive environment variables with `secret` keyword
974
- - Syntax: `secret apiKey = my-secret-key` in `.nornenv` files
975
- - Values automatically redacted as `***` in all CLI output
976
- - Prevents accidental exposure of tokens, passwords, API keys
977
-
978
- - **Human-Readable CLI Output**: Colorized, formatted output for terminal
979
- - Pass/fail indicators with colors and Unicode symbols
980
- - Assertion results with expected vs actual values
981
- - Request/response details in verbose mode
982
-
983
- - **JUnit Reporter**: Generate XML reports for CI/CD pipelines
984
- - `--junit` flag outputs JUnit-compatible XML
985
- - Compatible with GitHub Actions, Jenkins, Azure DevOps
986
- - Includes test names, durations, failure messages
987
-
988
- - **HTML Reporter**: Generate visual HTML reports
989
- - `--html` flag outputs styled HTML report
990
- - Expandable sections for requests, responses, assertions
991
- - Easy sharing and archiving of test results
992
-
993
- ### Fixed
994
- - **Print Statement Variable Resolution**: `{{$1.status}}` now resolves correctly in print statements
995
- - Response references (`$1`, `$2`, etc.) are now stored in runtime variables
996
- - Works in both print statements and variable assignments
997
-
998
- ## [1.0.26] - 2026-01-31
999
-
1000
- ### Added
1001
- - **Sequence Tags**: Tag sequences with `@smoke`, `@team(CustomerExp)` for filtering in CI/CD
1002
- - Simple tags: `@smoke @regression` before `sequence` declaration
1003
- - Key-value tags: `@team(CustomerExp)`, `@priority(high)`, `@jira(NORN-123)`
1004
- - Multiple tags on same line or separate lines
1005
- - Case-insensitive tag matching
1006
-
1007
- - **CLI Tag Filtering**: Filter sequences by tags when running from command line
1008
- - `--tag smoke` - AND logic (can repeat: `--tag smoke --tag auth`)
1009
- - `--tags smoke,regression` - OR logic (comma-separated)
1010
- - Key-value matching: `--tag team(CustomerExp)`
1011
- - Nested sequences silently skipped when tag filter is active and they don't match
1012
-
1013
- - **Tag IntelliSense**: Type `@` to see existing tags from workspace
1014
- - Auto-completes simple tags and key-value tags
1015
- - Suggests common tags: `smoke`, `regression`, `wip`, `skip`, `team`, `priority`
1016
-
1017
- - **Tag Diagnostics**: Warning when tags are placed incorrectly (not before `sequence`)
1018
-
1019
- ### Changed
1020
- - **Regression Test Filtering**: Regression CLI runs support `--tag` and `--tags` options
1021
- - Example: `node ./dist/cli.js tests/Regression/ --env prelive --tag smoke` runs only smoke-tagged sequences
1022
-
1023
- ## [1.0.25] - 2026-01-28
1024
-
1025
- ### Added
1026
- - **Capture Named Request Response**: `var response = run NamedRequest` now works
1027
- - Previously only `run NamedRequest` (without capture) worked
1028
- - Now you can capture the full HTTP response including `status`, `body`, and `headers`
1029
- - Example: `var resp = run GetSingleTodo` then `assert resp.status == 200`
1030
-
1031
- ## [1.0.24] - 2026-01-27
1032
-
1033
- ### Changed
1034
- - **Single Return Values**: Single returns now pass the raw value, not a wrapped object
1035
- - `return myValue` → caller receives the value directly (e.g., `"level-3-data"`)
1036
- - `return a, b` → caller receives `{a: valueA, b: valueB}` object
1037
- - This matches intuitive behavior: "return the value" means pass the value itself
1038
- - Example: `var result = run GetEmail` where `GetEmail` does `return email` → `result` is the email string
1039
-
1040
- ### Fixed
1041
- - **Regression Tests**: Updated test expectations to match correct single-return behavior
1042
- - Tests now correctly assert raw values instead of accessing `.property` on single returns
1043
-
1044
- ## [1.0.23] - 2026-01-26
1045
-
1046
- ### Fixed
1047
- - **Sequence Return Value Consistency**: Single and multiple return statements now behave identically
1048
- - Fixed `assert result.value == "data"` failing with "Variable not defined" for single returns
1049
- - All return values are now wrapped in a JSON object, so `result.myValue` works consistently
1050
-
1051
- - **API Endpoint Request Bodies**: POST/PUT/PATCH with endpoint syntax now includes the body
1052
- - Fixed `POST HttpBinPost Json` followed by `{"test": "data"}` sending empty body
1053
- - Body lines after endpoint requests are now correctly extracted and sent
1054
-
1055
- - **Variable Quote Stripping**: Quoted string values are now stored without quotes
1056
- - Fixed `var url = "https://example.com"` being used as `"https://example.com"/path`
1057
- - Quotes are stripped during variable extraction for cleaner substitution
1058
-
1059
- ## [1.0.22] - 2026-01-26
1060
-
1061
- ### Fixed
1062
- - **Standalone API Requests**: `GET GetPetById(1)` now works outside of sequences
1063
- - Fixed "Invalid URL" error when clicking CodeLens on API endpoint requests
1064
- - API detection now correctly skips blank lines, comments, and import lines
1065
-
1066
- ## [1.0.21] - 2026-01-25
1067
-
1068
- ### Fixed
1069
- - **Script Variable Capture**: `var id = run powershell "script.ps1"` now correctly captures and parses JSON output
1070
- - Script output is automatically parsed as JSON when valid, enabling `id[0].property` access
1071
- - Fixed detection to not confuse `run powershell` with `run SequenceName`
1072
-
1073
- - **Sequence Return Values**: `return id[0].id` now correctly returns nested values
1074
- - Fixed path parsing for array and property access in return statements
1075
- - Return values preserve their type (number, object, etc.) instead of being stringified
1076
-
1077
- - **Sub-sequence API Endpoints**: API endpoints now work correctly in sub-sequences
1078
- - Fixed `GET GetUser(id)` not resolving when called from `run Get_200(id)`
1079
- - API definitions are now properly passed to nested sequence calls
1080
-
1081
- ## [1.0.20] - 2026-01-25
1082
-
1083
- ### Added
1084
- - **Swagger/OpenAPI Import**: Import endpoints from OpenAPI specifications in `.nornapi` files
1085
- - Add `swagger https://api.example.com/swagger.json` to your `.nornapi` file
1086
- - Click "Import Endpoints" CodeLens button to fetch and parse the spec
1087
- - Select which sections to import (All, or specific tags like pet/store/user)
1088
- - Customize the base URL for generated endpoints
1089
- - Supports OpenAPI 2.0 (Swagger) and OpenAPI 3.x specifications
1090
- - Generates clean endpoint definitions: `EndpointName: METHOD /path`
1091
-
1092
- ## [1.0.19] - 2026-01-25
1093
-
1094
- ### Improved
1095
- - **Simplified IntelliSense**: Completions now insert just the keyword without extra placeholders
1096
- - HTTP methods insert `GET ` instead of `GET https://` with snippet
1097
- - `var`, `run`, `assert` insert just the keyword for natural typing
1098
- - Endpoint completions insert just the name, letting you add `()` manually
1099
-
1100
- - **Better Syntax Highlighting for JSON Bodies**: Full JSON coloring in request bodies
1101
- - Property keys highlighted as property names
1102
- - String values highlighted as strings
1103
- - Numbers highlighted as numbers
1104
- - Variable references `{{var}}` highlighted inside strings
1105
- - Works with or without blank line between headers and body
1106
-
1107
- - **Print Statement Syntax Highlighting**: Distinct colors for different elements
1108
- - Quoted strings show string color
1109
- - Variables show variable color
1110
- - `+` operator highlighted
1111
-
1112
- - **Variable Assignment Highlighting**: Better coloring for `var x = value`
1113
- - Variable paths like `result[0].id` highlighted as variables (not strings)
1114
-
1115
- ### Added
1116
- - **Missing Concatenation Diagnostics**: Red squiggly when `+` is missing between values in print
1117
- - `print "Result: " result` shows error between string and variable
1118
- - Suggests adding `+` operator
1119
-
1120
- - **Missing Parameter Diagnostics**: Red squiggly when calling sequence without required parameters
1121
- - `run Teardown` shows error if `Teardown(sessionId)` requires a parameter
1122
- - Shows required parameter names in error message
1123
-
1124
- ### Fixed
1125
- - Auto-closing parentheses now works - typing `(` inserts `)`
1126
- - IntelliSense triggers when typing inside parentheses
1127
-
1128
- ## [1.0.18] - 2026-01-24
1129
-
1130
- ### Added
1131
- - **Variable Request Capture**: Capture HTTP responses into variables for stable assertions
1132
- - Syntax: `var user = GET {{baseUrl}}/users/1` or `var user = GET GetUser(1) Json`
1133
- - Access response properties: `user.body.username`, `user.status`, `user.headers`
1134
- - Eliminates need for fragile `$1`, `$2` references that break when requests change
1135
- - Full support for named endpoints with header groups
1136
-
1137
- - **IntelliSense for Variable Request Capture**
1138
- - HTTP methods (GET, POST, etc.) shown after `var x = `
1139
- - Endpoint suggestions from `.nornapi` files after method
1140
- - Header group suggestions after endpoint (Auth, Json, etc.)
1141
- - Response property completions for captured variables (`user.body.`, `user.headers.`)
1142
-
1143
- - **Diagnostics for Variable Request Capture**
1144
- - Red squiggly for undefined endpoints in `var x = GET UnknownEndpoint`
1145
- - Red squiggly for undefined header groups in `var x = GET GetUser(1) InvalidGroup`
1146
-
1147
- - **Syntax Highlighting for Variable Request Capture**
1148
- - Endpoint name styled as function
1149
- - Parameters styled appropriately
1150
- - Header groups styled in green (matching other header group references)
1151
-
1152
- ## [1.0.17] - 2026-01-24
1153
-
1154
- ### Added
1155
- - **API Definition Files (.nornapi)**: New file format for defining reusable API configurations
1156
- - Define header groups with `headers GroupName` / `end headers`
1157
- - Define endpoint templates with `endpoints /path` / `end endpoints`
1158
- - Import into .norn files with `import "./api.nornapi"`
1159
- - IntelliSense support for .nornapi keywords and common headers
1160
- - Custom file icon for .nornapi files
1161
-
1162
- - **Enhanced Sequence Request Display**: Request steps in sequences now show full details
1163
- - URL display with method badge (color-coded by HTTP method)
1164
- - Tabs for Body, Headers, and Cookies (same as single request view)
1165
- - Copy button for response body
1166
- - JSON syntax highlighting in response body
1167
-
1168
- - **File Icons**: Custom icons for Norn file types
1169
- - `.nornapi` files show network connection icon
1170
- - `.nornenv` files show globe icon
1171
-
1172
- ### Fixed
1173
- - Comments no longer show diagnostic errors for undefined variables
1174
- - Lines starting with `#` or `//` are properly skipped during variable validation
1175
-
1176
- ## [1.0.16] - 2026-01-24
1177
-
1178
- ### Added
1179
- - **Sequence Parameters**: Sequences can now accept parameters with optional default values
1180
- - Declare parameters: `sequence Login(username, password = "secret123")`
1181
- - Call with positional args: `run Login("admin", "mypass")`
1182
- - Call with named args: `run Login(password: "pass", username: "user")`
1183
- - Parameters with defaults are optional
1184
- - Required parameters must come before optional ones
1185
-
1186
- - **Sequence Return Values**: Sequences can return multiple values
1187
- - Return statement: `return token, userId`
1188
- - Capture in caller: `var result = run Login("admin")`
1189
- - Access fields: `{{result.token}}`, `{{result.userId}}`
1190
-
1191
- - **IntelliSense for Return Fields**: Property completions for sequence return values
1192
- - Type `{{result.` to see available fields from the sequence's return statement
1193
- - Works for sequences in the same file and imported files
1194
-
1195
- - **CLI Print Support**: Print statements now display in CLI output with `[print]` prefix
1196
-
1197
- ### Fixed
1198
- - Sequence parameters no longer show as undefined variables in diagnostics
1199
- - CodeLens "Run Sequence" now shows for sequences where all parameters have defaults
1200
-
1201
- ### Examples
1202
-
1203
- ```norn
1204
- sequence CreateUser(name, role = "user", active = "true")
1205
- print Creating {{name}} with role {{role}}
1206
- POST {{baseUrl}}/users
1207
- Content-Type: application/json
1208
- {"name": "{{name}}", "role": "{{role}}", "active": {{active}}}
1209
-
1210
- var id = $1.body.id
1211
- return id, name, role
1212
- end sequence
1213
-
1214
- sequence TestUsers
1215
- # Positional args
1216
- var admin = run CreateUser("Admin", "admin", "true")
1217
- print Admin ID: {{admin.id}}
1218
-
1219
- # Named args (any order)
1220
- var guest = run CreateUser(role: "guest", name: "Guest")
1221
- print Guest ID: {{guest.id}}
1222
-
1223
- # Use defaults
1224
- run CreateUser("DefaultUser")
1225
- end sequence
1226
- ```
1227
-
1228
- ## [1.0.15] - 2026-01-24
1229
-
1230
- ### Added
1231
- - **Sequence Composition**: Sequences can now call other sequences with `run SequenceName`
1232
- - Enables modular test design with reusable setup/teardown patterns
1233
- - Variables set in called sequences are available to the caller
1234
- - Sequences can be nested to any depth
1235
- - Circular references are detected and reported as errors
1236
- - Sub-sequences shown in collapsible groups in the response panel
1237
-
1238
- - **File Imports**: Import named requests and sequences from other files
1239
- - `import "./common.norn"` - import from relative path
1240
- - Nested imports supported (imported files can import other files)
1241
- - Circular imports detected and reported
1242
- - Variables resolved at import time (baked in), not exported
1243
- - `.nornenv` environment variables shared across all files
1244
-
1245
- - **Response Panel Improvements**:
1246
- - Steps start collapsed by default for cleaner view
1247
- - "Expand All" / "Collapse All" button in sequence header
1248
- - Sub-sequence calls shown in collapsible groups with 📦 icon
1249
- - Failed sub-sequences show error styling
1250
-
1251
- ### Examples
1252
-
1253
- ```norn
1254
- # common.norn - shared utilities
1255
- var baseUrl = https://api.example.com
1256
-
1257
- [AuthRequest]
1258
- POST {{baseUrl}}/auth/login
1259
- Content-Type: application/json
1260
- {"username": "admin", "password": "secret"}
1261
-
1262
- sequence SharedSetup
1263
- run AuthRequest
1264
- var token = $1.body.accessToken
1265
- end sequence
1266
- ```
1267
-
1268
- ```norn
1269
- # main-test.norn
1270
- import "./common.norn"
1271
-
1272
- sequence MyTests
1273
- run SharedSetup
1274
-
1275
- GET {{baseUrl}}/users/me
1276
- Authorization: Bearer {{token}}
1277
- assert $1.status == 200
1278
- end sequence
1279
- ```
1280
-
1281
- ## [1.0.14] - 2026-01-23
1282
-
1283
- ### Added
1284
- - **Variable expression assignment**: Assign variables from expressions without `{{}}`
1285
- - `var id = data.users[0].id` - extract from JSON variable
1286
- - `var name = "John"` - quoted string literals
1287
- - `var count = 123` - numeric literals
1288
- - `var active = true` - boolean literals
1289
- - **PowerShell output parsing**: Automatic parsing of PowerShell table/list output to JSON
1290
- - Table format with headers and `---` separators
1291
- - List format with `Key : Value` pairs
1292
- - ANSI escape code stripping for clean output
1293
- - **Improved syntax highlighting**: Different colors for value types in variable assignments
1294
- - Quoted strings, numbers, booleans, variable references, URLs
1295
- - **IntelliSense for variable assignments**: After `var x = `, shows:
1296
- - Defined variables with their values
1297
- - Keywords: `true`, `false`, `null`
1298
- - Run commands
1299
- - **Diagnostic for invalid assignments**: Red squiggly for:
1300
- - Unquoted strings with spaces: `var x = hello world`
1301
- - Undefined variable references: `var x = unknownVar`
1302
-
1303
- ### Examples
1304
-
1305
- ```norn
1306
- sequence DataExtraction
1307
- # Load JSON data
1308
- var config = run readJson ./config.json
1309
-
1310
- # Extract values directly (no {{}} needed)
1311
- var userId = config.users[0].id
1312
- var userName = config.users[0].name
1313
-
1314
- # Use string literals with interpolation
1315
- var greeting = "Hello {{userName}}"
1316
-
1317
- # PowerShell scripts now auto-parse to JSON
1318
- var dbResult = run powershell ./query.ps1
1319
- var recordId = dbResult.Id
1320
-
1321
- print Result | User {{userId}}: {{userName}}
1322
- end sequence
1323
- ```
1324
-
1325
- ## [1.0.13] - 2026-01-22
1326
-
1327
- ### Added
1328
- - **`wait` command**: Pause execution for a specified duration
1329
- - Formats: `wait 2s`, `wait 500ms`, `wait 1.5 seconds`
1330
- - Useful for testing async operations or rate-limited APIs
1331
- - **`if` statements**: Conditional execution of steps based on response data
1332
- - Use any assertion operator: `if $1.status == 200 ... end if`
1333
- - Supports nesting: multiple if blocks can be nested
1334
- - Skipped steps are not executed when condition is false
1335
- - **`isType` assertion**: Type checking for response values
1336
- - Supported types: `number`, `string`, `boolean`, `array`, `object`, `null`
1337
- - Example: `assert $1.body.id isType number`
1338
- - Example: `assert $1.body.tags isType array`
1339
- - **CLI improvements**:
1340
- - `--env` / `-e`: Select environment from `.nornenv`
1341
- - `--request` / `-r`: Run a specific named request
1342
- - `--timeout` / `-t`: Request timeout in seconds
1343
- - `--verbose` now shows response headers
1344
-
1345
- ### Examples
1346
-
1347
- ```norn
1348
- sequence ConditionalExample
1349
- GET {{baseUrl}}/users/1
1350
-
1351
- # Type assertions
1352
- assert $1.body.id isType number
1353
- assert $1.body.name isType string
1354
- assert $1.body.roles isType array
1355
-
1356
- # Conditional execution
1357
- if $1.status == 200
1358
- print Success | User found
1359
-
1360
- # Wait before next request (rate limiting)
1361
- wait 1s
1362
-
1363
- GET {{baseUrl}}/users/1/profile
1364
- assert $2.status == 200
1365
- end if
1366
-
1367
- if $1.status == 404
1368
- print Not Found | User does not exist
1369
- end if
1370
- end sequence
1371
- ```
1372
-
1373
- ## [1.0.12] - 2026-01-22
1374
-
1375
- ### Added
1376
- - **JSON file reading**: Load JSON files into variables with `var config = run readJson ./path/to/file.json`
1377
- - Access nested properties: `{{config.database.host}}`, `{{config.users[0].name}}`
1378
- - Modify properties inline: `config.apiKey = {{newKey}}`
1379
- - **IntelliSense for `run` commands**: Typing `run` and selecting it automatically triggers IntelliSense showing available options:
1380
- - Script types: `bash`, `powershell`, `js`, `readJson`
1381
- - Named requests defined in the file
1382
- - **Method icons**: Script type completions now show method icons for better visual distinction
1383
- - **Smart IntelliSense triggers**: Space after `run` automatically shows available options
1384
-
1385
- ### Changed
1386
- - **Simplified completions**: Removed snippet placeholders from `run` command completions - now inserts plain text for cleaner experience
1387
- - **Refactored completion logic**: `run` command completions now share logic between standalone `run` and `var x = run` contexts
1388
-
1389
- ## [1.0.11] - 2026-01-21
1390
-
1391
- ### Added
1392
- - **Assertions**: New `assert` command for validating HTTP responses in sequences
1393
- - Operators: `==`, `!=`, `>`, `>=`, `<`, `<=`, `contains`, `startsWith`, `endsWith`, `matches`, `exists`, `!exists`
1394
- - Assert on status: `assert $1.status == 200`
1395
- - Assert on body: `assert $1.body.userId == 1`
1396
- - Assert on headers: `assert $1.headers.Content-Type contains "application/json"`
1397
- - Assert duration: `assert $1.duration < 5000`
1398
- - Custom failure messages: `assert $1.body.id == 999 | "Expected different ID"`
1399
- - **IntelliSense for response properties**: After typing `$1.`, shows completions for `status`, `statusText`, `headers`, `body`, `duration`
1400
- - **Assertion syntax highlighting**: `assert` commands now have proper syntax coloring
1401
-
1402
- ### Changed
1403
- - **BREAKING**: Response body access now requires explicit `body.` prefix
1404
- - Before: `$1.userId` or `$1[0].title`
1405
- - After: `$1.body.userId` or `$1.body[0].title`
1406
- - This makes it clearer what you're accessing (status vs headers vs body)
1407
-
1408
- ## [1.0.10] - 2026-01-20
1409
-
1410
- ### Fixed
1411
- - **PowerShell 7 support**: Now prefers `pwsh` (PowerShell 7+) over `powershell` (Windows PowerShell 5.1) for script execution. PowerShell 7 has newer SqlClient drivers that support additional connection string options like `HostNameInCertificate`. Falls back to Windows PowerShell if pwsh is not installed.
1412
-
1413
- ## [1.0.9] - 2026-01-20
1414
-
1415
- ### Added
1416
- - **Streaming sequence results**: Sequence steps now appear in the response panel as they complete, providing real-time feedback during long-running sequences
1417
- - **Variable assignment IntelliSense**: After typing `var x = run `, IntelliSense now shows available script types (bash, powershell, js) AND named requests to run
1418
- - **Named request capture syntax**: Support for `var result = run MyRequest` to capture a named request's response into a variable
1419
-
1420
- ### Fixed
1421
- - **`run` keyword highlighting**: The `run` keyword is now properly highlighted while typing, before completing the full command
1422
- - **Partial command highlighting**: `var x = run` and `var x = run bash` now highlight correctly while still typing
1423
- - **IntelliSense after `run `**: Typing `run ` (with trailing space) now properly triggers IntelliSense suggestions
1424
- - **Sequence re-run cleanup**: Running a sequence again now properly clears previous results instead of appending to them
1425
-
1426
- ## [1.0.8] - 2026-01-19
1427
-
1428
- ### Added
1429
- - **Add env file**: When no `.nornenv` file exists, CodeLens shows "**+ Add env file**" - clicking it creates a template file with common variables and dev/prod environments ready to customize
1430
-
1431
- ### Fixed
1432
- - **Parser fix**: Body extraction now stops at request boundaries (`[SomeName]`, `sequence`, HTTP methods). Previously `[SomeName]` after URL-encoded params was incorrectly included in the body.
1433
-
1434
- ## [1.0.7] - 2026-01-19
1435
-
1436
- ### Fixed
1437
- - **Syntax highlighting**: Proper stateful parsing - headers before blank line get header color, body params after blank line get parameter color (like the parser does)
1438
-
1439
- ## [1.0.6] - 2026-01-19
1440
-
1441
- ### Fixed
1442
- - **URL-encoded body support**: Now supports `key: value` format (colon) in addition to `key=value` for form data
1443
- - **Syntax highlighting**: Body parameters now have distinct highlighting from headers (different color for `username:` vs `Content-Type:`)
1444
-
1445
- ## [1.0.5] - 2026-01-19
1446
-
1447
- ### Fixed
1448
- - **Fixed**: File icon resolution
1449
- - **Fixed header/body parsing**: Parser now uses blank line to separate headers from body (standard HTTP convention). This fixes 400 errors when URL-encoded form data params like `username: value` were incorrectly parsed as headers.
1450
-
1451
- ## [1.0.4] - 2026-01-19
1452
-
1453
- ### Added
1454
- - **Named Requests**: Define reusable requests with `[RequestName]` and call them with `run RequestName` in sequences
1455
- - **Environment Support**: Create `.nornenv` file with environment-specific variables
1456
- - Common variables available in all environments
1457
- - Switch environments via status bar or CodeLens
1458
- - Environment variables shown in IntelliSense with source indicator
1459
- - **URL-encoded Form Data**: Support for `application/x-www-form-urlencoded` with multi-line format
1460
- - **Environment Selector in CodeLens**: Click `env: dev` next to Send Request to switch environments
1461
-
1462
- ### Changed
1463
- - Changed language ID from `http` to `norn` to avoid conflicts with other extensions
1464
- - Improved syntax highlighting for `[RequestName]` declarations and `run` commands
1465
-
1466
- ### Fixed
1467
- - Diagnostics now respect environment variables (no false "undefined variable" errors)
1468
- - Diagnostics refresh when switching environments
1469
- - Named request names now enforce no-spaces rule with error highlighting
1470
-
1471
- ## [1.0.3] - 2026-01-18
1472
-
1473
- - Fix 'sequence' not being recognized as a keyword
1474
- - Fixed an issue where if the name was of the sequence had a '-' it will be highlighted incorrectly
1475
-
1476
- ## [1.0.2] - 2026-01-18
1477
-
1478
- ### Added
1479
- - Capture entire response body with `var data = $1`
1480
- - Capture array elements with `var item = $1[0]`
1481
- - Extended evaluation period to 30 days
1482
-
1483
- ### Fixed
1484
- - Array index capture syntax now works correctly (`$1[0].field`)
1485
-
1486
- ## [1.0.1] - 2026-01-18
1487
-
1488
- ### Fixed
1489
- - Improved file icon resolution (128x128)
1490
- - Updated license badge in README
1491
-
1492
- ## [1.0.0] - 2025-01-15
1493
-
1494
- ### Added
1495
- - **HTTP Requests**: Send GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS requests
1496
- - **Variables**: Define with `var name = value`, reference with `{{name}}`
1497
- - **Sequences**: Chain multiple requests with `sequence Name` / `end sequence`
1498
- - **Response Capture**: Capture values from responses with `$N.path` syntax
1499
- - **Script Execution**: Run bash, PowerShell, or JavaScript scripts with `run` command
1500
- - **Print Statements**: Debug output with `print Message` or `print Title | Body`
1501
- - **Cookie Support**: Automatic cookie jar with persistence across requests
1502
- - **Syntax Highlighting**: Full highlighting for HTTP methods, headers, JSON bodies
1503
- - **IntelliSense**: Autocomplete for methods, headers, variables, and keywords
1504
- - **Diagnostics**: Error highlighting for undefined variables
1505
- - **CLI Tool**: Run requests from terminal with JSON output for CI/CD pipelines
1506
- - **Response Panel**: Webview with formatted JSON and execution results