proteum 2.1.9 → 2.2.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 (84) hide show
  1. package/.codex/environments/environment.toml +11 -0
  2. package/AGENTS.md +27 -11
  3. package/README.md +30 -11
  4. package/agents/project/AGENTS.md +172 -123
  5. package/agents/project/CODING_STYLE.md +1 -1
  6. package/agents/project/app-root/AGENTS.md +16 -0
  7. package/agents/project/client/AGENTS.md +5 -5
  8. package/agents/project/client/pages/AGENTS.md +13 -13
  9. package/agents/project/diagnostics.md +19 -10
  10. package/agents/project/optimizations.md +5 -6
  11. package/agents/project/root/AGENTS.md +297 -0
  12. package/agents/project/server/routes/AGENTS.md +2 -2
  13. package/agents/project/server/services/AGENTS.md +4 -2
  14. package/agents/project/tests/AGENTS.md +9 -2
  15. package/cli/app/index.ts +31 -7
  16. package/cli/commands/configure.ts +226 -0
  17. package/cli/commands/dev.ts +0 -2
  18. package/cli/commands/diagnose.ts +33 -1
  19. package/cli/commands/explain.ts +1 -1
  20. package/cli/commands/migrate.ts +51 -0
  21. package/cli/commands/orient.ts +169 -0
  22. package/cli/commands/perf.ts +8 -1
  23. package/cli/commands/verify.ts +1003 -49
  24. package/cli/compiler/artifacts/manifest.ts +4 -4
  25. package/cli/compiler/artifacts/routing.ts +2 -2
  26. package/cli/compiler/artifacts/services.ts +12 -3
  27. package/cli/compiler/client/index.ts +65 -19
  28. package/cli/compiler/common/files/style.ts +47 -2
  29. package/cli/compiler/common/generatedRouteModules.ts +31 -38
  30. package/cli/compiler/common/index.ts +10 -0
  31. package/cli/compiler/common/proteumManifest.ts +1 -0
  32. package/cli/compiler/server/index.ts +34 -9
  33. package/cli/context.ts +6 -1
  34. package/cli/index.ts +7 -8
  35. package/cli/migrate/pageContract.ts +516 -0
  36. package/cli/paths.ts +47 -6
  37. package/cli/presentation/commands.ts +100 -10
  38. package/cli/presentation/devSession.ts +4 -6
  39. package/cli/presentation/help.ts +2 -2
  40. package/cli/presentation/ink.ts +10 -5
  41. package/cli/presentation/welcome.ts +2 -4
  42. package/cli/runtime/commands.ts +94 -1
  43. package/cli/scaffold/index.ts +2 -2
  44. package/cli/scaffold/templates.ts +4 -2
  45. package/cli/utils/agents.ts +273 -58
  46. package/client/dev/profiler/index.tsx +3 -2
  47. package/client/router.ts +10 -2
  48. package/client/services/router/index.tsx +6 -22
  49. package/common/dev/connect.ts +20 -4
  50. package/common/dev/console.ts +7 -0
  51. package/common/dev/contractsDoctor.ts +354 -0
  52. package/common/dev/diagnostics.ts +10 -7
  53. package/common/dev/inspection.ts +830 -38
  54. package/common/dev/performance.ts +19 -5
  55. package/common/dev/profiler.ts +1 -0
  56. package/common/dev/proteumManifest.ts +5 -4
  57. package/common/dev/requestTrace.ts +78 -1
  58. package/common/env/proteumEnv.ts +10 -3
  59. package/common/router/contracts.ts +8 -11
  60. package/common/router/index.ts +2 -2
  61. package/common/router/pageData.ts +72 -0
  62. package/common/router/register.ts +10 -46
  63. package/common/router/response/page.ts +28 -16
  64. package/docs/assets/unique-domains-chip.png +0 -0
  65. package/docs/dev-sessions.md +8 -4
  66. package/docs/diagnostics.md +77 -11
  67. package/docs/migrate-from-2.1.3.md +388 -0
  68. package/docs/request-tracing.md +42 -9
  69. package/package.json +6 -1
  70. package/scripts/update-codex-agents.ts +2 -2
  71. package/server/app/container/console/index.ts +11 -1
  72. package/server/app/container/trace/index.ts +370 -72
  73. package/server/app/devDiagnostics.ts +1 -1
  74. package/server/app/index.ts +5 -1
  75. package/server/services/auth/index.ts +9 -0
  76. package/server/services/prisma/index.ts +15 -12
  77. package/server/services/router/http/index.ts +1 -1
  78. package/server/services/router/index.ts +105 -23
  79. package/server/services/router/request/api.ts +7 -1
  80. package/server/services/router/request/index.ts +2 -1
  81. package/server/services/router/response/index.ts +8 -28
  82. package/types/global/vendors.d.ts +12 -0
  83. package/types/vendors.d.ts +12 -0
  84. package/common/router/pageSetup.ts +0 -51
@@ -6,7 +6,7 @@
6
6
  import path from 'path';
7
7
 
8
8
  // Core
9
- import { ensureProjectAgentSymlinks } from '../cli/utils/agents';
9
+ import { configureProjectAgentSymlinks } 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
- ensureProjectAgentSymlinks({ appRoot: projectRoot, coreRoot: proteumRoot });
34
+ configureProjectAgentSymlinks({ appRoot: projectRoot, coreRoot: proteumRoot });
35
35
  }
@@ -237,6 +237,12 @@ export default class Console {
237
237
  ...(typeof channel.method === 'string' ? { method: channel.method } : {}),
238
238
  ...(typeof channel.path === 'string' ? { path: channel.path } : {}),
239
239
  ...(typeof channel.user === 'string' ? { user: channel.user } : {}),
240
+ ...(typeof channel.connectedNamespace === 'string' ? { connectedNamespace: channel.connectedNamespace } : {}),
241
+ ...(typeof channel.ownerLabel === 'string' ? { ownerLabel: channel.ownerLabel } : {}),
242
+ ...(typeof channel.ownerFilepath === 'string' ? { ownerFilepath: channel.ownerFilepath } : {}),
243
+ ...(typeof channel.serviceLabel === 'string' ? { serviceLabel: channel.serviceLabel } : {}),
244
+ ...(typeof channel.cacheKey === 'string' ? { cacheKey: channel.cacheKey } : {}),
245
+ ...(typeof channel.cachePhase === 'string' ? { cachePhase: channel.cachePhase } : {}),
240
246
  ...(typeof channel.traceCallId === 'string' ? { traceCallId: channel.traceCallId } : {}),
241
247
  ...(typeof channel.traceCallOrigin === 'string' ? { traceCallOrigin: channel.traceCallOrigin } : {}),
242
248
  ...(typeof channel.traceCallLabel === 'string' ? { traceCallLabel: channel.traceCallLabel } : {}),
@@ -288,7 +294,11 @@ export default class Console {
288
294
  public async createBugReport(error: TCatchedError, request?: ServerRequest) {
289
295
  const application = this.container.application;
290
296
  if (application === undefined)
291
- return console.error(LogPrefix, "Can't send bug report because the application is not instanciated");
297
+ return console.error(
298
+ LogPrefix,
299
+ "Can't send bug report because the application is not instanciated",
300
+ error,
301
+ );
292
302
 
293
303
  // Get context
294
304
  const now = new Date();