@north-light/crouter 0.3.160 → 0.3.161

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.
@@ -23,7 +23,9 @@ export declare function fullName(node: NamedNode): string;
23
23
  * badge. */
24
24
  export declare function personaLabel(meta: Pick<NodeMeta, 'kind' | 'mode'>): string;
25
25
  /** The pi session display name — the editor label in the top-left. It carries
26
- * the node's human task name only; persona lives in the editor's bottom-right
27
- * badge. Recomputed from meta on every revive and pushed live when naming
28
- * generates the first task description. */
26
+ * ONE name: the pi-generated description of the node's first task once naming
27
+ * has run, else the spawn handle. Unlike `fullName` it never prints both, so
28
+ * the chip doesn't read as two names side by side. Persona lives in the
29
+ * editor's bottom-right badge. Recomputed from meta on every revive and pushed
30
+ * live when naming generates the first task description. */
29
31
  export declare function editorLabel(meta: NodeMeta): string;
@@ -30,11 +30,14 @@ export function personaLabel(meta) {
30
30
  return `${modeIcon(meta.mode)} ${meta.kind}`;
31
31
  }
32
32
  /** The pi session display name — the editor label in the top-left. It carries
33
- * the node's human task name only; persona lives in the editor's bottom-right
34
- * badge. Recomputed from meta on every revive and pushed live when naming
35
- * generates the first task description. */
33
+ * ONE name: the pi-generated description of the node's first task once naming
34
+ * has run, else the spawn handle. Unlike `fullName` it never prints both, so
35
+ * the chip doesn't read as two names side by side. Persona lives in the
36
+ * editor's bottom-right badge. Recomputed from meta on every revive and pushed
37
+ * live when naming generates the first task description. */
36
38
  export function editorLabel(meta) {
37
39
  const icon = (meta.icon ?? '').trim();
38
- const name = fullName(meta);
40
+ const desc = (meta.description ?? '').trim();
41
+ const name = desc !== '' ? desc : fullName(meta);
39
42
  return icon !== '' ? `${icon} ${name}` : name;
40
43
  }
@@ -35,10 +35,12 @@ const PROMPT_CAP = 2000;
35
35
  * provider's own cold start; naming is async and off the spawn path, so a slow
36
36
  * call delays only the label, never the node. */
37
37
  const NAME_TIMEOUT_MS = 45_000;
