@loopops/mcp-server 3.29.0 → 3.32.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.
@@ -318,31 +318,9 @@ export function registerConfigTools(server, allowed) {
318
318
  source: z.string().optional().describe("Lead source (Web, Partner Referral, etc.)."),
319
319
  }, safeTool(async (input) => trpcMutation("mcp.previewRouting", input)));
320
320
  }
321
- if (allowed.has("list_pending_territories")) {
322
- server.tool("list_pending_territories", "List Accounts currently in a pending territory assignment state (Territory_Slug__c starts with 'pending:'). Returns the status breakdown + per-account table with agent reasoning when available. Pending accounts are re-evaluated on each assign_territories run.", {
323
- includeReasoning: z
324
- .boolean()
325
- .default(true)
326
- .describe("Include the agent's reasoning column (joins agent_decisions)."),
327
- }, safeTool(async ({ includeReasoning }) => trpcQuery("mcp.listPendingTerritories", { includeReasoning })));
328
- }
329
- if (allowed.has("assign_territories")) {
330
- server.tool("assign_territories", "Match each target Account to a territory Patch using config/design/hierarchy.yaml (tree) + config/deploy/territories.yaml (billing match rules). Writes Account.Territory_Slug__c + ObjectTerritory2Association in SF. Dry-run by default. Uses Claude Haiku + web_search as a fallback when deterministic matching fails. Auto-applies agent matches at confidence ≥ 0.9; flags 0.75-0.9 for review.", {
331
- mode: z
332
- .enum(["new", "all"])
333
- .default("new")
334
- .describe("'new' (default): only accounts without a current territory. 'all': re-evaluate everything (use after territories.yaml changes)."),
335
- dryRun: z
336
- .boolean()
337
- .default(true)
338
- .describe("When true (default), shows the diff without writing to Salesforce."),
339
- useAgent: z
340
- .boolean()
341
- .default(true)
342
- .describe("Run Claude fallback for accounts the deterministic matcher cannot resolve. Set false to skip the agent."),
343
- branch: z.string().optional().describe("Branch to read YAML from. Default: main."),
344
- }, safeTool(async ({ mode, dryRun, useAgent, branch }) => trpcMutation("mcp.assignTerritories", { mode, dryRun, useAgent, branch })));
345
- }
321
+ // list_pending_territories + assign_territories retired 2026-05-10.
322
+ // Account placement now uses the Phase 3 propose_account_assignments
323
+ // chain (with commit_cycle for directory-shape scenarios).
346
324
  if (allowed.has("show_govern_config")) {
347
325
  server.tool("show_govern_config", [
348
326
  "Read a YAML file under `config/govern/`. Most-common use: viewing",
@@ -560,6 +560,26 @@ export function registerDeployTools(server, allowed) {
560
560
  .describe("Why you're rolling back — required, min 20 chars. Captured in every per-proposal audit row."),
561
561
  }, safeTool(async (input) => trpcMutation("mcp.rollbackAccountCommit", input)));
562
562
  }
563
+ if (allowed.has("commit_cycle")) {
564
+ server.tool("commit_cycle", [
565
+ "Ops only. Phase 4.3 atomic cutover for directory-shape",
566
+ "scenarios. Reads all approved rows across user / quota /",
567
+ "account placement tables, promotes scenario inputs (territories,",
568
+ "hierarchy, composition, account_placement) to canonical",
569
+ "config/deploy/, writes assignments.yaml + quotas.yaml outputs,",
570
+ "updates account.territory_slug for committed account placements,",
571
+ "transitions all rows to 'committed', closes the cycle. ONE",
572
+ "GitHub commit + ONE DB transaction — either everything lands",
573
+ "or nothing does. Force two-step (default dryRun:true). Refuses",
574
+ "on legacy single-file scenarios; per-phase commits still work",
575
+ "for those.",
576
+ ].join(" "), {
577
+ planningCycleId: z.string().uuid().optional().describe("Planning cycle. Defaults to the org's currently-open cycle."),
578
+ dryRun: z.boolean().optional().describe("Default true. Pass false to perform the atomic commit."),
579
+ message: z.string().optional().describe("Override the auto-generated commit message."),
580
+ branch: z.string().optional().describe("Branch to write to. Default: main."),
581
+ }, safeTool(async (input) => trpcMutation("mcp.commitCycle", input)));
582
+ }
563
583
  if (allowed.has("close_cycle")) {
564
584
  server.tool("close_cycle", [
565
585
  "Ops only. Mark a planning cycle done. State `open → closed`.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loopops/mcp-server",
3
- "version": "3.29.0",
3
+ "version": "3.32.0",
4
4
  "description": "Loop Operations MCP Server — AI skills for RevOps",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",