exponential-mcp 0.14.1 → 0.16.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 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 {};
@@ -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) => client.actions.create(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.actions.update(params),
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
+ }
@@ -14,11 +14,11 @@ const scopeFields = {
14
14
  };
15
15
  export const decisions = {
16
16
  name: 'decisions',
17
- description: 'The Decision Log: decisions and open questions (an open question is a decision with status OPEN — there is no separate model), optionally sourced from a meeting with transcript evidence. Meetings are in `meetings`; decisions can be linked to `tickets` and `features` as "implemented by".',
17
+ description: 'The Decision Log: decisions and open questions (an open question is a decision with status OPEN — there is no separate model), optionally sourced from a meeting with transcript evidence. Meetings are in `meetings`; decisions can be linked to `tickets` and `features` as "implemented by". Decisions are filed under Pillars and labels: set them through `labels` set_for_entity with entityType "decision" (create takes no tags, get returns none — read them with `labels` list_for_entity); list rows carry `tags` and list filters by tagIds.',
18
18
  operations: {
19
19
  list: op({
20
20
  effect: 'read',
21
- summary: 'Confirmed decisions in a workspace, newest decided first. Never includes drafts (see list_for_meeting).',
21
+ summary: 'Confirmed decisions in a workspace, newest decided first. Never includes drafts (see list_for_meeting). Every row has tags: [{ id, name, slug, color, category, archivedAt }] — category "pillar" is a Pillar, anything else a label. tagIds filters to decisions carrying ANY of the given Pillars or labels (find ids with `labels` list, category "pillar" for Pillars).',
22
22
  params: z.object({
23
23
  workspaceId,
24
24
  statuses: z.array(z.enum(DECISION_STATUSES)).optional(),
@@ -31,13 +31,18 @@ export const decisions = {
31
31
  projectId: id('Project').optional(),
32
32
  search: z.string().max(200).optional().describe('Free text over statement and body'),
33
33
  number: z.number().int().min(1).optional().describe('One decision by its workspace sequence number — D-0003 is 3'),
34
+ tagIds: z
35
+ .array(id('Tag'))
36
+ .max(50)
37
+ .optional()
38
+ .describe('Only decisions carrying ANY of these Pillar or label ids (max 50)'),
34
39
  limit: z.number().int().min(1).max(500).optional().describe('Unset returns everything visible'),
35
40
  }),
36
41
  run: (client, params) => client.decisions.list(params),
37
42
  }),
38
43
  get: op({
39
44
  effect: 'read',
40
- summary: 'Get one decision with its deciders, evidence, links and supersession chain.',
45
+ summary: 'Get one decision with its deciders, evidence, links and supersession chain. Its Pillars and labels are not included: read them with `labels` list_for_entity (entityType "decision").',
41
46
  params: z.object({ workspaceId, decisionId }),
42
47
  run: (client, { workspaceId, decisionId }) => client.decisions.get(workspaceId, decisionId),
43
48
  }),
@@ -61,7 +66,7 @@ export const decisions = {
61
66
  }),
62
67
  create: op({
63
68
  effect: 'write',
64
- summary: 'Log a decision (status defaults to PROPOSED). Pass status "OPEN" for an open question and transcriptionSessionId to attach it to a meeting.',
69
+ summary: 'Log a decision (status defaults to PROPOSED). Pass status "OPEN" for an open question and transcriptionSessionId to attach it to a meeting. Takes no Pillars or labels: file it afterwards with `labels` set_for_entity (entityType "decision", entityId = the returned id).',
65
70
  params: z.object({
66
71
  workspaceId,
67
72
  statement: z.string().max(500).describe('The decision itself, or the open question'),
@@ -1,2 +1,6 @@
1
1
  import { type Domain } from './framework.js';
2
+ /** The server's tagEntityTypeSchema, in its order. */
3
+ export declare const ENTITY_TYPES: readonly ["action", "ticket", "feature", "epic", "project", "goal", "resource", "recurringTask", "decision"];
4
+ /** Entity types that take Pillars only; the server rejects a plain label on them. */
5
+ export declare const PILLAR_ONLY_ENTITY_TYPES: readonly ["project", "goal", "resource", "recurringTask"];
2
6
  export declare const labels: Domain;
@@ -1,6 +1,23 @@
1
1
  import { z } from 'zod';
2
2
  import { id, op, workspaceId } from './framework.js';
3
- const ENTITY_TYPES = ['action', 'ticket', 'feature', 'epic'];
3
+ /** The server's tagEntityTypeSchema, in its order. */
4
+ export const ENTITY_TYPES = [
5
+ 'action',
6
+ 'ticket',
7
+ 'feature',
8
+ 'epic',
9
+ 'project',
10
+ 'goal',
11
+ 'resource',
12
+ 'recurringTask',
13
+ 'decision',
14
+ ];
15
+ /** Entity types that take Pillars only; the server rejects a plain label on them. */
16
+ export const PILLAR_ONLY_ENTITY_TYPES = ['project', 'goal', 'resource', 'recurringTask'];
17
+ const ENTITY_TYPE_HELP = 'action, ticket, feature, epic and decision take Pillars and labels; project, goal, resource and recurringTask take Pillars only.';
18
+ const entityId = z
19
+ .string()
20
+ .describe('ID of the entity. A decision takes its CUID (not its D-0006 label); a goal its integer id as a string.');
4
21
  const TAG_COLORS = [
5
22
  'avatar-red',
6
23
  'avatar-teal',
@@ -35,11 +52,11 @@ const category = z
35
52
  .describe('Tag category; null means a plain label');
36
53
  export const labels = {
37
54
  name: 'labels',
38
- description: 'Labels (tags) that can be attached to actions (`actions`), tickets (`tickets`), features (`features`) and epics (`epics`). There are global system tags and per-workspace tags; a "label" is a tag whose category is null.',
55
+ description: 'Labels and Pillars (both are tags). A tag whose category is "pillar" is a Pillar (a standing area of the workspace); any other tag is a label. Actions, tickets, features, epics and decisions (`decisions`) take Pillars and labels; projects, goals, resources and recurring tasks take Pillars only. There are global system tags and per-workspace tags. Creating or promoting a Pillar needs a workspace admin, in the app.',
39
56
  operations: {
40
57
  list: op({
41
58
  effect: 'read',
42
- summary: 'List available tags as { globalTags, workspaceTags, allTags }. Without workspaceId, workspaceTags covers every workspace you belong to. Omit category for all categories; null for plain labels only.',
59
+ summary: 'List available tags as { globalTags, workspaceTags, allTags }. Without workspaceId, workspaceTags covers every workspace you belong to. Omit category for all categories; "pillar" for Pillars only; null for plain labels only.',
43
60
  params: z.object({
44
61
  workspaceId: workspaceId.optional(),
45
62
  category,
@@ -60,20 +77,20 @@ export const labels = {
60
77
  }),
61
78
  set_for_entity: op({
62
79
  effect: 'write',
63
- summary: 'Replace the full tag set on an action, ticket, feature or epic (an empty list clears it). Tags must be global or from the entity’s workspace.',
80
+ summary: `REPLACE the full tag set (Pillars and labels together) on an entity; an empty list clears it. To add or remove one tag, call list_for_entity first and send the whole new set. Tags must be global or from the entity’s workspace. ${ENTITY_TYPE_HELP} To file a decision under a Pillar: entityType "decision" with the decision's id (decisions.create takes no tags).`,
64
81
  params: z.object({
65
- entityType: z.enum(ENTITY_TYPES),
66
- entityId: z.string().describe('ID of the action, ticket, feature or epic'),
82
+ entityType: z.enum(ENTITY_TYPES).describe(ENTITY_TYPE_HELP),
83
+ entityId,
67
84
  tagIds: z.array(id('Tag')),
68
85
  }),
69
86
  run: (client, params) => client.labels.setEntityTags(params),
70
87
  }),
71
88
  list_for_entity: op({
72
89
  effect: 'read',
73
- summary: 'List the tags on an action, ticket, feature or epic.',
90
+ summary: `List the tags (Pillars and labels) on an entity. A decision's tags are read here: decisions.get returns none. ${ENTITY_TYPE_HELP}`,
74
91
  params: z.object({
75
- entityType: z.enum(ENTITY_TYPES),
76
- entityId: z.string().describe('ID of the action, ticket, feature or epic'),
92
+ entityType: z.enum(ENTITY_TYPES).describe(ENTITY_TYPE_HELP),
93
+ entityId,
77
94
  }),
78
95
  run: (client, params) => client.labels.listForEntity(params),
79
96
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exponential-mcp",
3
- "version": "0.14.1",
3
+ "version": "0.16.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.32.0",
50
+ "exponential-sdk": "^1.35.0",
51
51
  "zod": "^3.22.0",
52
52
  "zod-to-json-schema": "^3.25.2"
53
53
  },