@beyondwork/wb-cli 0.1.28 → 0.1.29
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 +4 -0
- package/README.md +6 -14
- package/out/cli.js +257 -556
- package/out/extension.js +193 -861
- package/package.json +15 -11
- package/wb-cli/skills/bw-workblock/SKILL.md +67 -0
- package/wb-cli/skills/bw-workblock/references/browser-run.sh +95 -0
- package/wb-cli/skills/bw-workblock/references/browser-validation.md +44 -0
- package/wb-cli/skills/bw-workblock/references/validate-ui.mjs +208 -0
- package/out/auth.js +0 -75
- package/out/auth.js.map +0 -1
- package/out/cli.js.map +0 -1
- package/out/client.js +0 -117
- package/out/client.js.map +0 -1
- package/out/connection_feedback.js +0 -45
- package/out/connection_feedback.js.map +0 -1
- package/out/extension.js.map +0 -1
- package/out/lib/branches.js +0 -138
- package/out/lib/branches.js.map +0 -1
- package/out/lib/branches.test.js +0 -185
- package/out/lib/branches.test.js.map +0 -1
- package/out/lib/index.js +0 -29
- package/out/lib/index.js.map +0 -1
- package/out/lib/logger.js +0 -28
- package/out/lib/logger.js.map +0 -1
- package/out/lib/workblock.js +0 -470
- package/out/lib/workblock.js.map +0 -1
- package/out/lib/workblock.test.js +0 -607
- package/out/lib/workblock.test.js.map +0 -1
- package/out/lib/workspace.js +0 -282
- package/out/lib/workspace.js.map +0 -1
- package/out/lib/workspace.test.js +0 -666
- package/out/lib/workspace.test.js.map +0 -1
- package/out/lib/ws-client.test.js +0 -188
- package/out/lib/ws-client.test.js.map +0 -1
- package/out/tree_data_provider.js +0 -274
- package/out/tree_data_provider.js.map +0 -1
- package/out/types.js +0 -25
- package/out/types.js.map +0 -1
- package/out/ws-client.js +0 -466
- package/out/ws-client.js.map +0 -1
package/package.json
CHANGED
|
@@ -3,17 +3,22 @@
|
|
|
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.
|
|
6
|
+
"version": "0.1.29",
|
|
7
|
+
"vsce": {
|
|
8
|
+
"baseContentUrl": "https://github.com/bwllaming/code/blob/HEAD/src/vscode/beyondwork",
|
|
9
|
+
"baseImagesUrl": "https://github.com/bwllaming/code/raw/HEAD/src/vscode/beyondwork"
|
|
10
|
+
},
|
|
7
11
|
"icon": "media/icon.png",
|
|
8
12
|
"engines": {
|
|
9
13
|
"vscode": "^1.94.0",
|
|
10
|
-
"node": "
|
|
14
|
+
"node": "^20.19.0 || ^22.13.0 || >=23.5.0"
|
|
11
15
|
},
|
|
12
16
|
"categories": [
|
|
13
17
|
"Other"
|
|
14
18
|
],
|
|
15
19
|
"bin": {
|
|
16
|
-
"beyondwork": "./out/cli.js"
|
|
20
|
+
"beyondwork": "./out/cli.js",
|
|
21
|
+
"wb-cli": "./out/cli.js"
|
|
17
22
|
},
|
|
18
23
|
"activationEvents": [
|
|
19
24
|
"onView:beyondworkConnections",
|
|
@@ -31,6 +36,7 @@
|
|
|
31
36
|
],
|
|
32
37
|
"files": [
|
|
33
38
|
"out/**/*",
|
|
39
|
+
"wb-cli/skills/bw-workblock/**",
|
|
34
40
|
"media/icon.png",
|
|
35
41
|
"CHANGELOG.md",
|
|
36
42
|
"README.md",
|
|
@@ -138,24 +144,22 @@
|
|
|
138
144
|
"file-type": "^21.3.3",
|
|
139
145
|
"glob": "^11.1.0",
|
|
140
146
|
"ignore": "^7.0.3",
|
|
141
|
-
"markdown-it": "^14.2
|
|
147
|
+
"markdown-it": "^14.3.2",
|
|
142
148
|
"mime-types": "^2.1.35",
|
|
143
149
|
"mocha": "^10.8.2",
|
|
144
150
|
"node-fetch-cache": "^5.1.0",
|
|
145
151
|
"uuid": "^11.0.3",
|
|
146
152
|
"ws": "^8.21.1",
|
|
147
|
-
"yaml": "^2.
|
|
153
|
+
"yaml": "^2.9.1"
|
|
148
154
|
},
|
|
149
155
|
"scripts": {
|
|
150
|
-
"compile": "pnpm run check-types && node esbuild.js --production
|
|
156
|
+
"compile": "pnpm run check-types && node esbuild.js --production",
|
|
151
157
|
"check-types": "tsc --noEmit",
|
|
152
|
-
"watch": "
|
|
158
|
+
"watch": "node esbuild.js --watch",
|
|
153
159
|
"watch:esbuild": "node esbuild.js --watch",
|
|
154
160
|
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
|
|
155
|
-
"package": "pnpm run check-types && node esbuild.js --production
|
|
161
|
+
"package": "pnpm run check-types && node esbuild.js --production",
|
|
156
162
|
"vsix": "bazel build //src/vscode/beyondwork:package",
|
|
157
|
-
"
|
|
158
|
-
"build-lib": "tsc -p tsconfig.json",
|
|
159
|
-
"test": "pnpm run build-lib && mocha 'out/lib/**/*.test.js'"
|
|
163
|
+
"test": "pnpm run check-types && node esbuild.js --tests && mocha 'out/lib/**/*.test.js'"
|
|
160
164
|
}
|
|
161
165
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bw-workblock
|
|
3
|
+
description: Create or edit a Beyond Work workblock that lives on a tenant, from a coding agent session in the Beyond Work monorepo, with `bin/wb-cli`. Use whenever the user asks to create, change, fix, extend, inspect, run or validate a workblock on a tenant, names a Studio URL (https://<tenant>/w/studio/detail/<id> or /w/studio/s/<id>) or a workblock id, or wants a change pushed to a workblock version. Covers credentials, create/clone/pull/push, validation, unit tests, runs, versions, and where the authoring knowledge (skills, docs) lands in the checkout.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# bw-workblock
|
|
7
|
+
|
|
8
|
+
`bin/wb-cli` in the monorepo turns a workblock on a tenant into local files and saves them back the
|
|
9
|
+
way Studio's Save and Update do. `clone` and `create` write the checkout to the directory you give
|
|
10
|
+
them: put it outside the monorepo. Every other verb acts on the checkout that holds the current
|
|
11
|
+
directory, so run it from there and call the wrapper by its path, `<monorepo>/bin/wb-cli validate`
|
|
12
|
+
(written `bin/wb-cli` below). The request is the whole job, push and publish included: do not stop
|
|
13
|
+
to ask. Deploying a version to `main` is not part of it: the user does that in Studio, because it
|
|
14
|
+
changes what every user of the tenant runs.
|
|
15
|
+
|
|
16
|
+
## The loop
|
|
17
|
+
|
|
18
|
+
1. **Get the files.** `bin/wb-cli clone <studio-url> <dir>`, or `bin/wb-cli create <tenant-host>
|
|
19
|
+
"<name>" <dir>` for a new workblock. The checkout is a git repository that wb-cli commits to:
|
|
20
|
+
HEAD is the server's state after the last clone, pull or push, so `git diff` shows your unpushed
|
|
21
|
+
edits. `.bw/workblock.json` binds it to the platform; do not edit it.
|
|
22
|
+
2. **Read before writing.** `AGENTS.md`, then the `.skills/` entries for the area you touch, then
|
|
23
|
+
`.docs/docs.md` for each platform API you call. The platform changes faster than your memory of
|
|
24
|
+
it, and validation catches only part of what the docs would have told you.
|
|
25
|
+
3. **Design the experience** of every new workblock and module before you write code: read
|
|
26
|
+
`.skills/workblock-architecture`, choose the pattern, and decide who starts each module and what a
|
|
27
|
+
person sees at the start, during input, while it runs and at the result. A module that a person
|
|
28
|
+
starts begins with a task that shows a UI and has no module inputs: for a module with inputs,
|
|
29
|
+
Studio's Start opens a generic "Configure & Run module" form with one raw field per input.
|
|
30
|
+
4. **Edit.** A test is an entry under the module's `tests:` (`name`, `type: pytest`) plus
|
|
31
|
+
`<module>/tests/<name>.py`, which imports a task's function as `from <package> import <function>`,
|
|
32
|
+
the package being the task name in lower case with spaces replaced by underscores. A file no
|
|
33
|
+
manifest entry claims is not pushed. Change only what the request asks for: no fixes to nearby
|
|
34
|
+
tasks, no tidying of files you did not need to touch, and no tasks beyond the request and the
|
|
35
|
+
experience of step 3.
|
|
36
|
+
5. **Validate** with `bin/wb-cli validate` until it reports no errors. Warnings are advisory.
|
|
37
|
+
6. **Publish** with `bin/wb-cli push --update` (`push --new-version <name> --update` from a `main`
|
|
38
|
+
checkout). Without `--update`, or when the CLI reports the push as not published, the version
|
|
39
|
+
stays behind, and a deploy in Studio would ship it without your change.
|
|
40
|
+
7. **Prove it.** Run `bin/wb-cli test [<module>]` when the module has tests, then `bin/wb-cli run
|
|
41
|
+
<module>`, or `bin/wb-cli run <module>/<task> --inputs '{...}'`, for what you changed. A run never
|
|
42
|
+
passes through Studio's Start and stops at a task UI. On a tenant on the dev-eu1 cluster you can
|
|
43
|
+
also drive a UI in a browser from Start to the result, as `references/browser-validation.md` next
|
|
44
|
+
to this file describes; it is optional, and on any other tenant it is not possible. What you did
|
|
45
|
+
not see run, report as not checked.
|
|
46
|
+
8. **Report** the Studio workspace URL, the version, the files changed, the validate, test, run and
|
|
47
|
+
browser results or why there were none, and what is left for the user in Studio.
|
|
48
|
+
|
|
49
|
+
## Credentials
|
|
50
|
+
|
|
51
|
+
`bin/wb-cli login <host>` checks the tenant's token in `~/.config/beyondwork/credentials.json` and
|
|
52
|
+
prints the user it belongs to; when there is none, it says what to ask the user for. You never
|
|
53
|
+
handle the token: do not open the credentials file, source an environment file that holds one, ask
|
|
54
|
+
for it, or put it in a command, because your transcript and the shell history are kept.
|
|
55
|
+
|
|
56
|
+
## Branches
|
|
57
|
+
|
|
58
|
+
`main` is what is deployed; the CLI never writes it, and it is empty until the first deploy. A
|
|
59
|
+
version `features/<name>` holds what was published with Update; each Studio workspace saves to its
|
|
60
|
+
own `features/<name>@stream/<workspace-id>`. To continue work someone left in a workspace, clone the
|
|
61
|
+
workspace URL (`bin/wb-cli branches <studio-url>` lists them); cloning `features/<name>` gives only
|
|
62
|
+
the published state. When the CLI refuses a push or a pull (exit 3), its message names the remedy.
|
|
63
|
+
|
|
64
|
+
## Row store
|
|
65
|
+
|
|
66
|
+
Workblock-scoped rows are shared by `main`, every version and every workspace of the workblock, so a
|
|
67
|
+
test that writes rows uses keys of its own and never resets the store.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# The browser-validation recipe as one script, run from inside the workblock checkout:
|
|
3
|
+
# REPO=<monorepo> MODULE=<module> SCRIPT=<path>/validate-ui.mjs SHOTS_DIR=<dir> bash browser-run.sh
|
|
4
|
+
# START=studio (the default) presses the module's Start button in the browser, the way a person
|
|
5
|
+
# does. START=cli starts the run with `wb-cli run <module>` instead, for a module that people never
|
|
6
|
+
# start from Studio (a trigger, a schedule or another workblock starts it).
|
|
7
|
+
# Every step is one shell, so the session cookie never lives in an exported variable.
|
|
8
|
+
# Exit codes: 0 submitted and outputs printed; 1 setup or run problem (the message says which);
|
|
9
|
+
# 3 the run failed or still waits at a UI nobody drove; validate-ui.mjs's own 2 (login or page),
|
|
10
|
+
# 3 (submit rejected, or Start opened the generic input form) and 4 (no task UI) pass through, and
|
|
11
|
+
# its 5 (a UI with its own actions, left open) ends the recipe with the run waiting there, exit 0.
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
: "${REPO:?the monorepo checkout}" "${MODULE:?the module to run}" "${SCRIPT:?validate-ui.mjs}" "${SHOTS_DIR:?screenshot directory}"
|
|
14
|
+
START=${START:-studio}
|
|
15
|
+
case "$START" in studio | cli) ;; *) echo "START is studio or cli, not $START" >&2; exit 1 ;; esac
|
|
16
|
+
W="$REPO/bin/wb-cli"
|
|
17
|
+
|
|
18
|
+
# 1. The tenant host and the workspace URL of this checkout.
|
|
19
|
+
STATUS=$("$W" status --json)
|
|
20
|
+
HOST=$(jq -r .marker.host <<<"$STATUS")
|
|
21
|
+
WORKSPACE_URL="https://$HOST/w/studio/s/$(jq -r .marker.streamId <<<"$STATUS")"
|
|
22
|
+
|
|
23
|
+
# 2. testcookies inputs. -t is the host's first label (testcookies builds the cookie domain
|
|
24
|
+
# <t>.dev-eu1.bworker.ai from it, so the tenant must be on dev-eu1). -n is the Kubernetes
|
|
25
|
+
# namespace of the tenant's ingress. -e is the user the wb-cli token belongs to. kubectl
|
|
26
|
+
# runs with the monorepo's environment, which holds the kubeconfig.
|
|
27
|
+
TENANT=${HOST%%.*}
|
|
28
|
+
NS=$(cd "$REPO" && eval "$(DIRENV_LOG_FORMAT= direnv export bash 2>/dev/null)" && kubectl --context dev-eu1 get ingress -A \
|
|
29
|
+
-o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.spec.rules[*].host}{"\n"}{end}' 2>/dev/null |
|
|
30
|
+
awk -v h="$HOST" '{for (i = 2; i <= NF; i++) if ($i == h) { print $1; exit }}') || true
|
|
31
|
+
[ -n "$NS" ] || { echo "No ingress on dev-eu1 serves $HOST: the tenant is not on dev-eu1, or kubectl has no access. Report the UI as not checked in a browser." >&2; exit 1; }
|
|
32
|
+
EMAIL=$("$W" login "$HOST" --json | jq -r .user)
|
|
33
|
+
echo "host=$HOST tenant=$TENANT namespace=$NS email=$EMAIL workspace=$WORKSPACE_URL"
|
|
34
|
+
|
|
35
|
+
# 3. Mint the cookie into a private file. Never print it. A Forbidden here means the tenant's
|
|
36
|
+
# secret is not readable with your credentials: that is the stop to report.
|
|
37
|
+
COOKIE_FILE=$(umask 077 && mktemp)
|
|
38
|
+
trap 'rm -f "$COOKIE_FILE"' EXIT
|
|
39
|
+
COOKIE_ERR=$(mktemp)
|
|
40
|
+
if ! (cd "$REPO" && bin/bazel run //src/beyondwork.ai/tools/testcookies:testcookies -- \
|
|
41
|
+
-n "$NS" -t "$TENANT" -e "$EMAIL" >"$COOKIE_FILE" 2>"$COOKIE_ERR"); then
|
|
42
|
+
grep -i -m 3 'forbidden\|denied\|error' "$COOKIE_ERR" >&2 || tail -n 3 "$COOKIE_ERR" >&2
|
|
43
|
+
rm -f "$COOKIE_ERR"
|
|
44
|
+
echo "testcookies failed; the UI cannot be checked in a browser with these credentials. Report that." >&2
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
rm -f "$COOKIE_ERR"
|
|
48
|
+
[ -s "$COOKIE_FILE" ] || { echo "testcookies wrote no cookie" >&2; exit 1; }
|
|
49
|
+
|
|
50
|
+
# 4. With START=studio the browser starts the run. A run that still waits would show its UI before
|
|
51
|
+
# Start is pressed, so stop it first, as `run` does. With START=cli the run starts here and must
|
|
52
|
+
# report "waiting"; anything else is a task problem to fix first.
|
|
53
|
+
if [ "$START" = studio ]; then
|
|
54
|
+
"$W" cancel
|
|
55
|
+
RUN_ID=latest
|
|
56
|
+
START_MODULE=$MODULE
|
|
57
|
+
else
|
|
58
|
+
RUN=$("$W" run "$MODULE" --json) || true
|
|
59
|
+
[ "$(jq -r .status <<<"$RUN")" = waiting ] || { echo "run did not reach the UI:" >&2; echo "$RUN" >&2; exit 1; }
|
|
60
|
+
RUN_ID=$(jq -r .run_id <<<"$RUN")
|
|
61
|
+
START_MODULE=
|
|
62
|
+
echo "run $RUN_ID is waiting at $(jq -r '.tasks[] | select(.task_id == "'"$(jq -r .waiting_task_id <<<"$RUN")"'") | .task_name' <<<"$RUN")"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# 5. Drive each UI the run shows, one validate-ui.mjs call per UI, until the run stops waiting.
|
|
66
|
+
# Right after a submit the run can still report the submitted UI as waiting; when no further
|
|
67
|
+
# UI appears (exit 4 after the first), the run has gone past it. bin/node needs WORKSPACE_ROOT
|
|
68
|
+
# when the current directory is outside the monorepo.
|
|
69
|
+
STEP=1
|
|
70
|
+
OPEN=
|
|
71
|
+
while :; do
|
|
72
|
+
CODE=0
|
|
73
|
+
WB_WORKSPACE_URL="$WORKSPACE_URL" BW_SAML_COOKIE_FILE="$COOKIE_FILE" SHOTS_DIR="$SHOTS_DIR" BW_REPO="$REPO" \
|
|
74
|
+
WB_START_MODULE="$START_MODULE" WB_UI_STEP="$STEP" WORKSPACE_ROOT="$REPO" "$REPO/bin/node" "$SCRIPT" || CODE=$?
|
|
75
|
+
if [ "$CODE" -eq 5 ]; then
|
|
76
|
+
OPEN=1
|
|
77
|
+
break
|
|
78
|
+
fi
|
|
79
|
+
if [ "$CODE" -ne 0 ]; then
|
|
80
|
+
{ [ "$CODE" -eq 4 ] && [ "$STEP" -gt 1 ]; } || exit "$CODE"
|
|
81
|
+
break
|
|
82
|
+
fi
|
|
83
|
+
[ "$("$W" run --wait-for "$RUN_ID" --json | jq -r .status)" = waiting ] || break
|
|
84
|
+
STEP=$((STEP + 1))
|
|
85
|
+
START_MODULE=
|
|
86
|
+
[ "$STEP" -le 10 ] || { echo "The run still waits after 10 UIs; stopping." >&2; exit 1; }
|
|
87
|
+
done
|
|
88
|
+
|
|
89
|
+
# 6. The outputs are the proof. A run that waits at a UI nobody drove has not reached its result;
|
|
90
|
+
# one that waits at the UI left open is an app doing its job.
|
|
91
|
+
"$W" run --wait-for "$RUN_ID"
|
|
92
|
+
if [ -z "$OPEN" ] && [ "$("$W" run --wait-for "$RUN_ID" --json | jq -r .status)" = waiting ]; then
|
|
93
|
+
echo "The run still waits for a person that no UI step drove: the recipe did not reach the result." >&2
|
|
94
|
+
exit 3
|
|
95
|
+
fi
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Browser validation from Start to the result (optional, dev tenants only)
|
|
2
|
+
|
|
3
|
+
`bin/wb-cli run` proves Python tasks by their outputs. It never passes through Studio's Start and it
|
|
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.
|
|
8
|
+
|
|
9
|
+
## When
|
|
10
|
+
|
|
11
|
+
Worth doing for a new workblock or module that a person starts, a change to such a module's inputs
|
|
12
|
+
or first task, a change to a task UI (the component, its `render_ui` call, the data it shows or the
|
|
13
|
+
outputs it returns), and a run of the module you changed that reports `waiting`. "Should work" from
|
|
14
|
+
the code or the type check is a guess: say what you saw and what you did not.
|
|
15
|
+
|
|
16
|
+
When the script stops for the tenant or the access, report the UI as not checked and hand over the
|
|
17
|
+
workspace URL. Do not probe the access with `kubectl` yourself: a call against another context says
|
|
18
|
+
`Forbidden` for reasons of its own.
|
|
19
|
+
|
|
20
|
+
## How
|
|
21
|
+
|
|
22
|
+
`browser-run.sh` next to this file does every step in one shell; `validate-ui.mjs` is the Playwright
|
|
23
|
+
script it runs. Copy both next to your checkout (not into it: the checkout lists files it does not
|
|
24
|
+
claim).
|
|
25
|
+
|
|
26
|
+
1. Edit `useTheUi()` in your copy: fill the fields, press the buttons and wait for the texts the
|
|
27
|
+
request describes, with `shot(page, "<name>")` at each step.
|
|
28
|
+
2. Push, then run from inside the checkout:
|
|
29
|
+
```bash
|
|
30
|
+
REPO=<monorepo> MODULE=<module> SCRIPT=<dir>/validate-ui.mjs SHOTS_DIR=<dir>/shots \
|
|
31
|
+
bash <dir>/browser-run.sh
|
|
32
|
+
```
|
|
33
|
+
It mints the session cookie into a private file, presses the module's Start button as a person
|
|
34
|
+
does, drives each UI the run shows and submits it (a UI with its own actions has no Submit:
|
|
35
|
+
press the one that continues the run in `useTheUi`, or it is left open), and prints the run's
|
|
36
|
+
final states and outputs.
|
|
37
|
+
Every stop prints what to do.
|
|
38
|
+
3. Look at every screenshot in `SHOTS_DIR`: a red-on-red label or a hidden button is in the picture
|
|
39
|
+
and nowhere else. Compare the outputs with what the request asked for.
|
|
40
|
+
4. When something is wrong, fix it in the checkout, push, and run the script again. After three
|
|
41
|
+
rounds on the same problem, stop and report what still fails and what you tried.
|
|
42
|
+
|
|
43
|
+
Report what you did in the browser, which screenshots you looked at, the outputs set against the
|
|
44
|
+
request, and anything you could not check and why.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// validate-ui.mjs: start a module with Studio's Start button, drive its task UI in the
|
|
2
|
+
// workspace, submit it, and prove the submit landed. Copy it next to your checkout, edit useTheUi(), and run:
|
|
3
|
+
//
|
|
4
|
+
// WORKSPACE_ROOT=<repo> <repo>/bin/node validate-ui.mjs
|
|
5
|
+
//
|
|
6
|
+
// with these environment variables:
|
|
7
|
+
// BW_REPO the monorepo checkout; @playwright/test is loaded from its src/ts/neui
|
|
8
|
+
// (default: WORKSPACE_ROOT)
|
|
9
|
+
// WB_WORKSPACE_URL https://<tenant-host>/w/studio/s/<workspace-id>, from `bin/wb-cli status`
|
|
10
|
+
// (not the /w/studio/detail/<id> page: that one shows no task UI)
|
|
11
|
+
// BW_SAML_COOKIE_FILE file that holds the testcookies output (chmod 600; never print it)
|
|
12
|
+
// SHOTS_DIR where the screenshots go (default: ./shots)
|
|
13
|
+
// WB_START_MODULE the module to start with Studio's Start button, the way a person does;
|
|
14
|
+
// leave it unset when a run already waits at the UI (`bin/wb-cli run`)
|
|
15
|
+
// WB_UI_STEP which UI of the run this is, 1 for the first; useTheUi gets it
|
|
16
|
+
//
|
|
17
|
+
// Exit codes: 0 submitted or closed, 5 left open (a UI with its own actions and no Submit),
|
|
18
|
+
// 2 login or page problem, 3 submit rejected or Start opened the generic input form, 4 no task
|
|
19
|
+
// UI appeared, 1 anything else.
|
|
20
|
+
// After exit 0, read the outputs: from the checkout, `bin/wb-cli run --wait-for latest`.
|
|
21
|
+
|
|
22
|
+
import { createRequire } from 'node:module';
|
|
23
|
+
import fs from 'node:fs';
|
|
24
|
+
import path from 'node:path';
|
|
25
|
+
|
|
26
|
+
// NODE_PATH does not apply to ESM `import`, so load Playwright through require from neui.
|
|
27
|
+
const repo = process.env.BW_REPO ?? process.env.WORKSPACE_ROOT;
|
|
28
|
+
if (!repo) throw new Error('Set BW_REPO (or WORKSPACE_ROOT) to the monorepo checkout.');
|
|
29
|
+
const require = createRequire(path.join(repo, 'src/ts/neui/package.json'));
|
|
30
|
+
let chromium;
|
|
31
|
+
try {
|
|
32
|
+
({ chromium } = require('@playwright/test'));
|
|
33
|
+
} catch {
|
|
34
|
+
console.error(`Playwright is not installed in ${repo}/src/ts. Run \`cd ${repo}/src/ts && ../../bin/pnpm install --frozen-lockfile\`, then this again.`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
// Installing the packages does not fetch the browser; this does, at the version the package expects.
|
|
38
|
+
const installBrowser = `cd ${repo}/src/ts/neui && ../../../bin/pnpm exec playwright install chromium`;
|
|
39
|
+
|
|
40
|
+
const url = process.env.WB_WORKSPACE_URL;
|
|
41
|
+
const cookieFile = process.env.BW_SAML_COOKIE_FILE;
|
|
42
|
+
const startModule = process.env.WB_START_MODULE;
|
|
43
|
+
const uiStep = Number(process.env.WB_UI_STEP ?? '1');
|
|
44
|
+
const shotsDir = path.resolve(process.env.SHOTS_DIR ?? 'shots');
|
|
45
|
+
if (!url || !cookieFile) throw new Error('Set WB_WORKSPACE_URL and BW_SAML_COOKIE_FILE.');
|
|
46
|
+
const host = new URL(url).hostname;
|
|
47
|
+
const cookie = fs.readFileSync(cookieFile, 'utf8').trim();
|
|
48
|
+
if (!cookie) throw new Error(`${cookieFile} is empty: mint the cookie again with testcookies.`);
|
|
49
|
+
fs.mkdirSync(shotsDir, { recursive: true });
|
|
50
|
+
|
|
51
|
+
let shots = 0;
|
|
52
|
+
async function shot(page, name) {
|
|
53
|
+
const file = path.join(shotsDir, `ui${uiStep}-${String(++shots).padStart(2, '0')}-${name}.png`);
|
|
54
|
+
await page.screenshot({ path: file });
|
|
55
|
+
console.log(`screenshot ${file}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ---- Edit this: use the UI the way the user would. `ui` is the component inside
|
|
59
|
+
// iframe[srcdoc]; buttons such as Submit are on `page`, outside the iframe. A run that shows
|
|
60
|
+
// several UIs calls this once for each, with `step` 1, 2, …: branch on it. ----
|
|
61
|
+
async function useTheUi(page, ui, step) {
|
|
62
|
+
await ui.getByLabel('Name').fill('Grace');
|
|
63
|
+
await shot(page, 'filled');
|
|
64
|
+
await ui.getByRole('button', { name: 'Shout' }).click();
|
|
65
|
+
await ui.getByText('GRACE!').waitFor();
|
|
66
|
+
await shot(page, 'after-shout');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Presses Start as a person does. Returns 0 when a task UI appears, 2 when Start is missing,
|
|
70
|
+
// 3 when it opens the "Configure & Run module" form (a finding, not a step), 4 when nothing appears.
|
|
71
|
+
async function pressStart(page, moduleName) {
|
|
72
|
+
const named = page.getByRole('button', { name: `Start ${moduleName}`, exact: true });
|
|
73
|
+
const tryChanges = page.getByRole('button', { name: 'Try changes', exact: true });
|
|
74
|
+
const menu = page.getByRole('button', { name: 'Start specific module', exact: true });
|
|
75
|
+
try {
|
|
76
|
+
await named.or(tryChanges).or(menu).first().waitFor({ timeout: 60_000 });
|
|
77
|
+
} catch {
|
|
78
|
+
await shot(page, 'no-start-button');
|
|
79
|
+
console.error(`No Start button for module "${moduleName}" after 60 s. Check the module name and that the workblock validates.`);
|
|
80
|
+
return 2;
|
|
81
|
+
}
|
|
82
|
+
await shot(page, 'before-start');
|
|
83
|
+
if (await named.isVisible()) {
|
|
84
|
+
await named.click();
|
|
85
|
+
} else if (await menu.isVisible()) {
|
|
86
|
+
await menu.click();
|
|
87
|
+
// The entrypoint's item also carries an "entry" badge, so match the name's own text.
|
|
88
|
+
await page.getByRole('menuitem').filter({ has: page.getByText(moduleName, { exact: true }) }).click();
|
|
89
|
+
} else {
|
|
90
|
+
await tryChanges.click();
|
|
91
|
+
}
|
|
92
|
+
// The loser of the race times out later; both branches settle, so neither rejects unhandled.
|
|
93
|
+
const outcome = await Promise.race([
|
|
94
|
+
page.getByRole('dialog', { name: 'Configure & Run module' }).waitFor({ timeout: 60_000 }).then(() => 'form', () => 'timeout'),
|
|
95
|
+
page.locator('iframe[srcdoc]').first().waitFor({ timeout: 60_000 }).then(() => 'ui', () => 'timeout'),
|
|
96
|
+
]);
|
|
97
|
+
if (outcome === 'form') {
|
|
98
|
+
await shot(page, 'start-input-form');
|
|
99
|
+
console.error(
|
|
100
|
+
`Start opened the generic "Configure & Run module" form: module "${moduleName}" has inputs, so a person who presses Start types raw values before any task UI. Give the module a first task with a UI and no module inputs, or set START=cli when people never start this module.`,
|
|
101
|
+
);
|
|
102
|
+
return 3;
|
|
103
|
+
}
|
|
104
|
+
if (outcome === 'timeout') {
|
|
105
|
+
await shot(page, 'no-task-ui');
|
|
106
|
+
console.error('No task UI and no input form 60 s after Start. Read the run with `bin/wb-cli run --wait-for latest`.');
|
|
107
|
+
return 4;
|
|
108
|
+
}
|
|
109
|
+
return 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let browser;
|
|
113
|
+
try {
|
|
114
|
+
browser = await chromium.launch();
|
|
115
|
+
} catch (e) {
|
|
116
|
+
if (!String(e?.message).includes("Executable doesn't exist")) throw e;
|
|
117
|
+
console.error(`Playwright's Chromium is not installed. Run \`${installBrowser}\`, then this again.`);
|
|
118
|
+
process.exit(1);
|
|
119
|
+
}
|
|
120
|
+
let exitCode = 1;
|
|
121
|
+
try {
|
|
122
|
+
const context = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
123
|
+
await context.addCookies([
|
|
124
|
+
{ name: '_saml_session', value: cookie, domain: host, path: '/', httpOnly: true, secure: true, sameSite: 'None' },
|
|
125
|
+
]);
|
|
126
|
+
const page = await context.newPage();
|
|
127
|
+
page.setDefaultTimeout(30_000);
|
|
128
|
+
// Console messages of the page and of the component iframe. A rejected submit shows only
|
|
129
|
+
// "Submission rejected" on screen; the reason thrown by the submit handler is logged here.
|
|
130
|
+
const consoleLines = [];
|
|
131
|
+
page.on('console', (m) => {
|
|
132
|
+
if (m.type() === 'error' || m.type() === 'warning') consoleLines.push(`console.${m.type()}: ${m.text()}`);
|
|
133
|
+
});
|
|
134
|
+
page.on('pageerror', (e) => consoleLines.push(`pageerror: ${e.message}`));
|
|
135
|
+
|
|
136
|
+
const response = await page.goto(url);
|
|
137
|
+
if (response?.status() === 403) {
|
|
138
|
+
console.error('403 Forbidden: the cookie email is not a user of this tenant. Use the email that `bin/wb-cli login <host>` prints.');
|
|
139
|
+
exitCode = 2;
|
|
140
|
+
} else if (new URL(page.url()).hostname !== host) {
|
|
141
|
+
console.error(`Redirected to ${new URL(page.url()).hostname}: the cookie was rejected or expired. Mint a new one.`);
|
|
142
|
+
exitCode = 2;
|
|
143
|
+
} else {
|
|
144
|
+
const started = startModule ? await pressStart(page, startModule) : 0;
|
|
145
|
+
if (started !== 0) {
|
|
146
|
+
exitCode = started;
|
|
147
|
+
} else {
|
|
148
|
+
// A spinner and a read-only header show first; the component follows a few seconds later.
|
|
149
|
+
const frame = page.locator('iframe[srcdoc]').first();
|
|
150
|
+
const ui = page.frameLocator('iframe[srcdoc]').first();
|
|
151
|
+
try {
|
|
152
|
+
// The iframe is attached before the component renders into its #root: wait for both.
|
|
153
|
+
await frame.waitFor({ timeout: 60_000 });
|
|
154
|
+
await ui.locator('#root > *').first().waitFor({ timeout: 30_000 });
|
|
155
|
+
} catch {
|
|
156
|
+
await shot(page, 'no-task-ui');
|
|
157
|
+
console.error('No task UI after 60 s. Check that the run is still waiting (`bin/wb-cli run --wait-for latest`) and that the URL is the workspace URL.');
|
|
158
|
+
exitCode = 4;
|
|
159
|
+
}
|
|
160
|
+
if (exitCode !== 4) {
|
|
161
|
+
await shot(page, 'ui-loaded');
|
|
162
|
+
await useTheUi(page, ui, uiStep);
|
|
163
|
+
|
|
164
|
+
// Studio shows Submit unless the UI set its own actions (bw.setActions). Then a continue
|
|
165
|
+
// action pressed in useTheUi closes the UI, and anything else leaves it open.
|
|
166
|
+
const frameHandle = await frame.elementHandle();
|
|
167
|
+
const submit = page.getByRole('button', { name: 'Submit', exact: true });
|
|
168
|
+
// A submit handler that throws shows "Submission rejected"; a server error "Failed to submit".
|
|
169
|
+
const rejected = page.getByText('Submission rejected').or(page.getByText('Failed to submit')).first();
|
|
170
|
+
if (await submit.waitFor({ timeout: 3_000 }).then(() => true, () => false)) {
|
|
171
|
+
await submit.click();
|
|
172
|
+
// Accepted: the component's iframe goes away. Rejected: the toast.
|
|
173
|
+
const outcome = await Promise.race([
|
|
174
|
+
frameHandle.waitForElementState('hidden', { timeout: 60_000 }).then(() => 'accepted'),
|
|
175
|
+
rejected.waitFor({ timeout: 60_000 }).then(() => 'rejected'),
|
|
176
|
+
]);
|
|
177
|
+
await shot(page, `submit-${outcome}`);
|
|
178
|
+
if (outcome === 'rejected') {
|
|
179
|
+
console.error('Submit rejected by the component; the reason is in the console lines below.');
|
|
180
|
+
exitCode = 3;
|
|
181
|
+
} else {
|
|
182
|
+
console.log('Submit accepted. Next: bin/wb-cli run --wait-for latest in the checkout.');
|
|
183
|
+
exitCode = 0;
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
const outcome = await Promise.race([
|
|
187
|
+
frameHandle.waitForElementState('hidden', { timeout: 10_000 }).then(() => 'closed', () => 'open'),
|
|
188
|
+
rejected.waitFor({ timeout: 10_000 }).then(() => 'rejected', () => 'open'),
|
|
189
|
+
]);
|
|
190
|
+
await shot(page, outcome === 'open' ? 'left-open' : outcome);
|
|
191
|
+
if (outcome === 'rejected') {
|
|
192
|
+
console.error('The action pressed in useTheUi was rejected; the reason is in the console lines below.');
|
|
193
|
+
exitCode = 3;
|
|
194
|
+
} else if (outcome === 'closed') {
|
|
195
|
+
exitCode = 0;
|
|
196
|
+
} else {
|
|
197
|
+
console.log('No Submit button and the UI stays open: it set its own actions, and none pressed in useTheUi continued the run.');
|
|
198
|
+
exitCode = 5;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (consoleLines.length > 0) console.error(consoleLines.map((l) => l.slice(0, 500)).join('\n'));
|
|
205
|
+
} finally {
|
|
206
|
+
await browser.close();
|
|
207
|
+
}
|
|
208
|
+
process.exit(exitCode);
|
package/out/auth.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.getApiToken = getApiToken;
|
|
37
|
-
exports.clearApiTokens = clearApiTokens;
|
|
38
|
-
const vscode = __importStar(require("vscode"));
|
|
39
|
-
/**
|
|
40
|
-
* Looks up an API token in globalState for the given host.
|
|
41
|
-
* If not found, prompts the user to enter one and then stores it.
|
|
42
|
-
*/
|
|
43
|
-
async function getApiToken(context, host) {
|
|
44
|
-
// Try retrieving from globalState
|
|
45
|
-
const storedTokens = context.globalState.get("bw_api_tokens", {});
|
|
46
|
-
if (storedTokens && storedTokens[host]) {
|
|
47
|
-
return storedTokens[host];
|
|
48
|
-
}
|
|
49
|
-
// If not found, prompt user
|
|
50
|
-
const token = await vscode.window.showInputBox({
|
|
51
|
-
prompt: `Enter API Token for ${host}. Create one by going into your Profile (top right) -> Settings -> API Tokens.`,
|
|
52
|
-
placeHolder: "Example: eyJhbGciOiJIUzI1NiIsInR5cCI6...",
|
|
53
|
-
validateInput: (value) => {
|
|
54
|
-
if (!value || value.trim().length < 10) {
|
|
55
|
-
return "Please enter a valid token.";
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
},
|
|
59
|
-
ignoreFocusOut: true,
|
|
60
|
-
});
|
|
61
|
-
if (!token) {
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
// Save into globalState
|
|
65
|
-
storedTokens[host] = token;
|
|
66
|
-
context.globalState.update("bw_api_tokens", storedTokens);
|
|
67
|
-
return token;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Clears all stored API tokens from globalState.
|
|
71
|
-
*/
|
|
72
|
-
function clearApiTokens(context) {
|
|
73
|
-
context.globalState.update("bw_api_tokens", {});
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=auth.js.map
|
package/out/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,kCAkCC;AAKD,wCAEC;AA/CD,+CAAiC;AAEjC;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,OAAgC,EAChC,IAAY;IAEZ,kCAAkC;IAClC,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAC1C,eAAe,EACf,EAAE,CACH,CAAC;IACF,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,4BAA4B;IAC5B,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;QAC7C,MAAM,EAAE,uBAAuB,IAAI,gFAAgF;QACnH,W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