@nanobpm/nano-ide-ext-types 1.3.0 → 1.5.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +65 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type ExtKind = "lang" | "app" | "example" | "theme";
1
+ export type ExtKind = "lang" | "app" | "example" | "theme" | "trigger";
2
2
  export interface FileType {
3
3
  /** File extension including the dot, e.g. ".rs". */
4
4
  ext: string;
@@ -48,7 +48,20 @@ export interface RunConfig {
48
48
  }
49
49
  export interface TemplateSpec {
50
50
  id: string;
51
+ /** Short human-facing title rendered on the New Project template card. */
51
52
  label: string;
53
+ /** One-line description rendered on the template card. Older packs instead
54
+ * cram "Title — description" into `label`; the console's template menu
55
+ * splits that on the em-dash as a fallback, but new packs should set this.
56
+ * Hosts that don't understand `description` render `label` alone, so if you
57
+ * must support such a host, keep the combined "Title — description" `label`
58
+ * (the em-dash split then keeps modern cards correct too). */
59
+ description?: string;
60
+ /** Language pack id this template's project uses, when it differs from what
61
+ * the pack implies (lang packs → the pack id; app/example packs →
62
+ * `requires[0]`, else "deno"). Drives the card's language icon AND the
63
+ * scaffolded project's `lang`. */
64
+ lang?: string;
52
65
  }
53
66
  /**
54
67
  * The console's design-token vocabulary (nanobpmn
@@ -141,6 +154,53 @@ export interface SignatureParam {
141
154
  /** Markdown documentation for this parameter. */
142
155
  documentation?: string;
143
156
  }
157
+ /**
158
+ * One config field a pack surfaces in the console (read-only in the IDE config
159
+ * panel; for a trigger source, the fields a trigger of this `kind` renders).
160
+ */
161
+ export interface ConfigField {
162
+ /** Stable key within the pack (the manifest trigger's `config[key]`). */
163
+ key: string;
164
+ /** Human-facing label. */
165
+ label: string;
166
+ /** What the field controls. */
167
+ description?: string;
168
+ /** Environment variable this field reads its current value from, if any. */
169
+ env?: string;
170
+ /** Documented default when unset. */
171
+ default?: string;
172
+ }
173
+ /**
174
+ * How a trigger source pack's events reach the runtime (ADR 0025 §6). Only
175
+ * `webhook` — the universal ingress the driver POSTs to — is honoured in v1;
176
+ * the field is forward-declared so a pack states its contract explicitly.
177
+ */
178
+ export type SourceTransport = "webhook";
179
+ /**
180
+ * One trigger source **kind** a `kind: "trigger"` pack contributes (ADR 0025
181
+ * §6). Registering a `kind` lets a manifest trigger use it and the
182
+ * console/validation recognise it. The pack's out-of-process `driver` (a
183
+ * Node/Deno process, ADR 0038/0036) emits events over the trigger ingress; the
184
+ * runtime owns the inbox/dispatch/retry — the pack only produces events.
185
+ */
186
+ export interface TriggerSourceSpec {
187
+ /** The `type` string a manifest trigger uses (e.g. "mqtt", "imap"). */
188
+ kind: string;
189
+ /** Human label for the console source picker. */
190
+ displayName?: string;
191
+ /** How the runtime receives this source's events. Defaults to "webhook". */
192
+ transport?: SourceTransport;
193
+ /** Config fields the console renders for a trigger of this kind. */
194
+ configFields?: ConfigField[];
195
+ /**
196
+ * Pack-relative path to the out-of-process driver entrypoint (a Node/Deno
197
+ * `.ts`/`.js`/`.mjs` file). When present, the runtime auto-launches and
198
+ * supervises the driver while an App with a trigger of this `kind` runs
199
+ * (ADR 0025 phase 4): one child process per such trigger, restarted with
200
+ * backoff on crash, killed when the App stops. Absent = declaration-only.
201
+ */
202
+ driver?: string;
203
+ }
144
204
  export interface ExtManifest {
145
205
  id: string;
146
206
  kind: ExtKind;
@@ -171,5 +231,9 @@ export interface ExtManifest {
171
231
  intellisense?: LangIntellisense[];
172
232
  /** Built-in packs set this; published packs omit it. */
173
233
  builtin?: boolean;
234
+ /** trigger packs: the trigger source kinds this pack contributes (ADR 0025
235
+ * §6). Each entry registers a `type` a manifest trigger can use; the pack's
236
+ * out-of-process driver emits events over the trigger ingress. */
237
+ triggerSources?: TriggerSourceSpec[];
174
238
  }
175
239
  export declare const MANIFEST_FILE = "nano-ide.ext.json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-ide-ext-types",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "TypeScript types for the nano-ide.ext.json extension manifest (ADR 0007).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",