@beyondwork/wb-cli 0.1.47 → 0.1.49
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 +10 -0
- package/README.md +37 -0
- package/out/cli.js +2840 -541
- package/out/extension.js +1 -1
- package/package.json +1 -1
- package/wb-cli/skills/bw-workblock/SKILL.md +35 -13
|
@@ -9,8 +9,13 @@ description: Create or edit a Beyond Work workblock that lives on a tenant, from
|
|
|
9
9
|
files and saves them back to that branch as commits. In the Beyond Work monorepo, call the wrapper by
|
|
10
10
|
its path, `<monorepo>/bin/wb-cli`, wherever this skill says `wb-cli`, and put checkouts outside the
|
|
11
11
|
monorepo. `clone` and `create` write the checkout to the directory you give them. Every other verb
|
|
12
|
-
acts on the checkout that holds the current directory,
|
|
13
|
-
job,
|
|
12
|
+
acts on the checkout that holds the current directory, except `api`, which also accepts `--tenant`.
|
|
13
|
+
The request is the whole job, push and publish included: do not stop to ask. One exception:
|
|
14
|
+
`wb-cli api` refuses an operation that has a warning, such as a deployment to `main`, a deletion,
|
|
15
|
+
or a permission change. It exits with code 3, sends nothing, and prints the warning. Show that
|
|
16
|
+
warning to the user and ask whether to continue. Run the command again with `--yes` only after
|
|
17
|
+
the user agrees. Never pass `--yes` without that answer, even when the request seems to include the
|
|
18
|
+
effect.
|
|
14
19
|
|
|
15
20
|
## Branches and the user's words
|
|
16
21
|
|
|
@@ -40,8 +45,8 @@ branch changes nothing: clone that branch and skip `checkout -b`.
|
|
|
40
45
|
`wb-cli push` saves your work: no other branch changes, and `test` and `run` check what you pushed.
|
|
41
46
|
`wb-cli push --to <target>` publishes your pushed commit to the target: the version branch that the
|
|
42
47
|
request names, such as `integration`, or, when the request names none, your new version branch.
|
|
43
|
-
Report the target
|
|
44
|
-
|
|
48
|
+
Report the target. A deployment to `main` uses Studio or `wb-cli api deploy_workblock_version`;
|
|
49
|
+
follow the confirmation warning above before sending the API request.
|
|
45
50
|
|
|
46
51
|
1. **Get the files.** For a new workblock, `wb-cli create <tenant-host> "<name>" <dir> --new-version
|
|
47
52
|
<name of what you build> -m "<what it is for>"` makes it, on a new version branch with that name.
|
|
@@ -55,7 +60,12 @@ so that the user can deploy it from Studio.
|
|
|
55
60
|
browser checks can publish to it. `.bw/workblock.json` binds the checkout to the platform; do not edit it.
|
|
56
61
|
2. **Read before writing.** `AGENTS.md`, then the `.skills/` entries for the area you touch, then
|
|
57
62
|
`.docs/docs.md` for each platform API you call. The platform changes faster than your memory of
|
|
58
|
-
it, and validation catches only part of what the docs would have told you.
|
|
63
|
+
it, and validation catches only part of what the docs would have told you. The code shows what
|
|
64
|
+
the workblock does; its history shows what users asked for and why. Before you change or extend
|
|
65
|
+
a workblock that has history, read its commit messages with `git log`, and the patches of the
|
|
66
|
+
files you touch with `git log -p -- <path>`. Skip this only for a request that gives the exact
|
|
67
|
+
new text or styling. A condition from an earlier request stays in effect until a request changes
|
|
68
|
+
it, also in new tasks and as the default of a value that you make configurable.
|
|
59
69
|
3. **Design the experience** of every new workblock and module before you write code: read
|
|
60
70
|
`.skills/workblock-architecture`, choose the pattern, and decide who starts each module and what a
|
|
61
71
|
person sees at the start, during input, while it runs and at the result. A module that a person
|
|
@@ -72,8 +82,11 @@ so that the user can deploy it from Studio.
|
|
|
72
82
|
fixes to nearby tasks, no tidying of files you did not need to touch, and no tasks beyond the
|
|
73
83
|
request and the experience of step 3.
|
|
74
84
|
5. **Validate** with `wb-cli validate` until it reports no errors. Warnings are advisory.
|
|
75
|
-
6. **Push** with `wb-cli push -m "<what
|
|
76
|
-
|
|
85
|
+
6. **Push** with `wb-cli push -m "<title: what the user wanted>" -m "Requested: <the user's goal>"
|
|
86
|
+
-m "- <each condition the user stated, with the user's reason and scope>" -m "Changed: <what the
|
|
87
|
+
push does for each condition>"`. Each push saves one commit, and later agents learn the user's
|
|
88
|
+
intent from its message, in `git log`, `wb-cli log` and Studio. Studio's own messages use the
|
|
89
|
+
same shape.
|
|
77
90
|
7. **Prove it.** `wb-cli test` and `wb-cli run` check only what you pushed, and print the commit they
|
|
78
91
|
ran on. Run `wb-cli test [<module>]` when the module has tests, then `wb-cli run <module>`, or
|
|
79
92
|
`wb-cli run <module>/<task> --inputs '{...}'`, for what you changed. Since wb-cli 0.1.36, `wb-cli
|
|
@@ -191,13 +204,14 @@ The building blocks:
|
|
|
191
204
|
After `--continue`, validate, test, and run the merged workblock. `wb-cli merge --abort` gives up.
|
|
192
205
|
- **Studio conversations.** Work that a person did not publish is on a conversation. Take it in with
|
|
193
206
|
`wb-cli merge features/<name>@stream/<id> -m "<what you took in>"`. Never push to it.
|
|
194
|
-
- **Version branches you made.** Delete abandoned ones from Studio, where they are versions
|
|
195
|
-
|
|
207
|
+
- **Version branches you made.** Delete abandoned ones from Studio, where they are versions, or
|
|
208
|
+
use `wb-cli api delete_workblock_branch` after the user confirms its warning.
|
|
196
209
|
- **Publishing a snapshot.** `push --to` publishes the checkout's saved commit. Newer changes on
|
|
197
210
|
its source branch or another version branch stay there. To include them, pull your source branch
|
|
198
211
|
or merge the other version branch first.
|
|
199
212
|
- **`main`.** Publish to the target version branch, then report its Studio URL and the checks you ran. The
|
|
200
|
-
user
|
|
213
|
+
user can deploy it from Studio, or confirm `wb-cli api deploy_workblock_version`.
|
|
214
|
+
`wb-cli push --to main` is refused.
|
|
201
215
|
|
|
202
216
|
## Spaces
|
|
203
217
|
|
|
@@ -235,9 +249,17 @@ still lacks access.
|
|
|
235
249
|
|
|
236
250
|
## Other platform requests
|
|
237
251
|
|
|
238
|
-
`wb-cli api <verb> '<json>'`
|
|
239
|
-
|
|
240
|
-
|
|
252
|
+
`wb-cli api <verb> '<json>'` calls any platform WebSocket operation as your user, including
|
|
253
|
+
permissions, schedules, deployments and administration. The server checks your access. Start with
|
|
254
|
+
`wb-cli api` for Studio topics, then `--list --group <topic>` or `--search <words>`. Discovery defaults
|
|
255
|
+
to Studio; add `--all` or `--surface admin` / `--surface spaces` for other areas. These filters do
|
|
256
|
+
not restrict calls. `<verb> --help` shows generated field help and examples; `--describe` returns
|
|
257
|
+
full schemas as JSON.
|
|
258
|
+
|
|
259
|
+
Prefer `push`, `run`, `test` and the other checkout workflows when they fit: raw API calls do not
|
|
260
|
+
update local files or `.bw/workblock.json`. `api` uses the checkout's tenant and, for operations
|
|
261
|
+
that use it, stream. Override these with `--tenant`, `--stream` or `--no-stream`. Body `-` reads
|
|
262
|
+
JSON from stdin.
|
|
241
263
|
|
|
242
264
|
`wb-cli query "<sql>"` reads the rows of the data model's entities in the development data
|
|
243
265
|
environment, at most 1,000 rows; `--env <name>` reads another environment. `--param name=value`
|