@noodleseed/one 0.181.0 → 0.182.0

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.
@@ -141,9 +141,16 @@ export interface DeploymentPackageBinding {
141
141
  }
142
142
  export type ReadinessProbe = () => boolean | Promise<boolean>;
143
143
  export type ModuleDispose = () => void | Promise<void>;
144
+ /**
145
+ * `serve-only` is a revision staged in production before approval (ADR 0144): it serves read-only
146
+ * probes and must start no worker, timer, queue consumer or projector and write nothing at boot.
147
+ */
148
+ export type ServiceRunMode = 'full' | 'serve-only';
144
149
  export interface ModuleHostContext {
145
150
  readonly logger: ModuleLogger;
146
151
  readonly clock: () => Date;
152
+ /** Absent means `full`. A module that starts background work or writes at boot must honor `serve-only`. */
153
+ readonly runMode?: ServiceRunMode;
147
154
  readonly options?: Readonly<Record<string, unknown>>;
148
155
  readonly stores?: ModuleStores;
149
156
  readonly tenants?: TenantRegistryView;
@@ -10,7 +10,8 @@ export async function closeServiceResources(input) {
10
10
  if (input.businessInformationSourceTimer !== undefined) {
11
11
  clearInterval(input.businessInformationSourceTimer);
12
12
  }
13
- clearInterval(input.alertTimer);
13
+ if (input.alertTimer !== undefined)
14
+ clearInterval(input.alertTimer);
14
15
  const errors = [];
15
16
  const moduleHost = input.moduleHost;
16
17
  if (moduleHost !== undefined) {
@@ -162,7 +162,8 @@ export function createServiceHandler(registry, options = {}) {
162
162
  logger,
163
163
  ...(options.clock !== undefined ? { clock: options.clock } : {}),
164
164
  });
165
- archiveSweeper.maybeSweep();
165
+ if (options.runMode !== 'serve-only')
166
+ archiveSweeper.maybeSweep();
166
167
  const moduleRouteDeps = {
167
168
  routes: [
168
169
  ...moduleHost.routes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noodleseed/one",
3
- "version": "0.181.0",
3
+ "version": "0.182.0",
4
4
  "private": false,
5
5
  "description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
6
6
  "license": "Apache-2.0",