@wrongstack/core 0.265.1 → 0.268.0

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.
Files changed (75) hide show
  1. package/dist/{agent-bridge-DrkBxszZ.d.ts → agent-bridge-UhojbpWx.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DM2pP-B6.d.ts → agent-subagent-runner-Bvtf1o9K.d.ts} +25 -7
  3. package/dist/{brain-BXd_61kQ.d.ts → brain-69wzMKp1.d.ts} +73 -1
  4. package/dist/{compactor-B8pOf45Y.d.ts → compactor-CBQAJoDc.d.ts} +19 -1
  5. package/dist/{config-BMCj_XDs.d.ts → config-VKfOZ-6X.d.ts} +122 -3
  6. package/dist/{context-MRk5PhNv.d.ts → context-C0U8B9NF.d.ts} +88 -1
  7. package/dist/coordination/index.d.ts +57 -161
  8. package/dist/coordination/index.js +471 -177
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +26 -25
  11. package/dist/defaults/index.js +1818 -844
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/execution/index.d.ts +72 -16
  14. package/dist/execution/index.js +1270 -265
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/execution/prompt-enhancer.d.ts +1 -1
  17. package/dist/extension/index.d.ts +7 -6
  18. package/dist/global-mailbox-KByEFFBa.d.ts +663 -0
  19. package/dist/{goal-preamble-DvHDSKSe.d.ts → goal-preamble-CrYjmdw4.d.ts} +28 -11
  20. package/dist/{goal-store-DtLMySNb.d.ts → goal-store-Y_zdLZ3q.d.ts} +1 -1
  21. package/dist/hq/index.d.ts +195 -0
  22. package/dist/hq/index.js +1884 -0
  23. package/dist/hq/index.js.map +1 -0
  24. package/dist/index-BfaS-f_m.d.ts +82 -0
  25. package/dist/{index-B-ch8K9C.d.ts → index-CtQnmkaS.d.ts} +8 -8
  26. package/dist/{index-CEDeNodM.d.ts → index-gCv830d7.d.ts} +5 -5
  27. package/dist/index.d.ts +124 -47
  28. package/dist/index.js +5600 -2662
  29. package/dist/index.js.map +1 -1
  30. package/dist/infrastructure/index.d.ts +6 -6
  31. package/dist/infrastructure/index.js +117 -19
  32. package/dist/infrastructure/index.js.map +1 -1
  33. package/dist/kernel/index.d.ts +10 -9
  34. package/dist/kernel/index.js.map +1 -1
  35. package/dist/{pipeline-DPDxH_7m.d.ts → mailbox-types-Ct2hJq0P.d.ts} +1 -244
  36. package/dist/{mcp-servers-2x4w6Jn9.d.ts → mcp-servers-HT3Fi7Bl.d.ts} +10 -4
  37. package/dist/models/index.d.ts +5 -5
  38. package/dist/models/index.js +33 -3
  39. package/dist/models/index.js.map +1 -1
  40. package/dist/{models-registry-DmJlKuNp.d.ts → models-registry-Bvcl3Vaa.d.ts} +1 -1
  41. package/dist/{multi-agent-coordinator-DyCkCZnU.d.ts → multi-agent-coordinator-BACjsmkC.d.ts} +1 -1
  42. package/dist/{null-fleet-bus-CG9QY2aP.d.ts → null-fleet-bus-DA7fvhUg.d.ts} +14 -9
  43. package/dist/observability/index.d.ts +2 -2
  44. package/dist/{parallel-eternal-engine-Jw9uhEoT.d.ts → parallel-eternal-engine-Ci71gYu_.d.ts} +11 -15
  45. package/dist/{path-resolver-Dy2ej-gE.d.ts → path-resolver-O1IJnmKE.d.ts} +4 -3
  46. package/dist/{permission-B9SB45lp.d.ts → permission-Bd-57Lbl.d.ts} +1 -1
  47. package/dist/{permission-policy-CkjSXabK.d.ts → permission-policy-uNXC6Kge.d.ts} +2 -3
  48. package/dist/pipeline-BDNvENyV.d.ts +245 -0
  49. package/dist/{plan-templates-CzD9GnAU.d.ts → plan-templates-EMsalEtN.d.ts} +5 -5
  50. package/dist/{llm-selector-C0tfTCUe.d.ts → provider-model-resolve-CEb9x886.d.ts} +40 -3
  51. package/dist/{provider-runner-DMa70ODu.d.ts → provider-runner-DWJbpo70.d.ts} +3 -3
  52. package/dist/{retry-policy-CN0khdlj.d.ts → retry-policy-C3s_lvdK.d.ts} +1 -1
  53. package/dist/sdd/index.d.ts +9 -8
  54. package/dist/sdd/index.js +44 -14
  55. package/dist/sdd/index.js.map +1 -1
  56. package/dist/{secret-vault-B2yw84VT.d.ts → secret-vault-Cgduf5xL.d.ts} +2 -2
  57. package/dist/security/index.d.ts +5 -67
  58. package/dist/security/index.js +129 -99
  59. package/dist/security/index.js.map +1 -1
  60. package/dist/{selector-CzHh_igB.d.ts → selector-47LBnBVk.d.ts} +1 -1
  61. package/dist/{session-event-bridge-BUI6Jf-4.d.ts → session-event-bridge-Cw7oqmW2.d.ts} +1 -1
  62. package/dist/{session-reader-CMgdMSRP.d.ts → session-reader-DD4v2Obw.d.ts} +1 -1
  63. package/dist/storage/index.d.ts +14 -12
  64. package/dist/storage/index.js +144 -120
  65. package/dist/storage/index.js.map +1 -1
  66. package/dist/tools/index.d.ts +4 -2
  67. package/dist/tools/index.js +166 -31
  68. package/dist/tools/index.js.map +1 -1
  69. package/dist/types/index.d.ts +20 -19
  70. package/dist/types/index.js +1358 -476
  71. package/dist/types/index.js.map +1 -1
  72. package/dist/utils/index.d.ts +472 -405
  73. package/dist/utils/index.js +2321 -1193
  74. package/dist/utils/index.js.map +1 -1
  75. package/package.json +5 -1
