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.
Files changed (59) hide show
  1. package/AGENTS.md +10 -4
  2. package/README.md +58 -15
  3. package/agents/project/AGENTS.md +53 -10
  4. package/agents/project/DOCUMENTATION.md +1326 -0
  5. package/agents/project/app-root/AGENTS.md +2 -2
  6. package/agents/project/diagnostics.md +12 -7
  7. package/agents/project/optimizations.md +1 -0
  8. package/agents/project/root/AGENTS.md +24 -9
  9. package/agents/project/tests/AGENTS.md +7 -0
  10. package/agents/project/tests/e2e/AGENTS.md +13 -0
  11. package/agents/project/tests/e2e/REAL_WORLD_JOURNEY_TESTS.md +192 -0
  12. package/cli/commands/connect.ts +40 -4
  13. package/cli/commands/dev.ts +148 -25
  14. package/cli/commands/diagnose.ts +138 -5
  15. package/cli/commands/doctor.ts +24 -4
  16. package/cli/commands/explain.ts +134 -6
  17. package/cli/commands/mcp.ts +133 -0
  18. package/cli/commands/orient.ts +93 -3
  19. package/cli/commands/perf.ts +118 -13
  20. package/cli/commands/runtime.ts +234 -0
  21. package/cli/commands/trace.ts +116 -21
  22. package/cli/mcp/router.ts +1010 -0
  23. package/cli/presentation/commands.ts +93 -26
  24. package/cli/presentation/devSession.ts +2 -0
  25. package/cli/presentation/help.ts +1 -1
  26. package/cli/runtime/commands.ts +215 -24
  27. package/cli/runtime/devSessions.ts +328 -2
  28. package/cli/runtime/mcpDaemon.ts +288 -0
  29. package/cli/runtime/ports.ts +151 -0
  30. package/cli/utils/agentOutput.ts +46 -0
  31. package/cli/utils/agents.ts +194 -51
  32. package/cli/utils/appRoots.ts +232 -0
  33. package/common/dev/diagnostics.ts +1 -1
  34. package/common/dev/inspection.ts +22 -7
  35. package/common/dev/mcpPayloads.ts +1150 -0
  36. package/common/dev/mcpServer.ts +287 -0
  37. package/docs/agent-routing.md +137 -0
  38. package/docs/dev-commands.md +2 -0
  39. package/docs/dev-sessions.md +4 -1
  40. package/docs/diagnostics.md +70 -24
  41. package/docs/mcp.md +206 -0
  42. package/docs/migrate-from-2.1.3.md +14 -6
  43. package/docs/request-tracing.md +12 -6
  44. package/package.json +11 -3
  45. package/server/app/devMcp.ts +204 -0
  46. package/server/services/router/http/cache.ts +116 -0
  47. package/server/services/router/http/index.ts +94 -35
  48. package/server/services/router/index.ts +8 -11
  49. package/server/services/router/request/ip.test.cjs +0 -1
  50. package/tests/agents-utils.test.cjs +92 -14
  51. package/tests/cli-mcp-command.test.cjs +262 -0
  52. package/tests/codex-mcp-usage.test.cjs +307 -0
  53. package/tests/dev-sessions.test.cjs +113 -0
  54. package/tests/dev-transpile-watch.test.cjs +117 -9
  55. package/tests/eslint-rules.test.cjs +0 -1
  56. package/tests/inspection.test.cjs +66 -0
  57. package/tests/mcp.test.cjs +873 -0
  58. package/tests/router-cache-config.test.cjs +73 -0
  59. 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
+ });
@@ -0,0 +1,9 @@
1
+ export default {
2
+ test: {
3
+ fileParallelism: false,
4
+ globals: true,
5
+ hookTimeout: 30000,
6
+ include: ['tests/**/*.test.cjs', 'server/**/*.test.cjs'],
7
+ testTimeout: 30000,
8
+ },
9
+ };