@femtomc/mu-server 26.2.69 → 26.2.70

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/dist/server.d.ts CHANGED
@@ -5,20 +5,11 @@ import { ForumStore } from "@femtomc/mu-forum";
5
5
  import { IssueStore } from "@femtomc/mu-issue";
6
6
  import { ControlPlaneActivitySupervisor } from "./activity_supervisor.js";
7
7
  import { type MuConfig } from "./config.js";
8
- import { type ControlPlaneConfig, type ControlPlaneHandle, type ControlPlaneSessionLifecycle, type ControlPlaneSessionMutationAction } from "./control_plane.js";
9
- import { CronProgramRegistry } from "./cron_programs.js";
10
- import { HeartbeatProgramRegistry } from "./heartbeat_programs.js";
8
+ import type { ControlPlaneConfig, ControlPlaneHandle, ControlPlaneSessionLifecycle } from "./control_plane_contract.js";
11
9
  import { ActivityHeartbeatScheduler } from "./heartbeat_scheduler.js";
12
- type ShellCommandResult = {
13
- exitCode: number;
14
- stdout: string;
15
- stderr: string;
16
- };
17
- type ShellCommandRunner = (command: string) => Promise<ShellCommandResult>;
18
- export declare function createProcessSessionLifecycle(opts: {
19
- repoRoot: string;
20
- runShellCommand?: ShellCommandRunner;
21
- }): ControlPlaneSessionLifecycle;
10
+ import { createProcessSessionLifecycle } from "./session_lifecycle.js";
11
+ import type { ServerRuntime } from "./server_runtime.js";
12
+ export { createProcessSessionLifecycle };
22
13
  type ControlPlaneReloader = (opts: {
23
14
  repoRoot: string;
24
15
  previous: ControlPlaneHandle | null;
@@ -42,15 +33,6 @@ export type ServerOptions = {
42
33
  configWriter?: ConfigWriter;
43
34
  sessionLifecycle?: ControlPlaneSessionLifecycle;
44
35
  };
45
- export type ServerRuntimeOptions = {
46
- repoRoot?: string;
47
- controlPlane?: ControlPlaneHandle | null;
48
- heartbeatScheduler?: ActivityHeartbeatScheduler;
49
- generationTelemetry?: GenerationTelemetryRecorder;
50
- config?: MuConfig;
51
- configReader?: ConfigReader;
52
- sessionLifecycle?: ControlPlaneSessionLifecycle;
53
- };
54
36
  export type ServerInstanceOptions = Omit<ServerOptions, "repoRoot" | "controlPlane" | "heartbeatScheduler" | "generationTelemetry" | "config" | "sessionLifecycle">;
55
37
  export type ServerContext = {
56
38
  repoRoot: string;
@@ -60,28 +42,14 @@ export type ServerContext = {
60
42
  eventsStore: JsonlStore<EventEnvelope>;
61
43
  };
62
44
  export declare function createContext(repoRoot: string): ServerContext;
63
- export type ServerRuntimeCapabilities = {
64
- session_lifecycle_actions: readonly ControlPlaneSessionMutationAction[];
65
- control_plane_bootstrapped: boolean;
66
- control_plane_adapters: string[];
67
- };
68
- export type ServerRuntime = {
69
- repoRoot: string;
70
- config: MuConfig;
71
- heartbeatScheduler: ActivityHeartbeatScheduler;
72
- generationTelemetry: GenerationTelemetryRecorder;
73
- sessionLifecycle: ControlPlaneSessionLifecycle;
74
- controlPlane: ControlPlaneHandle | null;
75
- capabilities: ServerRuntimeCapabilities;
76
- };
77
- export declare function composeServerRuntime(options?: ServerRuntimeOptions): Promise<ServerRuntime>;
45
+ export type { ServerRuntime, ServerRuntimeCapabilities, ServerRuntimeOptions } from "./server_runtime.js";
46
+ export { composeServerRuntime } from "./server_runtime.js";
78
47
  export declare function createServerFromRuntime(runtime: ServerRuntime, options?: ServerInstanceOptions): {
79
48
  port: number;
80
49
  fetch: (request: Request) => Promise<Response>;
81
50
  hostname: string;
82
51
  controlPlane: ControlPlaneHandle;
83
52
  activitySupervisor: ControlPlaneActivitySupervisor;
84
- heartbeatPrograms: HeartbeatProgramRegistry;
85
- cronPrograms: CronProgramRegistry;
53
+ heartbeatPrograms: import("./heartbeat_programs.js").HeartbeatProgramRegistry;
54
+ cronPrograms: import("./cron_programs.js").CronProgramRegistry;
86
55
  };
87
- export {};