@beyondwork/wb-cli 0.1.30 → 0.1.32

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publisher": "beyondwork",
4
4
  "displayName": "Beyond Work",
5
5
  "description": "Tool for interacting with Beyond Work workblocks from VS Code and CLI.",
6
- "version": "0.1.30",
6
+ "version": "0.1.32",
7
7
  "vsce": {
8
8
  "baseContentUrl": "https://github.com/bwllaming/code/blob/HEAD/src/vscode/beyondwork",
9
9
  "baseImagesUrl": "https://github.com/bwllaming/code/raw/HEAD/src/vscode/beyondwork"
@@ -41,10 +41,11 @@ done from Studio.
41
41
  stays behind, and a deploy in Studio would ship it without your change.
42
42
  7. **Prove it.** Run `wb-cli test [<module>]` when the module has tests, then `wb-cli run
43
43
  <module>`, or `wb-cli run <module>/<task> --inputs '{...}'`, for what you changed. A run never
44
- passes through Studio's Start and stops at a task UI. From a monorepo checkout, on a tenant on the
45
- dev-eu1 cluster, you can also drive a UI in a browser from Start to the result, as
46
- `references/browser-validation.md` next to this file describes; it is optional, and anywhere else
47
- it is not possible. What you did not see run, report as not checked.
44
+ passes through Studio's Start and stops at a task UI. Drive what a person sees, from Start
45
+ through each task UI to the result, in a browser as `references/browser-validation.md` next to
46
+ this file describes. That needs a browser tool that acts where the user is signed in to the
47
+ tenant, or a monorepo checkout and a tenant on the dev-eu1 cluster. What you did not see run,
48
+ report as not checked.
48
49
  8. **Report** the Studio workspace URL, the version, the files changed, the validate, test, run and
49
50
  browser results or why there were none, and what is left for the user in Studio.
50
51
 
@@ -63,6 +64,12 @@ own `features/<name>@stream/<workspace-id>`. To continue work someone left in a
63
64
  workspace URL (`wb-cli branches <studio-url>` lists them); cloning `features/<name>` gives only
64
65
  the published state. When the CLI refuses a push or a pull (exit 3), its message names the remedy.
65
66
 
67
+ ## Other platform requests
68
+
69
+ `wb-cli api <verb> '<json>'` sends one request of the platform's WebSocket API as your user, for
70
+ what has no verb of its own: schedules, triggers, permissions, spaces, run data, the LLM calls of a
71
+ run. `wb-cli api --list <word>` finds the verb; `wb-cli api <verb> --describe` shows its arguments.
72
+
66
73
  ## Row store
67
74
 
68
75
  Workblock-scoped rows are shared by `main`, every version and every workspace of the workblock, so a
@@ -1,10 +1,16 @@
1
- # Browser validation from Start to the result (optional, dev tenants only)
1
+ # Browser validation from Start to the result
2
2
 
3
- `bin/wb-cli run` proves Python tasks by their outputs. It never passes through Studio's Start and it
3
+ `wb-cli run` proves Python tasks by their outputs. It never passes through Studio's Start and it
4
4
  parks at a task UI, so what a person sees, from Start through every UI to the result, is proven only
5
- in a browser. This check is optional. It works only on a tenant on the dev-eu1 cluster whose
6
- namespace secrets you can read, because it mints the session cookie with `testcookies`; on any
7
- other tenant, report the UI as not checked and hand over the workspace URL.
5
+ in a browser. Two routes drive one, and the checks are the same:
6
+
7
+ - **Your browser tool**, when your harness gives you one that acts in a browser where the user is
8
+ signed in to the tenant, such as Claude in Chrome in Claude Code or the ChatGPT browser extension
9
+ in the Codex desktop app. It works on any tenant.
10
+ - **The Playwright script** next to this file, from a monorepo checkout on a tenant on the dev-eu1
11
+ cluster whose namespace secrets you can read. It mints its own session cookie with `testcookies`.
12
+
13
+ With neither, report the UI as not checked and hand over the workspace URL.
8
14
 
9
15
  ## When
10
16
 
@@ -13,12 +19,44 @@ or first task, a change to a task UI (the component, its `render_ui` call, the d
13
19
  outputs it returns), and a run of the module you changed that reports `waiting`. "Should work" from
14
20
  the code or the type check is a guess: say what you saw and what you did not.
15
21
 
22
+ ## With your browser tool
23
+
24
+ The browser acts as the user with all of the user's rights, not only the token's scopes. Open only
25
+ this checkout's workspace, the URL that `wb-cli status` prints. Press only Start, the controls of the
26
+ task UIs, Submit and the details of a toast. Never press Deploy, never change sharing, permissions
27
+ or settings, and never delete anything. On a login page, stop and ask the user to sign in in that
28
+ browser; never type credentials. When your tool connects more than one browser, use the one that is
29
+ signed in to the tenant.
30
+
31
+ 1. Push, then run `wb-cli cancel`: while a run waits at a task UI, as `wb-cli run` leaves it,
32
+ Studio shows Stop instead of Start. Then open the workspace. The task UI runs in a sandboxed
33
+ iframe in a process of its own. While the tab is hidden, the clicks and keys that you send into
34
+ it are lost without an error, and screenshots still look right. So check that
35
+ `document.visibilityState` is `visible`, and when it is not, or a click into a task UI has no
36
+ effect, ask the user to bring the browser window to the front and keep it visible until you
37
+ finish.
38
+ 2. Press `Start <module>` or `Try changes` in the toolbar, or pick the module under `Start specific
39
+ module`. When Start opens the "Configure & Run module" form instead of a task UI, stop: the
40
+ module has inputs, which is a finding against step 3 of the skill, not a form to fill in.
41
+ 3. Use each task UI as a person would. Page reading (the accessibility tree, element search, form
42
+ input) may see nothing inside the iframe. Then take a screenshot, click by coordinates, type, and
43
+ zoom in to confirm that the text arrived. Submit and the other run controls are outside the
44
+ iframe, below it.
45
+ 4. A rejected Submit shows a "Submission rejected" toast for a few seconds. Its "View error details"
46
+ button opens the data that the component rejected, with the reason it threw.
47
+ 5. Look at a screenshot of every screen: a red-on-red label or a hidden button is in the picture and
48
+ nowhere else.
49
+ 6. When the run ends, `wb-cli run --wait-for latest` from the checkout prints the state and the
50
+ outputs of every task. Compare the outputs with what the request asked for. When no task UI
51
+ shows the result, a person sees the outputs only as raw data behind the module's output node in
52
+ Studio, and not at all in a Space (`.skills/workblock-architecture`).
53
+
54
+ ## With the Playwright script
55
+
16
56
  When the script stops for the tenant or the access, report the UI as not checked and hand over the
17
57
  workspace URL. Do not probe the access with `kubectl` yourself: a call against another context says
18
58
  `Forbidden` for reasons of its own.
19
59
 
20
- ## How
21
-
22
60
  `browser-run.sh` next to this file does every step in one shell; `validate-ui.mjs` is the Playwright
23
61
  script it runs. Copy both next to your checkout (not into it: the checkout lists files it does not
24
62
  claim).
@@ -39,8 +77,11 @@ claim).
39
77
  and nowhere else. The `result-*` screenshots show the end of the run in Studio, where module
40
78
  outputs are raw data; a Space does not show them at all (`.skills/workblock-architecture`).
41
79
  Compare the outputs with what the request asked for.
42
- 4. When something is wrong, fix it in the checkout, push, and run the script again. After three
43
- rounds on the same problem, stop and report what still fails and what you tried.
80
+
81
+ ## Fix and report
82
+
83
+ When something is wrong, fix it in the checkout, push, and run the check again. After three rounds
84
+ on the same problem, stop and report what still fails and what you tried.
44
85
 
45
86
  Report what you did in the browser, which screenshots you looked at, the outputs set against the
46
87
  request, and anything you could not check and why.