@loopops/mcp-server 3.35.0 → 3.38.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/tools/config.js +36 -0
- package/dist/tools/deploy.js +32 -0
- package/package.json +1 -1
package/dist/tools/config.js
CHANGED
|
@@ -136,6 +136,42 @@ export function registerConfigTools(server, allowed) {
|
|
|
136
136
|
branch,
|
|
137
137
|
})));
|
|
138
138
|
}
|
|
139
|
+
if (allowed.has("create_scenario")) {
|
|
140
|
+
server.tool("create_scenario", [
|
|
141
|
+
"Ops only. Clone a base scenario into a new directory.",
|
|
142
|
+
"Web-callable equivalent of scripts/scenario-create.mjs — no",
|
|
143
|
+
"local clone or DATABASE_URL required. Reads every file in the",
|
|
144
|
+
"base scenario directory, regenerates scenario.yaml with the new",
|
|
145
|
+
"id + cloned_from, rewrites scenario_id rows in targets.yaml,",
|
|
146
|
+
"copies the rest verbatim (roster, target_productivity, plus any",
|
|
147
|
+
"optional canonical-input overrides the base carries), and writes",
|
|
148
|
+
"everything in ONE atomic GitHub commit. Default dryRun:true",
|
|
149
|
+
"shows the planned file list. After commit, edit the new scenario",
|
|
150
|
+
"via update_config (or your editor) and run promote_scenario",
|
|
151
|
+
"when ready.",
|
|
152
|
+
].join(" "), {
|
|
153
|
+
id: z
|
|
154
|
+
.string()
|
|
155
|
+
.min(1)
|
|
156
|
+
.describe("New scenario id (slug: lowercase letters/digits/underscores/hyphens, max 64 chars). Becomes the directory name under config/design/scenarios/. Must not already exist."),
|
|
157
|
+
baseScenarioId: z
|
|
158
|
+
.string()
|
|
159
|
+
.min(1)
|
|
160
|
+
.describe("Existing scenario to clone from (e.g. 'base'). Must resolve cleanly."),
|
|
161
|
+
description: z
|
|
162
|
+
.string()
|
|
163
|
+
.optional()
|
|
164
|
+
.describe("Manifest description for the new scenario. Defaults to 'Cloned from <base> on <date>'."),
|
|
165
|
+
dryRun: z
|
|
166
|
+
.boolean()
|
|
167
|
+
.optional()
|
|
168
|
+
.describe("Default true. Pass false to commit. Dry-run lists the files that would be written."),
|
|
169
|
+
branch: z
|
|
170
|
+
.string()
|
|
171
|
+
.optional()
|
|
172
|
+
.describe("Git branch to read base from AND write the new scenario to. Default: main."),
|
|
173
|
+
}, safeTool(async (input) => trpcMutation("mcp.createScenario", input)));
|
|
174
|
+
}
|
|
139
175
|
if (allowed.has("promote_scenario")) {
|
|
140
176
|
server.tool("promote_scenario", [
|
|
141
177
|
"Promote a scenario to active by editing `active_scenario` in",
|
package/dist/tools/deploy.js
CHANGED
|
@@ -594,6 +594,38 @@ export function registerDeployTools(server, allowed) {
|
|
|
594
594
|
.describe("Why you're rolling back — required, min 20 chars. Captured in every per-proposal audit row."),
|
|
595
595
|
}, safeTool(async (input) => trpcMutation("mcp.rollbackAccountCommit", input)));
|
|
596
596
|
}
|
|
597
|
+
if (allowed.has("open_cycle")) {
|
|
598
|
+
server.tool("open_cycle", [
|
|
599
|
+
"Ops only. Open a new planning_cycle row bound to a Design",
|
|
600
|
+
"scenario. Refuses by default if another open cycle exists for",
|
|
601
|
+
"the org (most propose_* tools assume exactly one open cycle —",
|
|
602
|
+
"two parallel cycles silently produce ambiguous defaults). Pass",
|
|
603
|
+
"allowMultipleOpen:true to open a parallel sandbox. Validates",
|
|
604
|
+
"the target scenario resolves cleanly (same check as",
|
|
605
|
+
"promote_scenario) — never binds a cycle to a broken scenario.",
|
|
606
|
+
"scenarioId defaults to capacity_config.active_scenario when",
|
|
607
|
+
"omitted. Writes an audit row of action='open' on the",
|
|
608
|
+
"deploy.planning_cycle resource. Pairs with close_cycle +",
|
|
609
|
+
"commit_cycle to make the cycle lifecycle fully MCP-callable.",
|
|
610
|
+
].join(" "), {
|
|
611
|
+
name: z
|
|
612
|
+
.string()
|
|
613
|
+
.min(1)
|
|
614
|
+
.describe("Human label for the cycle (e.g. 'FY27 H1 territory plan'). Shown in /control/cycles and every propose response."),
|
|
615
|
+
scenarioId: z
|
|
616
|
+
.string()
|
|
617
|
+
.optional()
|
|
618
|
+
.describe("Scenario to bind the cycle to. Defaults to capacity_config.active_scenario."),
|
|
619
|
+
allowMultipleOpen: z
|
|
620
|
+
.boolean()
|
|
621
|
+
.optional()
|
|
622
|
+
.describe("Default false → refuses if another open cycle exists. Pass true to open a parallel cycle anyway."),
|
|
623
|
+
branch: z
|
|
624
|
+
.string()
|
|
625
|
+
.optional()
|
|
626
|
+
.describe("Git branch to validate the scenario from. Default: main."),
|
|
627
|
+
}, safeTool(async (input) => trpcMutation("mcp.openCycle", input)));
|
|
628
|
+
}
|
|
597
629
|
if (allowed.has("commit_cycle")) {
|
|
598
630
|
server.tool("commit_cycle", [
|
|
599
631
|
"Ops only. Atomic cutover for a planning cycle. Reads all",
|