@indigoai-us/hq-cli 5.125.0 → 5.127.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 (108) hide show
  1. package/CHANGELOG.md +329 -0
  2. package/assets/bot-workers/setup/skills/joining-a-team.md +125 -0
  3. package/assets/bot-workers/setup/skills/your-business.md +270 -0
  4. package/assets/bot-workers/setup/worker.yaml +189 -58
  5. package/assets/lanes-hooks/hq-lanes-drain.json +15 -0
  6. package/assets/lanes-hooks/hq-lanes-drain.mjs +254 -0
  7. package/assets/lanes-hooks/hq-lanes-drain.sh +21 -0
  8. package/assets/lanes-reconcile/hq-lanes-reconcile.service +11 -0
  9. package/assets/lanes-reconcile/hq-lanes-reconcile.timer +12 -0
  10. package/dist/command-catalog.generated.d.ts +643 -6
  11. package/dist/command-catalog.generated.js +836 -6
  12. package/dist/command-registration-plan.d.ts +7 -0
  13. package/dist/command-registration-plan.js +11 -1
  14. package/dist/commands/agents.d.ts +12 -0
  15. package/dist/commands/agents.js +46 -2
  16. package/dist/commands/bot.d.ts +10 -0
  17. package/dist/commands/bot.js +6 -0
  18. package/dist/commands/lanes.d.ts +114 -0
  19. package/dist/commands/lanes.js +2969 -0
  20. package/dist/commands/mesh.js +287 -24
  21. package/dist/commands/onboard-create-identity.d.ts +26 -0
  22. package/dist/commands/onboard-create-identity.js +23 -0
  23. package/dist/commands/onboard.js +13 -4
  24. package/dist/lib/bot/progress.d.ts +6 -0
  25. package/dist/lib/bot/progress.js +16 -0
  26. package/dist/lib/bot/runtime/grok.d.ts +30 -7
  27. package/dist/lib/bot/runtime/grok.js +86 -8
  28. package/dist/lib/bot/runtime/index.js +15 -8
  29. package/dist/lib/bot/runtime/messages-stream.d.ts +12 -3
  30. package/dist/lib/bot/runtime/messages-stream.js +49 -3
  31. package/dist/lib/lanes/accounts.d.ts +103 -0
  32. package/dist/lib/lanes/accounts.js +318 -0
  33. package/dist/lib/lanes/compaction.d.ts +96 -0
  34. package/dist/lib/lanes/compaction.js +197 -0
  35. package/dist/lib/lanes/config.d.ts +71 -0
  36. package/dist/lib/lanes/config.js +408 -0
  37. package/dist/lib/lanes/delivery.d.ts +151 -0
  38. package/dist/lib/lanes/delivery.js +354 -0
  39. package/dist/lib/lanes/dropbox.d.ts +96 -0
  40. package/dist/lib/lanes/dropbox.js +408 -0
  41. package/dist/lib/lanes/effort.d.ts +50 -0
  42. package/dist/lib/lanes/effort.js +109 -0
  43. package/dist/lib/lanes/errors.d.ts +39 -0
  44. package/dist/lib/lanes/errors.js +72 -0
  45. package/dist/lib/lanes/hooks-install.d.ts +81 -0
  46. package/dist/lib/lanes/hooks-install.js +326 -0
  47. package/dist/lib/lanes/hq-root.d.ts +19 -0
  48. package/dist/lib/lanes/hq-root.js +28 -0
  49. package/dist/lib/lanes/index.d.ts +49 -0
  50. package/dist/lib/lanes/index.js +27 -0
  51. package/dist/lib/lanes/liveness.d.ts +95 -0
  52. package/dist/lib/lanes/liveness.js +332 -0
  53. package/dist/lib/lanes/machine-identity.d.ts +34 -0
  54. package/dist/lib/lanes/machine-identity.js +92 -0
  55. package/dist/lib/lanes/mesh-events.d.ts +109 -0
  56. package/dist/lib/lanes/mesh-events.js +275 -0
  57. package/dist/lib/lanes/outpost-dispatch.d.ts +65 -0
  58. package/dist/lib/lanes/outpost-dispatch.js +90 -0
  59. package/dist/lib/lanes/questions.d.ts +75 -0
  60. package/dist/lib/lanes/questions.js +243 -0
  61. package/dist/lib/lanes/quota.d.ts +95 -0
  62. package/dist/lib/lanes/quota.js +320 -0
  63. package/dist/lib/lanes/reconcile-install.d.ts +69 -0
  64. package/dist/lib/lanes/reconcile-install.js +221 -0
  65. package/dist/lib/lanes/reconcile.d.ts +102 -0
  66. package/dist/lib/lanes/reconcile.js +985 -0
  67. package/dist/lib/lanes/registry.d.ts +116 -0
  68. package/dist/lib/lanes/registry.js +521 -0
  69. package/dist/lib/lanes/spawn.d.ts +274 -0
  70. package/dist/lib/lanes/spawn.js +1363 -0
  71. package/dist/lib/lanes/store.d.ts +68 -0
  72. package/dist/lib/lanes/store.js +745 -0
  73. package/dist/lib/lanes/throttle.d.ts +89 -0
  74. package/dist/lib/lanes/throttle.js +297 -0
  75. package/dist/lib/lanes/types.d.ts +535 -0
  76. package/dist/lib/lanes/types.js +350 -0
  77. package/dist/lib/lanes/watcher-main.d.ts +9 -0
  78. package/dist/lib/lanes/watcher-main.js +22 -0
  79. package/dist/lib/lanes/watcher.d.ts +216 -0
  80. package/dist/lib/lanes/watcher.js +859 -0
  81. package/dist/lib/mesh/api.d.ts +71 -7
  82. package/dist/lib/mesh/api.js +167 -28
  83. package/dist/lib/mesh/live/backfill-held.d.ts +18 -7
  84. package/dist/lib/mesh/live/backfill-held.js +66 -21
  85. package/dist/lib/mesh/live/daemon/config.d.ts +27 -0
  86. package/dist/lib/mesh/live/daemon/config.js +75 -0
  87. package/dist/lib/mesh/live/daemon/index.d.ts +4 -3
  88. package/dist/lib/mesh/live/daemon/index.js +3 -3
  89. package/dist/lib/mesh/live/daemon/install.d.ts +143 -1
  90. package/dist/lib/mesh/live/daemon/install.js +444 -2
  91. package/dist/lib/mesh/live/daemon/paths.d.ts +2 -0
  92. package/dist/lib/mesh/live/daemon/paths.js +2 -0
  93. package/dist/lib/mesh/live/daemon/run.d.ts +2 -0
  94. package/dist/lib/mesh/live/daemon/run.js +111 -54
  95. package/dist/lib/mesh/live/daemon/state.d.ts +2 -0
  96. package/dist/lib/mesh/live/daemon/transcript-watch.d.ts +3 -0
  97. package/dist/lib/mesh/live/daemon/transcript-watch.js +31 -8
  98. package/dist/lib/scan-packages/index.d.ts +2 -0
  99. package/dist/lib/scan-packages/index.js +18 -13
  100. package/dist/lib/work-context/config.d.ts +20 -0
  101. package/dist/lib/work-context/config.js +26 -5
  102. package/dist/lib/work-context/reconcile.js +28 -7
  103. package/dist/lib/work-context/state.d.ts +12 -0
  104. package/dist/lib/work-context/state.js +131 -3
  105. package/dist/lib/work-context/windows-acl.d.ts +123 -0
  106. package/dist/lib/work-context/windows-acl.js +425 -0
  107. package/dist/utils/pack-contributions.js +5 -4
  108. package/package.json +3 -1
