@brokkai/slopcop 0.0.12 → 0.0.13

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 CHANGED
@@ -232,6 +232,29 @@ The hook is dormant in a repository until it is enabled in the workspace. Run
232
232
  check. The hook then checks what an agent writes and hands findings back; it
233
233
  never adds a repository and sends nothing for one that is not active.
234
234
 
235
+ ### Managed rollout
236
+
237
+ An administrator can deploy the `Stop` hook through managed configuration
238
+ instead of having each user run `slopcop init`. Device management must still
239
+ put `slopcop` on `PATH`, and each user still signs in.
240
+
241
+ - **Claude Code:** add the handler `slopcop init` writes to the `hooks` key of
242
+ the managed settings (`managed-settings.json` or a file in
243
+ `managed-settings.d/`): a `Stop` group with `"type": "command"`,
244
+ `"command": "slopcop hook claude || true"`, `"timeout": 720` and
245
+ `"statusMessage": "Checking the change with SlopCop"`. Under
246
+ `allowManagedHooksOnly` the hook init writes to `~/.claude/settings.json`
247
+ is blocked, so the managed hook is the only one that runs. Claude Code runs
248
+ an identical handler from several settings files once.
249
+ - **Codex:** define the `Stop` hook under `[hooks]` in the managed
250
+ `requirements.toml` (`command = "slopcop hook codex || true"`,
251
+ `command_windows = "slopcop hook codex || exit /b 0"`, `timeout = 720`).
252
+ Managed hooks are trusted by policy, so users skip `/hooks`. Codex installs
253
+ nothing from `managed_dir`.
254
+
255
+ Users then run `slopcop init --no-hooks` to install only the skill. See
256
+ [Managed rollout](https://docs.slopcop.com/agents/managed-rollout/).
257
+
235
258
  ## Sign in
236
259
 
237
260
  ```console
@@ -330,7 +353,12 @@ pushed, the CLI uses the merge base with `origin/HEAD` instead, so a check
330
353
  right after a push still covers the branch. `--base REV` names the branch the
331
354
  change started from and, like `git diff REV...HEAD`, uses the merge base of
332
355
  `REV` and `HEAD`, so commits that landed on `REV` after the branch point are not
333
- sent as reverse edits. `--base-exact REV` diffs against `REV` itself. The
356
+ sent as reverse edits. A branch stacked on `REV` that has since merged a newer
357
+ `origin/HEAD`, or `REV`'s own upstream, moves the base to that line's merge base
358
+ once it holds `REV`'s, as after `REV` landed, so the merged-in commits are not
359
+ sent either. When the lines have diverged, no fetchable commit holds both, so
360
+ the base stays and the CLI warns that the patch carries the merged-in commits.
361
+ `--base-exact REV` diffs against `REV` itself. The
334
362
  service must already have the base commit in its clone; a missing one comes back as the service's
335
363
  `base_not_found` message and remedy. The CLI then asks origin for its default
336
364
  branch (`git ls-remote`, no prompt, 10 second limit) and adds a line when the
@@ -371,7 +399,7 @@ changes, and binary content. Git-ignored files stay out, except selected
371
399
  `.slopcop/policies` rules, which must travel because the service evaluates them
372
400
  from the patched checkout.
373
401
 
374
- A check run by a Claude Code or Codex agent also sends which models wrote the
402
+ A check run by a Claude Code, Codex or OpenCode agent also sends which models wrote the
375
403
  change, so the service can tie each finding to the model that wrote its file.
376
404
  The CLI finds the agent's session from its environment and reads that
377
405
  session's own record:
@@ -383,6 +411,10 @@ session's own record:
383
411
  - **Codex:** `CODEX_THREAD_ID` names the rollout under `~/.codex/sessions` (or
384
412
  `$CODEX_HOME/sessions`). Each completed file change gives the files, and its
385
413
  turn gives the model and effort. A move counts as writing its destination.
414
+ - **OpenCode:** `OPENCODE_SESSION_ID` names the session in OpenCode's
415
+ database, `~/.local/share/opencode/opencode.db` (or `$OPENCODE_DB`),
416
+ subagents included. Each completed edit, write or patch gives the files,
417
+ and its step gives the model and its variant as the effort.
386
418
 
387
419
  It reads only those fields, never the conversation, tool input or file
388
420
  contents. What it sends is the harness, its version, the session id as an
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokkai/slopcop",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Static analysis for coding agents and CI: check a change through the hosted SlopCop API",
5
5
  "keywords": [
6
6
  "agents",