koneck 2.31.0 → 2.32.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.
@@ -42,55 +42,7 @@ export declare function pasteForDisplay(text: string, maxRows?: number): string;
42
42
  export declare function liveReplyLines(termRows: number | undefined): number;
43
43
  /** Sampling cadence for live stream refs: quick enough to read, slow enough not to flash. */
44
44
  export declare function liveRefreshDelay(idleForMs: number): number;
45
- /**
46
- * What KONECK says it is doing, and what it says it did.
47
- *
48
- * Grouped by how much work the turn turned out to be, so the wording matches the wait: a
49
- * sub-three-second answer gets something snappy, a two-minute one gets something that sounds
50
- * like effort, and a turn that had to recover from a failed tool gets a clutch verb. The word
51
- * shown while working escalates through the tiers as time passes, and the finished row reports
52
- * the tense that matches the real elapsed time.
53
- *
54
- * Apostrophes are ASCII on purpose: U+2019 is East Asian Ambiguous, the same class of character
55
- * that used to tear the panel borders.
56
- */
57
- export type WorkTier = 'reply' | 'quick' | 'normal' | 'heavy' | 'recovery';
58
- export declare const WORK_WORDS: Record<WorkTier, Array<readonly [string, string]>>;
59
- /** Which vocabulary the wait deserves. */
60
- /** What a turn actually amounted to, which is what the wording should follow. */
61
- export interface TurnEffort {
62
- elapsedMs: number;
63
- /** Tools the turn ran. Zero means it only thought and answered. */
64
- tools: number;
65
- /** Output tokens produced. */
66
- tokens: number;
67
- /** A tool failed and the turn recovered from it. */
68
- recovered: boolean;
69
- }
70
- /**
71
- * Whether the turn earned a verb at all.
72
- *
73
- * "Cooked lekker in 5.0s" for answering "hi" is a boast about nothing: no tool ran, ten tokens
74
- * came back, and the only reason it took five seconds is that the provider is slow. Elapsed time
75
- * alone cannot tell effort from latency, so a turn that ran no tools and said almost nothing gets
76
- * its timing reported plainly and no verb.
77
- */
78
- export declare function shouldName(effort: TurnEffort): boolean;
79
- /**
80
- * Which family of words fits.
81
- *
82
- * Time still decides between quick, normal and heavy, but only once the turn has done something.
83
- * A turn with no tools belongs to `reply` however long it took, because nothing was built and a
84
- * cooking verb would be describing work that never happened.
85
- */
86
- export declare function tierFor(effort: TurnEffort): WorkTier;
87
- /**
88
- * The gerund to show while working, and the past tense to report when the turn lands.
89
- *
90
- * The past tense is empty when the turn did not earn one, which the caller renders as timing
91
- * alone.
92
- */
93
- export declare function workWord(effort: TurnEffort, seed: number): readonly [string, string];
45
+ export { WORK_WORDS, shouldName, tierFor, workWord, type WorkTier, type TurnEffort, } from './work-words.js';
94
46
  /** Logical families for the searchable command palette; headers reuse an existing row. */
95
47
  export declare function commandGroup(command: string): string;
96
48
  /** What the overlay is currently offering. */
@@ -300,5 +252,4 @@ export declare function defaultAltScreen(stdout?: {
300
252
  columns?: number;
301
253
  }, env?: NodeJS.ProcessEnv): boolean;
302
254
  export declare function runInkChatMode(config: AgentConfig): Promise<void>;
303
- export {};
304
255
  //# sourceMappingURL=ink-chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ink-chat.d.ts","sourceRoot":"","sources":["../src/ink-chat.tsx"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3F,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AA+B7D,KAAK,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAGhD,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI9D;AAsCD,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAM7C;AA0BD,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE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O,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,sBAAsB,UAAQ,GAC7B,OAAO,GAAG,MAAM,GAAG,KAAK,CAc1B;AAED,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE,sGAAsG;AACtG,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,mBAAmB,EAAE,MAAM,EAC3B,eAAe,CAAC,EAAE,MAAM,EACxB,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAClC,MAAM,CAcR;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,OAAO,CAMnE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEzD;AA0ED;;;;;GAKG;AACH;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAU3D;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAmB,EAC7E,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAQT;AAqwID,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBvE"}
package/dist/ink-chat.js CHANGED
@@ -293,232 +293,10 @@ function Shimmer({ text, frame, base }) {
293
293
  return _jsx(Text, { color: color, bold: d === 0, children: ch }, i);
294
294
  }) }));
