@brokkai/slopcop 0.0.19 → 0.0.20
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/README.md +110 -48
- package/native/darwin_amd64/slopcop +0 -0
- package/native/darwin_arm64/slopcop +0 -0
- package/native/linux_amd64/slopcop +0 -0
- package/native/linux_arm64/slopcop +0 -0
- package/native/windows_amd64/slopcop.exe +0 -0
- package/native/windows_arm64/slopcop.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,9 @@ The full documentation is at <https://docs.slopcop.com>.
|
|
|
23
23
|
The hosted static analyzer needs no per-language install. Local review uses your
|
|
24
24
|
existing harness logins and Node.js with `npx`. `--mode ai` needs no SlopCop
|
|
25
25
|
login, enabled repository, or supported origin. Use `--mode static` for a
|
|
26
|
-
hosted-only check or CI without reviewer harness logins. A check
|
|
27
|
-
repository; `--if-enabled` skips one the
|
|
28
|
-
was skipped.
|
|
26
|
+
hosted-only check or CI without reviewer harness logins. A check of a
|
|
27
|
+
repository the workspace has never added adds it; `--if-enabled` skips one the
|
|
28
|
+
workspace has disabled, and says it was skipped.
|
|
29
29
|
|
|
30
30
|
## Install
|
|
31
31
|
|
|
@@ -149,6 +149,28 @@ runs with `$SLOPCOP_NO_UPDATE_NOTICE` set to any non-empty value never print
|
|
|
149
149
|
it. A service that no longer accepts a version answers `client_outdated`
|
|
150
150
|
(HTTP 426), which exits `2`.
|
|
151
151
|
|
|
152
|
+
### Automatic updates
|
|
153
|
+
|
|
154
|
+
A slopcop installed by the install script, or by hand from a release archive,
|
|
155
|
+
updates itself. When the service reports a newer release, the command first
|
|
156
|
+
finishes its own work, then downloads that release, checks the archive against
|
|
157
|
+
its `checksums.txt`, and replaces its own binary:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
slopcop: updating from v0.0.7 to v0.0.9...
|
|
161
|
+
slopcop: updated from v0.0.7 to v0.0.9; the next run uses it.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The line goes to stderr. An update that fails never fails the command: it
|
|
165
|
+
prints the upgrade notice with the reason, and is tried again a day later.
|
|
166
|
+
`slopcop update` does the same on request. A slopcop installed through npm,
|
|
167
|
+
pip, pipx or uv is not replaced, because that tool owns the file; it gets the
|
|
168
|
+
notice above, and `slopcop update` names the command to run. Nothing updates
|
|
169
|
+
itself when `$SLOPCOP_NO_AUTO_UPDATE` or `$CI` is set, so a job keeps the
|
|
170
|
+
version it installed, or in a `Stop` hook run. Only a release build is replaced:
|
|
171
|
+
a `dev` build, or one built ahead of a release, stays as built, and a
|
|
172
|
+
pre-release is never installed by itself.
|
|
173
|
+
|
|
152
174
|
### Go
|
|
153
175
|
|
|
154
176
|
```console
|
|
@@ -227,7 +249,7 @@ hosted API, but only when all of these hold:
|
|
|
227
249
|
session's subagents included), or the working tree has a changed
|
|
228
250
|
dependency manifest or lockfile (see below);
|
|
229
251
|
- slopcop is signed in, and the workspace a check would use
|
|
230
|
-
(`$SLOPCOP_WORKSPACE`, or the login's) has the repository active
|
|
252
|
+
(`$SLOPCOP_WORKSPACE`, the one the checkout is mapped to, or the login's) has the repository active
|
|
231
253
|
(`slopcop repo list`), so nothing is sent from other repositories;
|
|
232
254
|
- the tree differs from the last check in the session, including a check the
|
|
233
255
|
agent ran by hand.
|
|
@@ -263,10 +285,9 @@ Use `slopcop init --no-hooks` to install only the skill, or
|
|
|
263
285
|
Ordinary checks do not reinstall a removed hook. The skill remains the way to
|
|
264
286
|
check from other harnesses.
|
|
265
287
|
|
|
266
|
-
The hook
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
never adds a repository and sends nothing for one that is not active.
|
|
288
|
+
The hook checks what an agent writes and hands findings back. Its first check
|
|
289
|
+
of a repository the workspace has never added adds it, as any check does; it
|
|
290
|
+
sends nothing for one the workspace has disabled or has past its active limit.
|
|
270
291
|
|
|
271
292
|
### Managed rollout
|
|
272
293
|
|
|
@@ -314,7 +335,9 @@ printed.
|
|
|
314
335
|
The service URL defaults to `https://slopcop.com`; `--service` or
|
|
315
336
|
`$SLOPCOP_SERVICE` names another for one command. Each service keeps its own
|
|
316
337
|
login: `slopcop --service <url> login` leaves the others signed in and the
|
|
317
|
-
default as it is,
|
|
338
|
+
default as it is, unless the default has no login (as on a machine's first
|
|
339
|
+
login), in which case that service becomes the default and login says so. A login is only sent to the service that
|
|
340
|
+
issued it.
|
|
318
341
|
`slopcop login --default` or `slopcop service use <url>` changes the default,
|
|
319
342
|
after asking at a terminal, and `slopcop service list` shows the stored logins. A command that talks to
|
|
320
343
|
another service than `https://slopcop.com` says so on stderr.
|
|
@@ -329,33 +352,37 @@ Precedence:
|
|
|
329
352
|
| --- | --- |
|
|
330
353
|
| Service URL | `--service`, `$SLOPCOP_SERVICE`, the default stored by `slopcop login --default` or `slopcop service use`, `https://slopcop.com` |
|
|
331
354
|
| Token | `$SLOPCOP_TOKEN`, the login stored for that service |
|
|
332
|
-
| Workspace (`check`, `enable`, `status`, `ignore`, `unignore`, `ignored`, `repo`) | `-w`/`--workspace`, `$SLOPCOP_WORKSPACE`, the one the login is bound to |
|
|
355
|
+
| Workspace (`check`, `enable`, `status`, `ignore`, `unignore`, `ignored`, `repo`) | `-w`/`--workspace`, `$SLOPCOP_WORKSPACE`, the one this machine maps the checkout's repository to, the one the login is bound to |
|
|
333
356
|
|
|
334
357
|
## Workspace and repositories
|
|
335
358
|
|
|
336
|
-
A login
|
|
337
|
-
|
|
359
|
+
A login is bound to one workspace: the one active in the browser when the
|
|
360
|
+
login was approved. Its checks and ignores run in, and bill, that workspace,
|
|
361
|
+
unless this machine maps the repository to another of your workspaces.
|
|
338
362
|
|
|
339
363
|
```console
|
|
340
364
|
slopcop whoami # account, this login's workspace, its plan, the service URL
|
|
341
365
|
slopcop status # this checkout's repository, and whether the workspace checks it
|
|
342
366
|
slopcop enable # add this checkout's repository to the workspace, at a terminal
|
|
343
367
|
slopcop workspace list # the account's workspaces; * marks this login's
|
|
368
|
+
slopcop workspace map "Acme team" # check this checkout's repository there from now on, at a terminal
|
|
369
|
+
slopcop workspace unmap # go back to the login's workspace for this repository
|
|
370
|
+
slopcop workspace mappings # the repositories this machine maps, and to which workspace
|
|
344
371
|
slopcop workspace use "Acme team" # move this login (not the browser) to another, by name or id
|
|
345
372
|
slopcop check -w "Acme team" # check in, and bill, another workspace this once
|
|
346
373
|
slopcop repo list # the workspace's repositories: active, disabled, or over the limit
|
|
347
|
-
slopcop repo disable acme/widgets # stop checking
|
|
374
|
+
slopcop repo disable acme/widgets # stop checking one (owner only)
|
|
348
375
|
slopcop repo enable acme/widgets # turn it back on, within the workspace's active limit
|
|
349
376
|
```
|
|
350
377
|
|
|
351
378
|
`status`, `whoami`, `workspace list` and `repo list` take `--format human|json`,
|
|
352
|
-
as do `workspace use` and `repo enable|disable` for their answer.
|
|
353
|
-
|
|
354
|
-
|
|
379
|
+
as do `workspace use` and `repo enable|disable` for their answer. Repositories
|
|
380
|
+
are free; checks use the workspace's free checks for the month, then credits. A
|
|
381
|
+
disabled repository is not checked and keeps its reports, findings and settings.
|
|
355
382
|
`repo enable` and `repo disable` ask you to type the repository's `owner/name`
|
|
356
383
|
and refuse when stdin is not a terminal: an agent or CI job runs with your
|
|
357
384
|
login, and the service cannot tell it from you, so changing what the workspace
|
|
358
|
-
|
|
385
|
+
checks stays a step you take yourself.
|
|
359
386
|
`workspace use` moves every agent and script using this login, not only the
|
|
360
387
|
one that runs it, so it asks `[y/N]` and refuses when stdin is not a terminal.
|
|
361
388
|
To check in another workspace without moving anyone, `check`, `status`,
|
|
@@ -363,6 +390,21 @@ To check in another workspace without moving anyone, `check`, `status`,
|
|
|
363
390
|
(or `$SLOPCOP_WORKSPACE`) for that one command; the login stays where it was. Give agents that share a login their
|
|
364
391
|
own `--workspace` instead of switching it.
|
|
365
392
|
|
|
393
|
+
`workspace map <name|id>` makes every checkout of the repository `origin`
|
|
394
|
+
names, on this machine, check in that workspace, so one login checks work
|
|
395
|
+
repositories in a team workspace and your own in your personal one. `slopcop
|
|
396
|
+
enable` maps the checkout to the workspace it adds the repository to. The
|
|
397
|
+
mapping is kept in `config.json`, by service and repository URL; it decides
|
|
398
|
+
which workspace pays, so `workspace map` and `workspace unmap` ask `[y/N]` and
|
|
399
|
+
refuse when stdin is not a terminal. `--workspace` and `$SLOPCOP_WORKSPACE`
|
|
400
|
+
still win for one command, and `slopcop status` prints the workspace a
|
|
401
|
+
checkout gets and a `Chosen by` line saying why. A mapping to a workspace that
|
|
402
|
+
was archived, or that your account left, stops the check with
|
|
403
|
+
`workspace_not_found` instead of falling back to another workspace. The first
|
|
404
|
+
check of a repository with no mapping, when your account has more than one
|
|
405
|
+
workspace, notes once which workspace it runs in and any other of yours that
|
|
406
|
+
has the repository; the check still runs.
|
|
407
|
+
|
|
366
408
|
Names match without regard to case; when two workspaces share a name, or two
|
|
367
409
|
providers a repository name, pass the id the listing prints.
|
|
368
410
|
|
|
@@ -371,20 +413,30 @@ providers a repository name, pass the id the listing prints.
|
|
|
371
413
|
first check. It names the workspace and what adding the repository costs, asks
|
|
372
414
|
you to type the repository's `owner/name`, and refuses when stdin is not a
|
|
373
415
|
terminal. A repository that is already added but disabled is enabled again;
|
|
374
|
-
one that is already active is left alone.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
add the repository
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
416
|
+
one that is already active is left alone. Turning a disabled repository back
|
|
417
|
+
on stays a step you take yourself.
|
|
418
|
+
|
|
419
|
+
When your account has more than one workspace and the repository is in neither
|
|
420
|
+
the login's nor the one `--workspace` names, `enable` first lists the
|
|
421
|
+
workspaces by number, marking the login's own and any that already have the
|
|
422
|
+
repository, and asks which one should check and bill it. Before it adds a
|
|
423
|
+
repository another of your workspaces already has, it says so, since both would
|
|
424
|
+
then check and bill it. After enabling in a workspace other than the login's it
|
|
425
|
+
reminds you that a plain check still runs in the login's workspace, and would
|
|
426
|
+
add the repository there: pass `--workspace`, or set `SLOPCOP_WORKSPACE`, to
|
|
427
|
+
check where you enabled it.
|
|
428
|
+
|
|
429
|
+
A check does not need `enable` first: a check of a repository the workspace has
|
|
430
|
+
never added adds it to the workspace the check runs in (the login's, or the one
|
|
431
|
+
`--workspace` names), which then pays for its checks, so an agent is not
|
|
432
|
+
stopped to ask. A check of one the workspace has disabled exits `4` with
|
|
433
|
+
`repository_disabled`, and one past the active limit with
|
|
434
|
+
`active_repository_limit_reached`; these stop before the local reviewers start,
|
|
435
|
+
so the report has no review. A check that adds a repository, like `slopcop
|
|
436
|
+
enable`, says `added owner/name to "Workspace"` on stderr, and `json` reports
|
|
437
|
+
`"repositoryAdded": true` and `addedToWorkspace`: the workspace, how it was
|
|
438
|
+
chosen, and how to check the repository in another one instead. `--add-repository` is no longer needed; it is still
|
|
439
|
+
accepted. Deleting repositories, archiving workspaces, members, credits and
|
|
388
440
|
repository settings stay in the web app. `enable` exits with its first check's
|
|
389
441
|
result; the other account commands exit `0` on success and `2` with the
|
|
390
442
|
service's message and remedy otherwise, as `ignore` does.
|
|
@@ -393,7 +445,7 @@ service's message and remedy otherwise, as `ignore` does.
|
|
|
393
445
|
|
|
394
446
|
```console
|
|
395
447
|
slopcop # check the change in the current checkout
|
|
396
|
-
slopcop check --if-enabled # automatic check: skip a repository
|
|
448
|
+
slopcop check --if-enabled # automatic check: skip a repository disabled here
|
|
397
449
|
slopcop check --format json # same, machine-readable
|
|
398
450
|
slopcop --root ../repo --base origin/main
|
|
399
451
|
```
|
|
@@ -446,8 +498,7 @@ Flags:
|
|
|
446
498
|
| `--no-policy-discovery` | skip `.slopcop/policies` rules |
|
|
447
499
|
| `--timeout DURATION` | how long to wait for the result (default `10m`) |
|
|
448
500
|
| `-w`, `--workspace NAME\|ID` | check in, and bill, this workspace of the account instead of the login's |
|
|
449
|
-
| `--if-enabled` |
|
|
450
|
-
| `--add-repository` | add the repository to the workspace `--workspace` names, which then pays for it, without asking at a terminal; for after the user approved it. A check without it never adds a repository |
|
|
501
|
+
| `--if-enabled` | skip a repository the workspace has disabled or has past its active limit, exiting `0` without sending a check; one it has never added is added |
|
|
451
502
|
| `--verbose` | print the resolved request to stderr, and name each inconclusive check in `human` |
|
|
452
503
|
|
|
453
504
|
The hosted `slopcop.similarity` check runs by default, including when the
|
|
@@ -502,6 +553,9 @@ through Claude ACP. Each uses the newest model of its family at high effort.
|
|
|
502
553
|
mode is not static, then saves the first two that work (or one) as reviewers
|
|
503
554
|
and the rest that work as `review.fallbacks`. Configured reviewers are left
|
|
504
555
|
alone; unset `review.reviewers` and run init to pick again.
|
|
556
|
+
The probe skips a family whose login or API key is plainly missing (Codex or
|
|
557
|
+
Claude Code never logged in here, `DEEPSEEK_API_KEY` unset), and prints one
|
|
558
|
+
line when none work; `slopcop init --verbose` says why each one failed.
|
|
505
559
|
`slopcop init --no-reviewers` skips probing. A reviewer that cannot start does
|
|
506
560
|
not stop the others. One that ends without a verdict runs once more in a fresh
|
|
507
561
|
session; if it still fails, the next unused fallback stands in for it,
|
|
@@ -564,6 +618,12 @@ Patterns are relative to the repository root; quote globs so the shell does
|
|
|
564
618
|
not expand them. They only override the size filter and do not exclude other
|
|
565
619
|
changed source files. Service payload limits still apply to the resulting patch.
|
|
566
620
|
|
|
621
|
+
Changed files that `.bifrostignore` or `[check] exclude` keep out of every
|
|
622
|
+
check are left out of the upload and local review too, listed in
|
|
623
|
+
`omittedFiles` with reason `excluded`; `--include` does not bring them back.
|
|
624
|
+
A deleted file is sent without its old content, so removing a large folder
|
|
625
|
+
does not cost its size.
|
|
626
|
+
|
|
567
627
|
A check run by a Claude Code, Codex or OpenCode agent also sends which models wrote the
|
|
568
628
|
change, so the service can tie each finding to the model that wrote its file.
|
|
569
629
|
The CLI finds the agent's session from its environment and reads that
|
|
@@ -686,13 +746,14 @@ rare in static analysis, typically at a library boundary, so this is the norm
|
|
|
686
746
|
rather than a gap. Each report still says where they are, so a reviewer can
|
|
687
747
|
judge what a `clean` result is worth: `human` prints one `Inconclusive:` line
|
|
688
748
|
with the count and how many concern only files the change does not write, and
|
|
689
|
-
`--verbose` names each check. `json` lists them in
|
|
690
|
-
`policyId`, `reason`
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
`
|
|
694
|
-
|
|
695
|
-
|
|
749
|
+
`--verbose` names each check and the files it concerns. `json` lists them in
|
|
750
|
+
`inconclusive`, each with `policyId`, `reason`, `detail`, `files` (when the
|
|
751
|
+
analyzer named every file the check concerns) and `elsewhere` (true when it
|
|
752
|
+
concerns only files the change does not write), beside the
|
|
753
|
+
`summary.inconclusive` count. `sarif` adds a `note` notification per check
|
|
754
|
+
with `slopcop.inconclusive` and `slopcop.elsewhere` properties and one
|
|
755
|
+
location per file. The service names at most 50; the counts cover the rest.
|
|
756
|
+
It does not yet say which functions or lines each one concerns. A check that timed out or
|
|
696
757
|
that Bifrost judged unreliable is incomplete and counts wherever it is.
|
|
697
758
|
|
|
698
759
|
The service applies `--fail-on` and sets the status; the exit code follows it.
|
|
@@ -726,13 +787,14 @@ disabled it is the one this login is bound to, and `--workspace` after
|
|
|
726
787
|
refusal (`auth_required`, `auth_expired`, `account_required`,
|
|
727
788
|
`repo_not_indexed`, `app_not_installed`, `app_no_repo_access`,
|
|
728
789
|
`gitlab_not_connected`, `no_access`, `insufficient_credits`,
|
|
729
|
-
`repository_disabled`, `
|
|
730
|
-
`repository_add_unconfirmed`, `workspace_repository_limit_reached`,
|
|
790
|
+
`repository_disabled`, `repository_add_unconfirmed`, `workspace_repository_limit_reached`,
|
|
731
791
|
`active_repository_limit_reached`, `owner_required`, and `browser_required`),
|
|
732
792
|
so a script can stop instead of retrying, and `2` otherwise. The CLI refuses a
|
|
733
|
-
check of a repository the workspace has
|
|
734
|
-
`
|
|
735
|
-
|
|
793
|
+
check of a repository the workspace has disabled locally, as
|
|
794
|
+
`repository_disabled`, and one past the active limit as
|
|
795
|
+
`active_repository_limit_reached`, before sending anything or starting the
|
|
796
|
+
local reviewers. Stderr starts with the code, as in `slopcop:
|
|
797
|
+
repository_disabled: …`. `human` prints nothing on
|
|
736
798
|
stdout; `json` prints `{"status": "failed", "code": …, "message": …,
|
|
737
799
|
"remedy": …, "retryable": …}`, plus `installUrl` or `topUpUrl` when the
|
|
738
800
|
service sent one; `sarif` prints a run with `slopcop.status` `failed`, whose
|
|
@@ -754,8 +816,8 @@ The CLI calls `POST <service>/v1/check` with a bearer token:
|
|
|
754
816
|
}
|
|
755
817
|
```
|
|
756
818
|
|
|
757
|
-
`addRepository` is sent
|
|
758
|
-
the
|
|
819
|
+
`addRepository` is sent when the workspace has never added the repository, so
|
|
820
|
+
the check adds it. The service rejects any other field.
|
|
759
821
|
With `--workspace`, every request, the check's, the ignore's and the account
|
|
760
822
|
routes', carries the workspace's id in the `SlopCop-Workspace` header; a name
|
|
761
823
|
is first looked up with `GET <service>/v1/whoami`. The response carries `status`,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|