@hydranium/protocol 1.0.0-next.357 → 1.0.0-next.359

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 (87) hide show
  1. package/lib/client/data-connection.d.ts +1 -0
  2. package/lib/client/data-connection.d.ts.map +1 -1
  3. package/lib/client/data-connection.js +1 -0
  4. package/lib/client/data-connection.js.map +1 -1
  5. package/lib/client/data-events.d.ts +1 -0
  6. package/lib/client/data-events.d.ts.map +1 -1
  7. package/lib/client/data-events.js +1 -0
  8. package/lib/client/data-events.js.map +1 -1
  9. package/lib/client/data-session.d.ts +7 -0
  10. package/lib/client/data-session.d.ts.map +1 -1
  11. package/lib/client/data-session.js +7 -0
  12. package/lib/client/data-session.js.map +1 -1
  13. package/lib/client/message-relay.d.ts +2 -0
  14. package/lib/client/message-relay.d.ts.map +1 -1
  15. package/lib/client/message-relay.js.map +1 -1
  16. package/lib/client/post-message-transport.d.ts +5 -0
  17. package/lib/client/post-message-transport.d.ts.map +1 -1
  18. package/lib/client/post-message-transport.js.map +1 -1
  19. package/lib/client/rpc-connection.d.ts +16 -0
  20. package/lib/client/rpc-connection.d.ts.map +1 -1
  21. package/lib/client/rpc-connection.js +12 -1
  22. package/lib/client/rpc-connection.js.map +1 -1
  23. package/lib/client/worker-handshake.d.ts +4 -0
  24. package/lib/client/worker-handshake.d.ts.map +1 -1
  25. package/lib/client/worker-handshake.js.map +1 -1
  26. package/lib/data/data-server-protocol.d.ts +2 -1
  27. package/lib/data/data-server-protocol.d.ts.map +1 -1
  28. package/lib/data/events.d.ts +14 -19
  29. package/lib/data/events.d.ts.map +1 -1
  30. package/lib/data/requests.d.ts +5 -0
  31. package/lib/data/requests.d.ts.map +1 -1
  32. package/lib/debouncer.d.ts +4 -1
  33. package/lib/debouncer.d.ts.map +1 -1
  34. package/lib/debouncer.js +4 -1
  35. package/lib/debouncer.js.map +1 -1
  36. package/lib/errors.d.ts +5 -0
  37. package/lib/errors.d.ts.map +1 -1
  38. package/lib/errors.js +1 -0
  39. package/lib/errors.js.map +1 -1
  40. package/lib/glsp-edits-settled-actions.d.ts +2 -0
  41. package/lib/glsp-edits-settled-actions.d.ts.map +1 -1
  42. package/lib/glsp-edits-settled-actions.js.map +1 -1
  43. package/lib/glsp-save-model-actions.d.ts +5 -0
  44. package/lib/glsp-save-model-actions.d.ts.map +1 -1
  45. package/lib/glsp-save-model-actions.js.map +1 -1
  46. package/lib/latency-collector.d.ts +2 -0
  47. package/lib/latency-collector.d.ts.map +1 -1
  48. package/lib/latency-collector.js +2 -0
  49. package/lib/latency-collector.js.map +1 -1
  50. package/lib/pending-work-tracker.d.ts +1 -0
  51. package/lib/pending-work-tracker.d.ts.map +1 -1
  52. package/lib/pending-work-tracker.js +1 -0
  53. package/lib/pending-work-tracker.js.map +1 -1
  54. package/lib/profile-session.d.ts +11 -1
  55. package/lib/profile-session.d.ts.map +1 -1
  56. package/lib/profile-session.js +10 -1
  57. package/lib/profile-session.js.map +1 -1
  58. package/lib/profiling.d.ts +15 -2
  59. package/lib/profiling.d.ts.map +1 -1
  60. package/lib/profiling.js.map +1 -1
  61. package/lib/reconcile-write.d.ts +3 -0
  62. package/lib/reconcile-write.d.ts.map +1 -1
  63. package/lib/reconcile-write.js.map +1 -1
  64. package/lib/transfer-document.d.ts +2 -1
  65. package/lib/transfer-document.d.ts.map +1 -1
  66. package/lib/transfer-document.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/client/data-connection.ts +1 -0
  69. package/src/client/data-events.ts +1 -0
  70. package/src/client/data-session.ts +7 -0
  71. package/src/client/message-relay.ts +2 -0
  72. package/src/client/post-message-transport.ts +5 -0
  73. package/src/client/rpc-connection.ts +22 -1
  74. package/src/client/worker-handshake.ts +4 -0
  75. package/src/data/data-server-protocol.ts +2 -1
  76. package/src/data/events.ts +14 -19
  77. package/src/data/requests.ts +5 -0
  78. package/src/debouncer.ts +4 -1
  79. package/src/errors.ts +5 -0
  80. package/src/glsp-edits-settled-actions.ts +2 -0
  81. package/src/glsp-save-model-actions.ts +5 -0
  82. package/src/latency-collector.ts +2 -0
  83. package/src/pending-work-tracker.ts +1 -0
  84. package/src/profile-session.ts +11 -1
  85. package/src/profiling.ts +15 -2
  86. package/src/reconcile-write.ts +3 -0
  87. package/src/transfer-document.ts +2 -1