295
295
  }
296
- export const WORK_WORDS = {
297
- // No tool ran: it thought and answered. A cooking metaphor is wrong here nothing was made.
298
- reply: [
299
- ["Thinking it through", "Thought it through, sharp"],
300
- ["Consulting the elders", "Elders consulted"],
301
- ["Reading the room", "Room read"],
302
- ["Chewing it over", "Chewed it over"],
303
- ["Doing the maths", "Maths done"],
304
- ["Asking the rubber duck", "Duck consulted"],
305
- ["Squinting at it", "Squinted at it"],
306
- ["Joining the dots", "Dots joined"],
307
- ["Sleeping on it", "Slept on it"],
308
- ["Weighing both sides", "Both sides weighed"],
309
- ['Thinking', 'Thought it through'], ['Weighing it up', 'Weighed it up'],
310
- ['Talking it through', 'Talked it through'], ['Laying it out', 'Laid it out'],
311
- ['Reading you', 'Read you'], ['Working it out', 'Worked it out'],
312
- ['Turning it over', 'Turned it over'], ['Sizing it up', 'Sized it up'],
313
- ['Consulting', 'Consulted'], ['Advising', 'Advised'],
314
- ['Counselling', 'Counselled'], ['Explaining', 'Explained'],
315
- ],
316
- // Under ~3s. Snappy, almost dismissive — it barely counted as work.
317
- quick: [
318
- ["Now-now", "Done now-now"],
319
- ["Ayoba", "Made it ayoba"],
320
- ["Kicking it", "Kicked"],
321
- ["Zap-zapping", "Zap-zapped"],
322
- ["Tapping the card", "Card tapped"],
323
- ["Popping the kettle on", "Kettle popped on"],
324
- ["Pulling an espresso", "Espresso pulled"],
325
- ["Catching the kombi", "Kombi caught"],
326
- ["Beating the robot", "Robot beaten"],
327
- ["Slipping it in", "Slipped in"],
328
- ["Grabbing a vetkoek", "Vetkoek grabbed"],
329
- ["Skipping the queue", "Queue skipped"],
330
- ['Sharp-sharp', 'Sharp-sharp'], ['Doing it now-now', 'Done now-now'],
331
- ['One-tapping', 'One-tapped'], ['No-scoping', 'No-scoped'],
332
- ['Speedrunning', 'Speedran'], ['Microwaving', 'Microwaved'],
333
- ['Snapping', 'Snapped'], ['Flicking', 'Flicked'],
334
- ['Zapping', 'Zapped'], ['Sorting', 'Sorted'],
335
- ['Hot-reloading', 'Hot-reloaded'], ['JIT-compiling', 'JIT-compiled'],
336
- ['Instant-noodling', 'Instant-noodled'], ['Wazza-ing', "Wazza'd"],
337
- // Counter work: over before you have put your wallet away.
338
- ['Ringing it up', 'Rung up'], ['Swiping the card', 'Card swiped'],
339
- ['Stamping it', 'Stamped'], ['Checking you in', 'Checked in'],
340
- ['Taking the register', 'Register taken'], ['Triaging', 'Triaged'],
341
- ['Waving it through', 'Waved through'], ['Blowing the whistle', 'Whistle blown'],
342
- ['Ticking the box', 'Box ticked'], ['Handing over the key', 'Key handed over'],
343
- ['Weighing it', 'Weighed'], ['Bagging it', 'Bagged'],
344
- ],
345
- // The everyday middle. General flex and completion.
346
- normal: [
347
- ["Stirring the sishwala", "Sishwala stirred"],
348
- ["Pounding tinkhobe", "Tinkhobe pounded"],
349
- ["Souring the emasi", "Emasi soured"],
350
- ["Brewing emahewu", "Emahewu brewed"],
351
- ["Frying magwinya", "Magwinya fried"],
352
- ["Rolling a bunny chow", "Bunny chow rolled"],
353
- ["Firing the shisanyama", "Shisanyama fired"],
354
- ["Stirring the potjie", "Potjie stirred"],
355
- ["Turning the pap", "Pap turned"],
356
- ["Dropping the log drum", "Log drum dropped"],
357
- ["Stewing jollof", "Jollof stewed"],
358
- ["Pounding fufu", "Fufu pounded"],
359
- ["Rolling injera", "Injera rolled"],
360
- ["Grinding berbere", "Berbere ground"],
361
- ["Wrapping dolmades", "Dolmades wrapped"],
362
- ["Folding dumplings", "Dumplings folded"],
363
- ["Rolling sushi", "Sushi rolled"],
364
- ["Proving the sourdough", "Sourdough proved"],
365
- ["Tempering chocolate", "Chocolate tempered"],
366
- ["Layering the lasagne", "Lasagne layered"],
367
- ["Negotiating with TypeScript", "TypeScript talked round"],
368
- ["Bribing the linter", "Linter bribed"],
369
- ["Blaming the cache", "Cache blamed"],
370
- ["Threading the needle", "Needle threaded"],
371
- ["Loading the kombi", "Kombi loaded"],
372
- ["Beating loadshedding", "Loadshedding beaten"],
373
- ['Cooking', 'Cooked lekker'], ['Baking', 'Baked'],
374
- ['Grilling', 'Grilled'], ['Sizzling', 'Sizzled'],
375
- ['Brewing', 'Brewed'], ['Chowing', 'Chowed'],
376
- ['Shipping', 'Shipped'], ['Manifesting', 'Manifested'],
377
- ['Locking in', 'Locked in'], ['Eating', 'Ate and left no crumbs'],
378
- ['Cracking on', 'Cracked it'], ['Fixing bozza-style', 'Fixed bozza-style'],
379
- ['Shebelezaing', "Shebeleza'd"], ['Refactoring', 'Refactored'],
380
- ['Garbage-collecting', 'Garbage-collected'], ['Hammering', 'Hammered'],
381
- ['Clutching', 'Clutched'], ['Comboing', "Combo'd"],
382
- ['Carrying', 'Carried'], ['Soloing', "Solo'd"],
383
- ['Whittling', 'Whittled'], ['Forging', 'Forged'],
384
- ['Noodling', 'Noodled'], ['Rubber-ducking', 'Rubber-ducked'],
385
- ['Tree-shaking', 'Tree-shook'], ['Reticulating', 'Reticulated'],
386
- ['Letting it cook', 'Let it cook'], ['Getting it oga-certified', 'Oga-certified'],
387
- // A shift's honest work: clinic, classroom, shop floor, counting house.
388
- ['Doing the rounds', 'Rounds done'], ['Dispensing', 'Dispensed'],
389
- ['Dressing the wound', 'Wound dressed'], ['Taking the pulse', 'Pulse taken'],
390
- ['Marking the papers', 'Papers marked'], ['Setting the homework', 'Homework set'],
391
- ['Taking the lesson', 'Lesson taken'], ['Turning down the beds', 'Beds turned down'],
392
- ['Working the front desk', 'Front desk worked'], ['Laying the tables', 'Tables laid'],
393
- ['Balancing the books', 'Books balanced'], ['Reconciling', 'Reconciled'],
394
- ['Counting the till', 'Till counted'], ['Clearing the cheque', 'Cheque cleared'],
395
- ['Running the line', 'Line ran'], ['Tooling up', 'Tooled up'],
396
- ['Cutting the pattern', 'Pattern cut'], ['Stitching', 'Stitched'],
397
- ['Pressing and finishing', 'Pressed and finished'], ['Grading the sizes', 'Sizes graded'],
398
- ['Filing the papers', 'Papers filed'], ['Taking statements', 'Statements taken'],
399
- ['Serving the summons', 'Summons served'], ['Standing guard', 'Guard stood'],
400
- ['Walking the beat', 'Beat walked'], ['Canvassing', 'Canvassed'],
401
- ['Working the room', 'Room worked'], ['Tabling the motion', 'Motion tabled'],
402
- ['Haggling', 'Haggled'], ['Setting out the stall', 'Stall set out'],
403
- ['Restocking the shelves', 'Shelves restocked'], ['Cashing up', 'Cashed up'],
404
- ['Pounding the mealies', 'Mealies pounded'], ['Beating the drum', 'Drum beaten'],
405
- ['Sitting with the elders', 'Elders consulted'], ['Weaving the mat', 'Mat woven'],
406
- ],
407
- // Over ~10s. Slow heat and visible effort — it earned the wait.
408
- heavy: [
409
- ["Slow-braaiing", "Slow-braaied"],
410
- ["Burying the potjie", "Potjie unearthed"],
411
- ["Drying umncweba", "Umncweba dried"],
412
- ["Curing biltong", "Biltong cured"],
413
- ["Waiting for the kombi to fill", "Kombi finally filled"],
414
- ["Smoking brisket", "Brisket smoked"],
415
- ["Curing prosciutto", "Prosciutto cured"],
416
- ["Ageing the parmesan", "Parmesan aged"],
417
- ["Reducing the stock", "Stock reduced"],
418
- ["Confiting the duck", "Duck confited"],
419
- ["Fermenting the mageu", "Mageu fermented"],
420
- ["Digging the imbawula", "Imbawula stoked"],
421
- ["Walking to Mbabane", "Walked to Mbabane"],
422
- ["Crossing the Lubombo", "Lubombo crossed"],
423
- ["Counting the cattle", "Cattle counted"],
424
- ["Thatching the roof", "Roof thatched"],
425
- ["Waiting out stage six", "Stage six outlasted"],
426
- ["Arguing with the compiler", "Compiler talked down"],
427
- ['Braaiing', "Braai'd"], ['Deep-frying', 'Deep-fried'],
428
- ['Pressure-cooking', 'Pressure-cooked'], ['Slow-smoking', 'Smoked'],
429
- ['Simmering', 'Simmered'], ['Marinating', 'Marinated'],
430
- ['Flambeing', 'Flambeed'], ['Charring', 'Charred'],
431
- ['Caramelising', 'Caramelised'], ['Proofing the dough', 'Proofed'],
432
- ['Reducing the sauce', 'Reduced it down'], ['Low-and-slowing', 'Done low and slow'],
433
- ['Excavating', 'Excavated'], ['Spelunking', 'Spelunked'],
434
- ['Yak-shaving', 'Yak-shaved'], ['Grinding', 'Ground it out'],
435
- ['Locking all the way in', 'Locked all the way in'],
436
- ['Negotiating with malloc', 'Negotiated with malloc'],
437
- ['Arguing with the type checker', 'Out-argued the type checker'],
438
- // The long jobs: a night shift, a whole ward, a case that ran all day.
439
- ['Doing the ward round', 'Ward round done'], ['Scrubbing in', 'Scrubbed out'],
440
- ['Sitting the long clinic', 'Clinic finished'], ['Marking the whole class', 'Whole class marked'],
441
- ['Sitting the exam', 'Exam sat'], ['Running the night shift', 'Night shift done'],
442
- ['Working the full run', 'Full run done'], ['Cutting the whole marker', 'Marker cut'],
443
- ['Closing the books', 'Books closed'], ['Auditing', 'Audited'],
444
- ['Doing the stocktake', 'Stock taken'], ['Arguing the case', 'Case argued'],
445
- ['Sitting in chambers', 'Judgment handed down'], ['Building the docket', 'Docket built'],
446
- ['Doing the night patrol', 'Patrol done'], ['Standing the long watch', 'Watch stood'],
447
- ['Holding the indaba', 'Indaba held'], ['Filibustering', 'Filibustered'],
448
- ['Brewing umqombothi', 'Umqombothi brewed'], ['Keeping the fire going', 'Fire kept going'],
449
- ['Walking it to market', 'Walked it to market'],
450
- ['Herding promises', 'Herded the promises'],
451
- ['Bribing the scheduler', 'Bribed the scheduler'],
452
- ['Smashing wazobia', 'Smashed wazobia'],
453
- ],
454
- // Something failed on the way and had to be worked around.
455
- recovery: [
456
- ["Patching the pothole", "Pothole patched"],
457
- ["Jump-starting it", "Jump-started"],
458
- ["Duct-taping it", "Duct-taped"],
459
- ["Calling the mechanic", "Mechanic called"],
460
- ["Rerouting round the roadworks", "Roadworks rerouted"],
461
- ["Putting it back on the rails", "Back on the rails"],
462
- ["Unblocking the drain", "Drain unblocked"],
463
- ["Re-braaiing the burnt bit", "Burnt bit re-braaied"],
464
- ['Sorting it sharp-sharp', 'Sorted sharp-sharp'],
465
- ['De-spaghettifying', 'De-spaghettified'],
466
- ['Clutching it back', 'Clutched it'],
467
- ['Un-ganking', 'Un-ganked'],
468
- ['Debugging', 'De-bugged'],
469
- ['Unbreaking', 'Unbroke it'],
470
- ['Talking it down', 'Talked it down'],
471
- ['Patching the hull', 'Patched the hull'],
472
- ['Fixing it bozza-style', 'Fixed bozza-style'],
473
- ['Shebelezaing out of it', "Shebeleza'd out of it"],
474
- ['Reversing the curse', 'Reversed the curse'],
475
- ['Duct-taping', 'Duct-taped'],
476
- ],
477
- };
478
- /**
479
- * Whether the turn earned a verb at all.
480
- *
481
- * "Cooked lekker in 5.0s" for answering "hi" is a boast about nothing: no tool ran, ten tokens
482
- * came back, and the only reason it took five seconds is that the provider is slow. Elapsed time
483
- * alone cannot tell effort from latency, so a turn that ran no tools and said almost nothing gets
484
- * its timing reported plainly and no verb.
485
- */
486
- export function shouldName(effort) {
487
- if (effort.recovered)
488
- return true; // recovering from a failure is real work
489
- if (effort.tools > 0)
490
- return true; // it did something to the world
491
- return effort.tokens >= 60; // a substantial answer is work; "hi" is not
492
- }
493
- /**
494
- * Which family of words fits.
495
- *
496
- * Time still decides between quick, normal and heavy, but only once the turn has done something.
497
- * A turn with no tools belongs to `reply` however long it took, because nothing was built and a
498
- * cooking verb would be describing work that never happened.
499
- */
500
- export function tierFor(effort) {
501
- if (effort.recovered)
502
- return 'recovery';
503
- if (effort.tools === 0)
504
- return 'reply';
505
- if (effort.elapsedMs < 3_000)
506
- return 'quick';
507
- if (effort.elapsedMs > 10_000)
508
- return 'heavy';
509
- return 'normal';
510
- }
511
- /**
512
- * The gerund to show while working, and the past tense to report when the turn lands.
513
- *
514
- * The past tense is empty when the turn did not earn one, which the caller renders as timing
515
- * alone.
516
- */
517
- export function workWord(effort, seed) {
518
- const bucket = WORK_WORDS[tierFor(effort)];
519
- const [gerund, past] = bucket[Math.abs(seed) % bucket.length];
520
- return [gerund, shouldName(effort) ? past : ''];
521
- }
296
+ // The vocabulary moved to work-words.ts so the browser can narrate a turn the same way. Still
297
+ // re-exported here, because the tests and the rest of this file reach for it by this name.
298
+ export { WORK_WORDS, shouldName, tierFor, workWord, } from './work-words.js';
299
+ import { workWord } from './work-words.js';
522
300
  /** Every slash command, shown in the `/` palette and filtered as you type. */
