@nanobpm/nano-ide-ext-types 1.3.0 → 1.4.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 +52 -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;
@@ -141,6 +141,53 @@ export interface SignatureParam {
141
141
  /** Markdown documentation for this parameter. */
142
142
  documentation?: string;
143
143
  }
144
+ /**
145
+ * One config field a pack surfaces in the console (read-only in the IDE config
146
+ * panel; for a trigger source, the fields a trigger of this `kind` renders).
147
+ */
148
+ export interface ConfigField {
149
+ /** Stable key within the pack (the manifest trigger's `config[key]`). */
150
+ key: string;
151
+ /** Human-facing label. */
152
+ label: string;
153
+ /** What the field controls. */
154
+ description?: string;
155
+ /** Environment variable this field reads its current value from, if any. */
156
+ env?: string;
157
+ /** Documented default when unset. */
158
+ default?: string;
159
+ }
160
+ /**
161
+ * How a trigger source pack's events reach the runtime (ADR 0025 §6). Only
162
+ * `webhook` — the universal ingress the driver POSTs to — is honoured in v1;
163
+ * the field is forward-declared so a pack states its contract explicitly.
164
+ */
165
+ export type SourceTransport = "webhook";
166
+ /**
167
+ * One trigger source **kind** a `kind: "trigger"` pack contributes (ADR 0025
168
+ * §6). Registering a `kind` lets a manifest trigger use it and the
169
+ * console/validation recognise it. The pack's out-of-process `driver` (a
170
+ * Node/Deno process, ADR 0038/0036) emits events over the trigger ingress; the
171
+ * runtime owns the inbox/dispatch/retry — the pack only produces events.
172
+ */
173
+ export interface TriggerSourceSpec {
174
+ /** The `type` string a manifest trigger uses (e.g. "mqtt", "imap"). */
175
+ kind: string;
176
+ /** Human label for the console source picker. */
177
+ displayName?: string;
178
+ /** How the runtime receives this source's events. Defaults to "webhook". */
179
+ transport?: SourceTransport;
180
+ /** Config fields the console renders for a trigger of this kind. */
181
+ configFields?: ConfigField[];
182
+ /**
183
+ * Pack-relative path to the out-of-process driver entrypoint (a Node/Deno
184
+ * `.ts`/`.js`/`.mjs` file). When present, the runtime auto-launches and
185
+ * supervises the driver while an App with a trigger of this `kind` runs
186
+ * (ADR 0025 phase 4): one child process per such trigger, restarted with
187
+ * backoff on crash, killed when the App stops. Absent = declaration-only.
188
+ */
189
+ driver?: string;
190
+ }
144
191
  export interface ExtManifest {
145
192
  id: string;
146
193
  kind: ExtKind;
@@ -171,5 +218,9 @@ export interface ExtManifest {
171
218
  intellisense?: LangIntellisense[];
172
219
  /** Built-in packs set this; published packs omit it. */
173
220
  builtin?: boolean;
221
+ /** trigger packs: the trigger source kinds this pack contributes (ADR 0025
222
+ * §6). Each entry registers a `type` a manifest trigger can use; the pack's
223
+ * out-of-process driver emits events over the trigger ingress. */
224
+ triggerSources?: TriggerSourceSpec[];
174
225
  }
175
226
  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.4.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",