@volter/supercode-orchestrator 0.4.70 → 0.4.71

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.
@@ -534,6 +534,15 @@ const ACTIONS = {
534
534
  return;
535
535
  }
536
536
  },
537
+ // an event sent to other cards (`to`: an expression naming their ids, e.g. a card's open subtasks), as `as` sends it;
538
+ // a card it does not apply to now is passed over
539
+ send(ctx, { event: name, to, as = 'manager', payload = {} }, scope) {
540
+ const ids = [].concat(evaluate(String(to), scope) ?? []).map(String).filter((other) => other && other !== ctx.id);
541
+ for (const other of ids) {
542
+ try { ctx.effects.push(...(fire(ctx.db, ctx.board, ctx.entry, other, name, { roles: [as], payload }).effects ?? [])); }
543
+ catch (error) { if (!error.noTransition && !error.refusal && !/does not apply|there is for/.test(error.message)) throw error; }
544
+ }
545
+ },
537
546
  // a message from the board to a session (`to`: its address), kept on the card as a board_message event until the
538
547
  // dispatcher has sent it: a move settled by any verb (a list settles too) is never lost with its effects
539
548
  tell(ctx, { to, text }) { if (to) record(ctx.db, ctx.id, 'board_message', { to: String(to), text: String(text ?? '') }, null); },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.4.70",
3
+ "version": "0.4.71",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {