norn-cli 2.9.7 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "norn-cli",
3
3
  "displayName": "Norn",
4
- "description": "Version-controlled API, database, and Kubernetes tests and runbooks. Author in VS Code, then run the same files from the CLI and CI.",
5
- "version": "2.9.7",
4
+ "description": "Version-controlled API and database tests. Author in VS Code, then run the same files from the CLI and CI.",
5
+ "version": "3.0.0",
6
6
  "publisher": "Norn-PeterKrustanov",
7
7
  "author": {
8
8
  "name": "Peter Krastanov"
@@ -29,13 +29,11 @@
29
29
  "api automation",
30
30
  "openapi",
31
31
  "http",
32
- "test automation",
33
- "kubernetes",
34
- "kubectl",
35
- "runbooks"
32
+ "test automation"
36
33
  ],
37
34
  "engines": {
38
- "vscode": "^1.108.1"
35
+ "vscode": "^1.108.1",
36
+ "node": ">=20.0.0"
39
37
  },
40
38
  "categories": [
41
39
  "Testing",
@@ -48,6 +46,7 @@
48
46
  "onLanguage:nornapi",
49
47
  "onLanguage:nornenv",
50
48
  "onLanguage:nornk8s",
49
+ "onLanguage:nornagent",
51
50
  "workspaceContains:**/norn.config.json",
52
51
  "onChatParticipant:norn.chat",
53
52
  "onView:norn.sidebarHome",
@@ -59,6 +58,8 @@
59
58
  "onCommand:norn.openTerminal",
60
59
  "onCommand:norn.terminal.focusRawTerminal",
61
60
  "onCommand:norn.debugSequence",
61
+ "onCommand:norn.debug.runToNextContractFailure",
62
+ "onCommand:norn.showAgentGraph",
62
63
  "onDebugResolve:norn"
63
64
  ],
64
65
  "main": "./dist/extension.js",
@@ -79,6 +80,17 @@
79
80
  "title": "Debug Sequence",
80
81
  "category": "Norn"
81
82
  },
83
+ {
84
+ "command": "norn.debug.runToNextContractFailure",
85
+ "title": "Run to Next Contract Failure",
86
+ "category": "Norn Debug",
87
+ "icon": "$(debug-continue)"
88
+ },
89
+ {
90
+ "command": "norn.showAgentGraph",
91
+ "title": "Show Agent Graph",
92
+ "category": "Norn"
93
+ },
82
94
  {
83
95
  "command": "norn.clearCookies",
84
96
  "title": "Clear Cookies",
@@ -219,6 +231,20 @@
219
231
  ]
220
232
  },
221
233
  "menus": {
234
+ "commandPalette": [
235
+ {
236
+ "command": "norn.k8s.runLine",
237
+ "when": "false"
238
+ },
239
+ {
240
+ "command": "norn.k8s.runSequence",
241
+ "when": "false"
242
+ },
243
+ {
244
+ "command": "norn.k8s.selectContext",
245
+ "when": "false"
246
+ }
247
+ ],
222
248
  "explorer/context": [
223
249
  {
224
250
  "command": "norn.createStarterCatalog",
@@ -230,6 +256,13 @@
230
256
  "when": "explorerResourceIsFolder",
231
257
  "group": "norn@2"
232
258
  }
259
+ ],
260
+ "debug/toolBar": [
261
+ {
262
+ "command": "norn.debug.runToNextContractFailure",
263
+ "when": "debugType == norn && debugState == stopped",
264
+ "group": "navigation@25"
265
+ }
233
266
  ]
234
267
  },
235
268
  "languages": [
@@ -306,6 +339,21 @@
306
339
  "dark": "./images/nornk8s-icon.svg"
307
340
  },
308
341
  "configuration": "./language-configuration.json"
