@indigoai-us/hq-cli 5.345.165 → 5.345.168
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 +13 -0
- package/assets/scaffold/core/scripts/hq-delegate-send.sh +1 -1
- package/assets/scaffold/core/scripts/rebuild-all-indexes.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-orchestrator-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-public-knowledge-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-reports-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-social-drafts-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-threads-index.sh +11 -0
- package/assets/scaffold/core/scripts/rebuild-workers-index.sh +11 -0
- package/dist/command-catalog.generated.d.ts +6 -2
- package/dist/command-catalog.generated.js +7 -2
- package/dist/commands/access.js +2 -0
- package/dist/commands/agents.js +2 -2
- package/dist/commands/core-delegate-w1b.js +2 -1
- package/dist/commands/core-dm-bind-native.js +3 -1
- package/dist/commands/dm.d.ts +13 -2
- package/dist/commands/dm.js +42 -9
- package/dist/commands/integrations-api.d.ts +15 -0
- package/dist/commands/integrations-api.js +27 -0
- package/dist/commands/integrations-manage.js +4 -2
- package/dist/commands/integrations.js +9 -5
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +210 -197
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/agent-kit/mcp/tools.js +5 -6
- package/dist/lib/doctor/checks/sync-runtime.d.ts +7 -2
- package/dist/lib/doctor/checks/sync-runtime.js +1 -3
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/index-render/index.d.ts +5 -0
- package/dist/lib/index-render/index.js +22 -1
- package/dist/lib/notify-recipient.d.ts +15 -0
- package/dist/lib/notify-recipient.js +15 -0
- package/dist/lib/secret-scan/repo-config.d.ts +8 -2
- package/dist/lib/secret-scan/repo-config.js +12 -6
- package/dist/lib/secret-scan/staged.d.ts +6 -0
- package/dist/lib/secret-scan/staged.js +21 -3
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"hq-cli-daemon-sync-runner","type":"module","version":"6.18.
|
|
1
|
+
{"name":"hq-cli-daemon-sync-runner","type":"module","version":"6.18.101","bundleSha256":"353f47dca127c7f6c1e00de5c9cdce809c5c32d08b2deb9755020b8e8b822871","formatVersion":1}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { CLI_VERSION } from "../../../cli-version.js";
|
|
19
19
|
import { peekIdToken } from "../../../utils/id-token.js";
|
|
20
|
-
import { isRecipientUid } from "../../../lib/notify-recipient.js";
|
|
20
|
+
import { defaultAudienceFor, isAgentUid, isRecipientUid } from "../../../lib/notify-recipient.js";
|
|
21
21
|
import { redactAgentInboxItem } from "../inbox-redact.js";
|
|
22
22
|
import { markInboxDone, mergeAgentInbox, readDoneIds, summarizeInboxEntry } from "../inbox-state.js";
|
|
23
23
|
import { AttachmentCompanyUnresolvedError, fetchChatAttachment } from "./attachments.js";
|
|
@@ -214,13 +214,13 @@ export function buildAgentMcpTools(clients) {
|
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
name: "hq_dm_send",
|
|
217
|
-
description: "Send an HQ message as this agent to a person (email or prs_…), an agent (agt_…), or a channel or group DM (chn_…). When replying to an inbox item that has a channelId, pass that channelId as `to` so the answer lands in the conversation it came from. Use audience='agent' for progress/status messages that only agents need to see; audience='human' for messages a person must read; audience='both' when unsure.",
|
|
217
|
+
description: "Send an HQ message as this agent to a person (email or prs_…), an agent (agt_…), or a channel or group DM (chn_…). When replying to an inbox item that has a channelId, pass that channelId as `to` so the answer lands in the conversation it came from. Use audience='agent' for progress/status messages that only agents need to see; audience='human' for messages a person must read; audience='both' when unsure. Default: human for a person, agent for an agent, a channel or a group.",
|
|
218
218
|
inputSchema: {
|
|
219
219
|
type: "object",
|
|
220
220
|
properties: {
|
|
221
221
|
to: { type: "string", description: "Email, prs_… or agt_… uid, or a chn_… channel id" },
|
|
222
222
|
message: { type: "string" },
|
|
223
|
-
audience: { type: "string", enum: ["human", "agent", "both"], description: "Who this message is for (default: human)" },
|
|
223
|
+
audience: { type: "string", enum: ["human", "agent", "both"], description: "Who this message is for (default: human for a person, agent for an agent, channel or group)" },
|
|
224
224
|
},
|
|
225
225
|
required: ["to", "message"],
|
|
226
226
|
additionalProperties: false,
|
|
@@ -238,7 +238,7 @@ export function buildAgentMcpTools(clients) {
|
|
|
238
238
|
const token = await clients.getToken();
|
|
239
239
|
const res = await clients.apiJson(token, `/v1/notify/channels/${encodeURIComponent(to)}/messages`, {
|
|
240
240
|
method: "POST",
|
|
241
|
-
body: { body: message,
|
|
241
|
+
body: { body: message, audience: audience ?? defaultAudienceFor("channel") },
|
|
242
242
|
});
|
|
243
243
|
if (res.status < 200 || res.status >= 300) {
|
|
244
244
|
return errorResult(`Channel send failed (${res.status}): ${describeError(res.body)}`);
|
|
@@ -252,8 +252,7 @@ export function buildAgentMcpTools(clients) {
|
|
|
252
252
|
: (() => {
|
|
253
253
|
throw new McpToolInputError('"to" must be an email, prs_… or agt_… uid, or a chn_… channel id');
|
|
254
254
|
})();
|
|
255
|
-
|
|
256
|
-
body.audience = audience;
|
|
255
|
+
body.audience = audience ?? defaultAudienceFor(isAgentUid(to) ? "agent" : "person");
|
|
257
256
|
const token = await clients.getToken();
|
|
258
257
|
const res = await clients.apiJson(token, "/v1/notify/dm", { method: "POST", body });
|
|
259
258
|
if (res.status < 200 || res.status >= 300) {
|
|
@@ -32,9 +32,14 @@ export interface SyncRuntimeOptions {
|
|
|
32
32
|
* - `cloudwatch-metric`: the latency metric publisher was refused.
|
|
33
33
|
* - `targeted-pull`: the object pull after a change event failed; the
|
|
34
34
|
* refused keys are named by `sync.runtime.pull-access-denied`.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
|
+
* Only the receiver's own records are counted (`type:"receiver"` or an event
|
|
37
|
+
* named `receiver.*`). A runner `error` record from elsewhere, such as
|
|
38
|
+
* `runner.telemetry.outcome_flag_failed` carrying "hq-flags: resolve returned
|
|
39
|
+
* 403" for a company the caller is not a member of, is not a receiver
|
|
40
|
+
* permission refusal and is not counted here.
|
|
36
41
|
*/
|
|
37
|
-
export type ReceiverRefusalCall = "subscribe" | "sqs-receive" | "sqs-visibility" | "sqs-delete" | "cloudwatch-metric" | "targeted-pull" | "
|
|
42
|
+
export type ReceiverRefusalCall = "subscribe" | "sqs-receive" | "sqs-visibility" | "sqs-delete" | "cloudwatch-metric" | "targeted-pull" | "other";
|
|
38
43
|
/** Classify the last hour of sync log lines into privacy-safe results. */
|
|
39
44
|
export declare function analyzeSyncRuntimeLog(lines: readonly string[], options: SyncRuntimeOptions): CheckResult[];
|
|
40
45
|
/**
|
|
@@ -73,8 +73,6 @@ function classifyRefusal(record, errText) {
|
|
|
73
73
|
const byEvent = RECEIVER_EVENT_CALLS[event];
|
|
74
74
|
if (byEvent)
|
|
75
75
|
return byEvent;
|
|
76
|
-
if (record.type === "error")
|
|
77
|
-
return "runner-error";
|
|
78
76
|
return "other";
|
|
79
77
|
}
|
|
80
78
|
const QUEUE_LEG = new Set([
|
|
@@ -230,7 +228,7 @@ export function analyzeSyncRuntimeLog(lines, options) {
|
|
|
230
228
|
slowReceiptTimes.push(time);
|
|
231
229
|
}
|
|
232
230
|
if (time >= since &&
|
|
233
|
-
(record.type === "receiver" ||
|
|
231
|
+
(record.type === "receiver" ||
|
|
234
232
|
(typeof event === "string" && event.startsWith("receiver.")))) {
|
|
235
233
|
const errText = JSON.stringify(record.err ?? record.message ?? "");
|
|
236
234
|
if (PERMISSION.test(errText)) {
|