@lamemind/loom-deck 0.57.0 → 0.57.2

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/hooks.js CHANGED
@@ -10,7 +10,7 @@ import { discoverProjectSessions } from './sessions.js';
10
10
  import { discoverLiveSessions, liveSig } from './live-sessions.js';
11
11
  import { loadSessionIndex } from './task-index.js';
12
12
  import { archivableIds, SCAN_INTERVAL_MS } from './archivable.js';
13
- import { scanInbox } from './inbox.js';
13
+ import { scanInbox, INBOX_SCAN_INTERVAL_MS } from './inbox.js';
14
14
  import { mixedCount, readWrapCache, runWrapScan, wrapCacheFile, wrapCount, } from './wrap-scan.js';
15
15
  import { purgeTargets } from './purge.js';
16
16
  import { POLL_MS } from './model.js';
@@ -234,7 +234,7 @@ export function useInboxScan(projectRoot, docsRoot) {
234
234
  });
235
235
  };
236
236
  scan();
237
- const id = setInterval(scan, SCAN_INTERVAL_MS);
237
+ const id = setInterval(scan, INBOX_SCAN_INTERVAL_MS);
238
238
  return () => {
239
239
  alive = false;
240
240
  clearInterval(id);
package/dist/inbox.js CHANGED
@@ -16,6 +16,18 @@ import { basename, join } from 'node:path';
16
16
  import { pluginScript } from './plugin-cache.js';
17
17
  const execFileAsync = promisify(execFile);
18
18
  export const INBOX_METRICS_SCRIPT = 'scripts/docs/doc-metrics.sh';
19
+ /**
20
+ * Ogni 30 minuti — cadenza propria, staccata dai 6h di `SCAN_INTERVAL_MS`.
21
+ *
22
+ * Gli altri tre scan periodici misurano dati che si muovono al ritmo del
23
+ * calendario (l'età di una task) o di una riscrittura di massa (l'hard-wrap dei
24
+ * `.md`). La coda inbox si muove invece a ogni checkpoint: un file nuovo appare
25
+ * quando una sessione trasloca le sue nozioni, e con la cadenza a 6h il
26
+ * contatore resterebbe fermo per l'intera mattina di lavoro che lo ha riempito.
27
+ * Il costo di un giro resta uno spawn di `doc-metrics.sh` su una cartella di
28
+ * pochi file, quindi trascurabile anche a questa frequenza.
29
+ */
30
+ export const INBOX_SCAN_INTERVAL_MS = 30 * 60 * 1000;
19
31
  /** Le tre nature che una skill sa consumare, più il file che non si parsa. */
20
32
  export const NATURE = ['nozioni', 'derivazione', 'sweep'];
21
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lamemind/loom-deck",
3
- "version": "0.57.0",
3
+ "version": "0.57.2",
4
4
  "description": "Deck TUI Ink per-progetto della famiglia loom: legge tasks.md e spawna sessioni Claude Code bound via LOOM_TASK",
5
5
  "type": "module",
6
6
  "bin": {
package/scripts/deck-run CHANGED
@@ -486,6 +486,21 @@ _prompt_template() { # <kind> → template col placeholder {TASK}, o niente
486
486
 
487
487
  if [[ $PROMPT_GIVEN -eq 1 ]]; then
488
488
  PROMPT="$PROMPT_TEXT"
489
+ elif [[ $NO_TASK -eq 1 ]]; then
490
+ # Sessione nuda senza `--prompt`: nessun prompt iniziale, punto.
491
+ #
492
+ # Il default `recap` del catalogo NON si applica qui, e la guardia deve stare
493
+ # a monte invece che a valle. Finché il ramo `--no-task` scartava il prompt
494
+ # al momento di comporre il comando in-tab, un `PROMPT` risolto e mai usato
495
+ # era innocuo; da quando il PROMPT_ARG entra anche in quel ramo (T134/D9,
496
+ # per il drain e lo srotolamento) il testo del catalogo ci arriva davvero —
497
+ # e siccome ogni template interpola `{TASK}`, con la task vuota diventa
498
+ # `/loom-works:recap-status ` con l'id monco: la sessione vuota del deck (`c`)
499
+ # nasceva su un recap che nessuno ha chiesto.
500
+ #
501
+ # Stessa ragione per `LOOM_DECK_ENTER_PROMPT`, che interpola `{TASK}` a sua
502
+ # volta e qui resta quindi inerte: senza task non ha nulla da nominare.
503
+ PROMPT=""
489
504
  else
490
505
  _kind="${PROMPT_KIND:-recap}"
491
506
  if [[ "$_kind" == "none" ]]; then