@brainervirus/workit-pi 1.1.1 → 1.2.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/workit.js +15 -3
- package/package.json +1 -1
package/dist/workit.js
CHANGED
|
@@ -12476,6 +12476,12 @@ var externalActionDescriptor = (operation, payload) => canonicalJson({
|
|
|
12476
12476
|
payload,
|
|
12477
12477
|
...payload && typeof payload === "object" && !Array.isArray(payload) && "resolved" in payload && payload.resolved && typeof payload.resolved === "object" && Array.isArray(payload.resolved.steps) ? { steps: payload.resolved.steps } : {}
|
|
12478
12478
|
});
|
|
12479
|
+
var planReservationLength = (operation, descriptorPayload) => {
|
|
12480
|
+
if (operation !== "git.commit")
|
|
12481
|
+
return null;
|
|
12482
|
+
const payload = descriptorPayload ?? {};
|
|
12483
|
+
return Array.isArray(payload.plan_steps) ? payload.plan_steps.length : null;
|
|
12484
|
+
};
|
|
12479
12485
|
var externalActionHelp = "Fixed actions: git.branch_setup {action?,sdd_dir?,target_branch(required unless reapply_stash; the working branch to create or switch to),stash?}; git.commit {message}; git.push {branch?}; hosting.pull_request {title,body?,draft?,target_branch?,babysit?}; hosting.merge {target_branch?,source_branch?}; youtrack.update {issueId,markdown,minutes?}; youtrack.time {issueId,minutes,text?,dateMs?}; youtrack.meeting {issueId,minutes,text}; changelog.apply {entries?,path?,normalize_only?}; context.read {kind,range?,issueId?,issueUrl?,issueRef?,mode?,specPath?,planPath?}. context.read is read-only and needs no approval; all other operations require native approval (CLI uses a TTY; caller-unattested MCP cannot mutate).";
|
|
12480
12486
|
var externalActionRef = (host, actor, descriptor) => ({
|
|
12481
12487
|
kind: "host",
|
|
@@ -18680,6 +18686,12 @@ var registerWorkitTools = (pi, options = {}) => {
|
|
|
18680
18686
|
return output(result);
|
|
18681
18687
|
}
|
|
18682
18688
|
if (standingAutoApplies(store, "pi", actor, descriptor)) {
|
|
18689
|
+
const planCount = planReservationLength(resolved.data.request.operation, resolved.data.descriptorPayload);
|
|
18690
|
+
if (planCount !== null) {
|
|
18691
|
+
const bound = standingAutoBinding(core, store, "pi", actor, descriptor);
|
|
18692
|
+
if (bound)
|
|
18693
|
+
return output(success(null, null, { plan_commits: planCount }));
|
|
18694
|
+
}
|
|
18683
18695
|
const result = await nativeExternalActionRunner(ctx.cwd, actor, core)(descriptor, (step) => executeResolvedExternalAction(resolved.data, ctx.cwd, step, { host: "pi", actor }));
|
|
18684
18696
|
return output(result);
|
|
18685
18697
|
}
|
|
@@ -18722,9 +18734,9 @@ var registerWorkitTools = (pi, options = {}) => {
|
|
|
18722
18734
|
if (!decision.ok)
|
|
18723
18735
|
return output(decision);
|
|
18724
18736
|
}
|
|
18725
|
-
const
|
|
18726
|
-
if (
|
|
18727
|
-
return output(success(null, null, { plan_commits:
|
|
18737
|
+
const planCount = planReservationLength(resolved.data.request.operation, resolved.data.descriptorPayload);
|
|
18738
|
+
if (planCount !== null)
|
|
18739
|
+
return output(success(null, null, { plan_commits: planCount }));
|
|
18728
18740
|
const result = await nativeExternalActionRunner(ctx.cwd, actor, core)(descriptor, (step) => executeResolvedExternalAction(resolved.data, ctx.cwd, step, { host: "pi", actor }));
|
|
18729
18741
|
return output(result);
|
|
18730
18742
|
}
|