@henols/vice-mcp 0.2.3 → 0.2.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.
@@ -6,7 +6,7 @@
6
6
  // rebuild.
7
7
  import { createServer } from "node:net";
8
8
  // ---------------------------------------------------------------------------
9
- // MonitorChannel (plan 41-03, D-14): exactly two channels exist -- stock VICE
9
+ // MonitorChannel: exactly two channels exist -- stock VICE
10
10
  // exposes precisely the binary monitor and the `-remotemonitor` text
11
11
  // channel -- and this project has no plan to add a third. Frozen so a
12
12
  // consumer cannot accidentally push a third value onto it at runtime.
@@ -47,7 +47,7 @@ export function createBrokerState() {
47
47
  * trip. */
48
48
  export function _snapshotState(state) {
49
49
  return {
50
- // Phase 33, plan 33-06: `profile` is the SECOND nested object on an
50
+ // `profile` is the SECOND nested object on an
51
51
  // InstanceRecord (after `viceArgs`), so it needs its own copy for this
52
52
  // function's documented "deep, plain-object copy" contract to stay true --
53
53
  // a spread alone would hand a caller a reference into live broker state,
@@ -65,8 +65,8 @@ export function _snapshotState(state) {
65
65
  blockedPorts: Array.from(state.blockedPorts).sort((a, b) => a - b),
66
66
  };
67
67
  }
68
- /** VICE_BROKER_BASE_PORT's default (D-18): the broker's port band moves
69
- * from 6510 to 6600 in this phase -- 6510-6599 stays reserved by convention
68
+ /** VICE_BROKER_BASE_PORT's default: the broker's port band moved
69
+ * from 6510 to 6600 -- 6510-6599 stays reserved by convention
70
70
  * for an x64sc a human launches for their own work. */
71
71
  export const DEFAULT_BASE_PORT = 6600;
72
72
  /** Scan ceiling matching vice-broker.sh's own next_free_port(): exactly one
@@ -117,8 +117,8 @@ export function isPortBlocked(state, port) {
117
117
  export function blockPort(state, port) {
118
118
  state.blockedPorts.add(port);
119
119
  }
120
- /** Allocates the lowest free port at or above the base port (default 6600
121
- * per D-18, overridable via VICE_BROKER_BASE_PORT -- the same env var name
120
+ /** Allocates the lowest free port at or above the base port (default 6600,
121
+ * overridable via VICE_BROKER_BASE_PORT -- the same env var name
122
122
  * the bash daemon used), scanning up to PORT_SCAN_CEILING candidates.
123
123
  * "Free" means: not already recorded in the instance map (granted,
124
124
  * launching or ready all occupy their port), not already in the
@@ -128,8 +128,7 @@ export function blockPort(state, port) {
128
128
  * set before scanning continues, so it is never re-offered or re-probed by
129
129
  * this process again. Never throws -- returns a typed failure naming
130
130
  * exhaustion when every candidate in the window is taken. */
131
- // Gap closure (plan 14, discovered live during Task 2's own end-to-end
132
- // proof -- see RE-FINDINGS.md's dated entry for the full account):
131
+ // Discovered live during an end-to-end proof of this allocator:
133
132
  // EADDRINUSE is delivered to defaultPortInUse()'s `error` listener without
134
133
  // ever yielding to libuv's poll phase, so a scan running against MANY
135
134
  // already-bound candidates in a row does not merely take longer -- for its
@@ -186,8 +185,8 @@ export function countReady(state) {
186
185
  export function countTotal(state) {
187
186
  return state.instances.size;
188
187
  }
189
- /** Counts instances currently "launching". Plan 41-05 (folded todo) retired
190
- * the warm floor and its own maintainWarmFloor() -- the SECOND launch path
188
+ /** Counts instances currently "launching". The warm floor and its own
189
+ * maintainWarmFloor() were retired -- that was the SECOND launch path
191
190
  * that used to read this counter as a pre-check before starting a new
192
191
  * launch, alongside the cold-acquire arm's own equivalent check. With only
193
192
  * one launch path left (vice-broker.mts's handleAcquire(), guarded by