342
+ },
343
+ {
344
+ "id": "nornagent",
345
+ "aliases": [
346
+ "Norn Agent",
347
+ "nornagent"
348
+ ],
349
+ "extensions": [
350
+ ".nornagent"
351
+ ],
352
+ "icon": {
353
+ "light": "./images/nornagent-icon.svg",
354
+ "dark": "./images/nornagent-icon.svg"
355
+ },
356
+ "configuration": "./language-configuration.json"
309
357
  }
310
358
  ],
311
359
  "grammars": [
@@ -336,6 +384,23 @@
336
384
  "language": "nornk8s",
337
385
  "scopeName": "source.nornk8s",
338
386
  "path": "./syntaxes/nornk8s.tmLanguage.json"
387
+ },
388
+ {
389
+ "language": "nornagent",
390
+ "scopeName": "source.nornagent",
391
+ "path": "./syntaxes/nornagent.tmLanguage.json"
392
+ }
393
+ ],
394
+ "semanticTokenScopes": [
395
+ {
396
+ "language": "norn",
397
+ "scopes": {
398
+ "variable": [
399
+ "variable.other.constant.norn",
400
+ "variable.other.constant",
401
+ "variable"
402
+ ]
403
+ }
339
404
  }
340
405
  ],
341
406
  "jsonValidation": [
@@ -351,6 +416,9 @@
351
416
  "breakpoints": [
352
417
  {
353
418
  "language": "norn"
419
+ },
420
+ {
421
+ "language": "nornagent"
354
422
  }
355
423
  ],
356
424
  "debuggers": [
@@ -363,6 +431,9 @@
363
431
  "breakpoints": [
364
432
  {
365
433
  "language": "norn"
434
+ },
435
+ {
436
+ "language": "nornagent"
366
437
  }
367
438
  ],
368
439
  "configurationAttributes": {
@@ -380,6 +451,10 @@
380
451
  "type": "string",
381
452
  "description": "Name of the sequence to debug."
382
453
  },
454
+ "recording": {
455
+ "type": "string",
456
+ "description": "Optional workspace-relative or absolute agent-run recording to replay offline."
457
+ },
383
458
  "env": {
384
459
  "type": "string",
385
460
  "description": "Environment name for this debug session. If omitted, Norn uses the currently selected environment."
@@ -435,7 +510,7 @@
435
510
  "id": "norn.chat",
436
511
  "name": "norn",
437
512
  "fullName": "Norn",
438
- "description": "Ask questions about Norn syntax, generate requests and runbooks, explain sequences, and convert cURL/HTTP to Norn",
513
+ "description": "Ask questions about Norn syntax, generate requests, explain sequences, and convert cURL/HTTP to Norn",
439
514
  "isSticky": true,
440
515
  "commands": [
441
516
  {
@@ -564,12 +639,15 @@
564
639
  "typescript-eslint": "^8.52.0"
565
640
  },
566
641
  "dependencies": {
642
+ "@anthropic-ai/sdk": "^0.116.0",
643
+ "@google/genai": "^2.16.0",
567
644
  "@modelcontextprotocol/sdk": "^1.29.0",
568
645
  "ajv": "^8.17.1",
569
646
  "axios": "^1.13.2",
570
647
  "chalk": "^5.4.1",
571
648
  "mssql": "^12.2.0",
572
649
  "norn-cli": "^1.10.6",
650
+ "openai": "^6.49.0",
573
651
  "pg": "^8.20.0",
574
652
  "tough-cookie": "^6.0.0"
575
653
  },
@@ -0,0 +1,9 @@
1
+ import "./ai_orchastration.nornagent"
2
+
3
+ sequence SimpleNexusRun
4
+
5
+ var nexusReply = run Nexus "Who are you?"
6
+
7
+ print nexusReply
8
+
9
+ end sequence
@@ -0,0 +1,10 @@
1
+ model gpt4o
2
+ provider openai
3
+ name gpt-4o
4
+ apiKey {{OPENAI_API}}
5
+ end model
6
+
7
+ agent Nexus
8
+ model gpt4o
9
+ system file "./knowedge_base/nexus_system_prompt.md"
10
+ end agent
@@ -0,0 +1 @@
1
+ You are Nexus you test Jira tickets
@@ -66,6 +66,37 @@
66
66
  }
67
67
  }
68
68
  }
69
+ },
70
+ {
71
+ "label": "Norn config with contract mode",
72
+ "description": "Create a Norn config that auto-validates endpoint responses against synced contracts/ schemas.",
73
+ "body": {
74
+ "version": 1,
75
+ "contracts": {
76
+ "mode": "auto"
77
+ }
78
+ }
79
+ },
80
+ {
81
+ "label": "Norn config with agent limits",
82
+ "description": "Create a Norn config with global agent safeguards, automatic run recording, and a smaller local-provider output ceiling.",
83
+ "body": {
84
+ "version": 1,
85
+ "agents": {
86
+ "max_tokens": 16000,
87
+ "max_depth": 5,
88
+ "max_invocations": 25,
89
+ "contract_retries": 2,
90
+ "recording": {
91
+ "enabled": true
92
+ },
93
+ "providers": {
94
+ "local": {
95
+ "max_tokens": 4096
96
+ }
97
+ }
98
+ }
99
+ }
69
100
  }
