exponential-mcp 0.14.1 → 0.15.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/README.md +36 -0
- package/dist/domains/actions.d.ts +13 -0
- package/dist/domains/actions.js +44 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -302,6 +302,42 @@ npm run build
|
|
|
302
302
|
npm start
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
+
## Contributing
|
|
306
|
+
|
|
307
|
+
### Who merges: the PR-Agent auto-merge gate, or James
|
|
308
|
+
|
|
309
|
+
`.github/workflows/pr-agent-automerge.yml` squash-merges a PR into `main` once CI
|
|
310
|
+
(`Build, typecheck & test`) is green and PR-Agent left nothing blocking on the latest
|
|
311
|
+
commit. **Agent sessions do not merge PRs.**
|
|
312
|
+
|
|
313
|
+
PR-Agent runs review-only: GLM 5.3 through OpenRouter, one call per push. It doesn't
|
|
314
|
+
rewrite descriptions or post code suggestions. What blocks is a review finding tagged
|
|
315
|
+
`[blocker]` or left untagged, or a security concern. Fix those; `[minor]` findings don't
|
|
316
|
+
hold the merge. Every push is reviewed again and paid for, so batch fixes into one push
|
|
317
|
+
rather than pushing each one separately. The model and house rules are in `.pr_agent.toml`;
|
|
318
|
+
PR-Agent reads that file from `main`, so editing it on a branch changes nothing until merged.
|
|
319
|
+
|
|
320
|
+
- Never run `gh pr merge`, and never pass `--merge` to `/ship-this` or `/ship-ticket`. Open
|
|
321
|
+
the PR, apply PR-Agent's findings, push, and stop at "in review". The gate (or James) merges.
|
|
322
|
+
- Never add the `pr-agent-ack` label. It means "James saw the blocker and is merging anyway".
|
|
323
|
+
Only James applies it, and the gate ignores it from anyone else.
|
|
324
|
+
- A PR you can't get past the gate is left for James with a comment saying what blocks it
|
|
325
|
+
and why you could not fix it.
|
|
326
|
+
- `no-automerge` on a PR keeps it human-only. Don't remove it.
|
|
327
|
+
- PRs from forks and PRs opened by bots are never auto-merged; James merges those.
|
|
328
|
+
|
|
329
|
+
### `exponential-sdk` must be published before a PR that needs it
|
|
330
|
+
|
|
331
|
+
CI runs `.github/scripts/check-sdk-pin.mjs` before `npm ci`. It fails when the
|
|
332
|
+
`exponential-sdk` range in `package.json` has no published version on npm, when
|
|
333
|
+
`package-lock.json` pins a version that isn't on npm (or a local link or tarball), or when
|
|
334
|
+
the two files disagree. Publish the SDK first, then run `npm install` here and commit
|
|
335
|
+
`package-lock.json`. A version published in the last few minutes can lag the registry;
|
|
336
|
+
re-run the job.
|
|
337
|
+
|
|
338
|
+
`.github/workflows/sdk-bump.yml` checks npm hourly and opens a `chore: bump exponential-sdk
|
|
339
|
+
to <version>` PR when there is a newer SDK. A bot opens it, so the gate leaves it for James.
|
|
340
|
+
|
|
305
341
|
## License
|
|
306
342
|
|
|
307
343
|
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See [LICENSE](LICENSE).
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
import { type ExponentialClient } from 'exponential-sdk';
|
|
1
2
|
import { type Domain } from './framework.js';
|
|
2
3
|
export declare const actions: Domain;
|
|
4
|
+
type UpdateParams = Parameters<ExponentialClient['actions']['update']>[0] & {
|
|
5
|
+
addAssignees?: string[];
|
|
6
|
+
removeAssignees?: string[];
|
|
7
|
+
clearAssignees?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Field changes go to `actions.update`; assignees to `assign` / `unassign`,
|
|
11
|
+
* in the order clear, remove, add. An update that only touches assignees
|
|
12
|
+
* skips the field update. Returns the action as the last call left it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function updateAction(client: ExponentialClient, params: UpdateParams): Promise<unknown>;
|
|
15
|
+
export {};
|
package/dist/domains/actions.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { splitAssigneeRefs } from 'exponential-sdk';
|
|
2
3
|
import { date, id, op } from './framework.js';
|
|
3
4
|
const KANBAN_STATUSES = ['BACKLOG', 'TODO', 'IN_PROGRESS', 'IN_REVIEW', 'DONE', 'CANCELLED'];
|
|
4
5
|
const ACTION_STATUSES = ['ACTIVE', 'COMPLETED', 'CANCELLED', 'DELETED', 'DRAFT'];
|
|
@@ -19,6 +20,10 @@ const optionalWorkspaceId = z
|
|
|
19
20
|
.string()
|
|
20
21
|
.optional()
|
|
21
22
|
.describe('Workspace ID (see the `workspaces` tool); omit for all workspaces');
|
|
23
|
+
const assigneeRefs = (what) => z
|
|
24
|
+
.array(z.string().min(1))
|
|
25
|
+
.optional()
|
|
26
|
+
.describe(`${what}: user ids or emails (see the \`workspaces\` tool's members). Each must be assignable in the action's project or workspace, or the call is NOT_FOUND`);
|
|
22
27
|
const clearableDate = (what) => date(what).nullable().optional().describe(`${what} (ISO 8601; null to clear)`);
|
|
23
28
|
export const actions = {
|
|
24
29
|
name: 'actions',
|
|
@@ -100,7 +105,7 @@ export const actions = {
|
|
|
100
105
|
}),
|
|
101
106
|
create: op({
|
|
102
107
|
effect: 'write',
|
|
103
|
-
summary: 'Create an action. Priority defaults to "Quick" and status to ACTIVE.',
|
|
108
|
+
summary: 'Create an action. Priority defaults to "Quick" and status to ACTIVE. Pass `assignees` to put it on someone\u2019s Today list; a project action created by an agent with no assignee reaches nobody.',
|
|
104
109
|
params: z.object({
|
|
105
110
|
name: z.string(),
|
|
106
111
|
description: z.string().optional(),
|
|
@@ -115,12 +120,20 @@ export const actions = {
|
|
|
115
120
|
epicId: id('Epic').optional(),
|
|
116
121
|
effortEstimate: z.number().optional(),
|
|
117
122
|
blockedByIds: z.array(id('Action')).optional().describe('IDs of actions this one is blocked by'),
|
|
123
|
+
assignees: assigneeRefs('Who to assign, written with the action'),
|
|
118
124
|
}),
|
|
119
|
-
run: (client, params) =>
|
|
125
|
+
run: (client, { assignees, ...params }) => {
|
|
126
|
+
const { userIds, emails } = splitAssigneeRefs(assignees ?? []);
|
|
127
|
+
return client.actions.create({
|
|
128
|
+
...params,
|
|
129
|
+
...(userIds.length ? { assigneeIds: userIds } : {}),
|
|
130
|
+
...(emails.length ? { assigneeEmails: emails } : {}),
|
|
131
|
+
});
|
|
132
|
+
},
|
|
120
133
|
}),
|
|
121
134
|
update: op({
|
|
122
135
|
effect: 'write',
|
|
123
|
-
summary: 'Update an action. Only the fields you pass change. Complete it with status COMPLETED or kanbanStatus DONE.',
|
|
136
|
+
summary: 'Update an action. Only the fields you pass change. Complete it with status COMPLETED or kanbanStatus DONE. Assignees: `addAssignees` is additive (existing assignees stay), `removeAssignees` removes, `clearAssignees` removes everyone and runs first, so clearAssignees + addAssignees replaces the set.',
|
|
124
137
|
params: z.object({
|
|
125
138
|
id: id('Action'),
|
|
126
139
|
name: z.string().optional(),
|
|
@@ -140,8 +153,14 @@ export const actions = {
|
|
|
140
153
|
.array(id('Action'))
|
|
141
154
|
.optional()
|
|
142
155
|
.describe('Replaces the full set of blocking action IDs; omit to leave untouched'),
|
|
156
|
+
addAssignees: assigneeRefs('Assignees to add'),
|
|
157
|
+
removeAssignees: z
|
|
158
|
+
.array(z.string().min(1))
|
|
159
|
+
.optional()
|
|
160
|
+
.describe('Assignees to remove: user ids or emails. Users not assigned are ignored'),
|
|
161
|
+
clearAssignees: z.boolean().optional().describe('Remove every assignee (applied before addAssignees)'),
|
|
143
162
|
}),
|
|
144
|
-
run: (client, params) => client
|
|
163
|
+
run: (client, params) => updateAction(client, params),
|
|
145
164
|
}),
|
|
146
165
|
upsert_by_source: op({
|
|
147
166
|
effect: 'write',
|
|
@@ -167,3 +186,24 @@ export const actions = {
|
|
|
167
186
|
}),
|
|
168
187
|
},
|
|
169
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Field changes go to `actions.update`; assignees to `assign` / `unassign`,
|
|
191
|
+
* in the order clear, remove, add. An update that only touches assignees
|
|
192
|
+
* skips the field update. Returns the action as the last call left it.
|
|
193
|
+
*/
|
|
194
|
+
export async function updateAction(client, params) {
|
|
195
|
+
const { addAssignees, removeAssignees, clearAssignees, ...fields } = params;
|
|
196
|
+
const { id: actionId, ...patch } = fields;
|
|
197
|
+
const hasFieldChanges = Object.values(patch).some((v) => v !== undefined);
|
|
198
|
+
const hasAssigneeChanges = Boolean(clearAssignees || removeAssignees?.length || addAssignees?.length);
|
|
199
|
+
let result;
|
|
200
|
+
if (hasFieldChanges || !hasAssigneeChanges)
|
|
201
|
+
result = await client.actions.update(fields);
|
|
202
|
+
if (clearAssignees)
|
|
203
|
+
result = await client.actions.unassign(actionId, { all: true });
|
|
204
|
+
if (removeAssignees?.length)
|
|
205
|
+
result = await client.actions.unassign(actionId, splitAssigneeRefs(removeAssignees));
|
|
206
|
+
if (addAssignees?.length)
|
|
207
|
+
result = await client.actions.assign(actionId, splitAssigneeRefs(addAssignees));
|
|
208
|
+
return result;
|
|
209
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exponential-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "MCP server for Exponential - connect Claude to your projects, actions, goals, CRM, tickets and more",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
49
49
|
"commander": "^12.0.0",
|
|
50
|
-
"exponential-sdk": "^1.
|
|
50
|
+
"exponential-sdk": "^1.34.0",
|
|
51
51
|
"zod": "^3.22.0",
|
|
52
52
|
"zod-to-json-schema": "^3.25.2"
|
|
53
53
|
},
|