proteum 2.1.0-3 → 2.1.0-4
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 +2 -0
- package/agents/framework/AGENTS.md +18 -6
- package/agents/project/AGENTS.md +7 -1
- package/cli/bin.js +8 -0
- package/docs/request-tracing.md +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,6 +265,8 @@ proteum trace latest
|
|
|
265
265
|
|
|
266
266
|
Proteum includes a dev-only in-memory request trace buffer for routing, controller, context, SSR, and render debugging.
|
|
267
267
|
|
|
268
|
+
When diagnosing or testing against an app, first read the default port from `env.yaml` and check whether a server is already running there. If it is, inspect the existing traces before reproducing the issue so you can collect past errors and their context.
|
|
269
|
+
|
|
268
270
|
- `proteum trace requests`: list the most recent request summaries
|
|
269
271
|
- `proteum trace latest`: show the latest captured request
|
|
270
272
|
- `proteum trace show <requestId>`: inspect one trace in detail
|
|
@@ -12,7 +12,8 @@ When you enter a Proteum app, inspect it in this order:
|
|
|
12
12
|
2. Inspect `./server/index.ts` and `./server/config/*.ts`.
|
|
13
13
|
3. Inspect the touched `./server/controllers/**/*.ts`, `./server/services/**`, `./server/routes/**`, and `./client/pages/**` files.
|
|
14
14
|
4. Run `npx proteum doctor` if routing or generation looks suspicious.
|
|
15
|
-
5.
|
|
15
|
+
5. If you need to diagnose or test against a running app, check the default port in `./env.yaml` first.
|
|
16
|
+
6. If a server is already running on that port, use `npx proteum trace` to inspect past requests, errors, and their context before reproducing the issue or adding temporary logs.
|
|
16
17
|
|
|
17
18
|
## Non-Negotiable Rules
|
|
18
19
|
|
|
@@ -238,12 +239,17 @@ Relevant aliases:
|
|
|
238
239
|
|
|
239
240
|
1. Run `npx proteum explain --json`.
|
|
240
241
|
2. Run `npx proteum doctor`.
|
|
241
|
-
3.
|
|
242
|
-
|
|
242
|
+
3. Read the default port from `./env.yaml` and check whether a server is already running there.
|
|
243
|
+
4. If a server is already running on that default port, inspect existing traces first:
|
|
244
|
+
- `npx proteum trace requests --port <envPort>`
|
|
245
|
+
- `npx proteum trace latest --port <envPort>`
|
|
246
|
+
- `npx proteum trace show <requestId> --port <envPort>` when you need the full context for a past error
|
|
247
|
+
5. If the issue is request-time behavior in dev and the existing traces are not enough, run:
|
|
248
|
+
- `npx proteum trace arm --capture deep --port <envPort>`
|
|
243
249
|
- reproduce the failing request once
|
|
244
|
-
- `npx proteum trace latest
|
|
245
|
-
|
|
246
|
-
|
|
250
|
+
- `npx proteum trace latest --port <envPort>` or `npx proteum trace show <requestId> --port <envPort>`
|
|
251
|
+
6. Inspect the touched controller, service, route, or page source.
|
|
252
|
+
7. Only add temporary logging if the trace is insufficient.
|
|
247
253
|
|
|
248
254
|
For the full trace reference, see `node_modules/proteum/docs/request-tracing.md` in installed apps or `docs/request-tracing.md` in the framework repository.
|
|
249
255
|
|
|
@@ -274,6 +280,12 @@ Verify at the correct layer:
|
|
|
274
280
|
- SSR changes: load the real page and inspect rendered HTML plus browser console
|
|
275
281
|
- router/plugin changes: verify request context, auth, redirects, metrics, and validation on a running app
|
|
276
282
|
|
|
283
|
+
When you need to diagnose or test against an app that may already be running:
|
|
284
|
+
|
|
285
|
+
- read the default port from `env.yaml`
|
|
286
|
+
- check whether a server is already running on that port
|
|
287
|
+
- if it is, inspect `proteum trace requests`, `proteum trace latest`, and `proteum trace show <requestId>` before reproducing the issue
|
|
288
|
+
|
|
277
289
|
Useful app commands:
|
|
278
290
|
|
|
279
291
|
- `proteum dev`
|
package/agents/project/AGENTS.md
CHANGED
|
@@ -25,6 +25,12 @@ For request-time issues in dev, inspect traces before adding temporary logs:
|
|
|
25
25
|
- `npx proteum trace latest`
|
|
26
26
|
- `npx proteum trace arm --capture deep`
|
|
27
27
|
|
|
28
|
+
If you need to diagnose or test against a running app:
|
|
29
|
+
|
|
30
|
+
- read the default port from `./env.yaml`
|
|
31
|
+
- check whether a server is already running on that port
|
|
32
|
+
- if it is, inspect existing traces first to collect past errors and their context before reproducing the issue
|
|
33
|
+
|
|
28
34
|
## Project Structure
|
|
29
35
|
|
|
30
36
|
This is a full-stack monolith project using TypeScript, Node.js, Preact, and Proteum.
|
|
@@ -77,7 +83,7 @@ When a feature depends on a curated list, keep one canonical catalog or registry
|
|
|
77
83
|
1. evaluate or quantify the probability
|
|
78
84
|
2. explain why
|
|
79
85
|
3. suggest how to fix it
|
|
80
|
-
- When the issue is request-time behavior in dev, prefer `npx proteum trace`
|
|
86
|
+
- When the issue is request-time behavior in dev, first check whether a server is already running on the default port from `env.yaml`. If it is, prefer `npx proteum trace` to inspect past errors and their context before reproducing the issue or adding logs.
|
|
81
87
|
- When you have finished your work, summarize in one top-level short sentence the changes you made since the beginning of the conversation. Output as `Commit message`.
|
|
82
88
|
|
|
83
89
|
## High-Impact Files
|
package/cli/bin.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
|
|
5
|
+
const clearInteractiveConsole = () => {
|
|
6
|
+
if (process.stdout.isTTY !== true || process.env.TERM === 'dumb') return;
|
|
7
|
+
|
|
8
|
+
process.stdout.write('\x1B[2J\x1B[3J\x1B[H');
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
/*
|
|
6
12
|
Why this exists (npm i vs npm link difference)
|
|
7
13
|
|
|
@@ -30,6 +36,8 @@ if (!process.env.TS_NODE_IGNORE) {
|
|
|
30
36
|
process.env.TS_NODE_PROJECT = path.join(__dirname, 'tsconfig.json');
|
|
31
37
|
process.env.TS_NODE_TRANSPILE_ONLY = '1';
|
|
32
38
|
|
|
39
|
+
clearInteractiveConsole();
|
|
40
|
+
|
|
33
41
|
require('ts-node/register/transpile-only');
|
|
34
42
|
|
|
35
43
|
const { runCli } = require('./index.ts');
|
package/docs/request-tracing.md
CHANGED
|
@@ -19,6 +19,12 @@ proteum trace export <requestId>
|
|
|
19
19
|
proteum trace latest --url http://127.0.0.1:3010
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
Before reproducing a bug or starting a new test pass:
|
|
23
|
+
|
|
24
|
+
- read the default port from `env.yaml`
|
|
25
|
+
- check whether a dev server is already running on that port
|
|
26
|
+
- if it is, inspect `proteum trace requests`, `proteum trace latest`, and `proteum trace show <requestId>` first so you can capture past errors and their context
|
|
27
|
+
|
|
22
28
|
Typical debugging flow:
|
|
23
29
|
|
|
24
30
|
```bash
|
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.1.0-
|
|
4
|
+
"version": "2.1.0-4",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/proteum.git",
|
|
7
7
|
"license": "MIT",
|