70
101
  ],
71
102
  "properties": {
@@ -154,6 +185,49 @@
154
185
  }
155
186
  }
156
187
  ]
188
+ },
189
+ "contracts": {
190
+ "allOf": [
191
+ {
192
+ "$ref": "#/definitions/contractsSection"
193
+ }
194
+ ],
195
+ "defaultSnippets": [
196
+ {
197
+ "label": "Contracts section definition",
198
+ "description": "Turn on contract mode for endpoint-syntax requests.",
199
+ "body": {
200
+ "mode": "${1:auto}"
201
+ }
202
+ }
203
+ ]
204
+ },
205
+ "agents": {
206
+ "allOf": [
207
+ {
208
+ "$ref": "#/definitions/agentsSection"
209
+ }
210
+ ],
211
+ "defaultSnippets": [
212
+ {
213
+ "label": "Agent settings section definition",
214
+ "description": "Insert global agent limits, recording settings, and an optional provider-specific override.",
215
+ "body": {
216
+ "max_tokens": 16000,
217
+ "max_depth": 5,
218
+ "max_invocations": 25,
219
+ "contract_retries": 2,
220
+ "recording": {
221
+ "enabled": true
222
+ },
223
+ "providers": {
224
+ "${1:local}": {
225
+ "max_tokens": 4096
226
+ }
227
+ }
228
+ }
229
+ }
230
+ ]
157
231
  }
158
232
  },
159
233
  "definitions": {
@@ -260,6 +334,143 @@
260
334
  }
261
335
  }
262
336
  },
