@renseiai/agentfactory-mcp-server 0.8.58 → 0.8.60

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.
@@ -50,7 +50,7 @@ export function registerFleetResources(server) {
50
50
  // 3. fleet://logs/{id} — Agent activity logs
51
51
  server.resource('fleet-logs', new ResourceTemplate('fleet://logs/{id}', { list: undefined }), { description: 'Agent activity logs and session information' }, async (uri, variables) => {
52
52
  const id = Array.isArray(variables.id) ? variables.id[0] : variables.id;
53
- // Try to find the session by linearSessionId first, then fall back to issue ID
53
+ // Try to find the session by trackerSessionId first, then fall back to issue ID
54
54
  let session = await getSessionState(id);
55
55
  if (!session) {
56
56
  session = await getSessionStateByIssue(id);
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAsCxE;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAuX1D"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAoCxE;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwX1D"}
package/dist/src/tools.js CHANGED
@@ -6,13 +6,11 @@ const WORK_TYPES = [
6
6
  'backlog-creation',
7
7
  'development',
8
8
  'inflight',
9
- 'inflight-coordination',
10
9
  'qa',
11
10
  'acceptance',
12
11
  'refinement',
13
- 'coordination',
14
- 'qa-coordination',
15
- 'acceptance-coordination',
12
+ 'refinement-coordination',
13
+ 'ga-readiness',
16
14
  ];
17
15
  // Session status values for zod enum validation
18
16
  const SESSION_STATUSES = [
@@ -44,12 +42,13 @@ export function registerFleetTools(server) {
44
42
  priority: z.number().min(1).max(5).optional().describe('Priority 1-5 where 1 is highest (defaults to 3)'),
45
43
  }, async (args) => {
46
44
  try {
47
- const linearSessionId = `mcp-${Date.now()}-${args.issueId}`;
48
- const session = await storeSessionState(linearSessionId, {
45
+ const sessionId = `mcp-${Date.now()}-${args.issueId}`;
46
+ const session = await storeSessionState(sessionId, {
49
47
  issueId: args.issueId,
50
48
  providerSessionId: null,
51
49
  worktreePath: '',
52
50
  status: 'pending',
51
+ trackerProvider: 'linear',
53
52
  priority: args.priority ?? 3,
54
53
  promptContext: args.description,
55
54
  workType: args.workType ?? 'development',
@@ -61,7 +60,7 @@ export function registerFleetTools(server) {
61
60
  type: 'text',
62
61
  text: JSON.stringify({
63
62
  submitted: true,
64
- taskId: session.linearSessionId,
63
+ taskId: session.trackerSessionId,
65
64
  issueId: session.issueId,
66
65
  status: session.status,
67
66
  priority: session.priority,
@@ -163,7 +162,7 @@ export function registerFleetTools(server) {
163
162
  {
164
163
  type: 'text',
165
164
  text: JSON.stringify({
166
- taskId: session.linearSessionId,
165
+ taskId: session.trackerSessionId,
167
166
  issueId: session.issueId,
168
167
  issueIdentifier: session.issueIdentifier,
169
168
  status: session.status,
@@ -239,7 +238,7 @@ export function registerFleetTools(server) {
239
238
  content: [
240
239
  {
241
240
  type: 'text',
242
- text: `Error: Task "${session.linearSessionId}" is in status "${session.status}". Prompts can only be forwarded to running or claimed sessions.`,
241
+ text: `Error: Task "${session.trackerSessionId}" is in status "${session.status}". Prompts can only be forwarded to running or claimed sessions.`,
243
242
  },
244
243
  ],
245
244
  isError: true,
@@ -254,7 +253,7 @@ export function registerFleetTools(server) {
254
253
  }
255
254
  const streamId = await publishUrgent(agentId, {
256
255
  type: 'directive',
257
- sessionId: session.linearSessionId,
256
+ sessionId: session.trackerSessionId,
258
257
  payload: args.message,
259
258
  createdAt: Date.now(),
260
259
  });
@@ -265,7 +264,7 @@ export function registerFleetTools(server) {
265
264
  text: JSON.stringify({
266
265
  forwarded: true,
267
266
  streamId,
268
- taskId: session.linearSessionId,
267
+ taskId: session.trackerSessionId,
269
268
  issueId: session.issueId,
270
269
  sessionStatus: session.status,
271
270
  }, null, 2),
@@ -302,13 +301,13 @@ export function registerFleetTools(server) {
302
301
  content: [
303
302
  {
304
303
  type: 'text',
305
- text: `Error: Task "${session.linearSessionId}" is in status "${session.status}" and cannot be stopped. Only pending, claimed, or running tasks can be stopped.`,
304
+ text: `Error: Task "${session.trackerSessionId}" is in status "${session.status}" and cannot be stopped. Only pending, claimed, or running tasks can be stopped.`,
306
305
  },
307
306
  ],
308
307
  isError: true,
309
308
  };
310
309
  }
311
- const updated = await updateSessionStatus(session.linearSessionId, 'stopped');
310
+ const updated = await updateSessionStatus(session.trackerSessionId, 'stopped');
312
311
  if (!updated) {
313
312
  return {
314
313
  content: [{ type: 'text', text: `Error: Failed to update task status. Redis may not be configured.` }],
@@ -321,7 +320,7 @@ export function registerFleetTools(server) {
321
320
  type: 'text',
322
321
  text: JSON.stringify({
323
322
  stopped: true,
324
- taskId: session.linearSessionId,
323
+ taskId: session.trackerSessionId,
325
324
  issueId: session.issueId,
326
325
  previousStatus: session.status,
327
326
  newStatus: 'stopped',
@@ -28,7 +28,8 @@ function captureTools() {
28
28
  }
29
29
  function makeSession(overrides = {}) {
30
30
  return {
31
- linearSessionId: 'ses-123',
31
+ trackerSessionId: 'ses-123',
32
+ trackerProvider: 'linear',
32
33
  issueId: 'issue-abc',
33
34
  issueIdentifier: 'SUP-100',
34
35
  providerSessionId: null,
@@ -70,7 +71,7 @@ describe('submit-task', () => {
70
71
  it('creates a pending session and returns task info', async () => {
71
72
  const handler = tools.get('submit-task');
72
73
  vi.mocked(storeSessionState).mockResolvedValue({
73
- linearSessionId: 'mcp-123-issue-1',
74
+ trackerSessionId: 'mcp-123-issue-1', trackerProvider: 'linear',
74
75
  issueId: 'issue-1',
75
76
  status: 'pending',
76
77
  priority: 2,
@@ -88,7 +89,7 @@ describe('submit-task', () => {
88
89
  it('defaults to development work type and priority 3', async () => {
89
90
  const handler = tools.get('submit-task');
90
91
  vi.mocked(storeSessionState).mockResolvedValue({
91
- linearSessionId: 'mcp-123-issue-2',
92
+ trackerSessionId: 'mcp-123-issue-2', trackerProvider: 'linear',
92
93
  issueId: 'issue-2',
93
94
  status: 'pending',
94
95
  priority: 3,
@@ -114,7 +115,7 @@ describe('get-task-status', () => {
114
115
  vi.mocked(getSessionState).mockResolvedValue(session);
115
116
  const result = await handler({ taskId: 'ses-123' });
116
117
  const data = parseResult(result);
117
- expect(data.linearSessionId).toBe('ses-123');
118
+ expect(data.trackerSessionId).toBe('ses-123');
118
119
  expect(result.isError).toBeUndefined();
119
120
  });
120
121
  it('falls back to issue-based lookup', async () => {
@@ -137,7 +138,7 @@ describe('get-task-status', () => {
137
138
  describe('list-fleet', () => {
138
139
  it('returns all sessions when no filter', async () => {
139
140
  const handler = tools.get('list-fleet');
140
- const sessions = [makeSession(), makeSession({ linearSessionId: 'ses-456' })];
141
+ const sessions = [makeSession(), makeSession({ trackerSessionId: 'ses-456' })];
141
142
  vi.mocked(getAllSessions).mockResolvedValue(sessions);
142
143
  const result = await handler({});
143
144
  const data = parseResult(result);
@@ -155,7 +156,7 @@ describe('list-fleet', () => {
155
156
  });
156
157
  it('respects limit parameter', async () => {
157
158
  const handler = tools.get('list-fleet');
158
- const sessions = Array.from({ length: 30 }, (_, i) => makeSession({ linearSessionId: `ses-${i}` }));
159
+ const sessions = Array.from({ length: 30 }, (_, i) => makeSession({ trackerSessionId: `ses-${i}` }));
159
160
  vi.mocked(getAllSessions).mockResolvedValue(sessions);
160
161
  const result = await handler({ limit: 5 });
161
162
  const data = parseResult(result);
@@ -164,7 +165,7 @@ describe('list-fleet', () => {
164
165
  });
165
166
  it('defaults limit to 20', async () => {
166
167
  const handler = tools.get('list-fleet');
167
- const sessions = Array.from({ length: 25 }, (_, i) => makeSession({ linearSessionId: `ses-${i}` }));
168
+ const sessions = Array.from({ length: 25 }, (_, i) => makeSession({ trackerSessionId: `ses-${i}` }));
168
169
  vi.mocked(getAllSessions).mockResolvedValue(sessions);
169
170
  const result = await handler({});
170
171
  const data = parseResult(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renseiai/agentfactory-mcp-server",
3
- "version": "0.8.58",
3
+ "version": "0.8.60",
4
4
  "type": "module",
5
5
  "description": "MCP server exposing AgentFactory fleet capabilities to MCP-aware clients",
6
6
  "author": "Rensei AI (https://rensei.ai)",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@modelcontextprotocol/sdk": "^1.12.1",
39
39
  "zod": "^4.3.6",
40
- "@renseiai/agentfactory-server": "0.8.58"
40
+ "@renseiai/agentfactory-server": "0.8.60"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^22.5.4",