@@ -1,14 +1,14 @@
1
1
  import { S as SkillLoader, a as SkillManifest, b as SkillEntry } from './skill-DGIXCtdv.js';
2
2
  import { W as WstackPaths } from './wstack-paths-hOpNLmvf.js';
3
- import { P as Provider, C as Context } from './context-MRk5PhNv.js';
4
- import { C as Compactor, a as CompactReport } from './compactor-B8pOf45Y.js';
5
- import { M as MessageSelector } from './selector-CzHh_igB.js';
6
- import { E as EventBus } from './brain-BXd_61kQ.js';
7
- import { M as MiddlewareHandler } from './pipeline-DPDxH_7m.js';
8
- import { S as SessionEventBridge } from './session-event-bridge-BUI6Jf-4.js';
9
- import { C as ContextWindowAggressiveOn, g as ContextWindowPolicy } from './config-BMCj_XDs.js';
10
- import { g as Agent, D as DoneCondition } from './agent-subagent-runner-DM2pP-B6.js';
11
- import { R as RunResult, S as SystemPromptContributor } from './index-CEDeNodM.js';
3
+ import { P as Provider, C as Context } from './context-C0U8B9NF.js';
4
+ import { C as Compactor, a as CompactReport } from './compactor-CBQAJoDc.js';
5
+ import { M as MessageSelector } from './selector-47LBnBVk.js';
6
+ import { E as EventBus } from './brain-69wzMKp1.js';
7
+ import { M as MiddlewareHandler } from './pipeline-BDNvENyV.js';
8
+ import { S as SessionEventBridge } from './session-event-bridge-Cw7oqmW2.js';
9
+ import { C as ContextWindowAggressiveOn, h as ContextWindowPolicy } from './config-VKfOZ-6X.js';
10
+ import { g as Agent, D as DoneCondition } from './agent-subagent-runner-Bvtf1o9K.js';
11
+ import { R as RunResult, S as SystemPromptContributor } from './index-gCv830d7.js';
12
12
 