@@ -0,0 +1,270 @@
1
+ ---
2
+ name: your-business
3
+ title: Your business
4
+ description: Work out what kind of business the person runs, then recommend and set up the connections and structure that kind of business needs, one confirmed suggestion at a time.
5
+ ---
6
+
7
+ # Your business
8
+
9
+ This step runs right after Import. It is the part of setup that should feel
10
+ like talking to someone who has set up HQ for a hundred businesses like theirs.
11
+ Do not ask the person what they want to connect; you know better than they do
12
+ what a business like theirs needs in HQ. Work out what kind of business it is,
13
+ then recommend specific things, say why each one matters, and set up the ones
14
+ they agree to.
15
+
16
+ ## 1. Work out the business before you ask
17
+
18
+ Look first, quietly. You may already know most of the answer from:
19
+
20
+ - the company they joined or created in the previous step (its name, and
21
+ anything in `companies/{co}/knowledge/`),
22
+ - what Import just found (repository names, project names, note titles, the
23
+ kinds of documents on this machine),
24
+ - the "Owner context" block,
25
+ - their email domain.
26
+
27
+ If the evidence points clearly to one kind of business, say what you think it
28
+ is and ask them to confirm, in one line: "From what I found, it looks like you
29
+ run a marketing agency. Is that right?" If it does not, ask plainly:
30
+
31
+ > **What kind of business do you run?**
32
+
33
+ Accept any answer in their own words. Map it to the closest profile below. If
34
+ it matches none of them, use "Any business" plus your own judgement, and do
35
+ not force it into a category. Ask at most one follow-up if it changes the
36
+ recommendations (for an agency: "About how many clients do you work with right
37
+ now?"; for a brand: "Do you sell mostly on your own store, on Amazon, or in
38
+ retail?").
39
+
40
+ Record the business type and the key facts in the progress note and in
41
+ `personal/knowledge/profile.md`.
42
+
43
+ ## 2. Say what you recommend, then go one at a time
44
+
45
+ Open with one short message that names the business back to them and lists
46
+ the three to five things you recommend, in order, each with a reason of a few
47
+ words. For example:
48
+
49
+ > Great, an agency with about twelve clients. Here's what I'd set up for you:
50
+ > your note taker, so every client call lands in HQ; your project management
51
+ > tool, so bots can see what's due; and a home for each client, so their work
52
+ > stays separate. Want to start with your note taker?
53
+
54
+ Then take them one at a time. For each item: ask the one question it needs
55
+ (which tool they use, or yes/no), do it, say in one line what is now true,
56
+ and move to the next. "Not now" is a fine answer; move on without arguing and
57
+ do not return to it.
58
+
59
+ Recommend only what fits what they told you. Three well-chosen items beat
60
+ eight generic ones. Never show a catalogue of supported apps.
61
+
62
+ ## 3. Find their tools, then get each one working
63
+
64
+ ### Start with what is already there
65
+
66
+ Before asking anything, quietly look for tools they already use:
67
+
68
+ - **Connectors already set up in their Claude app.** Run
69
+ `hq integrations import --dry-run`. If it finds any, offer to bring them
70
+ into their company in one go, then run it for real. Their personal Claude
71
+ connectors do not work reliably for you or for other bots running in the
72
+ background; the HQ copy does. Never lean on their personal Claude
73
+ connectors to read their data.
74
+ - **Apps and signed-in tools on this Mac.** Look in `/Applications` and
75
+ `~/Applications` for the apps behind common work tools (Slack, Zoom,
76
+ Granola, Notion, ClickUp, Linear, Figma), and check which command-line tools
77
+ are installed and signed in (`gh`, `shopify`, `gcloud`, `stripe`, `vercel`).
78
+ - **What Import and the profile already told you.**
79
+
80
+ Then lead with a guess instead of a blank question: "It looks like you use
81
+ Slack, Notion and Granola. Which other tools do you use to run the business
82
+ day to day?" Take what they add in their own words, and add anything from your
83
+ recommendations they did not mention ("You didn't mention a note taker. Do
84
+ you record your calls?").
85
+
86
+ ### Work out how to connect each tool yourself
87
+
88
+ There is no list of supported tools. For each tool, find out how it connects,
89
+ the way a good engineer would, and then do it:
90
+
91
+ 1. **Ask HQ first.** `hq integrations inspect <domain>` (for example
92
+ `shopify.com`) shows what HQ can already resolve for that tool. If it
93
+ resolves, `hq integrations connect <domain>` is usually all it takes.
94
+ 2. **Otherwise, search.** Search the web for the tool's official MCP server
95
+ ("<tool> MCP server") and its API docs ("<tool> API key" or
96
+ "<tool> API authentication"). Read the official docs, not a blog post. Work
97
+ out, in this order of preference:
98
+ - an official remote MCP server (a URL, usually with a browser sign-in),
99
+ - an official API with a key or token,
100
+ - a well-maintained community MCP server,
101
+ - an export, email report or shared sheet, when there is no API.
102
+ Prefer the tool's own route over a third-party app that sits in front of
103
+ it. Only suggest a substitute (for example a commerce aggregator instead of
104
+ Shopify itself) if the direct route is genuinely impossible, and say why.
105
+ 3. **Connect it through HQ, never by hand.**
106
+ - MCP server: `hq integrations connect --mcp-url <url> --display-name
107
+ "<Tool>" --provider <slug>`, or `hq integrations connect --docs-url
108
+ <docsUrl>` / `hq integrations discover <docsUrl>` when you only have a
109
+ docs page.
110
+ - API key: tell them exactly where to create it (the settings page, with a
111
+ direct link when the docs give one, and the permissions to tick, read
112
+ access only unless they want more). They paste it into a one-time vault
113
+ link (`hq secrets generate-link`), never into the chat. Then either
114
+ connect it by piping from the vault
115
+ (`hq secrets exec --only <NAME> -- sh -c 'printf %s "$<NAME>" | hq integrations connect ... --token-stdin'`)
116
+ or, when the tool has no MCP server for HQ to wrap, keep the key in the
117
+ vault and call the API with `hq secrets exec`. Never use `--token`,
118
+ never print a key, never ask for one in the chat.
119
+ - Browser sign-in: `connect` opens the page and then waits for the
120
+ sign-in to come back. That wait must outlive your reply, because
121
+ everything you start ends when your turn ends. So always start it
122
+ detached, with a long timeout and a log:
123
+ `nohup hq integrations connect <app or --mcp-url ...> --timeout 1800 > /tmp/hq-connect-<slug>.log 2>&1 &`
124
+ Then read the log after a few seconds to confirm the page opened (or to
125
+ catch an error right away), and say "I've opened a Shopify sign-in page
126
+ in your browser. Approve it there and I'll see it on my side." Never run
127
+ `connect` for a browser sign-in in the foreground.
128
+ 4. **Check it landed, yourself.** On every turn while a connection is
129
+ pending, check `hq integrations list` (or `show <app>`) and the
130
+ `/tmp/hq-connect-<slug>.log` before you reply. When they tell you they
131
+ approved it, check again; if it is not there yet, wait and re-check a few
132
+ times over about a minute before answering. If it still has not landed,
133
+ say what the log shows in plain words (the page was closed, the sign-in
134
+ timed out, the account said no), restart the detached sign-in if that is
135
+ the fix, and never promise that the next attempt "will hold". You cannot
136
+ watch between messages, so do not say "I'll keep watching"; say you will
137
+ check again as soon as they reply.
138
+ 5. **Prove it works with their own data.** Run one real read
139
+ (`hq integrations tools --provider <slug>`, then a read-only call, or the
140
+ API call through `hq secrets exec`) and show them something real: last
141
+ week's orders, their latest call, the overdue tasks. Then one clause on
142
+ what it means for their team (see "What HQ is" in your instructions). A
143
+ connection is not done until this read works. Never say "connected",
144
+ "done" or "everything is set up" before it does.
145
+
146
+ If a step needs something only they can do (an admin approval, a paid plan),
147
+ say exactly what, record it in the progress note as waiting, and move on to
148
+ the next tool. When you come back to it later, check it again rather than
149
+ assuming.
150
+
151
+ When they name a tool in answer to your question, that is their go-ahead to
152
+ connect it; do not ask again. For tools you suggested yourself, ask once,
153
+ and once for a group is fine ("I can connect Slack, Notion and Granola now;
154
+ each opens a sign-in page. Go?"). Say what you are doing in plain words,
155
+ never the command.
156
+
157
+ If they want you to look at one document right now and the tool it lives in
158
+ is not connected yet, ask them to drop the file into this chat (they can
159
+ export a sheet as .xlsx or .csv and attach it with the paperclip). Start the
160
+ work from that, and connect the tool properly afterwards.
161
+
162
+ Never ask them to make a document publicly shared or "anyone with the link"
163
+ so you can read it. Connect the tool that holds it through HQ instead.
164
+
165
+ ### When something fails
166
+
167
+ Check your own side first. If a read fails, look at the connection's status
168
+ and the error before saying anything. Never tell them something on their side
169
+ is broken, expired or misconfigured unless you have checked it and can say
170
+ how you know. If they tell you something works on their side, believe them,
171
+ look for the problem on yours, and fix it (usually by connecting the tool
172
+ through HQ instead). Never argue.
173
+
174
+ ## Recommendations for every business
175
+
176
+ Always recommend these first, whatever the business, unless they are already
177
+ connected:
178
+
179
+ - **Note taker** (Granola, Fireflies, Otter, Fathom, Read.ai, tl;dv, or
180
+ meeting recordings from Zoom or Google Meet). This is the strongest
181
+ recommendation of all: meeting notes are where decisions, commitments and
182
+ client context live, and HQ turns them into signals, action items and
183
+ meeting prep. Say so in one sentence.
184
+ - **Email and calendar**, if they live in them (Google Workspace or
185
+ Microsoft 365).
186
+ - **Team chat** (Slack or Teams), if they work with a team.
187
+
188
+ ## Profiles
189
+
190
+ ### Agency or services firm
191
+
192
+ Marketing, creative, development, consulting, recruiting, accounting, or any
193
+ business that does work for clients.
194
+
195
+ - **Project management tool** (ClickUp, Asana, Monday, Notion, Linear,
196
+ Teamwork, Jira) so bots can see what is due and who owns it.
197
+ - **A home for each client.** Offer to set one up per active client, so each
198
+ client's knowledge, files and credentials stay separate, and so everyone
199
+ who works on that client, human or bot, sees the same picture. Ask for the list of
200
+ current clients (names only). Create them with `/new-client` once the
201
+ person agrees, confirming the list before you create anything. For more
202
+ than five clients, offer to start with their top three and add the rest
203
+ later.
204
+ - **CRM** (HubSpot, Attio, Pipedrive, Salesforce) if they run their own sales.
205
+ - **Time tracking or billing** (Harvest, Toggl, Everhour, QuickBooks, Xero)
206
+ if they bill by the hour.
207
+ - For marketing agencies, the **ad platforms** they manage for clients (Meta,
208
+ Google Ads, TikTok) and **Klaviyo** if they do email.
209
+ - First bot ideas: a weekly client status report, call prep before each client
210
+ meeting, action items pulled from every call.
211
+
212
+ ### E-commerce or consumer brand
213
+
214
+ - **Store** (Shopify, WooCommerce, BigCommerce, Amazon Seller Central).
215
+ - **Data warehouse or analytics** (BigQuery, Snowflake, Triple Whale,
216
+ Northbeam, Polar, Google Analytics), so bots can answer performance
217
+ questions from real numbers.
218
+ - **Marketing systems**: ad platforms (Meta, Google, TikTok), email and SMS
219
+ (Klaviyo, Postscript, Attentive), reviews (Okendo, Junip, Yotpo).
220
+ - **Project management** (as above).
221
+ - **ERP or operations** (NetSuite, Cin7, Brightpearl, a 3PL portal) if they
222
+ hold inventory.
223
+ - First bot ideas: a daily performance pulse, creative fatigue alerts, a
224
+ weekly business review.
225
+
226
+ ### Software or product company
227
+
228
+ - **Code** (GitHub or GitLab), **issue tracker** (Linear, Jira), **docs**
229
+ (Notion, Confluence).
230
+ - **Product analytics** (PostHog, Amplitude, Mixpanel) and **errors**
231
+ (Sentry).
232
+ - **CRM and support** (HubSpot, Salesforce, Intercom, Zendesk) if they sell or
233
+ support customers directly.
234
+ - **Billing** (Stripe).
235
+ - First bot ideas: a daily digest of what shipped, triage of new bug reports,
236
+ release notes.
237
+
238
+ ### Investor, fund or advisor
239
+
240
+ - **CRM or deal tracker** (Affinity, Attio, DealCloud, a spreadsheet).
241
+ - **Document storage** (Google Drive, Dropbox, Box) where memos and data
242
+ rooms live.
243
+ - A home for each portfolio company or active deal, if they want the work kept
244
+ separate.
245
+ - First bot ideas: deal screening, memo drafting, portfolio update summaries.
246
+
247
+ ### Creator, solo operator or freelancer
248
+
249
+ - **Where the work is published** (YouTube, a newsletter platform, social
250
+ accounts) and **where it is drafted** (Notion, Google Docs).
251
+ - **Payments** (Stripe, Gumroad) if they sell directly.
252
+ - Suggest working alone rather than a company, if that has not been settled.
253
+ - First bot ideas: repurposing one piece of content into several, a weekly
254
+ content plan.
255
+
256
+ ### Any business
257
+
258
+ When nothing above fits, ask what systems hold the truth about their business
259
+ (customers, money, work in progress) and recommend connecting those, plus the
260
+ note taker, email, calendar and chat.
261
+
262
+ ## What carries forward
263
+
264
+ Write the business type, the recommendations made, and what was connected,
265
+ skipped or wanted to the progress note. The later steps use it:
266
+
267
+ - "About you" skips anything you already learned here.
268
+ - "Connect" only offers what was not already covered here.
269
+ - "Your first moves" and the first bot come from the bot ideas that fit this
270
+ business and what they connected, not from generic features.