document360-writer 0.5.25 → 0.5.26
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 +98 -99
- package/dist/commands/catchup.d.ts +1 -1
- package/dist/commands/pull.d.ts +45 -0
- package/dist/lib/commandSuggest.d.ts +1 -1
- package/dist/lib/nextActions.d.ts +1 -1
- package/dist/lib/quickOptions.d.ts +1 -1
- package/dist/tui/catalog.d.ts +1 -1
- package/package.json +2 -2
- package/dist/commands/sync.d.ts +0 -8
|
@@ -26,7 +26,7 @@ export type PortalReconcileResult = {
|
|
|
26
26
|
conflicts: string[];
|
|
27
27
|
/** Titles of NEW portal articles not local yet — surfaced, not imported (import lands with P3/manifest). */
|
|
28
28
|
untrackedRemote: string[];
|
|
29
|
-
/** Per-article pull failures (left for /
|
|
29
|
+
/** Per-article pull failures (left for /pull). */
|
|
30
30
|
failed: {
|
|
31
31
|
path: string;
|
|
32
32
|
error: string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReplContext } from '../repl.js';
|
|
2
|
+
import type { SlashCommandResult } from './index.js';
|
|
3
|
+
/**
|
|
4
|
+
* /pull — bring Document360 down into the local docs. ONE verb, ONE direction (push stays /publish).
|
|
5
|
+
* /pull pull every clean portal edit + import every NEW portal article, then report drift
|
|
6
|
+
* /pull <path> pull (or conflict-resolve) one article after a reviewed diff
|
|
7
|
+
* /pull --status read-only drift report (no writes)
|
|
8
|
+
* /pull --baseline set a sync baseline for tracked-but-not-yet-compared articles
|
|
9
|
+
* /pull --compare (diagnostic) check the manifest sees the same articles as the per-article path
|
|
10
|
+
* No agent turn, no tokens — direct engine calls.
|
|
11
|
+
*/
|
|
12
|
+
export declare function pullCommand(args: string[], ctx: ReplContext): Promise<SlashCommandResult>;
|
|
13
|
+
/** Result of a bare /pull — the down-direction reconcile (shared by the classic REPL + the TUI). */
|
|
14
|
+
export type PullDownResult = {
|
|
15
|
+
/** Repo-relative paths whose clean portal edits were pulled into local. */
|
|
16
|
+
pulled: string[];
|
|
17
|
+
/** NEW portal articles imported into local files. */
|
|
18
|
+
imported: {
|
|
19
|
+
title: string;
|
|
20
|
+
path: string;
|
|
21
|
+
}[];
|
|
22
|
+
/** Paths changed in BOTH places — left untouched for the user to resolve. */
|
|
23
|
+
conflicts: string[];
|
|
24
|
+
/** Count of local-only changes (local-ahead + new-here) that go UP via /publish. */
|
|
25
|
+
toPublish: number;
|
|
26
|
+
/** Per-item failures (a pull or import that threw). */
|
|
27
|
+
failed: {
|
|
28
|
+
ref: string;
|
|
29
|
+
error: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Bare /pull: bring Document360 down. Auto-pull every clean `remote-ahead` (lossless — local unchanged),
|
|
34
|
+
* import every `untracked-remote` new portal article into a local draft, and tally what's left (conflicts
|
|
35
|
+
* to resolve, local changes to /publish). Pure orchestration over the engine sync primitives — no UI.
|
|
36
|
+
*/
|
|
37
|
+
export declare function pullDown(opts: {
|
|
38
|
+
cwd: string;
|
|
39
|
+
profileName?: string;
|
|
40
|
+
}): Promise<PullDownResult>;
|
|
41
|
+
/** Human summary of a bare /pull, each line tagged for tone. Always returns ≥1 line. */
|
|
42
|
+
export declare function pullDownLines(r: PullDownResult): {
|
|
43
|
+
text: string;
|
|
44
|
+
tone: 'ok' | 'info' | 'warn';
|
|
45
|
+
}[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Quick-run options: when an agent turn ends by suggesting slash commands (e.g. the
|
|
3
|
-
* gap-analysis trust gate offering `/
|
|
3
|
+
* gap-analysis trust gate offering `/pull <path>` vs `/publish <path>`), the TUI
|
|
4
4
|
* lets the user press 1-N to fill the command instead of retyping it. Only standalone
|
|
5
5
|
* command lines count — a command mentioned mid-sentence is prose, not an option.
|
|
6
6
|
*/
|
|
@@ -10,7 +10,7 @@ export type ReadyInputs = {
|
|
|
10
10
|
pendingText: string | null;
|
|
11
11
|
/** Planned articles (plan.json) not yet written — missing/empty files. >0 after an interrupted /write
|
|
12
12
|
(e.g. a crash mid-run) or a freshly-pinned plan with bodies still to generate. Drives the "pick up
|
|
13
|
-
where you left off" → /write lead so a half-done generation isn't buried under /audit + /
|
|
13
|
+
where you left off" → /write lead so a half-done generation isn't buried under /audit + /pull. */
|
|
14
14
|
pendingWrites: number;
|
|
15
15
|
/** Commits on HEAD since the last `/audit` marker (0 when never audited or not a git repo). */
|
|
16
16
|
behind: number;
|
|
@@ -5,7 +5,7 @@ export declare function argOf(cmd: string): string;
|
|
|
5
5
|
* options that should remain:
|
|
6
6
|
* - If the command IS one of the offered suggestions (same command, or an alternative over the same
|
|
7
7
|
* argument), the user is following the offered flow → keep the siblings, dropping the executed one
|
|
8
|
-
* and its argument-alternatives (SNAG-0049: running "/
|
|
8
|
+
* and its argument-alternatives (SNAG-0049: running "/pull X" must not wipe a pending "/audit").
|
|
9
9
|
* - Otherwise the user went off-script (e.g. "/reset" while "/publish --all" was offered) → clear all,
|
|
10
10
|
* so a now-irrelevant suggestion can't linger into the new context (SNAG-0127).
|
|
11
11
|
*/
|
package/dist/tui/catalog.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export declare function describeQuickOption(cmdLine: string): string;
|
|
|
12
12
|
/** Commands whose body filters as you type `/<prefix>`. */
|
|
13
13
|
export declare function filterCommands(input: string): CommandSpec[];
|
|
14
14
|
/** True when the usage has a REQUIRED argument (`<...>` outside optional `[...]`
|
|
15
|
-
brackets). "/rename <name>" requires one; "/
|
|
15
|
+
brackets). "/rename <name>" requires one; "/pull [<path> | --status]" does not —
|
|
16
16
|
palette Enter must submit the latter bare instead of waiting for input forever. */
|
|
17
17
|
export declare function requiresArgument(usage: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document360-writer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.26",
|
|
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.
|
|
37
|
+
"document360-engine": "^0.2.68",
|
|
38
38
|
"ink": "^5.2.1",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"react": "^18.3.1",
|
package/dist/commands/sync.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ReplContext } from '../repl.js';
|
|
2
|
-
import type { SlashCommandResult } from './index.js';
|
|
3
|
-
/**
|
|
4
|
-
* /sync — deterministic local<->Document360 drift report (no agent turn, no tokens).
|
|
5
|
-
* /sync pull <path> | --all — fetch portal edits into local markdown after a
|
|
6
|
-
* reviewed diff. Push direction stays /publish.
|
|
7
|
-
*/
|
|
8
|
-
export declare function syncCommand(args: string[], ctx: ReplContext): Promise<SlashCommandResult>;
|