13
13
  interface SkillLoaderOptions {
14
14
  paths: WstackPaths;
@@ -178,8 +178,15 @@ declare class SelectiveCompactor implements Compactor {
178
178
  private computeTargetBudget;
179
179
  private eliseOldToolResults;
180
180
  private hasTextContent;
181
+ /**
182
+ * Estimate message-array tokens via the shared `estimateMessages` primitive
183
+ * so SelectiveCompactor's before/after/load figures agree with the
184
+ * middleware threshold math and the other compactors. Previously this used a
185
+ * private `ceil(len/3.5)` walk that diverged from the calibrated shared
186
+ * estimator, causing the selective `load`/`targetBudget` comparison to mix
187
+ * two incompatible token scales.
188
+ */
181
189
  private estimateTokens;
182
- private roughTokenEstimate;
183
190
  }
184
191
 
185
192
  type CompactorStrategy = 'hybrid' | 'intelligent' | 'selective';
@@ -224,6 +231,16 @@ interface StrategyCompactorOptions {
224
231
  */
225
232
  declare function createStrategyCompactor(opts?: StrategyCompactorOptions): Compactor;
226
233
 
234
+ interface ContextWindowBudgetSnapshot {
235
+ maxContext: number;
236
+ inputTokens: number;
237
+ availableInputTokens: number;
238
+ remainingInputTokens: number;
239
+ reservedOutputTokens: number;
240
+ reservedSafetyTokens: number;
241
+ load: number;
242
+ overflowTokens: number;
243
+ }
227
244
  type CompactionFailureMode = 'throw' | 'throw_on_hard' | 'continue';
228
245
  interface AutoCompactionOptions {
229
246
  aggressiveOn?: ContextWindowAggressiveOn | undefined;
@@ -451,4 +468,4 @@ declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOp
451
468
  */
452
469
  declare function buildGoalPreamble(goal: string, deliverables?: string[]): string;
453
470
 
454
- export { AutoCompactionMiddleware as A, type CompactorStrategy as C, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, type StrategyCompactorOptions as i, buildGoalPreamble as j, createStrategyCompactor as k, makeAutonomyPromptContributor as m };
471
+ export { AutoCompactionMiddleware as A, type CompactorStrategy as C, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, type StrategyCompactorOptions as i, buildGoalPreamble as j, createStrategyCompactor as k, type ContextWindowBudgetSnapshot as l, makeAutonomyPromptContributor as m };
@@ -1,4 +1,4 @@
1
- import { E as EventBus } from './brain-BXd_61kQ.js';
1
+ import { E as EventBus } from './brain-69wzMKp1.js';
2
2
 
3
3
  /**
4
4
  * Long-running autonomous mission. A goal survives across sessions and
@@ -0,0 +1,195 @@
1
+ import { W as HqRedactionPolicy, p as HqEventEnvelope, R as HqPublisher, l as HqClientIdentity, a2 as HqSocketFactory, G as GlobalMailbox } from '../global-mailbox-KByEFFBa.js';
2
+ export { D as DEFAULT_HQ_REDACTION_POLICY, H as HQ_PROTOCOL_VERSION, a as HqAlertMessage, b as HqBrowserEventMessage, c as HqBrowserMessage, d as HqBrowserSnapshotMessage, e as HqClientCapability, f as HqClientCommandAckMessage, g as HqClientCommandPollMessage, h as HqClientEventMessage, i as HqClientHeartbeatPayload, j as HqClientHelloMessage, k as HqClientHelloPayload, m as HqClientKind, n as HqClientMessage, o as HqClientRecord, q as HqEventPayloadResult, r as HqEventType, s as HqFleetEventPayload, t as HqFleetSnapshotPayload, u as HqFleetSummary, v as HqGitSnapshotPayload, w as HqMailboxAgentStatus, x as HqMailboxAgentSummary, y as HqMailboxEventAction, z as HqMailboxEventPayload, A as HqMailboxMappingOptions, B as HqMailboxMessageSummary, C as HqMailboxMessageType, E as HqMailboxPriority, F as HqMailboxSnapshotOptions, I as HqMailboxSnapshotPayload, J as HqMailboxSummary, K as HqParseResult, L as HqPathPolicy, M as HqProjectIdentity, N as HqProjectRecord, O as HqProjectStatus, P as HqProtocolVersion, Q as HqPublishEventOptions, S as HqPublisherCommandHandler, T as HqPublisherCommandResult, U as HqPublisherOptions, V as HqQueuedCommand, X as HqServerCommandBatchMessage, Y as HqServerMessage, Z as HqSessionStartedPayload, _ as HqSessionStatus, $ as HqSessionStatusPayload, a0 as HqSessionSummary, a1 as HqSnapshot, a3 as HqSocketLike, a4 as HqSubagentSummary, a5 as HqToolArgsPolicy, a6 as HqToolCompletedPayload, a7 as HqToolStartedPayload, a8 as HqUsagePayload, a9 as HqWelcomePayload, aa as HqWorklistCounts, ab as HqWorklistSnapshotPayload, ac as HqWorkspaceKind, ad as createHqEventEnvelope, ae as createMailboxEventPayload, af as createMailboxSnapshotPayload, ag as createMailboxSnapshotPayloadFromMailbox, ah as mapMailboxAgentToHqSummary, ai as mapMailboxMessageToHqSummary, aj as parseHqEventPayload, ak as parseHqFrame } from '../global-mailbox-KByEFFBa.js';
3
+ import { E as EventBus } from '../brain-69wzMKp1.js';
4
+ import { w as HqClientConfig } from '../config-VKfOZ-6X.js';
5
+ import '../mailbox-types-Ct2hJq0P.js';
6
+ import '../context-C0U8B9NF.js';
7
+
8
+ interface HqRedactOptions {
9
+ policy?: Partial<HqRedactionPolicy>;
10
+ projectRoot?: string;
11
+ maxSummaryLength?: number;
12
+ }
13
+ interface HqRedactionResult<T> {
14
+ value: T;
15
+ redacted: boolean;
16
+ }
17
+ /**
18
+ * Scrub a free-text preview field and truncate it to a maximum length so
19
+ * it is safe to embed in HQ event envelopes and broadcast to browsers
20
+ * without leaking secrets or running away on unbounded input.
21
+ *
22
+ * Returns `undefined` when the input is empty or non-string. Truncation
23
+ * suffix is `"…[truncated:N]"` where N is the number of dropped chars.
24
+ */
25
+ declare function scrubAndTruncateHqPreview(value: unknown, maxLength?: number): string | undefined;
26
+ declare function redactHqValue<T>(value: T, options?: HqRedactOptions): HqRedactionResult<T>;
27
+ declare function redactHqEvent<TPayload>(event: HqEventEnvelope<TPayload>, options?: HqRedactOptions): HqRedactionResult<HqEventEnvelope<TPayload>>;
28
+ declare function summarizeHqToolArgs(value: unknown, options?: HqRedactOptions): unknown;
29
+
30
+ interface HqPublisherEnvConfig {
31
+ url: string;
32
+ token?: string;
33
+ enabled?: boolean;
34
+ rawContent?: boolean;
35
+ projectAlias?: string;
36
+ }
37
+ declare function resolveHqConfigFromEnv(env?: NodeJS.ProcessEnv): HqPublisherEnvConfig | undefined;
38
+ declare function resolveHqConfig(options?: {
39
+ env?: NodeJS.ProcessEnv | undefined;
40
+ config?: HqClientConfig | undefined;
41
+ }): HqPublisherEnvConfig | undefined;
42
+ interface CreateHqPublisherOptions {
43
+ clientKind: HqClientIdentity['kind'];
44
+ projectRoot: string;
45
+ projectName?: string;
46
+ machineId?: string;
47
+ hostnameOverride?: string;
48
+ socketFactory?: HqSocketFactory;
49
+ config?: HqPublisherEnvConfig;
50
+ appConfig?: {
51
+ hq?: HqClientConfig | undefined;
52
+ } | undefined;
53
+ redactionPolicy?: Partial<HqRedactionPolicy>;
54
+ }
55
+ declare function createHqPublisherFromEnv(options: CreateHqPublisherOptions): HqPublisher | undefined;
56
+ interface CreateGlobalMailboxOptions {
57
+ projectDir: string;
58
+ events?: EventBus;
59
+ hqPublisher?: HqPublisher;
60
+ }
61
+ declare function createGlobalMailbox(options: CreateGlobalMailboxOptions): GlobalMailbox;
62
+
63
+ /** Current auth-file schema version. Bump on breaking shape changes. */
64
+ declare const HQ_AUTH_FILE_VERSION: 1;
65
+ /** Default HQ data directory: `~/.wrongstack/hq` (honors WRONGSTACK_HOME). */
66
+ declare function defaultHqDataDir(): string;
67
+ /**
68
+ * Resolve an HQ data directory from an optional override.
69
+ *
70
+ * Resolution order:
71
+ * 1. Explicit `override` (from `--data-dir`) — resolved against
72
+ * `process.cwd()` if relative.
73
+ * 2. `WRONGSTACK_HQ_DATA_DIR` env var (same resolution rules).
74
+ * 3. `defaultHqDataDir()` — `~/.wrongstack/hq`.
75
+ *
76
+ * The env var exists so tests (and sandboxed runs) can redirect HQ state
77
+ * away from the real user home without threading a CLI flag everywhere.
78
+ */
79
+ declare function resolveHqDataDir(override?: string, env?: NodeJS.ProcessEnv): string;
80
+ /**
81
+ * A generic HQ-issued token. Used for both browser tokens (validated on
82
+ * `/ws/browser`) and client tokens (validated on `/ws/client`). The two
83
+ * are stored in separate lists so a browser-only token cannot be replayed
84
+ * against the client channel and vice versa.
85
+ */
86
+ interface HqToken {
87
+ id: string;
88
+ token: string;
89
+ label?: string;
90
+ createdAt: string;
91
+ lastUsedAt?: string;
92
+ }
93
+ /**
94
+ * Alias kept for backward-compat with Phase 3 callers/tests. New code
95
+ * should prefer `HqToken`.
96
+ */
97
+ type HqBrowserToken = HqToken;
98
+ /** On-disk shape of `<dataDir>/auth.json`. */
99
+ interface HqAuthFile {
100
+ version: typeof HQ_AUTH_FILE_VERSION;
101
+ updatedAt: string;
102
+ /**
103
+ * Operator-configured redaction policy override. When present, the HQ
104
+ * server applies these settings AFTER any publisher-declared policy —
105
+ * i.e. the operator can always tighten, never loosen.
106
+ */
107
+ redactionPolicy?: Partial<HqRedactionPolicy>;
108
+ /** Browser tokens — validated on `/ws/browser` upgrades (Phase 3). */
109
+ browserTokens?: HqToken[];
110
+ /** Client tokens — validated on `/ws/client` upgrades (Phase 4). */
111
+ clientTokens?: HqToken[];
112
+ }
113
+ /** An empty auth file — what a brand-new HQ install starts with. */
114
+ declare function emptyHqAuthFile(): HqAuthFile;
115
+ /** Path to `auth.json` under the given data directory. */
116
+ declare function hqAuthFilePath(dataDir: string): string;
117
+ /**
118
+ * Read `auth.json` from disk. Returns `emptyHqAuthFile()` when:
119
+ * - the file does not exist (ENOENT), or
120
+ * - the file cannot be parsed (the `warn` callback surfaces the error).
121
+ *
122
+ * Never throws for routine I/O — a missing or corrupt auth file should not
123
+ * prevent the HQ server from starting. The operator can recover by editing
124
+ * or deleting the file.
125
+ */
126
+ declare function readHqAuthFile(dataDir: string, opts?: {
127
+ warn?: (msg: string) => void;
128
+ }): Promise<HqAuthFile>;
129
+ /**
130
+ * Write `auth.json` atomically with mode 0o600. Creates the data directory
131
+ * if needed. Throws on I/O failure — callers (CLI commands) should surface
132
+ * the error to the operator.
133
+ */
134
+ declare function writeHqAuthFile(dataDir: string, file: HqAuthFile): Promise<void>;
135
+ interface EnsureHqFirstRunAuthResult {
136
+ authFile: HqAuthFile;
137
+ created: boolean;
138
+ browserToken?: HqToken;
139
+ clientToken?: HqToken;
140
+ }
141
+ /**
142
+ * Ensure a brand-new HQ data directory has the auth required for safe
143
+ * first-run operation. Only a missing auth.json is bootstrapped; an existing
144
+ * file, including one with empty token arrays, is treated as operator intent.
145
+ */
146
+ declare function ensureHqFirstRunAuthFile(dataDir: string, opts?: {
147
+ warn?: (msg: string) => void;
148
+ }): Promise<EnsureHqFirstRunAuthResult>;
149
+ /**
150
+ * Load → mutate → write. The mutator receives the current file (or an empty
151
+ * one) and returns the next file. Use this for any read-modify-write cycle
152
+ * to avoid clobbering concurrent edits from another CLI invocation.
153
+ *
154
+ * Note: this does NOT take a file lock. HQ auth edits are rare (operator
155
+ * running `wstack --hq-token add` etc.) and the atomic rename protects
156
+ * against torn writes; a race between two concurrent edits would be
157
+ * last-write-wins, which is acceptable for this low-frequency file.
158
+ */
159
+ declare function mutateHqAuthFile(dataDir: string, mutator: (current: HqAuthFile) => HqAuthFile | Promise<HqAuthFile>, opts?: {
160
+ warn?: (msg: string) => void;
161
+ }): Promise<HqAuthFile>;
162
+ /**
163
+ * Mint a fresh token. Used for both browser and client tokens; the caller
164
+ * decides which list to append to.
165
+ */
166
+ declare function mintHqToken(label?: string): HqToken;
167
+ /**
168
+ * Backward-compat alias for `mintHqToken`. Phase 3 callers/tests use this.
169
+ */
170
+ declare const mintHqBrowserToken: typeof mintHqToken;
171
+ /**
172
+ * Watch `auth.json` for changes and invoke `onChange` with the freshly-read
173
+ * file. Returns a `close()` function that stops watching.
174
+ *
175
+ * The watcher debounces events (default 200ms) because most editors do a
176
+ * tmp+rename dance that emits multiple events. On any read failure (file
177
+ * deleted, corrupt, etc.) the `warn` callback is invoked with the same
178
+ * semantics as `readHqAuthFile`; the watcher stays active so a future
179
+ * valid write re-triggers the callback.
180
+ *
181
+ * Notes:
182
+ * - `fs.watch` is best-effort across platforms. On some network
183
+ * filesystems events may not fire; the operator must restart the server
184
+ * to pick up changes in that case.
185
+ * - The watcher polls the parent directory (not the file itself) so that
186
+ * atomic rename events surface reliably.
187
+ */
188
+ declare function watchHqAuthFile(dataDir: string, onChange: (file: HqAuthFile) => void, opts?: {
189
+ warn?: (msg: string) => void;
190
+ debounceMs?: number;
191
+ }): {
192
+ close: () => void;
193
+ };
194
+
195
+ export { type CreateGlobalMailboxOptions, type CreateHqPublisherOptions, type EnsureHqFirstRunAuthResult, HQ_AUTH_FILE_VERSION, type HqAuthFile, type HqBrowserToken, HqClientIdentity, HqEventEnvelope, HqPublisher, type HqPublisherEnvConfig, type HqRedactOptions, HqRedactionPolicy, type HqRedactionResult, HqSocketFactory, type HqToken, createGlobalMailbox, createHqPublisherFromEnv, defaultHqDataDir, emptyHqAuthFile, ensureHqFirstRunAuthFile, hqAuthFilePath, mintHqBrowserToken, mintHqToken, mutateHqAuthFile, readHqAuthFile, redactHqEvent, redactHqValue, resolveHqConfig, resolveHqConfigFromEnv, resolveHqDataDir, scrubAndTruncateHqPreview, summarizeHqToolArgs, watchHqAuthFile, writeHqAuthFile };