@brainervirus/workit-cli 2.0.0 → 2.0.2

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/index.js +15 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -61990,6 +61990,13 @@ var compactText = (value, limit) => value === null ? null : value.replace(privat
61990
61990
  return `${match.slice(0, space)} <redacted>`;
61991
61991
  }).slice(0, limit);
61992
61992
  var compactBytes = (value) => new TextEncoder().encode(value).byteLength;
61993
+ var compactTimestamp = (value) => `${value.slice(0, 19)}.${value.slice(20, -1).padEnd(9, "0")}`;
61994
+ var compactDecisionChoice = (entry) => {
61995
+ const stated = entry.data.binding.statedChoice?.text;
61996
+ const approved = entry.data.response === "approved" ? entry.data.binding.approvedContent : "";
61997
+ const source = stated?.trim() || approved.trim() || null;
61998
+ return compactText(source, COMPACT_TEXT_BYTES);
61999
+ };
61993
62000
  var compactReference = (ref) => {
61994
62001
  if (ref.kind === "file")
61995
62002
  return {
@@ -62005,11 +62012,18 @@ var compactReference = (ref) => {
62005
62012
  return { kind: ref.kind };
62006
62013
  };
62007
62014
  function compactTaskContext(view) {
62008
- const decisions = view.task.decisions.slice().sort((left, right) => left.id < right.id ? -1 : left.id > right.id ? 1 : 0).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
62015
+ const decisions = view.task.decisions.slice().sort((left, right) => {
62016
+ const leftAt = compactTimestamp(left.recordedAt);
62017
+ const rightAt = compactTimestamp(right.recordedAt);
62018
+ if (leftAt !== rightAt)
62019
+ return leftAt > rightAt ? -1 : 1;
62020
+ return left.id < right.id ? -1 : left.id > right.id ? 1 : 0;
62021
+ }).slice(0, COMPACT_MAX_ITEMS).map((entry) => ({
62009
62022
  id: entry.id,
62010
62023
  purpose: entry.data.purpose,
62011
62024
  status: entry.data.response,
62012
62025
  digest: entry.data.digest,
62026
+ choice: compactDecisionChoice(entry) || `task.inspect taskId=${view.task.id} view=full; decision=${entry.id}`,
62013
62027
  references: entry.data.binding.contentRefs.slice(0, 1).map(compactReference)
62014
62028
  }));
62015
62029
  const methods = view.task.policy ? selectMethods(view.task.policy, view.capabilities).map((method) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -37,9 +37,9 @@
37
37
  "typecheck": "tsc --noEmit"
38
38
  },
39
39
  "dependencies": {
40
- "@brainervirus/workit-core": "^2.0.0",
41
- "@brainervirus/workit-cursor": "^2.0.0",
42
- "@brainervirus/workit-opencode": "^2.0.0",
40
+ "@brainervirus/workit-core": "^2.0.2",
41
+ "@brainervirus/workit-cursor": "^2.0.2",
42
+ "@brainervirus/workit-opencode": "^2.0.2",
43
43
  "@inkjs/ui": "2.0.0",
44
44
  "ink": "7.1.1",
45
45
  "react": "19.2.8"