@indigoai-us/hq-cli 5.111.2 → 5.112.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.
- package/CHANGELOG.md +22 -0
- package/dist/bin/hq-auth-refresh.d.ts +2 -0
- package/dist/bin/hq-auth-refresh.js +12 -6
- package/dist/command-catalog.generated.d.ts +6399 -0
- package/dist/command-catalog.generated.js +8275 -0
- package/dist/command-registration-plan.d.ts +394 -0
- package/dist/command-registration-plan.js +103 -0
- package/dist/commands/core.js +18 -0
- package/dist/lazy-commands.d.ts +20 -44
- package/dist/lazy-commands.js +57 -58
- package/dist/lib/core-utils/sentry-report.d.ts +76 -0
- package/dist/lib/core-utils/sentry-report.js +255 -0
- package/dist/main.d.ts +6 -0
- package/dist/main.js +87 -29
- package/dist/register-all.d.ts +4 -29
- package/dist/register-all.js +4 -235
- package/dist/sentry.d.ts +8 -2
- package/dist/sentry.js +17 -1
- package/dist/utils/cli-telemetry.d.ts +2 -1
- package/dist/utils/cli-telemetry.js +5 -5
- package/dist/utils/contribution-table.d.ts +1 -1
- package/dist/utils/version-check.d.ts +4 -1
- package/dist/utils/version-check.js +2 -2
- package/dist/utils/version-gate.d.ts +5 -1
- package/dist/utils/version-gate.js +4 -4
- package/package.json +3 -2
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* The one authoritative registration plan for eager validation and lazy
|
|
4
|
+
* invocation. Multi-module roots keep the old registration order here.
|
|
5
|
+
*/
|
|
6
|
+
export declare const REGISTRATION_PLAN: readonly [{
|
|
7
|
+
readonly type: "group";
|
|
8
|
+
readonly root: "modules";
|
|
9
|
+
readonly id: "modules";
|
|
10
|
+
readonly name: "modules";
|
|
11
|
+
readonly description: "Module management commands";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "registrar";
|
|
14
|
+
readonly root: "modules";
|
|
15
|
+
readonly parent: "modules";
|
|
16
|
+
readonly module: "./commands/add.js";
|
|
17
|
+
readonly exportName: "registerAddCommand";
|
|
18
|
+
}, {
|
|
19
|
+
readonly type: "registrar";
|
|
20
|
+
readonly root: "modules";
|
|
21
|
+
readonly parent: "modules";
|
|
22
|
+
readonly module: "./commands/sync.js";
|
|
23
|
+
readonly exportName: "registerSyncCommand";
|
|
24
|
+
}, {
|
|
25
|
+
readonly type: "registrar";
|
|
26
|
+
readonly root: "modules";
|
|
27
|
+
readonly parent: "modules";
|
|
28
|
+
readonly module: "./commands/list.js";
|
|
29
|
+
readonly exportName: "registerListCommand";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "registrar";
|
|
32
|
+
readonly root: "modules";
|
|
33
|
+
readonly parent: "modules";
|
|
34
|
+
readonly module: "./commands/update.js";
|
|
35
|
+
readonly exportName: "registerUpdateCommand";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "group";
|
|
38
|
+
readonly root: "packages";
|
|
39
|
+
readonly id: "packages";
|
|
40
|
+
readonly name: "packages";
|
|
41
|
+
readonly description: "Package management commands";
|
|
42
|
+
}, {
|
|
43
|
+
readonly type: "registrar";
|
|
44
|
+
readonly root: "packages";
|
|
45
|
+
readonly parent: "packages";
|
|
46
|
+
readonly module: "./commands/pkg-install.js";
|
|
47
|
+
readonly exportName: "registerPackageInstallCommand";
|
|
48
|
+
}, {
|
|
49
|
+
readonly type: "registrar";
|
|
50
|
+
readonly root: "packages";
|
|
51
|
+
readonly parent: "packages";
|
|
52
|
+
readonly module: "./commands/pkg-remove.js";
|
|
53
|
+
readonly exportName: "registerPackageRemoveCommand";
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "registrar";
|
|
56
|
+
readonly root: "packages";
|
|
57
|
+
readonly parent: "packages";
|
|
58
|
+
readonly module: "./commands/pkg-update.js";
|
|
59
|
+
readonly exportName: "registerPackageUpdateCommand";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "registrar";
|
|
62
|
+
readonly root: "packages";
|
|
63
|
+
readonly parent: "packages";
|
|
64
|
+
readonly module: "./commands/pkg-list.js";
|
|
65
|
+
readonly exportName: "registerPackageListCommand";
|
|
66
|
+
}, {
|
|
67
|
+
readonly type: "registrar";
|
|
68
|
+
readonly root: "packages";
|
|
69
|
+
readonly parent: "packages";
|
|
70
|
+
readonly module: "./commands/packs.js";
|
|
71
|
+
readonly exportName: "registerPacksCommand";
|
|
72
|
+
}, {
|
|
73
|
+
readonly type: "registrar";
|
|
74
|
+
readonly root: "packs";
|
|
75
|
+
readonly parent: "program";
|
|
76
|
+
readonly module: "./commands/packs.js";
|
|
77
|
+
readonly exportName: "registerPacksCommand";
|
|
78
|
+
}, {
|
|
79
|
+
readonly type: "registrar";
|
|
80
|
+
readonly root: "install";
|
|
81
|
+
readonly parent: "program";
|
|
82
|
+
readonly module: "./commands/pkg-install.js";
|
|
83
|
+
readonly exportName: "registerPackageInstallCommand";
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "registrar";
|
|
86
|
+
readonly root: "remove";
|
|
87
|
+
readonly parent: "program";
|
|
88
|
+
readonly module: "./commands/pkg-remove.js";
|
|
89
|
+
readonly exportName: "registerPackageRemoveCommand";
|
|
90
|
+
}, {
|
|
91
|
+
readonly type: "registrar";
|
|
92
|
+
readonly root: "publish";
|
|
93
|
+
readonly parent: "program";
|
|
94
|
+
readonly module: "./commands/publish.js";
|
|
95
|
+
readonly exportName: "registerPublishCommand";
|
|
96
|
+
}, {
|
|
97
|
+
readonly type: "registrar";
|
|
98
|
+
readonly root: "creators";
|
|
99
|
+
readonly parent: "program";
|
|
100
|
+
readonly module: "./commands/creators.js";
|
|
101
|
+
readonly exportName: "registerCreatorsCommand";
|
|
102
|
+
}, {
|
|
103
|
+
readonly type: "group";
|
|
104
|
+
readonly root: "sync";
|
|
105
|
+
readonly id: "sync";
|
|
106
|
+
readonly name: "sync";
|
|
107
|
+
readonly description: "Cloud sync commands — sync HQ to S3 for mobile access";
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "registrar";
|
|
110
|
+
readonly root: "sync";
|
|
111
|
+
readonly parent: "sync";
|
|
112
|
+
readonly module: "./commands/cloud.js";
|
|
113
|
+
readonly exportName: "registerCloudCommands";
|
|
114
|
+
}, {
|
|
115
|
+
readonly type: "registrar";
|
|
116
|
+
readonly root: "sync";
|
|
117
|
+
readonly parent: "sync";
|
|
118
|
+
readonly module: "./commands/sync-mode.js";
|
|
119
|
+
readonly exportName: "registerSyncModeCommand";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "registrar";
|
|
122
|
+
readonly root: "sync";
|
|
123
|
+
readonly parent: "sync";
|
|
124
|
+
readonly module: "./commands/sync-narrow.js";
|
|
125
|
+
readonly exportName: "registerSyncNarrowCommand";
|
|
126
|
+
}, {
|
|
127
|
+
readonly type: "registrar";
|
|
128
|
+
readonly root: "sync";
|
|
129
|
+
readonly parent: "sync";
|
|
130
|
+
readonly module: "./commands/sync-manifest.js";
|
|
131
|
+
readonly exportName: "registerSyncManifestCommand";
|
|
132
|
+
}, {
|
|
133
|
+
readonly type: "group";
|
|
134
|
+
readonly root: "cloud";
|
|
135
|
+
readonly id: "cloud";
|
|
136
|
+
readonly name: "cloud";
|
|
137
|
+
readonly description: "Cloud commands — provision entities and manage cloud-backed companies";
|
|
138
|
+
}, {
|
|
139
|
+
readonly type: "registrar";
|
|
140
|
+
readonly root: "cloud";
|
|
141
|
+
readonly parent: "cloud";
|
|
142
|
+
readonly module: "./commands/cloud-provision.js";
|
|
143
|
+
readonly exportName: "registerCloudProvisionCommands";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "registrar";
|
|
146
|
+
readonly root: "cloud";
|
|
147
|
+
readonly parent: "cloud";
|
|
148
|
+
readonly module: "./commands/cloud-demote.js";
|
|
149
|
+
readonly exportName: "registerCloudDemoteCommands";
|
|
150
|
+
}, {
|
|
151
|
+
readonly type: "registrar";
|
|
152
|
+
readonly root: "team-sync";
|
|
153
|
+
readonly parent: "program";
|
|
154
|
+
readonly module: "./commands/team-sync.js";
|
|
155
|
+
readonly exportName: "registerTeamSyncCommand";
|
|
156
|
+
}, {
|
|
157
|
+
readonly type: "registrar";
|
|
158
|
+
readonly root: "login";
|
|
159
|
+
readonly parent: "program";
|
|
160
|
+
readonly module: "./commands/login.js";
|
|
161
|
+
readonly exportName: "registerLoginCommand";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "registrar";
|
|
164
|
+
readonly root: "logout";
|
|
165
|
+
readonly parent: "program";
|
|
166
|
+
readonly module: "./commands/logout.js";
|
|
167
|
+
readonly exportName: "registerLogoutCommand";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "registrar";
|
|
170
|
+
readonly root: "whoami";
|
|
171
|
+
readonly parent: "program";
|
|
172
|
+
readonly module: "./commands/whoami.js";
|
|
173
|
+
readonly exportName: "registerWhoamiCommand";
|
|
174
|
+
}, {
|
|
175
|
+
readonly type: "registrar";
|
|
176
|
+
readonly root: "auth";
|
|
177
|
+
readonly parent: "program";
|
|
178
|
+
readonly module: "./commands/auth.js";
|
|
179
|
+
readonly exportName: "registerAuthCommands";
|
|
180
|
+
}, {
|
|
181
|
+
readonly type: "registrar";
|
|
182
|
+
readonly root: "secrets";
|
|
183
|
+
readonly parent: "program";
|
|
184
|
+
readonly module: "./commands/secrets.js";
|
|
185
|
+
readonly exportName: "registerSecretsCommand";
|
|
186
|
+
}, {
|
|
187
|
+
readonly type: "registrar";
|
|
188
|
+
readonly root: "db";
|
|
189
|
+
readonly parent: "program";
|
|
190
|
+
readonly module: "./commands/db.js";
|
|
191
|
+
readonly exportName: "registerDbCommand";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "registrar";
|
|
194
|
+
readonly root: "api-keys";
|
|
195
|
+
readonly parent: "program";
|
|
196
|
+
readonly module: "./commands/api-keys.js";
|
|
197
|
+
readonly exportName: "registerApiKeysCommand";
|
|
198
|
+
}, {
|
|
199
|
+
readonly type: "registrar";
|
|
200
|
+
readonly root: "run";
|
|
201
|
+
readonly parent: "program";
|
|
202
|
+
readonly module: "./commands/run.js";
|
|
203
|
+
readonly exportName: "registerRunCommand";
|
|
204
|
+
}, {
|
|
205
|
+
readonly type: "registrar";
|
|
206
|
+
readonly root: "groups";
|
|
207
|
+
readonly parent: "program";
|
|
208
|
+
readonly module: "./commands/groups.js";
|
|
209
|
+
readonly exportName: "registerGroupsCommand";
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "registrar";
|
|
212
|
+
readonly root: "workers";
|
|
213
|
+
readonly parent: "program";
|
|
214
|
+
readonly module: "./commands/workers.js";
|
|
215
|
+
readonly exportName: "registerWorkersCommand";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "registrar";
|
|
218
|
+
readonly root: "group-grants";
|
|
219
|
+
readonly parent: "program";
|
|
220
|
+
readonly module: "./commands/group-grants.js";
|
|
221
|
+
readonly exportName: "registerGroupGrantsCommand";
|
|
222
|
+
}, {
|
|
223
|
+
readonly type: "registrar";
|
|
224
|
+
readonly root: "files";
|
|
225
|
+
readonly parent: "program";
|
|
226
|
+
readonly module: "./commands/files.js";
|
|
227
|
+
readonly exportName: "registerFilesCommand";
|
|
228
|
+
readonly result: "files";
|
|
229
|
+
}, {
|
|
230
|
+
readonly type: "registrar";
|
|
231
|
+
readonly root: "files";
|
|
232
|
+
readonly parent: "files";
|
|
233
|
+
readonly module: "./commands/files-browse.js";
|
|
234
|
+
readonly exportName: "registerFilesBrowseCommands";
|
|
235
|
+
}, {
|
|
236
|
+
readonly type: "registrar";
|
|
237
|
+
readonly root: "access";
|
|
238
|
+
readonly parent: "program";
|
|
239
|
+
readonly module: "./commands/access.js";
|
|
240
|
+
readonly exportName: "registerAccessCommand";
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: "registrar";
|
|
243
|
+
readonly root: "skill";
|
|
244
|
+
readonly parent: "program";
|
|
245
|
+
readonly module: "./commands/skill.js";
|
|
246
|
+
readonly exportName: "registerSkillCommand";
|
|
247
|
+
}, {
|
|
248
|
+
readonly type: "registrar";
|
|
249
|
+
readonly root: "members";
|
|
250
|
+
readonly parent: "program";
|
|
251
|
+
readonly module: "./commands/members.js";
|
|
252
|
+
readonly exportName: "registerMembersCommand";
|
|
253
|
+
}, {
|
|
254
|
+
readonly type: "registrar";
|
|
255
|
+
readonly root: "people";
|
|
256
|
+
readonly parent: "program";
|
|
257
|
+
readonly module: "./commands/people.js";
|
|
258
|
+
readonly exportName: "registerPeopleCommand";
|
|
259
|
+
}, {
|
|
260
|
+
readonly type: "registrar";
|
|
261
|
+
readonly root: "dm";
|
|
262
|
+
readonly parent: "program";
|
|
263
|
+
readonly module: "./commands/dm.js";
|
|
264
|
+
readonly exportName: "registerDmCommand";
|
|
265
|
+
}, {
|
|
266
|
+
readonly type: "registrar";
|
|
267
|
+
readonly root: "channels";
|
|
268
|
+
readonly parent: "program";
|
|
269
|
+
readonly module: "./commands/channels.js";
|
|
270
|
+
readonly exportName: "registerChannelsCommand";
|
|
271
|
+
}, {
|
|
272
|
+
readonly type: "registrar";
|
|
273
|
+
readonly root: "onboard";
|
|
274
|
+
readonly parent: "program";
|
|
275
|
+
readonly module: "./commands/onboard.js";
|
|
276
|
+
readonly exportName: "registerOnboardCommand";
|
|
277
|
+
}, {
|
|
278
|
+
readonly type: "registrar";
|
|
279
|
+
readonly root: "feedback";
|
|
280
|
+
readonly parent: "program";
|
|
281
|
+
readonly module: "./commands/feedback.js";
|
|
282
|
+
readonly exportName: "registerFeedbackCommand";
|
|
283
|
+
}, {
|
|
284
|
+
readonly type: "registrar";
|
|
285
|
+
readonly root: "meetings";
|
|
286
|
+
readonly parent: "program";
|
|
287
|
+
readonly module: "./commands/meetings.js";
|
|
288
|
+
readonly exportName: "registerMeetingsCommand";
|
|
289
|
+
}, {
|
|
290
|
+
readonly type: "registrar";
|
|
291
|
+
readonly root: "sources";
|
|
292
|
+
readonly parent: "program";
|
|
293
|
+
readonly module: "./commands/sources.js";
|
|
294
|
+
readonly exportName: "registerSourcesCommand";
|
|
295
|
+
}, {
|
|
296
|
+
readonly type: "registrar";
|
|
297
|
+
readonly root: "signals";
|
|
298
|
+
readonly parent: "program";
|
|
299
|
+
readonly module: "./commands/signals.js";
|
|
300
|
+
readonly exportName: "registerSignalsCommand";
|
|
301
|
+
}, {
|
|
302
|
+
readonly type: "registrar";
|
|
303
|
+
readonly root: "integrations";
|
|
304
|
+
readonly parent: "program";
|
|
305
|
+
readonly module: "./commands/integrations.js";
|
|
306
|
+
readonly exportName: "registerIntegrationsCommand";
|
|
307
|
+
}, {
|
|
308
|
+
readonly type: "registrar";
|
|
309
|
+
readonly root: "reindex";
|
|
310
|
+
readonly parent: "program";
|
|
311
|
+
readonly module: "./commands/reindex.js";
|
|
312
|
+
readonly exportName: "registerReindexCommand";
|
|
313
|
+
}, {
|
|
314
|
+
readonly type: "registrar";
|
|
315
|
+
readonly root: "rescue";
|
|
316
|
+
readonly parent: "program";
|
|
317
|
+
readonly module: "./commands/rescue.js";
|
|
318
|
+
readonly exportName: "registerRescueCommand";
|
|
319
|
+
}, {
|
|
320
|
+
readonly type: "registrar";
|
|
321
|
+
readonly root: "mcp";
|
|
322
|
+
readonly parent: "program";
|
|
323
|
+
readonly module: "./commands/mcp-status.js";
|
|
324
|
+
readonly exportName: "registerMcpCommand";
|
|
325
|
+
}, {
|
|
326
|
+
readonly type: "registrar";
|
|
327
|
+
readonly root: "crm";
|
|
328
|
+
readonly parent: "program";
|
|
329
|
+
readonly module: "./commands/crm.js";
|
|
330
|
+
readonly exportName: "registerCrmCommand";
|
|
331
|
+
}, {
|
|
332
|
+
readonly type: "registrar";
|
|
333
|
+
readonly root: "company";
|
|
334
|
+
readonly parent: "program";
|
|
335
|
+
readonly module: "./commands/company.js";
|
|
336
|
+
readonly exportName: "registerCompanyCommand";
|
|
337
|
+
}, {
|
|
338
|
+
readonly type: "registrar";
|
|
339
|
+
readonly root: "agents";
|
|
340
|
+
readonly parent: "program";
|
|
341
|
+
readonly module: "./commands/agents.js";
|
|
342
|
+
readonly exportName: "registerAgentsCommand";
|
|
343
|
+
}, {
|
|
344
|
+
readonly type: "registrar";
|
|
345
|
+
readonly root: "outposts";
|
|
346
|
+
readonly parent: "program";
|
|
347
|
+
readonly module: "./commands/outposts.js";
|
|
348
|
+
readonly exportName: "registerOutpostsCommand";
|
|
349
|
+
}, {
|
|
350
|
+
readonly type: "registrar";
|
|
351
|
+
readonly root: "billing";
|
|
352
|
+
readonly parent: "program";
|
|
353
|
+
readonly module: "./commands/billing.js";
|
|
354
|
+
readonly exportName: "registerBillingCommand";
|
|
355
|
+
}, {
|
|
356
|
+
readonly type: "registrar";
|
|
357
|
+
readonly root: "core";
|
|
358
|
+
readonly parent: "program";
|
|
359
|
+
readonly module: "./commands/core.js";
|
|
360
|
+
readonly exportName: "registerCoreCommands";
|
|
361
|
+
}, {
|
|
362
|
+
readonly type: "registrar";
|
|
363
|
+
readonly root: "search";
|
|
364
|
+
readonly parent: "program";
|
|
365
|
+
readonly module: "./commands/search.js";
|
|
366
|
+
readonly exportName: "registerSearchCommand";
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "registrar";
|
|
369
|
+
readonly root: "index";
|
|
370
|
+
readonly parent: "program";
|
|
371
|
+
readonly module: "./commands/index-cmd.js";
|
|
372
|
+
readonly exportName: "registerIndexCommand";
|
|
373
|
+
}, {
|
|
374
|
+
readonly type: "registrar";
|
|
375
|
+
readonly root: "doctor";
|
|
376
|
+
readonly parent: "program";
|
|
377
|
+
readonly module: "./commands/doctor.js";
|
|
378
|
+
readonly exportName: "registerDoctorCommand";
|
|
379
|
+
}, {
|
|
380
|
+
readonly type: "registrar";
|
|
381
|
+
readonly root: "mesh";
|
|
382
|
+
readonly parent: "program";
|
|
383
|
+
readonly module: "./commands/mesh.js";
|
|
384
|
+
readonly exportName: "registerMeshCommand";
|
|
385
|
+
}, {
|
|
386
|
+
readonly type: "registrar";
|
|
387
|
+
readonly root: "bot";
|
|
388
|
+
readonly parent: "program";
|
|
389
|
+
readonly module: "./commands/bot.js";
|
|
390
|
+
readonly exportName: "registerBotCommand";
|
|
391
|
+
}];
|
|
392
|
+
export declare function registerAllCommands(program: Command): Promise<void>;
|
|
393
|
+
export declare function registerCommandRoot(program: Command, root: string): Promise<boolean>;
|
|
394
|
+
//# sourceMappingURL=command-registration-plan.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one authoritative registration plan for eager validation and lazy
|
|
3
|
+
* invocation. Multi-module roots keep the old registration order here.
|
|
4
|
+
*/
|
|
5
|
+
export const REGISTRATION_PLAN = [
|
|
6
|
+
{ type: "group", root: "modules", id: "modules", name: "modules", description: "Module management commands" },
|
|
7
|
+
{ type: "registrar", root: "modules", parent: "modules", module: "./commands/add.js", exportName: "registerAddCommand" },
|
|
8
|
+
{ type: "registrar", root: "modules", parent: "modules", module: "./commands/sync.js", exportName: "registerSyncCommand" },
|
|
9
|
+
{ type: "registrar", root: "modules", parent: "modules", module: "./commands/list.js", exportName: "registerListCommand" },
|
|
10
|
+
{ type: "registrar", root: "modules", parent: "modules", module: "./commands/update.js", exportName: "registerUpdateCommand" },
|
|
11
|
+
{ type: "group", root: "packages", id: "packages", name: "packages", description: "Package management commands" },
|
|
12
|
+
{ type: "registrar", root: "packages", parent: "packages", module: "./commands/pkg-install.js", exportName: "registerPackageInstallCommand" },
|
|
13
|
+
{ type: "registrar", root: "packages", parent: "packages", module: "./commands/pkg-remove.js", exportName: "registerPackageRemoveCommand" },
|
|
14
|
+
{ type: "registrar", root: "packages", parent: "packages", module: "./commands/pkg-update.js", exportName: "registerPackageUpdateCommand" },
|
|
15
|
+
{ type: "registrar", root: "packages", parent: "packages", module: "./commands/pkg-list.js", exportName: "registerPackageListCommand" },
|
|
16
|
+
{ type: "registrar", root: "packages", parent: "packages", module: "./commands/packs.js", exportName: "registerPacksCommand" },
|
|
17
|
+
{ type: "registrar", root: "packs", parent: "program", module: "./commands/packs.js", exportName: "registerPacksCommand" },
|
|
18
|
+
{ type: "registrar", root: "install", parent: "program", module: "./commands/pkg-install.js", exportName: "registerPackageInstallCommand" },
|
|
19
|
+
{ type: "registrar", root: "remove", parent: "program", module: "./commands/pkg-remove.js", exportName: "registerPackageRemoveCommand" },
|
|
20
|
+
{ type: "registrar", root: "publish", parent: "program", module: "./commands/publish.js", exportName: "registerPublishCommand" },
|
|
21
|
+
{ type: "registrar", root: "creators", parent: "program", module: "./commands/creators.js", exportName: "registerCreatorsCommand" },
|
|
22
|
+
{ type: "group", root: "sync", id: "sync", name: "sync", description: "Cloud sync commands — sync HQ to S3 for mobile access" },
|
|
23
|
+
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/cloud.js", exportName: "registerCloudCommands" },
|
|
24
|
+
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-mode.js", exportName: "registerSyncModeCommand" },
|
|
25
|
+
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-narrow.js", exportName: "registerSyncNarrowCommand" },
|
|
26
|
+
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-manifest.js", exportName: "registerSyncManifestCommand" },
|
|
27
|
+
{ type: "group", root: "cloud", id: "cloud", name: "cloud", description: "Cloud commands — provision entities and manage cloud-backed companies" },
|
|
28
|
+
{ type: "registrar", root: "cloud", parent: "cloud", module: "./commands/cloud-provision.js", exportName: "registerCloudProvisionCommands" },
|
|
29
|
+
{ type: "registrar", root: "cloud", parent: "cloud", module: "./commands/cloud-demote.js", exportName: "registerCloudDemoteCommands" },
|
|
30
|
+
{ type: "registrar", root: "team-sync", parent: "program", module: "./commands/team-sync.js", exportName: "registerTeamSyncCommand" },
|
|
31
|
+
{ type: "registrar", root: "login", parent: "program", module: "./commands/login.js", exportName: "registerLoginCommand" },
|
|
32
|
+
{ type: "registrar", root: "logout", parent: "program", module: "./commands/logout.js", exportName: "registerLogoutCommand" },
|
|
33
|
+
{ type: "registrar", root: "whoami", parent: "program", module: "./commands/whoami.js", exportName: "registerWhoamiCommand" },
|
|
34
|
+
{ type: "registrar", root: "auth", parent: "program", module: "./commands/auth.js", exportName: "registerAuthCommands" },
|
|
35
|
+
{ type: "registrar", root: "secrets", parent: "program", module: "./commands/secrets.js", exportName: "registerSecretsCommand" },
|
|
36
|
+
{ type: "registrar", root: "db", parent: "program", module: "./commands/db.js", exportName: "registerDbCommand" },
|
|
37
|
+
{ type: "registrar", root: "api-keys", parent: "program", module: "./commands/api-keys.js", exportName: "registerApiKeysCommand" },
|
|
38
|
+
{ type: "registrar", root: "run", parent: "program", module: "./commands/run.js", exportName: "registerRunCommand" },
|
|
39
|
+
{ type: "registrar", root: "groups", parent: "program", module: "./commands/groups.js", exportName: "registerGroupsCommand" },
|
|
40
|
+
{ type: "registrar", root: "workers", parent: "program", module: "./commands/workers.js", exportName: "registerWorkersCommand" },
|
|
41
|
+
{ type: "registrar", root: "group-grants", parent: "program", module: "./commands/group-grants.js", exportName: "registerGroupGrantsCommand" },
|
|
42
|
+
{ type: "registrar", root: "files", parent: "program", module: "./commands/files.js", exportName: "registerFilesCommand", result: "files" },
|
|
43
|
+
{ type: "registrar", root: "files", parent: "files", module: "./commands/files-browse.js", exportName: "registerFilesBrowseCommands" },
|
|
44
|
+
{ type: "registrar", root: "access", parent: "program", module: "./commands/access.js", exportName: "registerAccessCommand" },
|
|
45
|
+
{ type: "registrar", root: "skill", parent: "program", module: "./commands/skill.js", exportName: "registerSkillCommand" },
|
|
46
|
+
{ type: "registrar", root: "members", parent: "program", module: "./commands/members.js", exportName: "registerMembersCommand" },
|
|
47
|
+
{ type: "registrar", root: "people", parent: "program", module: "./commands/people.js", exportName: "registerPeopleCommand" },
|
|
48
|
+
{ type: "registrar", root: "dm", parent: "program", module: "./commands/dm.js", exportName: "registerDmCommand" },
|
|
49
|
+
{ type: "registrar", root: "channels", parent: "program", module: "./commands/channels.js", exportName: "registerChannelsCommand" },
|
|
50
|
+
{ type: "registrar", root: "onboard", parent: "program", module: "./commands/onboard.js", exportName: "registerOnboardCommand" },
|
|
51
|
+
{ type: "registrar", root: "feedback", parent: "program", module: "./commands/feedback.js", exportName: "registerFeedbackCommand" },
|
|
52
|
+
{ type: "registrar", root: "meetings", parent: "program", module: "./commands/meetings.js", exportName: "registerMeetingsCommand" },
|
|
53
|
+
{ type: "registrar", root: "sources", parent: "program", module: "./commands/sources.js", exportName: "registerSourcesCommand" },
|
|
54
|
+
{ type: "registrar", root: "signals", parent: "program", module: "./commands/signals.js", exportName: "registerSignalsCommand" },
|
|
55
|
+
{ type: "registrar", root: "integrations", parent: "program", module: "./commands/integrations.js", exportName: "registerIntegrationsCommand" },
|
|
56
|
+
{ type: "registrar", root: "reindex", parent: "program", module: "./commands/reindex.js", exportName: "registerReindexCommand" },
|
|
57
|
+
{ type: "registrar", root: "rescue", parent: "program", module: "./commands/rescue.js", exportName: "registerRescueCommand" },
|
|
58
|
+
{ type: "registrar", root: "mcp", parent: "program", module: "./commands/mcp-status.js", exportName: "registerMcpCommand" },
|
|
59
|
+
{ type: "registrar", root: "crm", parent: "program", module: "./commands/crm.js", exportName: "registerCrmCommand" },
|
|
60
|
+
{ type: "registrar", root: "company", parent: "program", module: "./commands/company.js", exportName: "registerCompanyCommand" },
|
|
61
|
+
{ type: "registrar", root: "agents", parent: "program", module: "./commands/agents.js", exportName: "registerAgentsCommand" },
|
|
62
|
+
{ type: "registrar", root: "outposts", parent: "program", module: "./commands/outposts.js", exportName: "registerOutpostsCommand" },
|
|
63
|
+
{ type: "registrar", root: "billing", parent: "program", module: "./commands/billing.js", exportName: "registerBillingCommand" },
|
|
64
|
+
{ type: "registrar", root: "core", parent: "program", module: "./commands/core.js", exportName: "registerCoreCommands" },
|
|
65
|
+
{ type: "registrar", root: "search", parent: "program", module: "./commands/search.js", exportName: "registerSearchCommand" },
|
|
66
|
+
{ type: "registrar", root: "index", parent: "program", module: "./commands/index-cmd.js", exportName: "registerIndexCommand" },
|
|
67
|
+
{ type: "registrar", root: "doctor", parent: "program", module: "./commands/doctor.js", exportName: "registerDoctorCommand" },
|
|
68
|
+
{ type: "registrar", root: "mesh", parent: "program", module: "./commands/mesh.js", exportName: "registerMeshCommand" },
|
|
69
|
+
{ type: "registrar", root: "bot", parent: "program", module: "./commands/bot.js", exportName: "registerBotCommand" },
|
|
70
|
+
];
|
|
71
|
+
async function executePlan(program, steps) {
|
|
72
|
+
const parents = new Map([["program", program]]);
|
|
73
|
+
for (const step of steps) {
|
|
74
|
+
if (step.type === "group") {
|
|
75
|
+
parents.set(step.id, program.command(step.name).description(step.description));
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const parent = parents.get(step.parent);
|
|
79
|
+
if (!parent)
|
|
80
|
+
throw new Error(`Missing command parent '${step.parent}' for '${step.exportName}'`);
|
|
81
|
+
const imported = await import(step.module);
|
|
82
|
+
const register = imported[step.exportName];
|
|
83
|
+
if (!register)
|
|
84
|
+
throw new Error(`Missing command registrar '${step.exportName}' from '${step.module}'`);
|
|
85
|
+
const result = register(parent);
|
|
86
|
+
if (step.result) {
|
|
87
|
+
if (!result)
|
|
88
|
+
throw new Error(`Command registrar '${step.exportName}' did not return '${step.result}'`);
|
|
89
|
+
parents.set(step.result, result);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export async function registerAllCommands(program) {
|
|
94
|
+
await executePlan(program, REGISTRATION_PLAN);
|
|
95
|
+
}
|
|
96
|
+
export async function registerCommandRoot(program, root) {
|
|
97
|
+
const steps = REGISTRATION_PLAN.filter((step) => step.root === root);
|
|
98
|
+
if (steps.length === 0)
|
|
99
|
+
return false;
|
|
100
|
+
await executePlan(program, steps);
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=command-registration-plan.js.map
|
package/dist/commands/core.js
CHANGED
|
@@ -46,6 +46,7 @@ import { archiveOldThreads } from "../lib/core-utils/archive-old-threads.js";
|
|
|
46
46
|
import { qmdReindexAfterSync } from "../lib/core-utils/qmd-reindex-after-sync.js";
|
|
47
47
|
import { softTimeoutCommand } from "../lib/core-utils/soft-timeout.js";
|
|
48
48
|
import { timeoutGuardCommand } from "../lib/core-utils/timeout-guard.js";
|
|
49
|
+
import { readSentryReportStdin, reportSentryEvent } from "../lib/core-utils/sentry-report.js";
|
|
49
50
|
/**
|
|
50
51
|
* These commands are now native implementations. Their retained shell assets
|
|
51
52
|
* are deliberately claimed in SCAFFOLD_ONLY_ASSETS: loose HQ trees still ship
|
|
@@ -457,6 +458,23 @@ export function registerCoreCommands(program) {
|
|
|
457
458
|
if (code !== 0)
|
|
458
459
|
process.exit(code);
|
|
459
460
|
});
|
|
461
|
+
// `hq core sentry report` — constrained, stderr-diagnostic-only transport
|
|
462
|
+
// for hook health events. Event data is accepted only on stdin so it never
|
|
463
|
+
// appears in the process list shared by the fleet.
|
|
464
|
+
core
|
|
465
|
+
.command("sentry")
|
|
466
|
+
.description("Constrained diagnostics transport for HQ hooks")
|
|
467
|
+
.command("report")
|
|
468
|
+
.description("Report one validated hook diagnostic from stdin")
|
|
469
|
+
.option("--dry-run", "validate and print the scrubbed Sentry event projection without sending")
|
|
470
|
+
.option("--timeout-ms <milliseconds>", "bounded Sentry flush budget (1-5000ms)")
|
|
471
|
+
.action(async (options) => {
|
|
472
|
+
const stdin = await readSentryReportStdin(process.stdin);
|
|
473
|
+
const timeoutMs = options.timeoutMs === undefined ? undefined : Number(options.timeoutMs);
|
|
474
|
+
const result = await reportSentryEvent(stdin ?? "", { dryRun: options.dryRun, timeoutMs });
|
|
475
|
+
if (result.code !== 0)
|
|
476
|
+
process.exitCode = result.code;
|
|
477
|
+
});
|
|
460
478
|
return core;
|
|
461
479
|
}
|
|
462
480
|
//# sourceMappingURL=core.js.map
|
package/dist/lazy-commands.d.ts
CHANGED
|
@@ -1,55 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
* Hot-command manifest for the entrypoint's lazy registration.
|
|
3
|
-
*
|
|
4
|
-
* main.ts used to import the entire ~60-module command graph at module scope,
|
|
5
|
-
* so every invocation paid for every command. That is fine for a human typing
|
|
6
|
-
* one command and ruinous for the calls automation makes in a loop: the
|
|
7
|
-
* hq-sentry agent fleet on an outpost runs `hq secrets` about 39 times a minute
|
|
8
|
-
* (each worker resolves credentials before every external command it executes),
|
|
9
|
-
* and each of those processes spent ~0.75 CPU-seconds importing commands it
|
|
10
|
-
* never ran — around half a core, continuously. Measured on Outpost 2
|
|
11
|
-
* (i-09424eff61920a4ac) 2026-09-05; see register-all.ts for the numbers.
|
|
12
|
-
*
|
|
13
|
-
* A command listed here registers ITSELF and nothing else. Anything not listed
|
|
14
|
-
* — `--help`, a bare `hq`, an unknown command, every other command — falls back
|
|
15
|
-
* to `registerAllCommands`, the complete unchanged graph. That fallback is what
|
|
16
|
-
* makes this safe to extend one command at a time: an entry is a performance
|
|
17
|
-
* opt-in, never a behaviour change, and a command that is absent here is simply
|
|
18
|
-
* as fast as it was before.
|
|
19
|
-
*
|
|
20
|
-
* This mirrors commands/scaffold-fast.ts, which does the same thing for the
|
|
21
|
-
* relocated `hq core …` scripts, and carries the same anti-drift discipline: a
|
|
22
|
-
* parity test registers each entry BOTH ways and asserts the resulting command
|
|
23
|
-
* shape is identical, so a manifest entry cannot silently diverge from the real
|
|
24
|
-
* registration.
|
|
25
|
-
*
|
|
26
|
-
* TO ADD A COMMAND: it must register exactly one top-level command, be
|
|
27
|
-
* registered onto `program` (not onto a subcommand group), and have no other
|
|
28
|
-
* module contributing subcommands to it. The parity test enforces the shape;
|
|
29
|
-
* these three conditions are what make the entry correct in the first place.
|
|
30
|
-
*/
|
|
31
|
-
import type { Command } from "commander";
|
|
1
|
+
import { Command } from "commander";
|
|
32
2
|
export type LazyCommand = {
|
|
33
|
-
/**
|
|
3
|
+
/** Canonical top-level name; aliases resolve to this name. */
|
|
34
4
|
name: string;
|
|
35
|
-
/** Registers
|
|
5
|
+
/** Registers every contributor for this root and no unrelated root. */
|
|
36
6
|
register: (program: Command) => Promise<void>;
|
|
37
7
|
};
|
|
38
8
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* loop: every fleet worker shells through one of them before each external
|
|
43
|
-
* command, which is exactly the shape that makes eager import expensive.
|
|
9
|
+
* One entry for every root, including groups that are assembled by several
|
|
10
|
+
* registrar modules. The routing metadata itself is generated from the eager
|
|
11
|
+
* command graph and checked in tests and the build.
|
|
44
12
|
*/
|
|
45
13
|
export declare const LAZY_COMMANDS: readonly LazyCommand[];
|
|
46
14
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
15
|
+
* Keep the registration seam at register-all.js. Besides making one place own
|
|
16
|
+
* the graph, this lets the torn-install recovery wrap failures while an update
|
|
17
|
+
* replaces the installed tree between startup and command registration.
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerCommandRoot(program: Command, root: string): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Register only generated root metadata. This is enough for root help and
|
|
22
|
+
* Commander suggestions, without evaluating an implementation module.
|
|
23
|
+
*/
|
|
24
|
+
export declare function registerCommandCatalog(program: Command): void;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the root requested by Commander argv. Root help, a bare invocation,
|
|
27
|
+
* and unknown tokens deliberately return null so the lightweight catalog can
|
|
28
|
+
* preserve the complete help and unknown-command recovery surfaces.
|
|
53
29
|
*/
|
|
54
30
|
export declare function findLazyCommand(argv: readonly string[]): LazyCommand | null;
|
|
55
31
|
//# sourceMappingURL=lazy-commands.d.ts.map
|