@sunstack/cli 0.3.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,54 @@
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
+
25
+ ## 0.4.0
26
+
27
+ Release date: 2026-10-30.
28
+
29
+ ### Breaking
30
+
31
+ - Set `within` to a nonempty list of distinct kinds, for example
32
+ `["step", "standards_section"]`. A match counts once inside any listed kind,
33
+ including overlapping containers. Rewrite `"within": "x"` as `"within": ["x"]`.
34
+ A present `null` or any non-list is refused; omit the key for no containment.
35
+
36
+ ### Fixed
37
+
38
+ - Check refusals for undefined kinds, cycles and `within` entries point at the
39
+ actual kind or field, including names with dots. Cycle refusals name and point
40
+ at the first kind in the cycle.
41
+ - Config refusals use the full setting path: `limits.evidence_max_chars`,
42
+ `check.files`, `evidence.kinds`, `evidence.ast_grep`,
43
+ `rulebook.<index>.markdown` and `rulebook.<index>.rules`.
44
+
45
+ ### Internal
46
+
47
+ - Separate child startup waits from active test deadlines (#113).
48
+ - Group Rust crate modules by responsibility (#110).
49
+ - Batch repository metadata reads (#112).
50
+ - Run CI on PRs and main, with cache writes only from main (#109, #111).
51
+
3
52
  ## 0.3.0
4
53
 
5
54
  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
@@ -89,7 +123,9 @@ skill-specific rules are test content.
89
123
 
90
124
  Add `select` to an evidence kind to ask one noul question about each mechanical
91
125
  candidate. Add `within` to keep a kind's matches only inside or equal to a final
92
- piece of another kind in the same file. This fragment belongs in `evidence.kinds`;
126
+ piece of any listed kind in the same file. `within` is a nonempty list without
127
+ repeated kinds, written as `["workflow_section"]` for one kind. A match inside
128
+ several listed kinds produces one piece. This fragment belongs in `evidence.kinds`;
93
129
  the rule IDs must exist in the caller's ast-grep project:
94
130
 
95
131
  ```json
@@ -118,7 +154,7 @@ the rule IDs must exist in the caller's ast-grep project:
118
154
  },
119
155
  "step": {
120
156
  "rule": "step",
121
- "within": "workflow_section",
157
+ "within": ["workflow_section"],
122
158
  "fields": { "body": { "from": "remainder" } }
123
159
  },
124
160
  "load": {
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT",
21
21
  "name": "@sunstack/cli",
22
- "version": "0.3.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.3.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.3.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.3.0",
91
+ "version": "0.5.0",
92
92
  "volta": {
93
93
  "node": "18.14.1",
94
94
  "npm": "9.5.0"