document360-writer 0.5.8 → 0.5.10
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/cli.js +87 -87
- package/dist/lib/nextActions.d.ts +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Inputs the decision needs, all already read from disk by the caller. */
|
|
2
|
+
export type ReadyInputs = {
|
|
3
|
+
/** Configured + signed in + scope ok + Claude present. False ⇒ the setup ladder owns the screen. */
|
|
4
|
+
ready: boolean;
|
|
5
|
+
/** Any tracked docs exist locally (a non-empty docsDir). */
|
|
6
|
+
hasDocs: boolean;
|
|
7
|
+
/** Count of articles in the category map for the active profile. */
|
|
8
|
+
tracked: number;
|
|
9
|
+
/** `pendingLine(pendingSummary())` — e.g. "2 hints, 1 request", or null when nothing's queued. */
|
|
10
|
+
pendingText: string | null;
|
|
11
|
+
/** Commits on HEAD since the last `/audit` marker (0 when never audited or not a git repo). */
|
|
12
|
+
behind: number;
|
|
13
|
+
/** The user's `/audit --auto on` setting. */
|
|
14
|
+
autoAudit: boolean;
|
|
15
|
+
/** Active profile/connection name, for the "N articles tracked for X" line. */
|
|
16
|
+
profileName: string;
|
|
17
|
+
/** Whether the caller may auto-run /audit (true only at launch — never on the post-turn refresh,
|
|
18
|
+
which would loop). When false, a would-be auto-audit degrades to offering /audit in the list. */
|
|
19
|
+
allowAutoAudit: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type ReadyDecision =
|
|
22
|
+
/** Not in the ready state — the caller must leave the quick-list/ghost untouched (setup ladder owns it). */
|
|
23
|
+
{
|
|
24
|
+
kind: 'idle';
|
|
25
|
+
}
|
|
26
|
+
/** Launch only: code moved + auto-audit on ⇒ run /audit now. `note` is the ambient line to show. */
|
|
27
|
+
| {
|
|
28
|
+
kind: 'autoAudit';
|
|
29
|
+
note: string;
|
|
30
|
+
}
|
|
31
|
+
/** No docs yet: cold-start. `note` is the transcript line, `ghost` the tab-fill, `options`/`title` the list. */
|
|
32
|
+
| {
|
|
33
|
+
kind: 'noDocs';
|
|
34
|
+
note: string;
|
|
35
|
+
ghost: string;
|
|
36
|
+
title: string | null;
|
|
37
|
+
options: string[];
|
|
38
|
+
}
|
|
39
|
+
/** Docs exist: the steady-state next-actions. `note` is the launch transcript block; `title`+`options`
|
|
40
|
+
are the durable quick-list (also restored after every turn). */
|
|
41
|
+
| {
|
|
42
|
+
kind: 'actions';
|
|
43
|
+
note: string;
|
|
44
|
+
title: string;
|
|
45
|
+
options: string[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Decide the next actions from already-gathered inputs. Pure — no I/O — so it's unit-tested and is the
|
|
49
|
+
* one place option order + copy is defined. Mirrors the behavior the launch orientation had inline.
|
|
50
|
+
*/
|
|
51
|
+
export declare function decideReadyActions(i: ReadyInputs): ReadyDecision;
|
package/package.json
CHANGED