agent-lyceum 0.15.0 → 0.15.1

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/ask-reply.js CHANGED
@@ -41,6 +41,9 @@ export function parseAskBody(body) {
41
41
  if (!text)
42
42
  return { ok: false, error: `question "${id}" needs a non-empty <text>` };
43
43
  const options = tags(first(q.inner, "options")?.inner ?? "", "option").map((o) => textOf(o)).filter(Boolean);
44
+ const bare = options.find((o) => /^\(?[A-Za-z0-9]{1,2}[:.):]?$/.test(o));
45
+ if (bare)
46
+ return { ok: false, error: `option "${bare}" of question "${id}" is only a label; write the full content of each option (what it does), e.g. "A: squash into two commits ..."` };
44
47
  const sug = first(q.inner, "suggested");
45
48
  const suggested = sug && textOf(sug) ? { value: textOf(sug), ...(sug.attrs.reason ? { reason: sug.attrs.reason } : {}) } : undefined;
46
49
  if (suggested && options.length && !options.includes(suggested.value))
@@ -126,10 +129,10 @@ export function resolveOptionLetters(r) {
126
129
  return {
127
130
  ...r,
128
131
  questions: r.questions.map((q) => {
129
- const raw = q.answer?.value.trim().match(/^([A-Za-z]|\d{1,2})[:.)]?$/)?.[1]?.toLowerCase();
132
+ const raw = q.answer?.value.trim().match(/^([A-Za-z]|\d{1,2})[:.):]?$/)?.[1]?.toLowerCase();
130
133
  if (q.delivered || !raw || !q.options?.length || !q.answer)
131
134
  return q;
132
- const hits = q.options.filter((o) => o.toLowerCase().match(/^([a-z])[:.)]/)?.[1] === raw);
135
+ const hits = q.options.filter((o) => o.toLowerCase().match(/^([a-z])[:.):]/)?.[1] === raw);
133
136
  const byPosition = /^\d+$/.test(raw) ? Number(raw) - 1 : raw.charCodeAt(0) - 97;
134
137
  const pick = hits.length ? (hits.length === 1 ? hits[0] : undefined) : q.options[byPosition];
135
138
  return pick ? { ...q, answer: { ...q.answer, value: pick } } : q;
package/dist/prompt.js CHANGED
@@ -94,7 +94,7 @@ export function buildSystemPrompt(project, agent) {
94
94
  ? [
95
95
  "",
96
96
  "## Asking the user",
97
- "You may ask the human user with `type: ask` (no `to` needed). The run then pauses until they answer, so ask only when the answer changes what you do next and you cannot work it out from the code, the memory or the task. Ask everything you need in ONE batch (at most 10 questions); prefer questions with `<options>` and a `<suggested>` value (with a `reason`) so the user can answer quickly. The body is exactly this:",
97
+ "You may ask the human user with `type: ask` (no `to` needed). The run then pauses until they answer, so ask only when the answer changes what you do next and you cannot work it out from the code, the memory or the task. Ask everything you need in ONE batch (at most 10 questions); prefer questions with `<options>` and a `<suggested>` value (with a `reason`) so the user can answer quickly. Write each option as its full content (what it does and what follows from it), never a bare letter or short code like A or b); the user must be able to choose without re-reading the question. The `<suggested>` value must repeat one option's text exactly. The body is exactly this:",
98
98
  "",
99
99
  "```",
100
100
  "<ask>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-lyceum",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Config + dispatcher for teams of Claude Code / Codex agents with scoped context and file-based mailboxes",
5
5
  "keywords": [
6
6
  "ai",