@brainervirus/workit-opencode 8.31.1 → 8.33.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.
Files changed (2) hide show
  1. package/dist/plugin.js +16 -6
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -7411,10 +7411,11 @@ function invalidOperation(family, input, error) {
7411
7411
  const request = isObject2(input) ? input : {};
7412
7412
  const action = typeof request.action === "string" ? request.action : "";
7413
7413
  const actions = OPERATION_ACTIONS[family];
7414
- if (!actions.includes(action))
7415
- return failure2("invalid_input", `${family}: action must be one of ${oneOf(actions)}`, {
7416
- fields: [{ path: "action", reason: `got ${JSON.stringify(request.action ?? null)}` }]
7417
- });
7414
+ if (!actions.includes(action)) {
7415
+ const common = actions.find((name) => READ_ONLY_ACTIONS.has(name)) ?? actions[0];
7416
+ const example = JSON.stringify(exampleOperation(family, common));
7417
+ return failure2("invalid_input", `${family}: action must be one of ${oneOf(actions)}. Example: ${example}`, { fields: [{ path: "action", reason: `got ${JSON.stringify(request.action ?? null)}` }] });
7418
+ }
7418
7419
  const own = actionKeys(family, action);
7419
7420
  const fields = [];
7420
7421
  const sentence = [];
@@ -8521,6 +8522,7 @@ var workspaceConfigSchema = object({
8521
8522
  verification: _enum(["proportional", "self", "independent"]).optional(),
8522
8523
  delegation: unknown().optional(),
8523
8524
  trailers: boolean2().optional(),
8525
+ deleteBranch: boolean2().optional(),
8524
8526
  liveSessionGuard: boolean2().optional(),
8525
8527
  fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
8526
8528
  models: object({ roles: unknown().optional() }).passthrough().optional(),
@@ -16205,7 +16207,14 @@ var sessionMarkerFile = (input, session, store) => {
16205
16207
  return path19.join(dir, "hooks", `skills-${name}.json`);
16206
16208
  };
16207
16209
  var list2 = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
16208
- var EMPTY = { nudged: [], loaded: [], raw: [], stops: [], judges: [] };
16210
+ var EMPTY = {
16211
+ nudged: [],
16212
+ loaded: [],
16213
+ raw: [],
16214
+ stops: [],
16215
+ judges: [],
16216
+ model: null
16217
+ };
16209
16218
  var readRaw = (file) => {
16210
16219
  try {
16211
16220
  return fs15.readFileSync(file, "utf8");
@@ -16221,7 +16230,8 @@ var parseMarker = (text) => {
16221
16230
  loaded: list2(value.loaded),
16222
16231
  raw: list2(value.raw),
16223
16232
  stops: list2(value.stops),
16224
- judges: list2(value.judges)
16233
+ judges: list2(value.judges),
16234
+ model: typeof value.model === "string" ? value.model : null
16225
16235
  };
16226
16236
  } catch {
16227
16237
  return { ...EMPTY };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-opencode",
3
- "version": "8.31.1",
3
+ "version": "8.33.0",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "devDependencies": {
42
- "@brainervirus/workit-core": "^8.31.1",
42
+ "@brainervirus/workit-core": "^8.33.0",
43
43
  "@opencode/plugin": "2.0.18"
44
44
  },
45
45
  "engines": {