@indigoai-us/hq-cli 5.12.5 → 5.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [5.13.1] — 2026-05-14
6
+
7
+ ### Fixed
8
+
9
+ - **Republish hq-cli alongside `@indigoai-us/hq-cloud@5.16.0` to ship the
10
+ `computePersonalVaultPaths` helper.** `5.13.0` imported the new helper
11
+ from hq-cloud, but the publish workflow's idempotent skip-if-already-on-npm
12
+ gate suppressed the hq-cloud republish (its `package.json` still said
13
+ 5.15.0). The runtime resolution of `^5.1.0` then pulled the older
14
+ hq-cloud, and every `hq` invocation crashed with `SyntaxError: ... does
15
+ not provide an export named 'computePersonalVaultPaths'`. 5.13.1 carries
16
+ no source delta; it bumps the version so the workflow republishes and
17
+ forces hq-cloud@5.16.0 to ship alongside.
18
+
19
+ ## [5.13.0] — 2026-05-14
20
+
21
+ ### Added
22
+
23
+ - **`hq sync now` — bidirectional sync command.** Mirrors the AppBar HQ Sync
24
+ "Sync Now" button: pushes local changes to the target vault, then pulls
25
+ remote updates. Push runs first so the subsequent pull doesn't redownload
26
+ files that were about to be broadcast (matches `hq-sync-runner` ordering).
27
+ Supports `--company <slug>`, `--personal`, `--all`, `--message <msg>`,
28
+ `--on-conflict <strategy>`, and `--hq-root <path>`. The `--all` form
29
+ composes `pushAll` then `pullAll`, fanning out across every membership and
30
+ the canonical personal vault in a single invocation.
31
+
32
+ - **`--personal` flag on `hq sync pull`, `hq sync push`, and `hq sync now`.**
33
+ Targets the caller's canonical person-entity vault without needing the
34
+ person UID — resolves it from the cached Cognito session, then routes
35
+ through `personalMode` (no `companies/<slug>/` prefix) with `journalSlug:
36
+ "personal"` for idempotency-state parity with the Rust personal first-push.
37
+ For `push --personal` with no explicit `[paths]`, defaults to the same
38
+ top-level scope as `--all`'s personal slot (every top-level entry under
39
+ `<hq-root>` minus `.git`, `companies`, `repos`, `workspace`). Mutually
40
+ exclusive with `--all` and `--company`.
41
+
42
+ - **`--all` flag on `hq sync push`.** Symmetric with `pull --all`: pushes
43
+ every company you are a member of plus the canonical personal vault in
44
+ a single invocation. Company targets push `<hq-root>/companies/<slug>/`;
45
+ personal pushes the canonical personal-vault scope. Each leg uses the
46
+ menubar runner's bulk defaults (`skipUnchanged: true`,
47
+ `propagateDeletes: true`) so re-runs are cheap and on-disk deletes
48
+ propagate to the vault. Cannot be combined with explicit `[paths]` or
49
+ `--creds-from-stdin` — the fanout needs to vend per-target credentials.
50
+
51
+ ### Changed
52
+
53
+ - **Selector flags on `hq sync {pull,push,now}` are mutually exclusive.**
54
+ `--all`, `--personal`, and `--company` are now validated as a single
55
+ selector: at most one may be set per invocation; zero means "use the
56
+ active company from `.hq/config.json`". Conflicting combinations are
57
+ rejected with a clear error before any network calls.
58
+
59
+ ### Fixed
60
+
61
+ - **Swallow `EPIPE` on stdout/stderr to stop Sentry fatals.** When a
62
+ downstream consumer (`| head`, closed pager, broken shell pipe) shut the
63
+ read end of the CLI's stdout or stderr, Node raised `EPIPE` that Sentry
64
+ then captured as a fatal. Both streams now ignore `EPIPE` quietly so the
65
+ CLI exits cleanly when piped into truncating consumers, and the Sentry
66
+ dashboard stops filling up with non-actionable pipe errors.
67
+
3
68
  ## [5.12.4] — 2026-05-12
4
69
 
5
70
  ### Changed
@@ -58,6 +58,50 @@ export interface PullAllRow {
58
58
  result?: SyncCallResult;
59
59
  error?: string;
60
60
  }
61
+ export interface ShareCallOptions {
62
+ company: string;
63
+ hqRoot: string;
64
+ paths: string[];
65
+ onConflict?: ConflictStrategy;
66
+ personalMode?: boolean;
67
+ journalSlug?: string;
68
+ message?: string;
69
+ skipUnchanged?: boolean;
70
+ propagateDeletes?: boolean;
71
+ }
72
+ export interface ShareCallResult {
73
+ filesUploaded: number;
74
+ bytesUploaded: number;
75
+ filesSkipped: number;
76
+ filesDeleted: number;
77
+ conflictPaths: string[];
78
+ aborted: boolean;
79
+ }
80
+ export interface PushAllDeps {
81
+ vaultClient: PullAllVaultClient;
82
+ share: (options: ShareCallOptions) => Promise<ShareCallResult>;
83
+ }
84
+ export interface PushAllOptions {
85
+ hqRoot: string;
86
+ onConflict?: ConflictStrategy;
87
+ message?: string;
88
+ }
89
+ export interface PushAllRow {
90
+ slug: string;
91
+ result?: ShareCallResult;
92
+ error?: string;
93
+ }
94
+ export interface PushAllResult {
95
+ attempted: number;
96
+ filesUploaded: number;
97
+ bytesUploaded: number;
98
+ filesDeleted: number;
99
+ errors: Array<{
100
+ company: string;
101
+ message: string;
102
+ }>;
103
+ perCompany: PushAllRow[];
104
+ }
61
105
  export interface PullAllResult {
62
106
  attempted: number;
63
107
  filesDownloaded: number;
@@ -70,5 +114,29 @@ export interface PullAllResult {
70
114
  perCompany: PullAllRow[];
71
115
  }
72
116
  export declare function pullAll(options: PullAllOptions, deps: PullAllDeps): Promise<PullAllResult>;
117
+ /**
118
+ * Drives `hq sync push --all`: same membership + canonical-person fanout as
119
+ * pullAll, but each leg calls share() with the runner's bulk defaults
120
+ * (skipUnchanged: true, propagateDeletes: true). Pure function with injected
121
+ * deps so tests can drive it without network or filesystem.
122
+ */
123
+ export declare function pushAll(options: PushAllOptions, deps: PushAllDeps): Promise<PushAllResult>;
124
+ /**
125
+ * Resolve the canonical person entity UID for the logged-in user. Used by
126
+ * `hq sync {push,pull,now} --personal` to target the personal vault without
127
+ * the caller needing to know the UID. Throws a clean error if the user has
128
+ * no person entity (typically means they haven't run `hq onboard`).
129
+ */
130
+ export declare function resolveCanonicalPersonUid(vaultClient: PullAllVaultClient): Promise<string>;
131
+ /**
132
+ * Refuse ambiguous selector combinations. `--all`, `--personal`, and
133
+ * `--company` are mutually exclusive — at most one may be set per
134
+ * invocation; zero means "use the active company from .hq/config.json".
135
+ */
136
+ export declare function assertSingleSelector(opts: {
137
+ all?: boolean;
138
+ personal?: boolean;
139
+ company?: string;
140
+ }, command: string): void;
73
141
  export declare function registerCloudCommands(program: Command): void;
74
142
  //# sourceMappingURL=cloud.d.ts.map