@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.
- package/anno-cli.ts +156 -158
- package/anno-confidence.ts +2 -2
- package/anno-derive.ts +6 -6
- package/anno-details.ts +4 -4
- package/anno-export-asm.ts +100 -101
- package/anno-graphics.ts +16 -16
- package/anno-hazard-report.ts +2 -2
- package/anno-import.ts +15 -15
- package/anno-index.ts +8 -8
- package/anno-join.ts +35 -35
- package/anno-memmap-render.ts +22 -21
- package/anno-provenance-ledger.ts +4 -4
- package/anno-regbits-gen.ts +13 -13
- package/anno-store-export.ts +11 -11
- package/anno-store.ts +139 -144
- package/anno-symbols.ts +7 -7
- package/anno-types.ts +55 -55
- package/package.json +1 -1
- package/resources/broker-control.mjs +85 -92
- package/resources/broker-epoch.mjs +6 -7
- package/resources/broker-kill.mjs +29 -30
- package/resources/broker-launch.mjs +352 -370
- package/resources/broker-state.mjs +9 -10
- package/resources/host-tool.mjs +636 -664
- package/resources/vice-broker.mjs +189 -191
- package/vice-broker-client.ts +98 -100
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// rebuild.
|
|
7
7
|
import { createServer } from "node:net";
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
|
-
// MonitorChannel
|
|
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
|
-
//
|
|
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
|
|
69
|
-
* from 6510 to 6600
|
|
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
|
-
*
|
|
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
|
-
//
|
|
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".
|
|
190
|
-
*
|
|
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
|