@zixt/host 0.0.28 → 0.0.29

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 +11 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import { homedir } from "node:os";
31
31
  // package.json
32
32
  var package_default = {
33
33
  name: "@zixt/host",
34
- version: "0.0.28",
34
+ version: "0.0.29",
35
35
  type: "module",
36
36
  exports: {
37
37
  ".": "./src/client.ts",
@@ -19008,6 +19008,8 @@ async function generateTaskTitle(instructions, runner) {
19008
19008
  const prompt = [
19009
19009
  "Name this task for a task list. Reply with ONLY the name: at most eight",
19010
19010
  "words, no quotes, no trailing period, same language as the request.",
19011
+ "Never ask a question or explain that context is missing. The request",
19012
+ "below is the context. If it is vague, name its apparent goal.",
19011
19013
  "",
19012
19014
  "<task_request>",
19013
19015
  instructions.slice(0, INSTRUCTIONS_BUDGET),
@@ -19060,9 +19062,16 @@ function cleanTitleOutput(raw) {
19060
19062
  const line = raw.split("\n").map((candidate) => candidate.trim()).find((candidate) => candidate.length > 0);
19061
19063
  if (!line) return null;
19062
19064
  const unwrapped = line.replace(/^["'`“”‘’]+/, "").replace(/["'`“”‘’]+$/, "").replace(/\.$/, "").replace(/\s+/g, " ").trim();
19063
- if (!unwrapped || unwrapped.length > 200) return null;
19065
+ if (!isPlausibleTaskTitle(unwrapped)) return null;
19064
19066
  return unwrapped;
19065
19067
  }
19068
+ function isPlausibleTaskTitle(title) {
19069
+ if (!title || title.length > 200 || title.includes("?")) return false;
19070
+ if (title.split(/\s+/u).length > 8) return false;
19071
+ return !/^(?:i (?:do not|don't|need|cannot|can't)|could you|can you|please (?:provide|describe|clarify)|what task|need more context)\b/iu.test(
19072
+ title
19073
+ );
19074
+ }
19066
19075
 
19067
19076
  // src/worker-watchdog.ts
19068
19077
  import { randomUUID } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zixt/host",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/client.ts",