document360-writer 0.5.70 → 0.5.72
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 +97 -97
- package/dist/commands/catchup.d.ts +13 -10
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeSyncStatus, planPull, applyPull } from 'document360-engine';
|
|
1
|
+
import { computeSyncStatus, planPull, applyPull, planImport, applyImport } from 'document360-engine';
|
|
2
2
|
import type { ReplContext } from '../repl.js';
|
|
3
3
|
import type { SlashCommandResult } from './index.js';
|
|
4
4
|
export type PendingSummary = {
|
|
@@ -18,15 +18,15 @@ export declare function parseCatchUpArgs(args: string[]): {
|
|
|
18
18
|
export declare function buildCatchUpPrompt({ publish }: {
|
|
19
19
|
publish: boolean;
|
|
20
20
|
}): string;
|
|
21
|
-
/** Outcome of the Phase-0 portal reconcile (catch-up
|
|
21
|
+
/** Outcome of the Phase-0 portal reconcile (catch-up brings the portal fully down BEFORE the agent writes). */
|
|
22
22
|
export type PortalReconcileResult = {
|
|
23
23
|
/** Repo-relative paths whose clean portal edits were pulled into local (lossless — local was unchanged). */
|
|
24
24
|
pulled: string[];
|
|
25
|
+
/** Repo-relative paths of NEW portal articles imported into local drafts (were untracked-remote). */
|
|
26
|
+
imported: string[];
|
|
25
27
|
/** Paths changed in BOTH places — left untouched for the user to resolve. */
|
|
26
28
|
conflicts: string[];
|
|
27
|
-
/**
|
|
28
|
-
untrackedRemote: string[];
|
|
29
|
-
/** Per-article pull failures (left for /pull). */
|
|
29
|
+
/** Per-article pull/import failures (left for /pull). */
|
|
30
30
|
failed: {
|
|
31
31
|
path: string;
|
|
32
32
|
error: string;
|
|
@@ -39,13 +39,16 @@ export type ReconcileDeps = {
|
|
|
39
39
|
status: typeof computeSyncStatus;
|
|
40
40
|
plan: typeof planPull;
|
|
41
41
|
apply: typeof applyPull;
|
|
42
|
+
planImport: typeof planImport;
|
|
43
|
+
applyImport: typeof applyImport;
|
|
42
44
|
};
|
|
43
45
|
/**
|
|
44
|
-
* Phase 0 of /catch-up —
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
46
|
+
* Phase 0 of /catch-up — bring the portal FULLY down before the agent works, so "/catch-up" is the one
|
|
47
|
+
* command a returning user needs (pull + process). Auto-pull clean `remote-ahead` (lossless — local
|
|
48
|
+
* unchanged) AND import `untracked-remote` (new portal-authored articles → local drafts), the same way
|
|
49
|
+
* bare /pull does; `conflict` is surfaced + skipped (never overwrite a copy we can't trust). Best-effort:
|
|
50
|
+
* a status failure returns `{ error }` and catch-up proceeds (the agent's own d360_sync_status still gates).
|
|
51
|
+
* The hidden feedback category is excluded upstream (computeSyncStatus), so its articles never import here.
|
|
49
52
|
*/
|
|
50
53
|
export declare function reconcilePortal(opts: {
|
|
51
54
|
cwd: string;
|
package/package.json
CHANGED