package/src/profiling.ts CHANGED
@@ -17,15 +17,23 @@
17
17
 
18
18
  /** Which dimensions to capture, and the two sampling knobs. All off by default. */
19
19
  export interface ProfileCaptureOptions {
20
+ /** Sample the CPU at {@link cpuIntervalMicros} into a `server-cpu` artefact. */
20
21
  cpu?: boolean;
22
+ /** Sample allocations at {@link allocationIntervalBytes} into a `server-alloc` artefact. */
21
23
  allocation?: boolean;
24
+ /** Record every GC pause, summed by kind in `server-summary` rather than as its own artefact. */
22
25
  gc?: boolean;
26
+ /**
27
+ * Sample event-loop delay, summarised as mean, p50, p99 and max in
28
+ * `server-summary` rather than as its own artefact. Absent there when the
29
+ * sampler recorded nothing.
30
+ */
23
31
  eventLoopDelay?: boolean;
24
32
  /** Also drop a retained `.heapsnapshot` at stop (for the memory analyzer). */
25
33
  heapSnapshot?: boolean;
26
- /** CPU sampling interval in µs (implementation default 1000). */
34
+ /** CPU sampling interval in µs (implementation default `DEFAULT_CPU_INTERVAL_MICROS`). */
27
35
  cpuIntervalMicros?: number;
28
- /** Allocation sampling interval in bytes (implementation default 32768). */
36
+ /** Allocation sampling interval in bytes (implementation default `DEFAULT_ALLOCATION_INTERVAL_BYTES`). */
29
37
  allocationIntervalBytes?: number;
30
38
  }
31
39
 
@@ -72,12 +80,17 @@ export interface ProfilingArtifact {
72
80
 
73
81
  /** What a skill reads to know what to expect from a run (browser entries only in `app` mode, etc.). */
74
82
  export interface ProfilingEnvironment {
83
+ /** `harness` for a headless run, `app` for one that drove the real app. */
75
84
  mode: 'harness' | 'app';
76
85
  /** Whether a cgroup memory controller is present (running in a pod) vs local. */
77
86
  container: boolean;
87
+ /** The commit the run reflects, which a finding's `file:line` is read against. Absent when the caller named none. */
78
88
  commit?: string;
89
+ /** The workspace under test as the caller named it. Absent when it named none. */
79
90
  workspace?: string;
91
+ /** The `process.version` of the process that wrote the manifest, which for an e2e run is the test runner, not the server. */
80
92
  node: string;
93
+ /** Captured windows in capture order, each with its duration in milliseconds. */
81
94
  windows: { label: string; ms: number }[];
82
95
  }
83
96
 
@@ -35,6 +35,7 @@ export interface ReconcileWriteHooks<TModel> {
35
35
  refetch(): Promise<VersionedModel<TModel> | undefined>;
36
36
  /** The last in-sync model the user's intent is measured against. */
37
37
  readonly base: TModel;
38
+ /** Asked for each conflict while writes remain. Its refetch callback runs {@link refetch} only when called. */
38
39
  readonly conflictResolver: ConflictResolver;
39
40
  /** Writes, the first included, after which a still-conflicting edit is dropped; 3 when absent. */
40
41
  readonly maxWrites?: number;
@@ -59,7 +60,9 @@ export type ReconcileWriteOutcome =
59
60
  * {@link ReconcileWriteHooks.onUnavailable} ran.
60
61
  */
61
62
  readonly status: 'merged' | 'already-applied' | 'unchanged' | 'conflict' | 'dropped' | 'unavailable';
63
+ /** The last conflict a write raised, which on `merged` is the one before the write that landed. */
62
64
  readonly conflict: ConflictError;
65
+ /** Writes made, the first included. `dropped` is reported once they reach {@link ReconcileWriteHooks.maxWrites}. */
63
66
  readonly writes: number;
64
67
  };
65
68
 
@@ -63,6 +63,7 @@ export interface TextState {
63
63
  * see {@link TransferElement}).
64
64
  */
65
65
  export interface TransferDocument<TTransfer extends TransferElement, TDiagnostic = TransferDiagnostic> {
66
+ /** Need not be spelled as the request named it. */
66
67
  uri: string;
67
68
  /**
68
69
  * Absent when the document does not exist: the server answers an unknown
@@ -116,7 +117,7 @@ export type TransferCreatedDocument<TTransfer extends TransferElement, TDiagnost
116
117
 
117
118
  /** What a watch answers, once it is in place. */
118
119
  export interface TransferWatchedDocument {
119
- /** The key the watch's events name the document by, which a symlinked URI does not spell. */
120
+ /** The key the watch's events name the document by, which need not be the spelling the watch was asked with. */
120
121
  readonly uri: string;
121
122
  /** Whether a document exists there; one the server fails to load counts, only a missing one does not. */
122
123
  readonly exists: boolean;