@ferrfleet/mcp 10.18.0 → 10.19.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.
@@ -192,6 +192,21 @@ describe('workflow and event rule tools', () => {
192
192
  expect(accepts('create_workflow', 'entries', [noStarts])).toBe(false);
193
193
  expect(accepts('create_workflow', 'outputs', [noFrom])).toBe(false);
194
194
  });
195
+ it('accepts from as a step id or a non-empty list of distinct step ids', () => {
196
+ expect(accepts('create_workflow', 'outputs', [{ ...issueOutput, from: 'review' }])).toBe(true);
197
+ expect(accepts('create_workflow', 'outputs', [{ ...issueOutput, from: ['review', 'verify'] }])).toBe(true);
198
+ expect(accepts('update_workflow', 'outputs', [{ ...issueOutput, from: ['review'] }])).toBe(true);
199
+ });
200
+ it('refuses an empty, duplicated or malformed from', () => {
201
+ for (const from of [[], ['review', 'review'], [''], ['review', 3], '', 3, null]) {
202
+ expect(accepts('create_workflow', 'outputs', [{ ...issueOutput, from }]), String(from)).toBe(false);
203
+ }
204
+ });
205
+ it('create_workflow posts a list from unchanged', async () => {
206
+ const output = { ...issueOutput, from: ['review', 'verify'] };
207
+ await handlers.get('create_workflow')({ name: 'wf', steps: [step], outputs: [output] });
208
+ expect(lastCall().body).toMatchObject({ outputs: [output] });
209
+ });
195
210
  it('caps entries and outputs at 10', () => {
196
211
  const entries = Array.from({ length: 11 }, (_, i) => ({ ...cronEntry, id: `e${i}` }));
197
212
  const outputs = Array.from({ length: 11 }, (_, i) => ({ ...issueOutput, id: `o${i}` }));
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAmH9D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QAqItD"}
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA0H9D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QAqItD"}
@@ -60,7 +60,12 @@ const outputSchema = z.strictObject({
60
60
  .string()
61
61
  .min(1)
62
62
  .describe('Output id, unique among the steps, entries and outputs of the workflow'),
63
- from: z.string().min(1).describe('Id of the step whose result is delivered'),
63
+ from: z
64
+ .union([z.string().min(1), z.array(z.string().min(1)).min(1)])
65
+ .refine((from) => typeof from === 'string' || new Set(from).size === from.length, {
66
+ message: 'Step ids must be unique',
67
+ })
68
+ .describe('Id of the step whose result is delivered, or a non-empty list of distinct step ids: the output waits for all of them, ignores skipped ones and delivers the last listed step that completed with a body'),
64
69
  kind: z.enum(OUTPUT_KINDS).describe('Where the result goes'),
65
70
  connector_id: z
66
71
  .string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferrfleet/mcp",
3
- "version": "10.18.0",
3
+ "version": "10.19.0",
4
4
  "description": "Model Context Protocol server for FerrFleet: agents, runs, skills",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",