@nanobpm/nano-ide-ext-types 1.5.0 → 1.6.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/dist/index.d.ts +58 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,47 @@ export interface TriggerSourceSpec {
|
|
|
201
201
|
*/
|
|
202
202
|
driver?: string;
|
|
203
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* One worker a connector pack contributes — the **outbound/compute** edge of the
|
|
206
|
+
* I/O surface (ADR 0050, amending ADR 0033 §4). "Connector" is the *planned* pack
|
|
207
|
+
* kind for two-edge I/O packs; it is not yet a member of {@link ExtKind}, so today
|
|
208
|
+
* these packs ship as `kind: "trigger"` and carry `workers[]` alongside their
|
|
209
|
+
* `triggerSources[]`. Where {@link TriggerSourceSpec} is the *inbound* edge
|
|
210
|
+
* (external event → engine), a worker is the *outbound* edge (engine job →
|
|
211
|
+
* external effect, e.g. "post a Slack message").
|
|
212
|
+
*
|
|
213
|
+
* The `type` is the design→runtime **seam**: it must equal the
|
|
214
|
+
* `zeebe:taskDefinition:type` of the element template (a {@link ExtManifest.components}
|
|
215
|
+
* entry) that this worker backs, so a task dragged from the palette resolves to
|
|
216
|
+
* a running worker (ADR 0033 §1). The worker is **long-lived**: it subscribes by
|
|
217
|
+
* `type` (Zeebe-style, via `@nanobpm/worker`'s `defineWorker`), is started when
|
|
218
|
+
* the connector is enabled and the App runs, and is supervised — restarted with
|
|
219
|
+
* backoff on crash, killed on stop — reusing the trigger-driver supervisor
|
|
220
|
+
* (ADR 0025 §4 / 0036 / 0038). At-least-once outbound delivery is inherited from
|
|
221
|
+
* the engine's durable job queue (the job *is* the outbox), so no new durable
|
|
222
|
+
* subsystem is needed — the symmetric dual of the inbound inbox (ADR 0025 §2).
|
|
223
|
+
*/
|
|
224
|
+
export interface WorkerSpec {
|
|
225
|
+
/** The BPMN job type this worker serves. MUST equal the backing element
|
|
226
|
+
* template's `zeebe:taskDefinition:type` (the design→runtime seam). */
|
|
227
|
+
type: string;
|
|
228
|
+
/** Pack-relative entrypoint (a Node/Deno `.ts`/`.js`/`.mjs`) that calls
|
|
229
|
+
* `@nanobpm/worker`'s `defineWorker`. Runs on Node >=22.6
|
|
230
|
+
* (`--experimental-strip-types`) or Deno, like a trigger driver. */
|
|
231
|
+
entry: string;
|
|
232
|
+
/** Human label for the console. */
|
|
233
|
+
displayName?: string;
|
|
234
|
+
/** Max concurrent jobs (maps to `defineWorker`'s `maxParallelJobs`). */
|
|
235
|
+
maxParallelJobs?: number;
|
|
236
|
+
/**
|
|
237
|
+
* Config fields surfaced **per-connector** in the project config surface when
|
|
238
|
+
* the connector is enabled — e.g. the shared connection/API token. Defaults
|
|
239
|
+
* are env-pointers (`env`), never inline secrets, so the committed manifest
|
|
240
|
+
* carries no credentials (ADR 0027 §5). Distinct from the element template's
|
|
241
|
+
* per-instance `zeebe:input` fields (channel, message text).
|
|
242
|
+
*/
|
|
243
|
+
configFields?: ConfigField[];
|
|
244
|
+
}
|
|
204
245
|
export interface ExtManifest {
|
|
205
246
|
id: string;
|
|
206
247
|
kind: ExtKind;
|
|
@@ -235,5 +276,22 @@ export interface ExtManifest {
|
|
|
235
276
|
* §6). Each entry registers a `type` a manifest trigger can use; the pack's
|
|
236
277
|
* out-of-process driver emits events over the trigger ingress. */
|
|
237
278
|
triggerSources?: TriggerSourceSpec[];
|
|
279
|
+
/**
|
|
280
|
+
* Pack-relative paths to Camunda **element-template** JSON files (each a
|
|
281
|
+
* single template or an array of them) — the design-time **components** this
|
|
282
|
+
* pack contributes to the modeler palette (ADR 0033 §4). The host resolves +
|
|
283
|
+
* parses them (`extensions::pack_component_templates`, path-escape-guarded)
|
|
284
|
+
* and layers them into the palette / template chooser. Mirrors the host's
|
|
285
|
+
* `ExtManifest.components: Vec<String>`.
|
|
286
|
+
*/
|
|
287
|
+
components?: string[];
|
|
288
|
+
/**
|
|
289
|
+
* connector packs: the **workers** this pack contributes — the outbound edge
|
|
290
|
+
* bound to its `components` element templates by matching job `type` (ADR
|
|
291
|
+
* 0050, amending ADR 0033 §4). Host consumption (launch + supervision +
|
|
292
|
+
* project-enablement gating) is the ADR 0050 host increment; the field is the
|
|
293
|
+
* canonical contract packs author against.
|
|
294
|
+
*/
|
|
295
|
+
workers?: WorkerSpec[];
|
|
238
296
|
}
|
|
239
297
|
export declare const MANIFEST_FILE = "nano-ide.ext.json";
|