337
+ "contractsSection": {
338
+ "type": "object",
339
+ "additionalProperties": false,
340
+ "description": "Contract-mode settings. Contract mode auto-validates each endpoint-syntax response against the synced contracts/ schema for that operation and status.",
341
+ "properties": {
342
+ "_comment": {
343
+ "$ref": "#/definitions/comment",
344
+ "description": "Optional human-readable guidance ignored by Norn at runtime."
345
+ },
346
+ "mode": {
347
+ "type": "string",
348
+ "enum": [
349
+ "auto",
350
+ "off"
351
+ ],
352
+ "default": "off",
353
+ "description": "'auto' validates every endpoint-syntax request against its committed contracts/ schema (no assert lines needed). 'off' (default) disables contract mode; the --contracts CLI flag overrides this per run.",
354
+ "enumDescriptions": [
355
+ "Validate every endpoint-syntax response against its synced contract schema.",
356
+ "Disable automatic contract validation (default)."
357
+ ]
358
+ }
359
+ }
360
+ },
361
+ "agentProviderLimits": {
362
+ "type": "object",
363
+ "additionalProperties": false,
364
+ "description": "Agent limits for one model provider. These override global agents settings and are overridden by directives on an individual agent.",
365
+ "properties": {
366
+ "_comment": {
367
+ "$ref": "#/definitions/comment",
368
+ "description": "Optional human-readable guidance ignored by Norn at runtime."
369
+ },
370
+ "max_tokens": {
371
+ "type": "integer",
372
+ "minimum": 1,
373
+ "description": "Provider-specific maximum output-token ceiling for each agent invocation."
374
+ },
375
+ "max_depth": {
376
+ "type": "integer",
377
+ "minimum": 1,
378
+ "description": "Provider-specific maximum sub-agent invocation depth."
379
+ },
380
+ "max_invocations": {
381
+ "type": "integer",
382
+ "minimum": 1,
383
+ "description": "Provider-specific maximum total invocations in one top-level agent run."
384
+ },
385
+ "contract_retries": {
386
+ "type": "integer",
387
+ "minimum": 0,
388
+ "description": "Provider-specific failed-attempt cap for correctable accepts or returns handoff violations."
389
+ }
390
+ }
391
+ },
392
+ "agentRecording": {
393
+ "type": "object",
394
+ "additionalProperties": false,
395
+ "description": "Automatic agent run recording. Norn keeps a fixed rolling maximum of the latest 20 generated recordings; retention is not configurable.",
396
+ "properties": {
397
+ "_comment": {
398
+ "$ref": "#/definitions/comment",
399
+ "description": "Optional human-readable guidance ignored by Norn at runtime."
400
+ },
401
+ "enabled": {
402
+ "type": "boolean",
403
+ "default": true,
404
+ "description": "Write an offline replay recording for completed agent runs. Enabled by default."
405
+ }
406
+ }
407
+ },
408
+ "agentsSection": {
409
+ "type": "object",
410
+ "additionalProperties": false,
411
+ "description": "Global recording behavior and global/provider-specific limits for agent runs. Per-agent .nornagent directives override limit values.",
412
+ "properties": {
413
+ "_comment": {
414
+ "$ref": "#/definitions/comment",
415
+ "description": "Optional human-readable guidance ignored by Norn at runtime."
416
+ },
417
+ "max_tokens": {
418
+ "type": "integer",
419
+ "minimum": 1,
420
+ "description": "Maximum output-token ceiling for each agent invocation. This is a ceiling, not a spend; hosted providers default to 16000 and local defaults to 4096."
421
+ },
422
+ "max_depth": {
423
+ "type": "integer",
424
+ "minimum": 1,
425
+ "description": "Maximum sub-agent invocation depth for one top-level agent run. Higher values can permit more model calls."
426
+ },
427
+ "max_invocations": {
428
+ "type": "integer",
429
+ "minimum": 1,
430
+ "description": "Maximum total agent invocations, including the root, within one top-level agent run."
431
+ },
432
+ "contract_retries": {
433
+ "type": "integer",
434
+ "minimum": 0,
435
+ "description": "Failed-attempt cap for correctable accepts or returns violations at a sub-agent handoff. Set to 0 to fail immediately."
436
+ },
437
+ "recording": {
438
+ "allOf": [
439
+ {
440
+ "$ref": "#/definitions/agentRecording"
441
+ }
442
+ ],
443
+ "defaultSnippets": [
444
+ {
445
+ "label": "Agent recording settings",
446
+ "description": "Enable or disable automatic offline replay recordings.",
447
+ "body": {
448
+ "enabled": true
449
+ }
450
+ }
451
+ ]
452
+ },
453
+ "providers": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "description": "Limits for a specific model provider. Provider values override global agents settings.",
457
+ "properties": {
458
+ "openai": {
459
+ "$ref": "#/definitions/agentProviderLimits"
460
+ },
461
+ "anthropic": {
462
+ "$ref": "#/definitions/agentProviderLimits"
463
+ },
464
+ "google": {
465
+ "$ref": "#/definitions/agentProviderLimits"
466
+ },
467
+ "local": {
468
+ "$ref": "#/definitions/agentProviderLimits"
469
+ }
470
+ }
471
+ }
472
+ }
473
+ },
263
474
  "mcpSection": {
264
475
  "type": "object",
265
476
  "additionalProperties": false,