@sunstack/cli 0.2.0 → 0.3.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 +14 -0
- package/README.md +94 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
Release date: 2026-10-30.
|
|
6
|
+
|
|
7
|
+
- Add noul-based evidence selection, kind containment, kind-based field sources and
|
|
8
|
+
strict-child remainder exclusions. Selection and rules share model-request limits.
|
|
9
|
+
- Report every asked candidate and per-file/per-kind counts, including files with
|
|
10
|
+
no candidates. Selected kinds require credentials for `--evidence`; `--check`
|
|
11
|
+
remains credential-free. Uncertain and incomplete selection affect run status.
|
|
12
|
+
- Recognize numbered and Step section headings at H2 through H6, excluding H1.
|
|
13
|
+
Configurations using those generic utilities can gain evidence within the new
|
|
14
|
+
sections and changed fields or results that read them.
|
|
15
|
+
- Run the fresh-install smoke in TypeScript with a current rulebook fixture.
|
|
16
|
+
|
|
3
17
|
## 0.2.0
|
|
4
18
|
|
|
5
19
|
This pre-1.0 minor release cuts over the lint configuration and rulebook format.
|
package/README.md
CHANGED
|
@@ -48,9 +48,11 @@ sunstack lint --config sunstack.lint.json --all --format json
|
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
`--check` validates configuration, the rulebook and evidence project, then lists
|
|
51
|
-
the assembled rules as JSON. It reads no checked
|
|
52
|
-
requests. `--evidence [KIND]` prints
|
|
53
|
-
|
|
51
|
+
the assembled rules and selected/contained kinds as JSON. It reads no checked
|
|
52
|
+
files, sends no model requests and needs no credential. `--evidence [KIND]` prints
|
|
53
|
+
picked pieces, selection outcomes and file counts as JSON. It runs evidence
|
|
54
|
+
selection when configured, requiring a credential, but sends no rule questions.
|
|
55
|
+
Without selected kinds, the evidence listing remains credential-free.
|
|
54
56
|
|
|
55
57
|
An ordinary lint run uses changed evidence by default and requires Git for that
|
|
56
58
|
default scope. Use `--all` for every configured target, `--since REV` for changes
|
|
@@ -65,7 +67,9 @@ file and first and last line, its outcome (`pass`, `finding`, `not_applicable`,
|
|
|
65
67
|
The decision model is always configured and enabled for asking rules; there is
|
|
66
68
|
no model-off switch. Ordinary runs with asking rules require an OpenRouter
|
|
67
69
|
credential before checked-file acquisition, even if a later mechanical branch
|
|
68
|
-
would avoid an ask.
|
|
70
|
+
would avoid an ask. A selected evidence kind also requires a credential, including
|
|
71
|
+
for `--evidence`, even when the rules are mechanical. With neither selected kinds
|
|
72
|
+
nor asking rules, no key is needed. Credential lookup and
|
|
69
73
|
saving are described below under the native protocol.
|
|
70
74
|
|
|
71
75
|
Lint exits 0 for clean or nothing selected, 1 for error findings or warnings over
|
|
@@ -81,6 +85,92 @@ for a complete test example. Copy the fixture directory to an isolated root to
|
|
|
81
85
|
try it; its checked-file globs are relative to that root. The example's
|
|
82
86
|
skill-specific rules are test content.
|
|
83
87
|
|
|
88
|
+
## Selected and contained evidence
|
|
89
|
+
|
|
90
|
+
Add `select` to an evidence kind to ask one noul question about each mechanical
|
|
91
|
+
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`;
|
|
93
|
+
the rule IDs must exist in the caller's ast-grep project:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"workflow_section": {
|
|
98
|
+
"rule": "workflow-candidate",
|
|
99
|
+
"fields": {
|
|
100
|
+
"heading": { "from": "first_line" },
|
|
101
|
+
"body": { "from": "remainder", "exclude": { "rule": "section" } },
|
|
102
|
+
"outline": { "from": "same_file", "rule": "section" }
|
|
103
|
+
},
|
|
104
|
+
"select": {
|
|
105
|
+
"question": {
|
|
106
|
+
"type": "noul",
|
|
107
|
+
"instructions": {
|
|
108
|
+
"check": "body",
|
|
109
|
+
"against": "heading",
|
|
110
|
+
"context": ["outline"],
|
|
111
|
+
"task": "Is this section an ordered workflow?"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"yes_at_or_above": 0.7,
|
|
115
|
+
"no_at_or_below": 0.3,
|
|
116
|
+
"shared": ["outline"]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"step": {
|
|
120
|
+
"rule": "step",
|
|
121
|
+
"within": "workflow_section",
|
|
122
|
+
"fields": { "body": { "from": "remainder" } }
|
|
123
|
+
},
|
|
124
|
+
"load": {
|
|
125
|
+
"rule": "load",
|
|
126
|
+
"fields": { "step": { "from": "enclosing", "kind": "step" } }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Answers at or above 0.7 select the candidate; at or below 0.3 reject it; values
|
|
132
|
+
between them are uncertain. Only selected candidates become pieces. A failed
|
|
133
|
+
selection remains incomplete; it never falls back to selecting the candidate.
|
|
134
|
+
Kinds build in dependency order before any rules run. Cycles, undefined kinds,
|
|
135
|
+
invalid thresholds, non-noul selection questions and target-field references in
|
|
136
|
+
selection questions are refused by `--check`.
|
|
137
|
+
|
|
138
|
+
`inside`, `enclosing` and `same_file` accept exactly one of `rule` or `kind`.
|
|
139
|
+
A rule source reads raw matches; a kind source reads final pieces after selection
|
|
140
|
+
and containment. `remainder.exclude` removes only strictly contained ranges,
|
|
141
|
+
including child sections; an equal range never erases the piece itself. A target's
|
|
142
|
+
`as_kind` must remain target-free and independent of selection.
|
|
143
|
+
|
|
144
|
+
The model receives consecutive candidates of one file and kind, with one question
|
|
145
|
+
per candidate. Fields in `shared` must come from `same_file`; their view is bounded
|
|
146
|
+
once and sent once per request. Each candidate has its own bounded view without
|
|
147
|
+
shared or target fields. Questions cannot refer to target fields, and selection
|
|
148
|
+
requests carry no target opening or target-file fields. Requests split to satisfy
|
|
149
|
+
encoded character, byte, question-count and input-token limits. Selection and rule
|
|
150
|
+
requests share the run's request count, concurrency and usage accounting.
|
|
151
|
+
|
|
152
|
+
Under a change scope, selection considers all candidates of each file with a
|
|
153
|
+
changed hunk or a changed load target. Other files retain their candidate counts
|
|
154
|
+
with `asked: 0`. Final pieces are still picked by their own changed ranges or
|
|
155
|
+
changed targets; changing only a parent heading does not pick every child step.
|
|
156
|
+
|
|
157
|
+
JSON reports and evidence listings add `selections` and `file_counts`. Each asked
|
|
158
|
+
candidate reports its kind, source location, first line and outcome, with a yes
|
|
159
|
+
probability or an incomplete reason. Counts cover every built file and configured
|
|
160
|
+
kind, including zero-candidate files: matches, pieces, picked and scan-limited,
|
|
161
|
+
plus candidate/asked/outcome counts for selected kinds. The default format prints
|
|
162
|
+
selection totals and files with candidates but none selected. Selection uncertainty
|
|
163
|
+
uses exit 5 unless a higher-priority status applies; any incomplete candidate
|
|
164
|
+
makes the run incomplete with `selection_incomplete`. GitHub and SARIF formatting
|
|
165
|
+
is unchanged.
|
|
166
|
+
|
|
167
|
+
The generic numbered-heading and Step-heading utilities recognize levels H2
|
|
168
|
+
through H6; H1 titles are excluded. Existing configurations otherwise preserve
|
|
169
|
+
0.2.0 behavior, apart from these extra heading matches and evidence, fields and
|
|
170
|
+
results derived from their sections. See the complete
|
|
171
|
+
[selection fixture](tests/fixtures/rulebook-lint/selection/skill-rules.config.json)
|
|
172
|
+
for working configuration inputs; its domain-specific question is test content.
|
|
173
|
+
|
|
84
174
|
## Native JSON protocol
|
|
85
175
|
|
|
86
176
|
Run `sunstack exec` (or `cargo run -p sunstack -- exec` from the repository root).
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"hasInstallScript": true,
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"name": "@sunstack/cli",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.3.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.
|
|
51
|
+
"version": "0.3.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
|
+
"https://github.com/ShravanSunder/sunstack-tools/releases/download/v0.3.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.
|
|
91
|
+
"version": "0.3.0",
|
|
92
92
|
"volta": {
|
|
93
93
|
"node": "18.14.1",
|
|
94
94
|
"npm": "9.5.0"
|