523
301
  const COMMANDS = [
524
302
  { cmd: '/help', desc: 'Show help' },
@@ -1677,13 +1455,32 @@ function App({ config: initialConfig, clearFrame }) {
1677
1455
  /** Bumped to make Ink write a frame whose content has not changed. See redrawScreen. */
1678
1456
  const [repaint, setRepaint] = useState(0);
1679
1457
  const [ask, setAsk] = useState(null);
1458
+ /*
1459
+ * Entering the alternate buffer, and then making sure something is drawn in it.
1460
+ *
1461
+ * An effect runs after the render that scheduled it, so the sequence was: Ink draws the first
1462
+ * frame on the ordinary screen, this switches to the alternate one — which is empty — and Ink
1463
+ * still believes its frame is on display, so it writes nothing more. The interface only appeared
1464
+ * once something forced a fresh frame, and on a quiet startup the first such thing is a resize.
1465
+ * Reported as "the screen goes blank up until i minimize it and then it shows": minimising and
1466
+ * restoring is a resize, and that was the repaint.
1467
+ *
1468
+ * Same two steps as ctrl+L, for the same reason: tell Ink its frame is gone, then give it a
1469
+ * reason to write one.
1470
+ */
1680
1471
  useEffect(() => {
1681
1472
  if (!process.stdout.isTTY)
1682
1473
  return;
1683
1474
  if (altScreen) {
1684
1475
  process.stdout.write('\u001b[?1049h\u001b[H'); // enter, and home the cursor
1476
+ clearFrame?.();
1477
+ setRepaint(n => n + 1);
1685
1478
  return () => { process.stdout.write('\u001b[?1049l'); };
1686
1479
  }
1480
+ // Leaving it is the same problem in reverse: the ordinary screen still holds whatever was
1481
+ // there before, and Ink's idea of what it drew belongs to the buffer just abandoned.
1482
+ clearFrame?.();
1483
+ setRepaint(n => n + 1);
1687
1484
  return;
1688
1485
  }, [altScreen]);
1689
1486
  /**