sisyphi 1.2.25 → 1.2.26

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/cli.js CHANGED
@@ -842,7 +842,6 @@ var init_ask_store = __esm({
842
842
  init_notify();
843
843
  init_state();
844
844
  ACTIONABLE_KINDS = /* @__PURE__ */ new Set([
845
- "validation",
846
845
  "decision",
847
846
  "context",
848
847
  "error",
@@ -6838,7 +6837,7 @@ if [ ! -f "$RESULT_FILE" ]; then printf 'dismiss' > "$RESULT_FILE"; fi
6838
6837
  }
6839
6838
 
6840
6839
  // src/cli/commands/ask.ts
6841
- import { approveDeck, notifyDeck, launchReview, display } from "@crouton-kit/humanloop";
6840
+ import { notifyDeck, launchReview, display } from "@crouton-kit/humanloop";
6842
6841
  var ULID_RE = /^[0-9A-HJKMNP-TV-Z]{26}$/;
6843
6842
  function validateAskId(askId) {
6844
6843
  if (!ULID_RE.test(askId)) {
@@ -6849,10 +6848,9 @@ function validateAskId(askId) {
6849
6848
  }
6850
6849
  }
6851
6850
  var ROOT_HELP = `
6852
- ask: user-engagement leaves. deck (option picks) | approve (yes/no gate) | notify (FYI) | review (markdown annotation) | state (recovery) | show (display).
6851
+ ask: user-engagement leaves. deck (option picks) | notify (FYI) | review (markdown annotation) | state (recovery) | show (display).
6853
6852
 
6854
- deck submit FILE Pose 1+ questions with named alternatives. | use when picking between concrete named paths or bundling decisions
6855
- approve TITLE Yes/no gate on a single concrete action. Blocks. | use when you need explicit consent before a destructive or irreversible step
6853
+ deck submit FILE Pose 1+ questions with named alternatives. | use when picking between concrete named paths, a yes/no gate, or bundling decisions
6856
6854
  notify TITLE Fire-and-forget acknowledgement. Non-blocking. | use when the user should know something but no answer is needed
6857
6855
  review {sub} Line-by-line markdown annotation workflow. | use when surfacing a document for per-line annotation rather than option picking
6858
6856
  state {sub} Inspect existing ask state. | use on recovery only \u2014 not the normal path
@@ -6878,7 +6876,7 @@ DECK DESIGN
6878
6876
  Each option is a concrete forward path. The user picks an option to commit to a direction; each label must name a real path with its tradeoffs spelled out, grounded in *this* codebase or *this* exploration. Reference specifics \u2014 file names, framework constraints, prior decisions \u2014 not generic descriptions.
6879
6877
 
6880
6878
  Bound option count to 2\u20134 per interaction.
6881
- < 2: collapses to yes/no \u2014 use \`sis ask approve\` instead.
6879
+ < 2: a bare yes/no gate is a 2-option deck (Yes / No) \u2014 author it that way.
6882
6880
  > 4: too granular for the user to weigh \u2014 split into two interactions or cut weak options.
6883
6881
 
6884
6882
  Options must be mutually exclusive forward paths. Reject feeling-based prompts ("Happy with this?") and fallback-to-freetext options ("Comment", "Maybe"). If "Reject" is a real path, name what rejecting routes to (back to design? abandon? try a different framing?).
@@ -6917,10 +6915,9 @@ DECK JSON SCHEMA
6917
6915
  // $SISYPHUS_SESSION_DIR/context/)
6918
6916
  // and pass a basename like
6919
6917
  // "summary.md".
6920
- kind? "decision" | "validation" | "context" | "error" | "notify"
6918
+ kind? "decision" | "context" | "error" | "notify"
6921
6919
  // display hint for inbox icon/sort:
6922
- // decision \u2014 fork in the road
6923
- // validation \u2014 sign-off on work
6920
+ // decision \u2014 fork in the road (incl. yes/no sign-off)
6924
6921
  // context \u2014 background needing response
6925
6922
  // error \u2014 recovery picker
6926
6923
  // notify \u2014 use the \`notify\` leaf instead
@@ -6951,34 +6948,12 @@ Effects
6951
6948
 
6952
6949
  Exit codes: 0 ok | 2 usage (invalid file, validation error, missing session)
6953
6950
  `;
6954
- var APPROVE_HELP = `
6955
- approve: yes/no gate on a single concrete action.
6956
-
6957
- Use when the next step is irreversible and proceeding needs explicit user consent. The \`--body\` should describe the concrete action so the user can judge it without a follow-up question. When nuance matters (yes-but or no-because), use \`sis ask deck submit\` instead.
6958
-
6959
- Same blocking semantics as \`sis ask deck submit\`: orchestrator runs foreground, agent uses run_in_background.
6960
-
6961
- Input
6962
- <title> required \u2014 action being approved
6963
- --subtitle <s> optional \u2014 one-line context shown below the title
6964
- --body <b> optional \u2014 markdown body describing what the user is approving
6965
- --session <id> optional \u2014 session id (defaults to SISYPHUS_SESSION_ID)
6966
-
6967
- Output (stdout, bare JSON \u2014 NOT the standard {ok, data} envelope)
6968
- { "askId", "approved": boolean, "completedAt", "responses" }
6969
- on error: stderr diagnostic + non-zero exit
6970
-
6971
- Effects
6972
- Blocks until the user picks. Creates an ask in the session store, marks it answered on completion.
6973
-
6974
- Exit codes: 0 ok | 2 usage (missing session)
6975
- `;
6976
6951
  var NOTIFY_HELP = `
6977
6952
  notify: fire-and-forget acknowledgement to the dashboard.
6978
6953
 
6979
6954
  Non-blocking \u2014 returns immediately with { askId } before the user sees it.
6980
6955
 
6981
- Use when the user should know about something (a milestone hit, a finding surfaced, a heads-up before a long-running step) but no answer is needed. When even a minimal answer matters, use \`sis ask approve\`. When picking between paths matters, use \`sis ask deck submit\`. Notifications do not have a return path.
6956
+ Use when the user should know about something (a milestone hit, a finding surfaced, a heads-up before a long-running step) but no answer is needed. When even a minimal answer matters (incl. a yes/no gate), use \`sis ask deck submit\`. Notifications do not have a return path.
6982
6957
 
6983
6958
  Input
6984
6959
  <title> required \u2014 notification title
@@ -6997,7 +6972,7 @@ Exit codes: 0 ok | 2 usage (missing session)
6997
6972
  var REVIEW_BRANCH_HELP = `
6998
6973
  Line-by-line markdown annotation workflow. The agent submits the file; in tmux an editor pane opens next to the agent (also reachable from the dashboard inbox). The user annotates per-line with <Space>c and submits with <Space>s. Multiple open/close cycles are supported \u2014 the draft persists until explicitly submitted.
6999
6974
 
7000
- Use when surfacing a document the user should annotate per-line rather than pick options on. For a global yes/no, use \`sis ask approve\`. For named alternatives, use \`sis ask deck submit\`.
6975
+ Use when surfacing a document the user should annotate per-line rather than pick options on. For a global yes/no or named alternatives, use \`sis ask deck submit\`.
7001
6976
 
7002
6977
  Branches
7003
6978
  submit <file> Submit a .md file for review; blocks until the user submits. | use when you have a markdown document to send for annotation
@@ -7147,9 +7122,6 @@ function registerAsk(program2) {
7147
7122
  deck.command("submit <file>").description("Submit a deck JSON file; blocks until the user resolves it").option("--session <id>", "Session id (defaults to SISYPHUS_SESSION_ID)").addHelpText("after", DECK_SUBMIT_HELP).action(async (file, opts) => {
7148
7123
  await submit(file, opts);
7149
7124
  });
7150
- ask.command("approve <title>").description("Yes/no gate on a single concrete action; blocks until answered").option("--subtitle <s>", "Optional one-line context shown below the title").option("--body <b>", "Markdown body describing the action the user is approving").option("--session <id>", "Session id (defaults to SISYPHUS_SESSION_ID)").addHelpText("after", APPROVE_HELP).action(async (title, opts) => {
7151
- await approve(title, opts);
7152
- });
7153
7125
  ask.command("notify <title>").description("Fire-and-forget acknowledgement on the dashboard (non-blocking)").option("--body <b>", "Optional markdown body").option("--session <id>", "Session id (defaults to SISYPHUS_SESSION_ID)").addHelpText("after", NOTIFY_HELP).action(async (title, opts) => {
7154
7126
  await notify(title, opts);
7155
7127
  });
@@ -7397,25 +7369,6 @@ async function submit(file, opts) {
7397
7369
  const { output } = await submitDeck(decisions, opts);
7398
7370
  process.stdout.write(JSON.stringify(output) + "\n");
7399
7371
  }
7400
- async function approve(title, opts) {
7401
- const deck = approveDeck(title, {
7402
- ...opts.subtitle !== void 0 ? { subtitle: opts.subtitle } : {},
7403
- ...opts.body !== void 0 ? { body: opts.body } : {}
7404
- });
7405
- const { askId, output } = await submitDeck(deck, opts);
7406
- if (!output) throw new Error("blocking ask returned no output");
7407
- if (output.kind === "review") throw new Error("approve returned review output \u2014 internal error");
7408
- const approveResponse = output.responses.find((r) => r.id === "approve");
7409
- const approved = approveResponse?.selectedOptionId === "yes";
7410
- process.stdout.write(
7411
- JSON.stringify({
7412
- askId,
7413
- approved,
7414
- completedAt: output.completedAt,
7415
- responses: output.responses
7416
- }) + "\n"
7417
- );
7418
- }
7419
7372
  async function notify(title, opts) {
7420
7373
  const deck = notifyDeck(title, opts.body !== void 0 ? { body: opts.body } : {});
7421
7374
  const { askId } = await submitDeck(deck, opts, { blocking: false, kindOverride: "notify" });
@@ -7572,10 +7525,9 @@ async function show(path, opts) {
7572
7525
  });
7573
7526
  }
7574
7527
  const windowOpt = rawWindow !== void 0 ? rawWindow : "auto";
7575
- const watch = opts.watch === true;
7576
7528
  let paneId;
7577
7529
  try {
7578
- const r = display(path, { watch, window: windowOpt });
7530
+ const r = display(path, { window: windowOpt });
7579
7531
  paneId = r.paneId;
7580
7532
  } catch (err) {
7581
7533
  process.stderr.write(`[sis ask show] display error: ${err.message}