@ganju/utils 0.0.10 → 0.0.12

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.
@@ -324,6 +324,7 @@ export declare const constants: {
324
324
  };
325
325
  RESOURCE_SYNC_BATCH_SIZE: number;
326
326
  RESOURCE_SYNC_MANUAL_COOLDOWN_MS: number;
327
+ RESOURCE_SYNC_STALE_MS: number;
327
328
  CRAWL_RENDERER_CHEERIO: "cheerio";
328
329
  CRAWL_RENDERER_PLAYWRIGHT: "playwright";
329
330
  CRAWL_RENDERERS: ("cheerio" | "playwright")[];
@@ -386,6 +387,14 @@ export declare const constants: {
386
387
  SHARED_KEY_HISTORY_LIMIT: number;
387
388
  SHARED_KEY_MAX_TOOL_LOOPS: number;
388
389
  CHANNEL_MAX_TOOLS: number;
390
+ TOOL_CONFIRMATION_TTL_MS: number;
391
+ TOOL_CONFIRMATION_REQUIRED_RESULT: string;
392
+ TOOL_CONFIRMATION_FALLBACK_QUESTION: string;
393
+ TOOL_CONFIRMATION_ASK_INSTRUCTION: string;
394
+ TOOL_CONFIRMATION_SYSTEM_NOTE: string;
395
+ MCP_TOOL_CONFIRMATION_TTL_MS: number;
396
+ MCP_TOOL_CONFIRMATION_ARG: string;
397
+ MCP_TOOL_CONFIRMATION_ARG_DESCRIPTION: string;
389
398
  CHANNEL_DEBOUNCE_DEFAULT_MS: number;
390
399
  CHANNEL_DEBOUNCE_MIN_MS: number;
391
400
  CHANNEL_DEBOUNCE_MAX_MS: number;
@@ -418,8 +427,10 @@ export declare const constants: {
418
427
  DISCORD_TIMESTAMP_HEADER: string;
419
428
  DISCORD_INTERACTION_TYPE_PING: number;
420
429
  DISCORD_INTERACTION_TYPE_APPLICATION_COMMAND: number;
430
+ DISCORD_INTERACTION_TYPE_MESSAGE_COMPONENT: number;
421
431
  DISCORD_INTERACTION_RESPONSE_PONG: number;
422
432
  DISCORD_INTERACTION_RESPONSE_DEFERRED: number;
433
+ DISCORD_INTERACTION_RESPONSE_UPDATE_MESSAGE: number;
423
434
  DISCORD_CHANNEL_TYPE_DM: number;
424
435
  DISCORD_CHANNEL_TYPE_GROUP_DM: number;
425
436
  DISCORD_GATEWAY_OP_DISPATCH: number;
@@ -434,6 +445,7 @@ export declare const constants: {
434
445
  WHATSAPP_API_BASE: string;
435
446
  WHATSAPP_API_VERSION: string;
436
447
  WHATSAPP_MESSAGE_LIMIT: number;
448
+ WHATSAPP_INTERACTIVE_BODY_LIMIT: number;
437
449
  WHATSAPP_SIGNATURE_HEADER: string;
438
450
  WHATSAPP_SIGNATURE_PREFIX: string;
439
451
  WHATSAPP_HUB_MODE_PARAM: string;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AA6JA,QAAA,MAAM,yBAAyB,EAAiB,UAAU,CAAC;AAC3D,QAAA,MAAM,+BAA+B,EAAuB,gBAAgB,CAAC;AAC7E,QAAA,MAAM,8BAA8B,EAAsB,eAAe,CAAC;AAC1E,QAAA,MAAM,wBAAwB,EAAgB,SAAS,CAAC;AAuCxD,QAAA,MAAM,sBAAsB,EAAiB,UAAU,CAAC;AACxD,QAAA,MAAM,4BAA4B,EAAuB,gBAAgB,CAAC;AAC1E,QAAA,MAAM,oBAAoB,EAAe,QAAQ,CAAC;AAClD,QAAA,MAAM,oBAAoB,EAAe,QAAQ,CAAC;AAoFlD,QAAA,MAAM,4BAA4B,EAAc,OAAO,CAAC;AACxD,QAAA,MAAM,6BAA6B,EAAe,QAAQ,CAAC;AAyU3D,QAAA,MAAM,sBAAsB,EAAkB,WAAW,CAAC;AAC1D,QAAA,MAAM,mBAAmB,EAAe,QAAQ,CAAC;AAGjD,QAAA,MAAM,mBAAmB,EAAe,QAAQ,CAAC;AAwVjD,MAAM,MAAM,mBAAmB,GAC3B;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IAC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;;;;;;;;;;;;CAs9DnE,CAAC"}
package/dist/constants.js CHANGED
@@ -234,6 +234,16 @@ const RESOURCE_SYNC_BATCH_SIZE = 50;
234
234
  // plan, and a website sync re-crawls every page, so it can't be a button to
235
235
  // press in a loop.
236
236
  const RESOURCE_SYNC_MANUAL_COOLDOWN_MS = 5 * 60 * 1000;
237
+ // How long a sync may stay PENDING before it counts as stuck rather than
238
+ // running. A lost queue message or a job that exhausted its retries never
239
+ // completes its root, and a root that stays PENDING would otherwise be skipped
240
+ // by the hourly job and refused by "Sync now" forever. Twelve hours outlasts
241
+ // any realistic wait: the crawl-page queue runs 5 at a time for every org, and
242
+ // one hourly run can queue 50 sites — thousands of pages, hours of backlog. A
243
+ // shorter window restarts syncs that are merely queued, re-fetching every page
244
+ // into the same backlog; a longer one leaves a stuck daily source missing more
245
+ // than one sync.
246
+ const RESOURCE_SYNC_STALE_MS = 12 * 60 * 60 * 1000;
237
247
  const CRAWL_RENDERER_CHEERIO = 'cheerio';
238
248
  const CRAWL_RENDERER_PLAYWRIGHT = 'playwright';
239
249
  const CRAWL_RENDERERS = [CRAWL_RENDERER_CHEERIO, CRAWL_RENDERER_PLAYWRIGHT];
@@ -620,6 +630,53 @@ const CHANNEL_DEBOUNCE_JOIN = '\n';
620
630
  // and how many times it tries before dropping the batch rather than looping.
621
631
  const CHANNEL_DEBOUNCE_RETRY_MS = 5000;
622
632
  const CHANNEL_DEBOUNCE_MAX_ATTEMPTS = 3;
633
+ // Confirming sensitive actions, for organizations that turn it on. A channel
634
+ // bot that wants to run a tool annotated `destructiveHint` asks first, and the
635
+ // call runs only if the participant's next message is a plain yes.
636
+ //
637
+ // How long the question stays open. An answer after that is read as a new
638
+ // message, never as consent to something asked long ago.
639
+ const TOOL_CONFIRMATION_TTL_MS = 30 * 60 * 1000;
640
+ // The tool result the model gets instead of running the call. It is what makes
641
+ // the model write the question — in the participant's language, naming what
642
+ // the call would do — rather than claiming the action happened.
643
+ // The call's exact arguments are listed under the model's question by the
644
+ // runner, so the model only has to say what it is about to do.
645
+ const TOOL_CONFIRMATION_REQUIRED_RESULT = 'Not run yet: this action needs the user to confirm it first. In one or ' +
646
+ 'two sentences, tell them what it will do (who it goes to, what will be ' +
647
+ 'changed or deleted) and ask them to answer yes to go ahead or no to ' +
648
+ 'cancel — in their own language, never quoting English words at someone ' +
649
+ 'writing in another one. The exact details are listed for them under your ' +
650
+ 'message. It runs only if their next message is yes. Do not say it was done.';
651
+ // Told to the model on every turn of an organization that confirms: the
652
+ // asking is done for it, so it calls the tool when asked instead of asking
653
+ // first itself — and calls every action a request needs in one step, since
654
+ // the turn stops at the first held call and each later one would be a
655
+ // question of its own.
656
+ const TOOL_CONFIRMATION_SYSTEM_NOTE = 'Actions that send, change or delete something are confirmed with the ' +
657
+ 'user by the system before they run. Ask for any detail you are missing, ' +
658
+ 'but once you have what the action needs, call the tool — do not ask the ' +
659
+ 'user to confirm it yourself; the system asks them and runs it on their ' +
660
+ 'yes. When a request needs several such actions (say, delete an event ' +
661
+ 'and create its replacement), call them all in the same step, so the ' +
662
+ 'user confirms them together once.';
663
+ // The system-prompt addition for the step that writes the question, with the
664
+ // held actions' names in place of {{actions}}.
665
+ const TOOL_CONFIRMATION_ASK_INSTRUCTION = 'IMPORTANT: these actions have NOT been done: {{actions}}. They are ' +
666
+ 'waiting for the user to confirm them. Your reply must ask the user to ' +
667
+ 'confirm, and must not say or suggest that they were done, nor describe ' +
668
+ 'or make up any result from them.';
669
+ // For MCP clients, whose chat the server can't see: a sensitive call without a
670
+ // valid confirmation isn't run, and the model is told to ask the user and call
671
+ // again with a token that binds the second call to these exact arguments.
672
+ // How long that token stays good, and the argument that carries it.
673
+ const MCP_TOOL_CONFIRMATION_TTL_MS = 10 * 60 * 1000;
674
+ const MCP_TOOL_CONFIRMATION_ARG = 'confirmation';
675
+ const MCP_TOOL_CONFIRMATION_ARG_DESCRIPTION = "Leave out on the first call. This action needs the user's yes: the " +
676
+ 'first call returns a token; after the user says yes, call again with the ' +
677
+ 'same arguments and that token here.';
678
+ // The question when the model wrote none, above the runner's own summary.
679
+ const TOOL_CONFIRMATION_FALLBACK_QUESTION = 'Before I do this, please confirm. Reply yes to go ahead, or no to cancel.';
623
680
  const TELEGRAM_SECRET_HEADER = 'x-telegram-bot-api-secret-token';
624
681
  const TELEGRAM_API_BASE = 'https://api.telegram.org';
625
682
  const TELEGRAM_MESSAGE_LIMIT = 3500;
@@ -676,8 +733,12 @@ const DISCORD_TIMESTAMP_HEADER = 'x-signature-timestamp';
676
733
  // Interaction request types and response types (Discord API).
677
734
  const DISCORD_INTERACTION_TYPE_PING = 1;
678
735
  const DISCORD_INTERACTION_TYPE_APPLICATION_COMMAND = 2;
736
+ // A tap on a message button — the Yes/No under a confirmation question.
737
+ const DISCORD_INTERACTION_TYPE_MESSAGE_COMPONENT = 3;
679
738
  const DISCORD_INTERACTION_RESPONSE_PONG = 1;
680
739
  const DISCORD_INTERACTION_RESPONSE_DEFERRED = 5;
740
+ // Edits the message the tapped button is on, in the same response.
741
+ const DISCORD_INTERACTION_RESPONSE_UPDATE_MESSAGE = 7;
681
742
  // Channel types we map to conversation scopes: DM (1) / group DM (3) = private;
682
743
  // everything else (guild text channels, threads) = channel.
683
744
  const DISCORD_CHANNEL_TYPE_DM = 1;
@@ -705,6 +766,8 @@ const WHATSAPP_API_BASE = 'https://graph.facebook.com';
705
766
  const WHATSAPP_API_VERSION = 'v25.0';
706
767
  // A WhatsApp text message body caps at 4096 chars; we chunk a bit under that.
707
768
  const WHATSAPP_MESSAGE_LIMIT = 4000;
769
+ // The body of an interactive (reply-button) message holds at most this much.
770
+ const WHATSAPP_INTERACTIVE_BODY_LIMIT = 1024;
708
771
  const WHATSAPP_SIGNATURE_HEADER = 'x-hub-signature-256';
709
772
  const WHATSAPP_SIGNATURE_PREFIX = 'sha256=';
710
773
  // GET-handshake query params + the expected hub.mode value.
@@ -2179,6 +2242,7 @@ exports.constants = {
2179
2242
  RESOURCE_SYNC_INTERVAL_MS,
2180
2243
  RESOURCE_SYNC_BATCH_SIZE,
2181
2244
  RESOURCE_SYNC_MANUAL_COOLDOWN_MS,
2245
+ RESOURCE_SYNC_STALE_MS,
2182
2246
  CRAWL_RENDERER_CHEERIO,
2183
2247
  CRAWL_RENDERER_PLAYWRIGHT,
2184
2248
  CRAWL_RENDERERS,
@@ -2237,6 +2301,14 @@ exports.constants = {
2237
2301
  SHARED_KEY_HISTORY_LIMIT,
2238
2302
  SHARED_KEY_MAX_TOOL_LOOPS,
2239
2303
  CHANNEL_MAX_TOOLS,
2304
+ TOOL_CONFIRMATION_TTL_MS,
2305
+ TOOL_CONFIRMATION_REQUIRED_RESULT,
2306
+ TOOL_CONFIRMATION_FALLBACK_QUESTION,
2307
+ TOOL_CONFIRMATION_ASK_INSTRUCTION,
2308
+ TOOL_CONFIRMATION_SYSTEM_NOTE,
2309
+ MCP_TOOL_CONFIRMATION_TTL_MS,
2310
+ MCP_TOOL_CONFIRMATION_ARG,
2311
+ MCP_TOOL_CONFIRMATION_ARG_DESCRIPTION,
2240
2312
  CHANNEL_DEBOUNCE_DEFAULT_MS,
2241
2313
  CHANNEL_DEBOUNCE_MIN_MS,
2242
2314
  CHANNEL_DEBOUNCE_MAX_MS,
@@ -2269,8 +2341,10 @@ exports.constants = {
2269
2341
  DISCORD_TIMESTAMP_HEADER,
2270
2342
  DISCORD_INTERACTION_TYPE_PING,
2271
2343
  DISCORD_INTERACTION_TYPE_APPLICATION_COMMAND,
2344
+ DISCORD_INTERACTION_TYPE_MESSAGE_COMPONENT,
2272
2345
  DISCORD_INTERACTION_RESPONSE_PONG,
2273
2346
  DISCORD_INTERACTION_RESPONSE_DEFERRED,
2347
+ DISCORD_INTERACTION_RESPONSE_UPDATE_MESSAGE,
2274
2348
  DISCORD_CHANNEL_TYPE_DM,
2275
2349
  DISCORD_CHANNEL_TYPE_GROUP_DM,
2276
2350
  DISCORD_GATEWAY_OP_DISPATCH,
@@ -2285,6 +2359,7 @@ exports.constants = {
2285
2359
  WHATSAPP_API_BASE,
2286
2360
  WHATSAPP_API_VERSION,
2287
2361
  WHATSAPP_MESSAGE_LIMIT,
2362
+ WHATSAPP_INTERACTIVE_BODY_LIMIT,
2288
2363
  WHATSAPP_SIGNATURE_HEADER,
2289
2364
  WHATSAPP_SIGNATURE_PREFIX,
2290
2365
  WHATSAPP_HUB_MODE_PARAM,