@sunstack/cli 0.4.0 → 0.5.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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ Release date: 2026-10-31.
6
+
7
+ ### Added
8
+
9
+ - Add rule-only `next` and `previous` evidence fields with a default `count` of 1
10
+ and a range of 1 through 5. Neighbours share the match's parent and retain
11
+ source order and spans; continuation nodes do not count or stop the walk.
12
+ - Let ask and combine steps route uncertain answers to another decision step
13
+ using the same request's answers. Reports name the step that ended the walk.
14
+
15
+ ### Breaking
16
+
17
+ - Incomplete provider-failure reasons require `failure_class` and carry
18
+ `http_status` when received. Requests refused by the engine use
19
+ `invalid_request`; answers that fail admission use `invalid_response`.
20
+ The default line includes the provider class and any HTTP status.
21
+ - Rename selection's `malformed_answer` reason to `invalid_response` and carry
22
+ provider class/status in incomplete selection candidates. Update report
23
+ consumers for this hard cutover.
24
+
3
25
  ## 0.4.0
4
26
 
5
27
  Release date: 2026-10-30.
package/README.md CHANGED
@@ -35,6 +35,27 @@ finding. Questions reach the model as authored, with one piece's bounded field
35
35
  view. The binary embeds six generic Markdown utilities; rulebooks, questions and
36
36
  domain-specific evidence rules belong to the caller.
37
37
 
38
+ Evidence fields can use `next` or `previous` to collect full matching sibling
39
+ texts and source spans. They name an ast-grep `rule`; `count` defaults to 1 and
40
+ accepts 1 through 5. For example, a kind's `fields` can include:
41
+
42
+ ```json
43
+ {
44
+ "following": { "from": "next", "rule": "list", "count": 1 },
45
+ "preceding": { "from": "previous", "rule": "list_item", "count": 2 }
46
+ }
47
+ ```
48
+
49
+ The walk stays within the match's direct parent and stops at the first
50
+ nonmatching sibling. Blank-line and indentation continuation nodes do not stop
51
+ or count toward the walk. Values stay in source order, including `previous`
52
+ values. These sources accept only rule references and leave `remainder` intact.
53
+
54
+ An ask or combine step can add `"uncertain": "verdict"` to route an in-band
55
+ answer, or a choice below `min_probability`, to another step. The walk uses
56
+ answers from the same request. Omitting the route ends uncertain at that step.
57
+ Both the `uncertain` and `results` views report the step that ended the walk.
58
+
38
59
  Rulebook and ast-grep project paths resolve relative to the configuration file.
39
60
  Checked-file globs resolve from its Git repository root, or from the config
40
61
  directory outside Git. Without `--config`, lint searches the current directory
@@ -79,6 +100,19 @@ and answers for the caller to inspect. Cancellation takes precedence over
79
100
  incomplete work, then findings, then uncertainty. A warning alone does not fail
80
101
  unless it exceeds `--max-warnings`.
81
102
 
103
+ A failed provider request carries its class and, when received, its HTTP status
104
+ in the incomplete reason:
105
+
106
+ ```json
107
+ { "kind": "provider_failure", "failure_class": "rate_limit", "http_status": 429 }
108
+ ```
109
+
110
+ When no HTTP response arrived, `http_status` is omitted. The default output
111
+ prints `provider failure (rate_limit, HTTP 429)` or
112
+ `provider failure (connection)`. A request refused by the engine is
113
+ `invalid_request`; an answer that fails admission is `invalid_response`.
114
+ Incomplete selection candidates use these reason shapes too.
115
+
82
116
  See the checked-in [worked configuration](tests/fixtures/rulebook-lint/skill-rules.config.json)
83
117
  and its [rulebook entries](tests/fixtures/rulebook-lint/rulebook/steering.rules.json)
84
118
  for a complete test example. Copy the fixture directory to an isolated root to
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT",
21
21
  "name": "@sunstack/cli",
22
- "version": "0.4.0"
22
+ "version": "0.5.0"
23
23
  },
24
24
  "node_modules/detect-libc": {
25
25
  "engines": {
@@ -48,5 +48,5 @@
48
48
  }
49
49
  },
50
50
  "requires": true,
51
- "version": "0.4.0"
51
+ "version": "0.5.0"
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/ShravanSunder/sunstack-tools/releases/download/v0.4.0"
3
+ "https://github.com/ShravanSunder/sunstack-tools/releases/download/v0.5.0"
4
4
  ],
5
5
  "bin": {
6
6
  "sunstack": "run-sunstack.js"
@@ -88,7 +88,7 @@
88
88
  "zipExt": ".tar.gz"
89
89
  }
90
90
  },
91
- "version": "0.4.0",
91
+ "version": "0.5.0",
92
92
  "volta": {
93
93
  "node": "18.14.1",
94
94
  "npm": "9.5.0"