@pellux/goodvibes-daemon 1.28.14 → 1.28.16

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/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@ All notable changes to the GoodVibes daemon.
4
4
 
5
5
  ---
6
6
 
7
+ ## [1.28.16] - 2026-08-07
8
+
9
+ ### Changes
10
+
11
+ - **One more module-scope read is gone from the compiled daemon's load path.**
12
+ The command catalog built its flag-arity table by calling an SDK helper at
13
+ module scope; under the single-file compiler's nondeterministic module
14
+ order that call could run before the helper exists, killing the binary at
15
+ load. The table is now built on first use. Found by auditing for the same
16
+ build-order lottery class 1.28.15 fixed — this was the last direct
17
+ module-scope call into the platform runtime in this product.
18
+
19
+ ## [1.28.15] - 2026-08-07
20
+
21
+ ### Changes
22
+
23
+ - **The compiled daemon no longer plays a build-order lottery at load**
24
+ (platform runtime 2.0.13): the daemon's runtime barrel read fifteen values
25
+ off the SDK's runtime namespace objects at module scope (`export const X =
26
+ ns.X`). Bun's single-file compiler emits module bodies in an order that
27
+ varies build-to-build, and such a read can land before the module that
28
+ defines the binding — the binary then dies at load with a ReferenceError on
29
+ some builds of identical source. Every one of those reads is now a grouped
30
+ live re-export from the SDK's registered runtime subpaths, resolved by the
31
+ module system instead of read at module scope. The shared post-build smoke
32
+ now also scans the compiled artifact for the eager pattern, so a
33
+ reintroduction fails the build even on a lucky ordering.
34
+
7
35
  ## [1.28.14] - 2026-08-06
8
36
 
9
37
  ### Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pellux/goodvibes-daemon",
3
- "version": "1.28.14",
3
+ "version": "1.28.16",
4
4
  "description": "The GoodVibes daemon \u2014 the one long-running host for the control plane, channels, cluster membership, scheduled work, knowledge and memory stores, and the verb families every GoodVibes client calls.",
5
5
  "type": "module",
6
6
  "main": "src/daemon/cli.ts",
@@ -65,8 +65,8 @@
65
65
  "@anthropic-ai/bedrock-sdk": "^0.28.1",
66
66
  "@anthropic-ai/sdk": "^0.82.0",
67
67
  "@ast-grep/napi": "^0.42.0",
68
- "@pellux/goodvibes-sdk": "2.0.12",
69
- "@pellux/goodvibes-terminal-shell": "2.0.12",
68
+ "@pellux/goodvibes-sdk": "2.0.13",
69
+ "@pellux/goodvibes-terminal-shell": "2.0.13",
70
70
  "bash-language-server": "^5.6.0",
71
71
  "fuse.js": "^7.1.0",
72
72
  "graphql": "^16.13.2",
@@ -87,7 +87,7 @@
87
87
  "web-tree-sitter": "^0.26.7"
88
88
  },
89
89
  "devDependencies": {
90
- "@pellux/goodvibes-toolchain": "2.0.0",
90
+ "@pellux/goodvibes-toolchain": "2.0.13",
91
91
  "@types/bun": "^1.3.10",
92
92
  "typescript": "^5.9.3"
93
93
  },
@@ -820,7 +820,15 @@ export function isRawInterceptCommand(command: DaemonCommand): boolean {
820
820
  * than one command's flag list has the same kind in all of them — asserted by
821
821
  * a unit test rather than left as an assumption — so one table is honest.
822
822
  */
823
- export const ALL_FLAG_ARITY: ReadonlyMap<string, CliFlagKind> = catalogFlagArity(DAEMON_CLI_CATALOG);
823
+ // Resolved on first use, not at module load: `catalogFlagArity` is an SDK
824
+ // import, and the single-file compiler's nondeterministic module order could
825
+ // run this line before the SDK module body exists — the binary then dies at
826
+ // load (the build-order lottery class fixed at runtime 2.0.13).
827
+ let allFlagArityCache: ReadonlyMap<string, CliFlagKind> | null = null;
828
+ export function allFlagArity(): ReadonlyMap<string, CliFlagKind> {
829
+ allFlagArityCache ??= catalogFlagArity(DAEMON_CLI_CATALOG);
830
+ return allFlagArityCache;
831
+ }
824
832
 
825
833
  /** Flag specs a given command accepts: the global ones plus its own. */
826
834
  export function flagsForCommand(command: DaemonCommand): readonly DaemonCommandFlagSpec[] {
@@ -12,13 +12,17 @@
12
12
  * SDK.
13
13
  */
14
14
 
15
- import {
16
- bootstrap,
17
- observability,
15
+ // Type-only: the runtime namespace objects must never be READ at module scope.
16
+ // An eager `export const X = ns.X` compiles to a top-level property read off a
17
+ // lazy namespace object, and Bun's single-file compiler orders module bodies
18
+ // nondeterministically — on some builds the read lands before the defining
19
+ // module and the binary dies at load. Values below are grouped live re-exports
20
+ // from the SDK's registered subpaths instead; the toolchain post-build-smoke
21
+ // scans compiled artifacts for the eager pattern and fails the build if one
22
+ // returns.
23
+ import type {
18
24
  operations,
19
- security,
20
25
  shell,
21
- transport,
22
26
  ui,
23
27
  } from '@pellux/goodvibes-sdk/platform/runtime';
24
28
 
@@ -29,46 +33,43 @@ export * from '@pellux/goodvibes-sdk/platform/runtime/feature-flags';
29
33
  export * from '@pellux/goodvibes-sdk/platform/runtime/settings';
30
34
  export * from '@pellux/goodvibes-sdk/platform/runtime/sandbox';
31
35
 
32
- // Shell paths + the surface-scoped storage handle.
33
- export const createShellPathService = shell.createShellPathService;
36
+ // Shell paths + the surface-scoped storage handle. Grouped live re-exports:
37
+ // class values (WorktreeRegistry etc.) carry their instance types with them.
38
+ export { createShellPathService, WorktreeRegistry } from '@pellux/goodvibes-sdk/platform/runtime/shell';
34
39
  export type ShellPathService = shell.ShellPathService;
35
- export const createSessionSurface = operations.createSessionSurface;
40
+ export { createSessionSurface } from '@pellux/goodvibes-sdk/platform/runtime/operations';
36
41
  export type SessionSurface = operations.SessionSurface;
37
- export const WorktreeRegistry = shell.WorktreeRegistry;
38
- export type WorktreeRegistry = shell.WorktreeRegistry;
39
42
 
40
43
  // Remote execution + the distributed runtime.
41
- export const DistributedRuntimeManager = operations.DistributedRuntimeManager;
42
- export type DistributedRuntimeManager = operations.DistributedRuntimeManager;
43
- export const RemoteRunnerRegistry = operations.RemoteRunnerRegistry;
44
- export type RemoteRunnerRegistry = operations.RemoteRunnerRegistry;
45
- export const RemoteSupervisor = operations.RemoteSupervisor;
46
- export type RemoteSupervisor = operations.RemoteSupervisor;
44
+ export {
45
+ DistributedRuntimeManager,
46
+ RemoteRunnerRegistry,
47
+ RemoteSupervisor,
48
+ } from '@pellux/goodvibes-sdk/platform/runtime/operations';
47
49
 
48
50
  // Boot helpers the daemon runs itself (the facade does not know about them).
49
- export const syncConfiguredServices = bootstrap.synchronizeConfiguredServices;
51
+ export { synchronizeConfiguredServices as syncConfiguredServices } from '@pellux/goodvibes-sdk/platform/runtime/bootstrap';
50
52
 
51
53
  // Observability.
52
- export const TelemetryApiService = observability.TelemetryApiService;
53
- export type TelemetryApiService = observability.TelemetryApiService;
54
- export const ComponentHealthMonitor = observability.ComponentHealthMonitor;
55
- export type ComponentHealthMonitor = observability.ComponentHealthMonitor;
56
- export const IdempotencyStore = observability.IdempotencyStore;
57
- export type IdempotencyStore = observability.IdempotencyStore;
54
+ export {
55
+ TelemetryApiService,
56
+ ComponentHealthMonitor,
57
+ IdempotencyStore,
58
+ } from '@pellux/goodvibes-sdk/platform/runtime/observability';
58
59
 
59
60
  // Security.
60
- export const PolicyRuntimeState = security.PolicyRuntimeState;
61
- export type PolicyRuntimeState = security.PolicyRuntimeState;
61
+ export { PolicyRuntimeState } from '@pellux/goodvibes-sdk/platform/runtime/security';
62
62
 
63
63
  // Integration helpers (surface-scoped continuity reads) and the no-op screen
64
64
  // stand-ins. The daemon facade's service-graph contract names a panel manager
65
65
  // and a keybindings manager because a surface that has a screen supplies real
66
66
  // ones; the daemon has no screen, and the SDK ships the honest no-ops for
67
67
  // exactly this case rather than leaving a hole a fake would fill.
68
- export const IntegrationHelperService = ui.IntegrationHelperService;
69
- export type IntegrationHelperService = ui.IntegrationHelperService;
70
- export const createNoopPanelManager = ui.createNoopPanelManager;
71
- export const createNoopKeybindingsManager = ui.createNoopKeybindingsManager;
68
+ export {
69
+ IntegrationHelperService,
70
+ createNoopPanelManager,
71
+ createNoopKeybindingsManager,
72
+ } from '@pellux/goodvibes-sdk/platform/runtime/ui';
72
73
  export type PanelManagerLike = ui.PanelManagerLike;
73
74
  export type KeybindingsManagerLike = ui.KeybindingsManagerLike;
74
75
 
@@ -77,8 +78,7 @@ export type Notification = ui.Notification;
77
78
  export type RoutingDecision = ui.RoutingDecision;
78
79
 
79
80
  // Outbound network transport installation (proxy/TLS policy from settings).
80
- export const GlobalNetworkTransportInstaller = transport.GlobalNetworkTransportInstaller;
81
- export type GlobalNetworkTransportInstaller = transport.GlobalNetworkTransportInstaller;
81
+ export { GlobalNetworkTransportInstaller } from '@pellux/goodvibes-sdk/platform/runtime/transport';
82
82
 
83
83
 
84
84
  // Runtime event payload unions, re-exported so a consumer names one import path