document360-writer 0.5.46 → 0.5.48

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.
@@ -1,8 +1,11 @@
1
1
  export type ChecklistStatus = 'pending' | 'active' | 'done' | 'failed';
2
+ /** `itemsDone` is live per-item progress WITHIN an active partition (e.g. articles written so far of
3
+ `items`); undefined for flows that don't report per-item progress (the row then shows the total only). */
2
4
  export type ChecklistRow = {
3
5
  label: string;
4
6
  items: number;
5
7
  status: ChecklistStatus;
8
+ itemsDone?: number;
6
9
  };
7
10
  /** Build the initial (all-pending) checklist rows from a partition plan. */
8
11
  export declare function checklistRows(partitions: {
@@ -11,6 +14,15 @@ export declare function checklistRows(partitions: {
11
14
  }[]): ChecklistRow[];
12
15
  /** Return rows with the named partition set to `status` (immutable; for setConvertProgress updaters). */
13
16
  export declare function withRowStatus(rows: ChecklistRow[], label: string, status: ChecklistStatus): ChecklistRow[];
17
+ /** Return rows with the named partition's `itemsDone` bumped by one (capped at `items`). Drives the
18
+ live "1/3 articles" sub-progress as each file lands — so a long write turn shows steady movement
19
+ instead of a frozen-looking 0/N. Immutable (for setConvertProgress updaters). */
20
+ export declare function withRowItemDone(rows: ChecklistRow[], label: string): ChecklistRow[];
21
+ /** If this tool event wrote one of a partition's target articles, return that target path; else null.
22
+ The tool's `file_path` is absolute/cwd-relative while partition paths are docsDir-relative, so we match
23
+ by path-tail (with a `/` boundary so "…/11-x.md" can't match target "1-x.md"). Pure + testable; the
24
+ caller dedupes (an Edit after a Write to the same file must tick the article only once). */
25
+ export declare function writtenArticle(toolName: string, input: Record<string, unknown>, paths: string[]): string | null;
14
26
  /** Strip a leading docs-dir path segment so a category row reads "01-getting-started", not
15
27
  "user-docs/01-…". Only matches a path-like token (no spaces) so "chunk 1/3" is left intact. */
16
28
  export declare function rowLabel(label: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document360-writer",
3
- "version": "0.5.46",
3
+ "version": "0.5.48",
4
4
  "description": "Standalone documentation agent CLI. Reads your code, writes your docs. Specialized for Document360 publishing.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "@inquirer/prompts": "^8.4.3",
35
35
  "commander": "^14.0.3",
36
36
  "diff": "^8.0.4",
37
- "document360-engine": "^0.2.83",
37
+ "document360-engine": "^0.2.84",
38
38
  "ink": "^5.2.1",
39
39
  "picocolors": "^1.1.1",
40
40
  "react": "^18.3.1",