@ferrfleet/mcp 10.17.1 → 10.18.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.js CHANGED
@@ -5,6 +5,7 @@ try {
5
5
  await runMcp({
6
6
  name: 'ferrfleet',
7
7
  version: readPackageVersion(import.meta.url),
8
+ scopes: ['agents:read', 'agents:run'],
8
9
  register,
9
10
  });
10
11
  }
@@ -327,6 +327,21 @@ describe('workflow and event rule tools', () => {
327
327
  body: { name: 'R', outcome: skip },
328
328
  });
329
329
  });
330
+ it('update_event_rule forwards entry_id of a workflow outcome', async () => {
331
+ const outcome = { action: 'workflow', workflow_id: ID, entry_id: 'renovate-pr' };
332
+ await handlers.get('update_event_rule')({ rule_id: ID, name: 'R', outcome });
333
+ expect(lastCall().body).toEqual({ name: 'R', outcome });
334
+ });
335
+ it('create_event_rule forwards entry_id of a workflow outcome', async () => {
336
+ const outcome = { action: 'workflow', workflow_id: ID, entry_id: 'pr' };
337
+ await handlers.get('create_event_rule')({ name: 'R', outcome });
338
+ expect(lastCall().body).toEqual({ name: 'R', outcome });
339
+ });
340
+ it('a workflow outcome without entry_id sends none', async () => {
341
+ const outcome = { action: 'workflow', workflow_id: ID };
342
+ await handlers.get('create_event_rule')({ name: 'R', outcome });
343
+ expect(lastCall().body).toEqual({ name: 'R', outcome });
344
+ });
330
345
  it('delete_event_rule sends DELETE and reports the id on 204', async () => {
331
346
  mockFetch.mockResolvedValue(respond(204));
332
347
  const result = await handlers.get('delete_event_rule')({ rule_id: ID });
@@ -365,6 +380,11 @@ describe('workflow and event rule tools', () => {
365
380
  expect(ok({ action: 'run', agent_id: 'a', instructions: 'x', dedup: 'head_commit' })).toBe(true);
366
381
  expect(ok(skip)).toBe(true);
367
382
  expect(ok({ action: 'workflow', workflow_id: ID })).toBe(true);
383
+ expect(ok({ action: 'workflow', workflow_id: ID, entry_id: 'pr' })).toBe(true);
384
+ });
385
+ it('rejects an empty or non-string entry_id', () => {
386
+ expect(ok({ action: 'workflow', workflow_id: ID, entry_id: '' })).toBe(false);
387
+ expect(ok({ action: 'workflow', workflow_id: ID, entry_id: 1 })).toBe(false);
368
388
  });
369
389
  it('rejects an unknown action', () => {
370
390
  expect(ok({ action: 'notify' })).toBe(false);
@@ -387,6 +407,7 @@ describe('workflow and event rule tools', () => {
387
407
  it('rejects fields from another variant', () => {
388
408
  expect(ok({ action: 'skip', reason: 'x', agent_id: 'a' })).toBe(false);
389
409
  expect(ok({ action: 'run', workflow_id: ID })).toBe(false);
410
+ expect(ok({ action: 'skip', reason: 'x', entry_id: 'pr' })).toBe(false);
390
411
  });
391
412
  });
392
413
  describe('conditions schema', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"event-rules.d.ts","sourceRoot":"","sources":["../../src/tools/event-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA0E9D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QA2FvD"}
1
+ {"version":3,"file":"event-rules.d.ts","sourceRoot":"","sources":["../../src/tools/event-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAmF9D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QA2FvD"}
@@ -40,7 +40,11 @@ const conditionsSchema = z
40
40
  const outcomeSchema = z.discriminatedUnion('action', [
41
41
  z.strictObject({
42
42
  action: z.literal('run'),
43
- agent_id: z.string().min(1).optional().describe('Agent to run instead of the repository-bound one'),
43
+ agent_id: z
44
+ .string()
45
+ .min(1)
46
+ .optional()
47
+ .describe('Agent to run instead of the repository-bound one'),
44
48
  instructions: z.string().max(4000).optional().describe("Appended to the agent's prompt"),
45
49
  dedup: z
46
50
  .enum(DEDUP_MODES)
@@ -54,6 +58,11 @@ const outcomeSchema = z.discriminatedUnion('action', [
54
58
  z.strictObject({
55
59
  action: z.literal('workflow'),
56
60
  workflow_id: z.guid().describe('Workflow from list_workflows'),
61
+ entry_id: z
62
+ .string()
63
+ .min(1)
64
+ .optional()
65
+ .describe('Event entry of the workflow to start; omit to start every root step'),
57
66
  }),
58
67
  ]);
59
68
  const ruleFields = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferrfleet/mcp",
3
- "version": "10.17.1",
3
+ "version": "10.18.0",
4
4
  "description": "Model Context Protocol server for FerrFleet: agents, runs, skills",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",