38
- /** Nerd Font glyphs offered to the namer as EXAMPLES, never as a closed set —
39
- * the model may pick any Nerd Font character it thinks fits better. Grouped by
40
- * the kind of work they read as, so the model generalizes from the grouping
41
- * instead of pattern-matching a lookup table. */
38
+ /** Nerd Font glyphs offered to the namer as a FALLBACK set for when a task has
39
+ * no concrete subject — never a closed set, and deliberately introduced to the
40
+ * model as the generic tier so it reaches for a real noun first. Measured
41
+ * against 20 real prompts, an unqualified example list anchors the model onto
42
+ * it almost totally; the two-step rule in the system prompt is what pulls picks
43
+ * back out to the actual subject. */
42
44
  const ICON_EXAMPLES = [
43
45
  'fixing/diagnosis: U+F188 bug, U+F0F1 stethoscope, U+F06D fire, U+F071 warning',
44
46
  'building/changing code: U+F0AD wrench, U+F067 plus, U+F121 code, U+F085 cogs, U+F021 refresh',
@@ -58,16 +60,21 @@ const NAME_SYSTEM_PROMPT = 'You name coding-agent work sessions. The name is a l
58
60
  'hyphens (e.g. `refactor-auth-token-flow`, `add-csv-export-endpoint`). No punctuation, ' +
59
61
  'quotes, or prose.\n' +
60
62
  '- `icon`: ONE Nerd Font glyph, written as its codepoint in `U+XXXX` form (e.g. ' +
61
- '`U+F188`). ANY Nerd Font codepoint is allowed — the whole Font Awesome, Material, ' +
62
- 'Devicons, Octicons and Codicons ranges are available, so reach for the glyph that ' +
63
- 'actually depicts this work rather than settling for one of the examples below. ' +
64
- 'Emit a codepoint, not a name like `nf-fa-bug`, and not an emoji.\n\n' +
65
- 'Pick the glyph whose depicted object a person would associate with this work at a ' +
66
- 'glance. Prefer the concrete subject (a database, a lock, a browser, a specific ' +
67
- "technology's logo) over a generic verb glyph when the task has one; fall back to the " +
68
- 'activity (fixing, building, testing) otherwise. Never reuse a generic gear for ' +
69
- 'everything.\n\n' +
70
- 'Examples of what reads well, by kind of work:\n' +
63
+ '`U+F188`). Emit a codepoint, not a name like `nf-fa-bug`, and not an emoji.\n\n' +
64
+ 'Choosing the icon — work through it in this order:\n' +
65
+ '1. Name the concrete SUBJECT of the task: the thing being acted on. A font, a ' +
66
+ 'trash can, an account, a browser tab, a clock, an invoice, a map, a robot, a specific ' +
67
+ "technology's logo. If a glyph depicts that thing, use it. This is almost always the " +
68
+ 'better icon, because it is what distinguishes this session from every other one.\n' +
69
+ '2. Only when the task has no depictable subject, fall back to the ACTIVITY (fixing, ' +
70
+ 'documenting, testing) using the generic set below.\n\n' +
71
+ 'ANY Nerd Font codepoint is allowed and the set is enormous — the whole Font Awesome ' +
72
+ 'range, Devicons and Seti technology logos, Octicons, Codicons, Weather, and the ' +
73
+ 'thousands of Material Design nouns above U+F0001. Reach into it. The examples below ' +
74
+ 'are the generic tier, NOT a menu: if your pick came from them and the task had a real ' +
75
+ 'subject, you picked wrong. Never reuse a generic gear, wrench, or bug for a task that ' +
76
+ 'is actually about something.\n\n' +
77
+ 'Generic fallback set, by kind of work:\n' +
71
78
  ICON_EXAMPLES;
72
79
  /** Put the raw task text FIRST in a delimited block, then the instruction, so the
73
80
  * model reads the content before being told what to do and never mistakes the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/crouter",
3
- "version": "0.3.160",
3
+ "version": "0.3.161",
4
4
  "description": "crtr — agent runtime with memory, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -94,9 +94,9 @@
94
94
  "test:full:heavy": "node scripts/test-runner.mjs heavy"
95
95
  },
96
96
  "overrides": {
97
- "@earendil-works/pi-ai": "0.82.1",
98
- "@earendil-works/pi-agent-core": "0.82.1",
99
- "@earendil-works/pi-tui": "0.82.1"
97
+ "@earendil-works/pi-ai": "0.83.0",
98
+ "@earendil-works/pi-agent-core": "0.83.0",
99
+ "@earendil-works/pi-tui": "0.83.0"
100
100
  },
101
101
  "repository": {
102
102
  "type": "git",
@@ -108,10 +108,10 @@
108
108
  "license": "MIT",
109
109
  "dependencies": {
110
110
  "@crouton-kit/humanloop": "0.4.20",
111
- "@earendil-works/pi-agent-core": "0.82.1",
112
- "@earendil-works/pi-ai": "0.82.1",
113
- "@earendil-works/pi-coding-agent": "0.82.1",
114
- "@earendil-works/pi-tui": "0.82.1",
111
+ "@earendil-works/pi-agent-core": "0.83.0",
112
+ "@earendil-works/pi-ai": "0.83.0",
113
+ "@earendil-works/pi-coding-agent": "0.83.0",
114
+ "@earendil-works/pi-tui": "0.83.0",
115
115
  "@fontsource-variable/fraunces": "^5.2.9",
116
116
  "@fontsource-variable/instrument-sans": "^5.2.8",
117
117
  "@fontsource-variable/martian-mono": "^5.2.7",