proteum 2.2.9 → 2.4.1
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 +10 -4
- package/README.md +58 -15
- package/agents/project/AGENTS.md +53 -10
- package/agents/project/DOCUMENTATION.md +1326 -0
- package/agents/project/app-root/AGENTS.md +2 -2
- package/agents/project/diagnostics.md +12 -7
- package/agents/project/optimizations.md +1 -0
- package/agents/project/root/AGENTS.md +24 -9
- package/agents/project/tests/AGENTS.md +7 -0
- package/agents/project/tests/e2e/AGENTS.md +13 -0
- package/agents/project/tests/e2e/REAL_WORLD_JOURNEY_TESTS.md +192 -0
- package/cli/commands/connect.ts +40 -4
- package/cli/commands/dev.ts +148 -25
- package/cli/commands/diagnose.ts +138 -5
- package/cli/commands/doctor.ts +24 -4
- package/cli/commands/explain.ts +134 -6
- package/cli/commands/mcp.ts +133 -0
- package/cli/commands/orient.ts +93 -3
- package/cli/commands/perf.ts +118 -13
- package/cli/commands/runtime.ts +234 -0
- package/cli/commands/trace.ts +116 -21
- package/cli/mcp/router.ts +1010 -0
- package/cli/presentation/commands.ts +93 -26
- package/cli/presentation/devSession.ts +2 -0
- package/cli/presentation/help.ts +1 -1
- package/cli/runtime/commands.ts +215 -24
- package/cli/runtime/devSessions.ts +328 -2
- package/cli/runtime/mcpDaemon.ts +288 -0
- package/cli/runtime/ports.ts +151 -0
- package/cli/utils/agentOutput.ts +46 -0
- package/cli/utils/agents.ts +194 -51
- package/cli/utils/appRoots.ts +232 -0
- package/common/dev/diagnostics.ts +1 -1
- package/common/dev/inspection.ts +22 -7
- package/common/dev/mcpPayloads.ts +1150 -0
- package/common/dev/mcpServer.ts +287 -0
- package/docs/agent-routing.md +137 -0
- package/docs/dev-commands.md +2 -0
- package/docs/dev-sessions.md +4 -1
- package/docs/diagnostics.md +70 -24
- package/docs/mcp.md +206 -0
- package/docs/migrate-from-2.1.3.md +14 -6
- package/docs/request-tracing.md +12 -6
- package/package.json +11 -3
- package/server/app/devMcp.ts +204 -0
- package/server/services/router/http/cache.ts +116 -0
- package/server/services/router/http/index.ts +94 -35
- package/server/services/router/index.ts +8 -11
- package/server/services/router/request/ip.test.cjs +0 -1
- package/tests/agents-utils.test.cjs +92 -14
- package/tests/cli-mcp-command.test.cjs +262 -0
- package/tests/codex-mcp-usage.test.cjs +307 -0
- package/tests/dev-sessions.test.cjs +113 -0
- package/tests/dev-transpile-watch.test.cjs +117 -9
- package/tests/eslint-rules.test.cjs +0 -1
- package/tests/inspection.test.cjs +66 -0
- package/tests/mcp.test.cjs +873 -0
- package/tests/router-cache-config.test.cjs +73 -0
- package/vitest.config.mjs +9 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const assert = require('node:assert/strict');
|
|
2
|
+
|
|
3
|
+
require('ts-node/register/transpile-only');
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
resolveHttpCacheConfig,
|
|
7
|
+
resolvePublicAssetCacheControl,
|
|
8
|
+
} = require('../server/services/router/http/cache');
|
|
9
|
+
|
|
10
|
+
test('router cache config preserves current defaults', () => {
|
|
11
|
+
const cache = resolveHttpCacheConfig();
|
|
12
|
+
|
|
13
|
+
assert.equal(cache.html.dynamic.cacheControl, 'no-store, no-cache, must-revalidate, proxy-revalidate');
|
|
14
|
+
assert.equal(cache.html.dynamic.surrogateControl, 'no-store');
|
|
15
|
+
assert.equal(cache.html.static.cacheControl, 'public, max-age=0, must-revalidate');
|
|
16
|
+
assert.equal(cache.html.static.surrogateControl, false);
|
|
17
|
+
assert.equal(cache.publicAssets.dev, 'no-store');
|
|
18
|
+
assert.equal(cache.publicAssets.versioned, 'public, max-age=31536000, immutable');
|
|
19
|
+
assert.equal(cache.publicAssets.unversioned, 'public, max-age=0, must-revalidate');
|
|
20
|
+
assert.equal(cache.publicAssets.etag, undefined);
|
|
21
|
+
assert.equal(cache.publicAssets.lastModified, undefined);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test('router cache config resolves granular public asset policies', () => {
|
|
25
|
+
const cache = resolveHttpCacheConfig({
|
|
26
|
+
publicAssets: {
|
|
27
|
+
dev: 'dev-cache',
|
|
28
|
+
versioned: 'versioned-cache',
|
|
29
|
+
unversioned: 'unversioned-cache',
|
|
30
|
+
etag: false,
|
|
31
|
+
lastModified: false,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
assert.equal(cache.publicAssets.etag, false);
|
|
36
|
+
assert.equal(cache.publicAssets.lastModified, false);
|
|
37
|
+
assert.equal(
|
|
38
|
+
resolvePublicAssetCacheControl({
|
|
39
|
+
res: undefined,
|
|
40
|
+
filePath: '/app/public/client.abc123.js',
|
|
41
|
+
profile: 'prod',
|
|
42
|
+
cache: cache.publicAssets,
|
|
43
|
+
}),
|
|
44
|
+
'versioned-cache',
|
|
45
|
+
);
|
|
46
|
+
assert.equal(
|
|
47
|
+
resolvePublicAssetCacheControl({
|
|
48
|
+
res: { req: { originalUrl: '/public/client.js?v=123' } },
|
|
49
|
+
filePath: '/app/public/client.js',
|
|
50
|
+
profile: 'prod',
|
|
51
|
+
cache: cache.publicAssets,
|
|
52
|
+
}),
|
|
53
|
+
'versioned-cache',
|
|
54
|
+
);
|
|
55
|
+
assert.equal(
|
|
56
|
+
resolvePublicAssetCacheControl({
|
|
57
|
+
res: { req: { originalUrl: '/public/client.js' } },
|
|
58
|
+
filePath: '/app/public/client.js',
|
|
59
|
+
profile: 'prod',
|
|
60
|
+
cache: cache.publicAssets,
|
|
61
|
+
}),
|
|
62
|
+
'unversioned-cache',
|
|
63
|
+
);
|
|
64
|
+
assert.equal(
|
|
65
|
+
resolvePublicAssetCacheControl({
|
|
66
|
+
res: { req: { originalUrl: '/public/client.abc123.js' } },
|
|
67
|
+
filePath: '/app/public/client.abc123.js',
|
|
68
|
+
profile: 'dev',
|
|
69
|
+
cache: cache.publicAssets,
|
|
70
|
+
}),
|
|
71
|
+
'dev-cache',
|
|
72
|
+
);
|
|
73
|
+
});
|