@brainervirus/workit-core 1.1.0 → 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/package.json +1 -1
- package/src/core/external-action.ts +17 -0
- package/src/core/pr-create.ts +2 -1
- package/src/core/support-matrix.ts +4 -1
- package/src/core.ts +1 -0
package/package.json
CHANGED
|
@@ -225,6 +225,23 @@ export const externalActionDescriptor = (operation: string, payload: unknown): s
|
|
|
225
225
|
: {}),
|
|
226
226
|
});
|
|
227
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Plan reservations never execute a git commit. A git.commit whose resolved
|
|
230
|
+
* payload carries a plan_steps array records the listed chain once and lets
|
|
231
|
+
* each listed single commit execute later under that authorization. Adapters
|
|
232
|
+
* must return plan success without running the commit effect, both for prior
|
|
233
|
+
* approvals and standing auto-approval; otherwise the reservation fails as a
|
|
234
|
+
* single commit requiring a message. Returns the listed count, else null.
|
|
235
|
+
*/
|
|
236
|
+
export const planReservationLength = (
|
|
237
|
+
operation: string,
|
|
238
|
+
descriptorPayload: unknown,
|
|
239
|
+
): number | null => {
|
|
240
|
+
if (operation !== "git.commit") return null;
|
|
241
|
+
const payload = (descriptorPayload ?? {}) as { plan_steps?: unknown };
|
|
242
|
+
return Array.isArray(payload.plan_steps) ? payload.plan_steps.length : null;
|
|
243
|
+
};
|
|
244
|
+
|
|
228
245
|
/** Compact host-facing help for the fixed optional-action surface. */
|
|
229
246
|
export const externalActionHelp =
|
|
230
247
|
"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).";
|
package/src/core/pr-create.ts
CHANGED
|
@@ -404,7 +404,8 @@ export function mergePr(
|
|
|
404
404
|
cmd = ["gh", "pr", "merge", opts.source];
|
|
405
405
|
cmd.push(squash ? "--squash" : "--merge");
|
|
406
406
|
if (removeBranch) cmd.push("--delete-branch");
|
|
407
|
-
|
|
407
|
+
// NOTE: gh pr merge has no --yes flag; fully-specified flags merge
|
|
408
|
+
// non-interactively on their own.
|
|
408
409
|
cmdEnv = { ...process.env, PATH: process.env.PATH ?? "", GH_TOKEN: token };
|
|
409
410
|
}
|
|
410
411
|
const result = spawnSync(cmd[0], cmd.slice(1), { cwd: root, encoding: "utf8", env: cmdEnv });
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
export const SUPPORT_MATRIX = {
|
|
8
8
|
bun: "1.4.1",
|
|
9
9
|
node: { minimum: "24", current: "24.20.0" },
|
|
10
|
-
|
|
10
|
+
// The object-form dual entry (server() + setup()) only loads from
|
|
11
|
+
// 1.18.29+; the supported floor is 1.18.30 so no host can pass doctor while
|
|
12
|
+
// being unable to load the entry shape.
|
|
13
|
+
opencode: { minimum: "1.18.30", current: "1.18.30" },
|
|
11
14
|
// Codex is a qualification host, not a runtime dependency: the CLI version
|
|
12
15
|
// below is the one live qualification evidence covers. The doctor warns when
|
|
13
16
|
// an installed CLI drifts ahead so a fresh install never silently outruns
|