norn-cli 2.9.8 → 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/CHANGELOG.md +23 -0
- package/CLAUDE.md +68 -0
- package/NOW.md +119 -20
- package/README.md +152 -0
- package/demos/agent-workbench/README.md +156 -0
- package/demos/agent-workbench/agents.nornagent +87 -0
- package/demos/agent-workbench/contracts/domain-answer.schema.json +28 -0
- package/demos/agent-workbench/contracts/domain-question.schema.json +34 -0
- package/demos/agent-workbench/contracts/router-verdict.schema.json +43 -0
- package/demos/agent-workbench/contracts/ticket.schema.json +29 -0
- package/demos/agent-workbench/contracts/verdict.schema.json +48 -0
- package/demos/agent-workbench/fake-openai-server.js +128 -0
- package/demos/agent-workbench/fixtures/aligned-ticket.json +10 -0
- package/demos/agent-workbench/fixtures/cross-domain-ticket.json +10 -0
- package/demos/agent-workbench/fixtures/invalid-output-ticket.json +8 -0
- package/demos/agent-workbench/norn.config.json +14 -0
- package/demos/agent-workbench/prompts/ticket-router.md +11 -0
- package/demos/agent-workbench/workbench.norn +32 -0
- package/dist/cli.js +184789 -111685
- package/package.json +69 -2
- package/playground/ai.norn +9 -0
- package/playground/ai_orchastration.nornagent +10 -0
- package/playground/knowedge_base/nexus_system_prompt.md +1 -0
- package/schemas/norn.config.schema.json +211 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "norn-cli",
|
|
3
3
|
"displayName": "Norn",
|
|
4
4
|
"description": "Version-controlled API and database tests. Author in VS Code, then run the same files from the CLI and CI.",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "3.0.0",
|
|
6
6
|
"publisher": "Norn-PeterKrustanov",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Peter Krastanov"
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"test automation"
|
|
33
33
|
],
|
|
34
34
|
"engines": {
|
|
35
|
-
"vscode": "^1.108.1"
|
|
35
|
+
"vscode": "^1.108.1",
|
|
36
|
+
"node": ">=20.0.0"
|
|
36
37
|
},
|
|
37
38
|
"categories": [
|
|
38
39
|
"Testing",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"onLanguage:nornapi",
|
|
46
47
|
"onLanguage:nornenv",
|
|
47
48
|
"onLanguage:nornk8s",
|
|
49
|
+
"onLanguage:nornagent",
|
|
48
50
|
"workspaceContains:**/norn.config.json",
|
|
49
51
|
"onChatParticipant:norn.chat",
|
|
50
52
|
"onView:norn.sidebarHome",
|
|
@@ -56,6 +58,8 @@
|
|
|
56
58
|
"onCommand:norn.openTerminal",
|
|
57
59
|
"onCommand:norn.terminal.focusRawTerminal",
|
|
58
60
|
"onCommand:norn.debugSequence",
|
|
61
|
+
"onCommand:norn.debug.runToNextContractFailure",
|
|
62
|
+
"onCommand:norn.showAgentGraph",
|
|
59
63
|
"onDebugResolve:norn"
|
|
60
64
|
],
|
|
61
65
|
"main": "./dist/extension.js",
|
|
@@ -76,6 +80,17 @@
|
|
|
76
80
|
"title": "Debug Sequence",
|
|
77
81
|
"category": "Norn"
|
|
78
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
|
+
},
|
|
79
94
|
{
|
|
80
95
|
"command": "norn.clearCookies",
|
|
81
96
|
"title": "Clear Cookies",
|
|
@@ -241,6 +256,13 @@
|
|
|
241
256
|
"when": "explorerResourceIsFolder",
|
|
242
257
|
"group": "norn@2"
|
|
243
258
|
}
|
|
259
|
+
],
|
|
260
|
+
"debug/toolBar": [
|
|
261
|
+
{
|
|
262
|
+
"command": "norn.debug.runToNextContractFailure",
|
|
263
|
+
"when": "debugType == norn && debugState == stopped",
|
|
264
|
+
"group": "navigation@25"
|
|
265
|
+
}
|
|
244
266
|
]
|
|
245
267
|
},
|
|
246
268
|
"languages": [
|
|
@@ -317,6 +339,21 @@
|
|
|
317
339
|
"dark": "./images/nornk8s-icon.svg"
|
|
318
340
|
},
|
|
319
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"
|
|
320
357
|
}
|
|
321
358
|
],
|
|
322
359
|
"grammars": [
|
|
@@ -347,6 +384,23 @@
|
|
|
347
384
|
"language": "nornk8s",
|
|
348
385
|
"scopeName": "source.nornk8s",
|
|
349
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
|
+
}
|
|
350
404
|
}
|
|
351
405
|
],
|
|
352
406
|
"jsonValidation": [
|
|
@@ -362,6 +416,9 @@
|
|
|
362
416
|
"breakpoints": [
|
|
363
417
|
{
|
|
364
418
|
"language": "norn"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"language": "nornagent"
|
|
365
422
|
}
|
|
366
423
|
],
|
|
367
424
|
"debuggers": [
|
|
@@ -374,6 +431,9 @@
|
|
|
374
431
|
"breakpoints": [
|
|
375
432
|
{
|
|
376
433
|
"language": "norn"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"language": "nornagent"
|
|
377
437
|
}
|
|
378
438
|
],
|
|
379
439
|
"configurationAttributes": {
|
|
@@ -391,6 +451,10 @@
|
|
|
391
451
|
"type": "string",
|
|
392
452
|
"description": "Name of the sequence to debug."
|
|
393
453
|
},
|
|
454
|
+
"recording": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"description": "Optional workspace-relative or absolute agent-run recording to replay offline."
|
|
457
|
+
},
|
|
394
458
|
"env": {
|
|
395
459
|
"type": "string",
|
|
396
460
|
"description": "Environment name for this debug session. If omitted, Norn uses the currently selected environment."
|
|
@@ -575,12 +639,15 @@
|
|
|
575
639
|
"typescript-eslint": "^8.52.0"
|
|
576
640
|
},
|
|
577
641
|
"dependencies": {
|
|
642
|
+
"@anthropic-ai/sdk": "^0.116.0",
|
|
643
|
+
"@google/genai": "^2.16.0",
|
|
578
644
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
579
645
|
"ajv": "^8.17.1",
|
|
580
646
|
"axios": "^1.13.2",
|
|
581
647
|
"chalk": "^5.4.1",
|
|
582
648
|
"mssql": "^12.2.0",
|
|
583
649
|
"norn-cli": "^1.10.6",
|
|
650
|
+
"openai": "^6.49.0",
|
|
584
651
|
"pg": "^8.20.0",
|
|
585
652
|
"tough-cookie": "^6.0.0"
|
|
586
653
|
},
|
|
@@ -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,
|