tickmarkr 2.2.1 → 2.3.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 (48) hide show
  1. package/README.md +10 -9
  2. package/dist/adapters/types.d.ts +20 -1
  3. package/dist/adapters/types.js +42 -2
  4. package/dist/cli/commands/approve.js +5 -4
  5. package/dist/cli/commands/beat.js +7 -4
  6. package/dist/cli/commands/doctor.d.ts +5 -1
  7. package/dist/cli/commands/doctor.js +67 -7
  8. package/dist/cli/commands/init.js +36 -21
  9. package/dist/cli/commands/plan.js +16 -2
  10. package/dist/cli/commands/report.js +37 -1
  11. package/dist/cli/commands/verify.d.ts +5 -0
  12. package/dist/cli/commands/verify.js +140 -25
  13. package/dist/compile/collateral.js +15 -9
  14. package/dist/compile/native.js +3 -3
  15. package/dist/config/config.js +1 -1
  16. package/dist/drivers/index.d.ts +6 -0
  17. package/dist/drivers/index.js +19 -4
  18. package/dist/drivers/orca.d.ts +22 -1
  19. package/dist/drivers/orca.js +147 -6
  20. package/dist/drivers/subprocess.d.ts +3 -3
  21. package/dist/drivers/subprocess.js +16 -9
  22. package/dist/drivers/types.d.ts +2 -0
  23. package/dist/gates/baseline.d.ts +2 -0
  24. package/dist/gates/baseline.js +21 -4
  25. package/dist/gates/llm.d.ts +6 -0
  26. package/dist/gates/llm.js +25 -9
  27. package/dist/gates/review.d.ts +3 -1
  28. package/dist/gates/review.js +40 -12
  29. package/dist/gates/run-gates.js +17 -10
  30. package/dist/gates/verdict-cause.d.ts +6 -2
  31. package/dist/gates/verdict-cause.js +8 -4
  32. package/dist/run/consult.js +5 -1
  33. package/dist/run/daemon.d.ts +12 -0
  34. package/dist/run/daemon.js +218 -25
  35. package/dist/run/git.d.ts +1 -0
  36. package/dist/run/git.js +4 -0
  37. package/dist/run/journal.d.ts +15 -2
  38. package/dist/run/journal.js +70 -12
  39. package/dist/run/supervision.d.ts +6 -0
  40. package/dist/run/supervision.js +29 -1
  41. package/dist/tui/ink/init-app.js +4 -4
  42. package/package.json +1 -1
  43. package/skills/tickmarkr-overseer/SKILL.md +77 -18
  44. package/skills/tickmarkr-overseer/scripts/seat-send.sh +88 -18
  45. package/skills/tickmarkr-overseer/scripts/watch-artifacts.sh +36 -2
  46. package/skills/tickmarkr-overseer/scripts/watch-contamination.sh +36 -15
  47. package/skills/tickmarkr-overseer/scripts/watch-context.sh +33 -7
  48. package/skills/tickmarkr-overseer/scripts/watch-pending-input.sh +32 -8
@@ -21,6 +21,17 @@ POLL="${2:-30}"
21
21
  CAP="${3:-14400}"
22
22
  CONFIRM="${4:-2}" # consecutive polls before waking — a draft mid-typing is not a stall
23
23
 
24
+ # The path/target is shared evidence, not ownership. Record the arming seat and this exact process so
25
+ # stand-down can retire only what that seat armed, without a pgrep pattern that catches its partner.
26
+ PID_DIR="${TKR_STATE_DIR:-.tickmarkr}/overseer/pids"
27
+ PID_SEAT=$(printf '%s' "${TKR_ARMING_SEAT:-unattributed}" | sed 's/[^A-Za-z0-9_-]/_/g')
28
+ PID_FILE="$PID_DIR/${PID_SEAT}-watch-pending-input-$$.pid"
29
+ mkdir -p "$PID_DIR" && (umask 077; printf '%s\n' "$$" > "$PID_FILE") || {
30
+ echo "watch-pending-input: cannot record pid under $PID_DIR" >&2; exit 73;
31
+ }
32
+ clear_pid() { rm -f "$PID_FILE"; }
33
+ trap clear_pid EXIT
34
+
24
35
  status_of() {
25
36
  herdr agent get "$TARGET" 2>/dev/null \
26
37
  | sed -n 's/.*"agent_status":"\([a-z_]*\)".*/\1/p' | head -1
@@ -35,8 +46,11 @@ status_of() {
35
46
  # no wake, no streak. Negative scope: sampled on one theme/version; a theme rendering typed input dim
36
47
  # would blind this check TOWARD silence, so a wake is still authoritative but its absence is not proof.
37
48
  is_ghost() {
38
- herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
39
- | grep -F -- "❯" | grep -F -- "$1" | head -1 | grep -q "$(printf '\033')\[2m"
49
+ (
50
+ export LC_ALL=C
51
+ herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
52
+ | grep -F -- "❯" | grep -F -- "$1" | head -1 | grep -q "$(printf '\033')\[2m"
53
+ )
40
54
  }
41
55
 
42
56
  pending_text() {
@@ -175,8 +189,11 @@ while [ "$elapsed" -lt "$CAP" ]; do
175
189
  # typed draft. Ghost text renders dim/grey; typed text renders default. Emit the styled
176
190
  # bytes so the reader can discriminate before treating this as a draft.
177
191
  echo " styling evidence (dim/grey SGR around the text = autosuggest ghost, NOT a draft):"
178
- herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
179
- | grep -F -- "$T" | head -2 | cat -v | sed 's/^/ /'
192
+ (
193
+ export LC_ALL=C
194
+ herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
195
+ | grep -F -- "$T" | head -2 | cat -v | sed 's/^/ /'
196
+ )
180
197
  echo " the seat is idle and holding live work in its prompt — supersede it, do not re-send:"
181
198
  echo " herdr agent prompt $TARGET \" <-- disregard everything before this arrow (stale draft). ACTUAL: …\""
182
199
  # Name the ACTUAL reason we fell through. Saying "budget exhausted" when the cause was the
@@ -208,10 +225,17 @@ done
208
225
  echo "WATCH_CAP_REACHED $TARGET status=$(status_of) — no sustained pending input in ${CAP}s"
209
226
  FINAL=$(pending_text)
210
227
  if [ -n "$FINAL" ]; then
211
- echo " final read (UNSUSTAINED — present at cap, not confirmed across polls): $FINAL"
212
- echo " styling evidence (dim/grey SGR = autosuggest ghost, NOT a draft):"
213
- herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
214
- | grep -F -- "$FINAL" | head -2 | cat -v | sed 's/^/ /'
228
+ if is_ghost "$FINAL"; then
229
+ echo " final read: autosuggest ghost ignored (dim SGR), input box has no typed draft"
230
+ else
231
+ echo " final read (UNSUSTAINED — present at cap, not confirmed across polls): $FINAL"
232
+ echo " styling evidence (dim/grey SGR = autosuggest ghost, NOT a draft):"
233
+ (
234
+ export LC_ALL=C
235
+ herdr agent read "$TARGET" --source visible --lines 14 --format ansi 2>/dev/null \
236
+ | grep -F -- "$FINAL" | head -2 | cat -v | sed 's/^/ /'
237
+ )
238
+ fi
215
239
  else
216
240
  echo " final read: input box empty"
217
241
  fi