@north-light/api 0.3.512 → 0.3.514

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.
@@ -8,7 +8,7 @@ export const MAX_KIND_EVENTS = 64;
8
8
  export const MIN_EVENT_LEVEL = 1;
9
9
  export const MAX_EVENT_LEVEL = 10;
10
10
  const KIND_KEYS = new Set(['description', 'events', 'read']);
11
- const EVENT_KEYS = new Set(['level', 'supersedes']);
11
+ const EVENT_KEYS = new Set(['level', 'supersedes', 'ends_wait']);
12
12
  function isRecord(value) {
13
13
  return typeof value === 'object' && value !== null && !Array.isArray(value);
14
14
  }
@@ -25,7 +25,7 @@ export function eventCatalogReasons(events, where) {
25
25
  if (!LOCAL.test(local))
26
26
  reasons.push(`${at} is not a valid event name`);
27
27
  if (!isRecord(spec)) {
28
- reasons.push(`${at} must be an object { level, supersedes? }`);
28
+ reasons.push(`${at} must be an object { level, supersedes?, ends_wait? }`);
29
29
  continue;
30
30
  }
31
31
  for (const key of Object.keys(spec))
@@ -36,6 +36,8 @@ export function eventCatalogReasons(events, where) {
36
36
  reasons.push(`${at} level must be an integer ${MIN_EVENT_LEVEL}-${MAX_EVENT_LEVEL}`);
37
37
  if (spec['supersedes'] !== undefined && typeof spec['supersedes'] !== 'boolean')
38
38
  reasons.push(`${at} supersedes must be a boolean`);
39
+ if (spec['ends_wait'] !== undefined && typeof spec['ends_wait'] !== 'boolean')
40
+ reasons.push(`${at} ends_wait must be a boolean`);
39
41
  }
40
42
  return reasons;
41
43
  }
@@ -1,5 +1,5 @@
1
1
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
2
- export declare const CONTRACT_LEVEL = "1.22";
2
+ export declare const CONTRACT_LEVEL = "1.23";
3
3
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
4
4
  export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
5
5
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -12,7 +12,7 @@
12
12
  //
13
13
  // PURITY (spec §3.1): Node built-ins + `src/api/*` only.
14
14
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
15
- export const CONTRACT_LEVEL = '1.22';
15
+ export const CONTRACT_LEVEL = '1.23';
16
16
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
17
17
  export const REQUIRED_CONTRACT_HEADER = 'Crouter-Required-Contract';
18
18
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -276,6 +276,18 @@ export interface RosterDTO {
276
276
  generated_at: IsoTime;
277
277
  nodes: RosterNodeDTO[];
278
278
  edges: RosterEdgeDTO[];
279
+ /** Every live wait a node holds on a watched canvas object (a workflow run until it completes), oldest
280
+ * first per node. The attach viewer lists this node's below the editor beside its child and cron rows. */
281
+ object_waits?: RosterObjectWaitDTO[];
282
+ }
283
+ /** One node's live wait on a watched object: the object's kind (`github.run`) and name identify it to a
284
+ * person; `crtr canvas read <object_id>` reads it. */
285
+ export interface RosterObjectWaitDTO {
286
+ node_id: NodeIdDTO;
287
+ object_id: string;
288
+ object_type: string;
289
+ object_name: string;
290
+ created: IsoTime;
279
291
  }
280
292
  /** Browse's initial frame needs the dashboard fields and topology, not the full
281
293
  * node detail/list projection. Transported as gzip JSON (application/gzip) over
@@ -2,6 +2,7 @@ import type { PrivacyName } from './objects.js';
2
2
  export interface CustomEventSpecDTO {
3
3
  level: number;
4
4
  supersedes?: boolean;
5
+ ends_wait?: boolean;
5
6
  }
6
7
  export type CustomReceiverDTO = 'queue' | {
7
8
  url: string;
@@ -13,6 +13,7 @@ export interface ObjectKindDeclDTO {
13
13
  events: Record<string, {
14
14
  level: number;
15
15
  supersedes?: boolean;
16
+ ends_wait?: boolean;
16
17
  }>;
17
18
  owner: {
18
19
  id: string;
package/dist/types.d.ts CHANGED
@@ -66,6 +66,7 @@ export interface ObjectKindDeclaration {
66
66
  events: Record<string, {
67
67
  level: number;
68
68
  supersedes?: boolean;
69
+ ends_wait?: boolean;
69
70
  }>;
70
71
  /** A leaf path of the plugin's own commands, run to render an instance as markdown. */
71
72
  read?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.512",
3
+ "version": "0.3.514",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",