@brainervirus/workit-cli 5.0.0 → 6.0.1

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
@@ -1,102 +1,24 @@
1
1
  # @brainervirus/workit-cli
2
2
 
3
3
  [![CI](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml/badge.svg)](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml)
4
- [![npm version](https://img.shields.io/npm/v/@brainervirus/workit-cli.svg)](https://www.npmjs.com/package/@brainervirus/workit-cli)
5
- [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/@brainervirus/workit-cli.svg)](https://www.npmjs.com/package/@brainervirus/workit-cli)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BrainerVirus/workit/blob/main/LICENSE)
6
6
 
7
- The workit CLI — an interactive Ink wizard that configures workit for OpenCode, Cursor, Codex and Pi, plus upgrade tooling and an offline installation doctor.
8
-
9
- ## Requirements
10
-
11
- - **Node.js ≥ 24** — the published CLI is a self-contained Node bundle (no Bun runtime). Node 23 and below fail (`ERR_MODULE_NOT_FOUND`/ESM syntax or the `>=24` engine gate).
12
-
13
- ## Install
7
+ The `workit` command: setup wizard, doctor and upgrades, plus the delivery
8
+ verbs agents use (`check`, `ledger`, `git`, `pr`, `ci`, `stack`,
9
+ `verify-delivery`, `grant`, `task`, …). Requires Node.js 24+; the published
10
+ CLI is a self-contained Node bundle.
14
11
 
15
12
  ```bash
16
13
  npm i -g @brainervirus/workit-cli
17
- # or run without installing:
18
- npx @brainervirus/workit-cli init
19
- ```
20
-
21
- ## Usage
22
-
23
- ```bash
24
- workit init # basic / advanced setup wizard
25
- workit upgrade [--hosts=opencode,cursor,codex,pi] [--cli] [--preview | --apply --confirm] [--json]
26
- workit launch <opencode|cursor|codex|pi> [--auto-upgrade] [-- host arguments]
27
- workit doctor # offline installation health report
28
- workit doctor --json # machine-readable report
29
- workit <family> <action> [--payload <json|@file|->] [--task <id>] [--revision <uuid>] [--workspace-revision <uuid|null>] [--view full] [--actor <id>] [--confirm] [--json]
30
- workit action <operation> --payload <JSON> [--preview] [--confirm] [--task <id>] [--json] # preview or run one approved external action
31
- workit handoff --task <id> [--json] # export task state and compact destination context
32
- workit check <name> | workit check [--name <n>] [--shell] [--timeout <s>] [--task <id>] [--json] -- <cmd…> # run a check, record CLI-observed evidence (exit = the command's)
33
- workit uninstall # remove host registrations (keeps ~/.config/workit)
34
- workit # help
14
+ workit init # interactive setup for Claude Code, OpenCode, Cursor, Codex and Pi
15
+ workit doctor # offline installation health
16
+ workit help # every verb; `workit help <verb>` for one
35
17
  ```
36
18
 
37
- `workit init` guides you through: detected host selection, basic global config (locale, branch policy), optional advanced commit policy, YouTrack, VCS, workspaces (scoped hosting/tracker/branch/commit rules, profiles and release tracks), and project hygiene files. The wizard is a TTY application — `workit init` requires an interactive terminal and prints guidance (exiting nonzero) when stdin is not a TTY.
38
-
39
- Authenticate GitHub or GitLab with `gh auth login` or `glab auth login` before hosting actions; Workit does not need a second provider token file. `workit action` Git/hosting payloads accept `cwd` to target any checkout while task state stays in the session directory. Non-Git directories can host tasks for OS work; YouTrack keeps its own permanent token.
40
-
41
- The platforms step lists all four supported hosts. Installed tools are selected
42
- initially; absent tools are disabled. Select all available, clear all, or pick
43
- individual hosts. Apply uses native Codex marketplace and Pi package commands,
44
- OpenCode registration, and a managed Cursor plugin copy. Existing explicit/local
45
- pins and unrelated host settings are preserved.
46
-
47
- Advanced workspace edits preserve existing custom fields. Narrow globs win over
48
- broader matches independent of file order; equal-specificity ambiguity is
49
- reported. A sample-checkout preview shows the selected scope and effective
50
- policy source. GitHub and GitLab can both use YouTrack; GitHub Issues requires
51
- GitHub. Inheritance removes an override instead of freezing global defaults.
52
-
53
- `workit upgrade` previews targeted native package updates and known configuration
54
- migrations. `--apply --confirm` backs up configuration, rejects stale previews,
55
- and verifies the installed version. Local/exact pins are skipped; `--cli` also
56
- updates an existing global npm CLI (`--hosts=none` targets only the CLI). For ephemeral use, invoke
57
- `npx @brainervirus/workit-cli@latest`. JSONC OpenCode configuration currently
58
- requires native inspection rather than automatic mutation.
59
-
60
- OpenCode 2.0.21 cannot target a server plugin with its `plugin update` command
61
- (verified in the official Docker image). Workit reports that limitation and
62
- preserves the OpenCode registration; it never falls back to updating every
63
- plugin or deleting caches. OpenCode package resolution remains host-owned.
64
- Cursor, Codex and Pi use their supported scoped update paths.
65
-
66
- `workit launch <host> --auto-upgrade -- <args>` performs optional upgrades before
67
- launch. Stop other selected host instances first. Registry failure starts the
68
- unchanged host with a warning; installer or verification failure prevents launch.
69
- No startup hook updates an already loaded plugin, and no task-history migration
70
- or host-permission change is performed.
71
-
72
- `workit doctor` checks the offline installation health and exits nonzero when problems are found; `--json` prints the full report as JSON instead of the human-readable table.
73
-
74
- The task surface exposes the eight shared operation families (`task`, `policy`,
75
- `evidence`, `finding`, `decision`, `worker`, `writer`, and `state`) and their 24
76
- closed actions. Payloads can be inline JSON, a UTF-8 `@file`, or UTF-8 stdin
77
- with `-`; `--json` preserves the structured Result shape and exits nonzero for
78
- failures. Headless mutations that require consent use `--confirm` (agent-reported)
79
- or an observed TTY prompt; the action route additionally requires an
80
- interactive TTY — headless action calls return `needs_input` even with
81
- `--confirm`. `workit handoff --task` is read-only and refuses to
82
- emit a handoff when export and inspection revisions differ.
83
-
84
- ## Behavior
85
-
86
- - **Safe apply semantics** — a malformed `config.json` is detected before the wizard renders and reported as a friendly blocked output instead of crashing; the same guard runs after the Apply preview.
87
- - **Stable interaction** — unchanged wizard inputs are no-ops; they settle without React render warnings and never discard draft state.
88
- - **Clean terminal** — only `warn`/`error` diagnostics print to stderr; routine structured `info` records stay in the JSONL journal. Nonzero failures and human-readable errors remain visible.
89
- - **Node support** — the packed CLI runs on Node 24+; installation on Node 24 emits no engine warning from workit's dependency tree.
90
-
91
- ## Package scripts
92
-
93
- ```bash
94
- bun run build # bundle dist/index.js (self-contained, Node shebang) + assets
95
- bun run typecheck # tsc --noEmit
96
- ```
97
-
98
- The build produces a nonsplitting `dist/index.js` with a portable `#!/usr/bin/env node` shebang and copies the deterministic `assets/` (templates) from core.
99
-
100
- ## Docs
19
+ Or run once without installing: `npx @brainervirus/workit-cli init`.
101
20
 
102
- Full usage: https://github.com/BrainerVirus/workit#readme
21
+ See the root [README](https://github.com/BrainerVirus/workit) for concepts and the
22
+ [CLI reference](https://github.com/BrainerVirus/workit#cli-reference), and the
23
+ [guides](https://github.com/BrainerVirus/workit/tree/main/docs/guides) for verification, delivery, grants and
24
+ configuration.
@@ -2,9 +2,10 @@
2
2
 
3
3
  Workit keeps one accountable lead and one shared task state. Inspect current
4
4
  task state before acting; use only the shared operations for task, policy,
5
- evidence, finding, decision, worker, writer, and state changes. Authority is
5
+ evidence, finding, decision, worker, and state changes. Authority is
6
6
  bounded by the requested scope, current revision, caller/session provenance, and
7
- observed capabilities. Never claim host enforcement or evidence that the host
7
+ observed capabilities; delivery is bounded by the workspace autonomy grants
8
+ (`workit grant show`). Never claim host enforcement or evidence that the host
8
9
  cannot provide. Preserve unresolved requirements, gaps, and uncertain workers.
9
10
 
10
11
  Focused methods are loaded only when the resolved policy requires them. A method