@ultimat3/manifest 31.24.0 → 31.25.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/manifest",
3
- "version": "31.24.0",
3
+ "version": "31.25.0",
4
4
  "description": "x.manifest.json: deterministic generated facts, contract diff, AGENTS.md budget",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -43,12 +43,12 @@
43
43
  "test": "bun test"
44
44
  },
45
45
  "dependencies": {
46
- "@ultimat3/action": "31.24.0",
47
- "@ultimat3/core": "31.24.0",
48
- "@ultimat3/entity": "31.24.0",
49
- "@ultimat3/jobs": "31.24.0",
50
- "@ultimat3/query": "31.24.0",
51
- "@ultimat3/realtime": "31.24.0",
52
- "@ultimat3/schema": "31.24.0"
46
+ "@ultimat3/action": "31.25.0",
47
+ "@ultimat3/core": "31.25.0",
48
+ "@ultimat3/entity": "31.25.0",
49
+ "@ultimat3/jobs": "31.25.0",
50
+ "@ultimat3/query": "31.25.0",
51
+ "@ultimat3/realtime": "31.25.0",
52
+ "@ultimat3/schema": "31.25.0"
53
53
  }
54
54
  }
package/src/diff-work.ts CHANGED
@@ -54,6 +54,14 @@ export function diffJobs(
54
54
  detail: 'concurrency changed; runs already in flight keep the slots they hold',
55
55
  });
56
56
  }
57
+ // A limiter paces runs, as a cap does: no enqueuer or queued payload depends on it.
58
+ if (canonicalJson(job.limiter ?? null) !== canonicalJson(next.limiter ?? null)) {
59
+ changes.push({
60
+ kind: 'internal',
61
+ path: `${path}.limiter`,
62
+ detail: 'limiter changed; runs already admitted keep what they spent',
63
+ });
64
+ }
57
65
  if ((job.onSettled ?? false) !== (next.onSettled ?? false)) {
58
66
  changes.push({
59
67
  kind: 'internal',
package/src/schema.ts CHANGED
@@ -327,6 +327,15 @@ export interface JobFact {
327
327
  };
328
328
  /** Present, and `true`, only when the job declares an `onSettled` hook. */
329
329
  readonly onSettled?: true;
330
+ /**
331
+ * The named fleet budget it spends (`job({ limiter })`), present only when it declares one:
332
+ * `rate` per `windowMs`, `concurrency` at once, either `null` when the limiter caps nothing there.
333
+ */
334
+ readonly limiter?: {
335
+ readonly name: string;
336
+ readonly rate: { readonly limit: number; readonly windowMs: number } | null;
337
+ readonly concurrency: number | null;
338
+ };
330
339
  }
331
340
 
332
341
  /**
package/src/sources.ts CHANGED
@@ -259,6 +259,15 @@ export function frameworkSources(input: FrameworkSourcesInput): ManifestSources
259
259
  }),
260
260
  // The same rule: only a job that declares the hook carries the key.
261
261
  ...(job.onSettled ? { onSettled: true as const } : {}),
262
+ ...(job.limiter === null
263
+ ? {}
264
+ : {
265
+ limiter: {
266
+ name: job.limiter.name,
267
+ rate: job.limiter.rate,
268
+ concurrency: job.limiter.concurrency,
269
+ },
270
+ }),
262
271
  })),
263
272
  // Field by field, for the reason above: `kind` is the declaration's tag, not a fact.
264
273
  consumers: registeredConsumers().map((consumer) => ({