proteum 2.2.2-1 → 2.2.3
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/AGENTS.md +2 -2
- package/README.md +4 -1
- package/agents/project/AGENTS.md +3 -3
- package/agents/project/diagnostics.md +3 -3
- package/agents/project/root/AGENTS.md +3 -3
- package/agents/project/tests/AGENTS.md +2 -2
- package/cli/app/index.ts +19 -9
- package/cli/commands/check.ts +7 -3
- package/cli/commands/configure.ts +14 -9
- package/cli/commands/e2e.ts +204 -0
- package/cli/commands/typecheck.ts +7 -3
- package/cli/presentation/commands.ts +37 -7
- package/cli/runtime/command.ts +2 -2
- package/cli/runtime/commands.ts +59 -0
- package/cli/scaffold/index.ts +1 -1
- package/cli/utils/agents.ts +175 -80
- package/cli/utils/check.ts +32 -4
- package/docs/dev-sessions.md +11 -2
- package/docs/diagnostics.md +2 -1
- package/package.json +1 -1
- package/scripts/update-codex-agents.ts +2 -2
package/docs/dev-sessions.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dev Sessions
|
|
2
2
|
|
|
3
|
-
Proteum ships
|
|
3
|
+
Proteum ships dev-only auth bootstrap commands so `proteum verify browser`, `proteum e2e`, Playwright runs, and local debugging can start from an authenticated state without driving the login UI.
|
|
4
4
|
|
|
5
5
|
## When To Use It
|
|
6
6
|
|
|
@@ -31,10 +31,18 @@ proteum session admin@example.com --role ADMIN --port 3101
|
|
|
31
31
|
proteum session god@example.com --role GOD --url http://localhost:3102 --json
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
Playwright wrapper mode:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
proteum e2e --port 3101 --session-email admin@example.com --session-role ADMIN tests/e2e/features/admin.spec.ts
|
|
38
|
+
proteum e2e --url http://localhost:3101 --env FEATURE_FLAG=true --grep smoke
|
|
39
|
+
```
|
|
40
|
+
|
|
34
41
|
Behavior:
|
|
35
42
|
|
|
36
43
|
- local mode refreshes generated artifacts, builds the dev output, starts a temporary local dev server, creates the session, prints the payload, and exits
|
|
37
44
|
- remote mode talks to an already running `proteum dev` instance
|
|
45
|
+
- `proteum e2e` talks to an already running `proteum dev` instance when `--session-email` is present, then starts Playwright with `E2E_BASE_URL`, optional `E2E_PORT`, optional `E2E_AUTH_TOKEN`, and any explicit `--env` or `--env-file` values in the child process environment
|
|
38
46
|
- the command requires an explicit email and optionally asserts a role before returning the session
|
|
39
47
|
- the command is available only in dev mode
|
|
40
48
|
- browser verification flows should keep browser state app-local and disposable through `proteum verify browser` or direct Playwright instead of reusing a shared temp profile
|
|
@@ -68,7 +76,7 @@ curl -H "$(jq -r '.curlCookieHeader' session.json)" http://localhost:3101/api/Au
|
|
|
68
76
|
## Agent Guidance
|
|
69
77
|
|
|
70
78
|
- Prefer `proteum session` over UI login automation when the goal is to test or debug protected application behavior.
|
|
71
|
-
- Prefer `proteum verify browser` for focused browser-visible verification. When lower-level control is required, use direct Playwright with a disposable profile.
|
|
79
|
+
- Prefer `proteum verify browser` for focused browser-visible verification, and `proteum e2e --port <port>` for targeted or full Playwright suites. When lower-level control is required, use direct Playwright with a disposable profile.
|
|
72
80
|
- Use UI login automation only when the auth UX itself is the feature under test.
|
|
73
81
|
- Pair it with `proteum diagnose` for a fast protected-route summary, `proteum perf request` for a one-request timing breakdown, then use `proteum trace` when you need lower-level request events.
|
|
74
82
|
- Only the final verifier agent should usually run browser flows. Earlier agents should stay on `orient`, `verify owner`, `verify request`, and request-level diagnostics unless browser execution is required.
|
|
@@ -78,6 +86,7 @@ Typical flow:
|
|
|
78
86
|
```bash
|
|
79
87
|
proteum orient /dashboard
|
|
80
88
|
proteum session admin@example.com --role ADMIN --port 3101 --json > session.json
|
|
89
|
+
proteum e2e --port 3101 --session-email admin@example.com --session-role ADMIN tests/e2e/features/dashboard.spec.ts
|
|
81
90
|
proteum diagnose /dashboard --hit /dashboard --port 3101
|
|
82
91
|
proteum perf request /dashboard --port 3101
|
|
83
92
|
proteum trace latest --port 3101
|
package/docs/diagnostics.md
CHANGED
|
@@ -53,6 +53,7 @@ proteum diagnose /api/Auth/CurrentUser --url http://127.0.0.1:3101
|
|
|
53
53
|
proteum verify owner /api/Auth/CurrentUser
|
|
54
54
|
proteum verify request /dashboard --port 3101
|
|
55
55
|
proteum verify browser /dashboard --port 3101 --session-email admin@example.com --session-role ADMIN
|
|
56
|
+
proteum e2e --port 3101 --session-email admin@example.com --session-role ADMIN tests/e2e/features/dashboard.spec.ts
|
|
56
57
|
|
|
57
58
|
proteum perf top --since today
|
|
58
59
|
proteum perf request /dashboard --port 3101
|
|
@@ -210,7 +211,7 @@ For AI coding agents or automation:
|
|
|
210
211
|
2. Read `./.proteum/manifest.json` or run `proteum explain --json` only after you know which surface matters.
|
|
211
212
|
3. Run `proteum doctor --json` and `proteum doctor --contracts --json` to inspect framework and generated-artifact diagnostics.
|
|
212
213
|
4. Use `proteum verify owner <query>` or `proteum diagnose <path> --port <port>` for the smallest trustworthy runtime surface before broad checks.
|
|
213
|
-
5. Use `proteum verify browser` for browser-visible verification,
|
|
214
|
+
5. Use `proteum verify browser` for browser-visible verification, or `proteum e2e --port <port>` for targeted/full Playwright suites. Only drop to direct Playwright when the Proteum wrapper cannot express the needed control. Keep auth sourced from Proteum session helpers, and reserve browser flows for the final verifier agent unless they are the only trustworthy surface.
|
|
214
215
|
6. For performance, CPU, SQL, render, cache, or connected-boundary questions, use `proteum perf request <requestId|path>` against the same running dev server.
|
|
215
216
|
7. Use `proteum trace ...` when you need lower-level event detail than `diagnose` or `perf` provides.
|
|
216
217
|
8. Run global checks second, not first. Unrelated diagnostics should remain visible but non-blocking during focused verification unless strict global mode is required.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proteum",
|
|
3
3
|
"description": "LLM-first Opinionated Typescript Framework for web applications.",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.3",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/proteum.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
|
|
8
8
|
// Core
|
|
9
|
-
import {
|
|
9
|
+
import { configureProjectAgentInstructions } from '../cli/utils/agents';
|
|
10
10
|
|
|
11
11
|
/*----------------------------------
|
|
12
12
|
- TYPES
|
|
@@ -31,5 +31,5 @@ for (const projectRoot of projectRoots) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
console.log(`[update-codex-agents] Syncing project Codex assets in ${projectRoot}`);
|
|
34
|
-
|
|
34
|
+
configureProjectAgentInstructions({ appRoot: projectRoot, coreRoot: proteumRoot });
|
|
35
35
|
}
|