charness 4.1.0 → 4.1.1
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 +23 -0
- package/DEVELOPMENT.md +1 -1
- package/SETUP.md +34 -8
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +60 -5
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +128 -14
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +164 -31
- package/dist/bot.js.map +1 -1
- package/dist/connectors/jira/answerSink.d.ts +8 -0
- package/dist/connectors/jira/answerSink.d.ts.map +1 -1
- package/dist/connectors/jira/answerSink.js +15 -0
- package/dist/connectors/jira/answerSink.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +16 -0
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +21 -2
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +10 -3
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +21 -3
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts +200 -18
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +814 -43
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/prompt.d.ts +46 -0
- package/dist/connectors/jira/prompt.d.ts.map +1 -1
- package/dist/connectors/jira/prompt.js +123 -15
- package/dist/connectors/jira/prompt.js.map +1 -1
- package/dist/connectors/jira/trigger.d.ts +27 -4
- package/dist/connectors/jira/trigger.d.ts.map +1 -1
- package/dist/connectors/jira/trigger.js +35 -1
- package/dist/connectors/jira/trigger.js.map +1 -1
- package/dist/connectors/jira/triggerLog.d.ts +60 -5
- package/dist/connectors/jira/triggerLog.d.ts.map +1 -1
- package/dist/connectors/jira/triggerLog.js +116 -7
- package/dist/connectors/jira/triggerLog.js.map +1 -1
- package/dist/connectors/telegram/commands/runners.d.ts +28 -1
- package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.js +75 -40
- package/dist/connectors/telegram/commands/runners.js.map +1 -1
- package/dist/connectors/telegram/sendOutcome.d.ts +3 -1
- package/dist/connectors/telegram/sendOutcome.d.ts.map +1 -1
- package/dist/connectors/telegram/sendOutcome.js.map +1 -1
- package/dist/connectors/telegram/telegramFailureRetry.d.ts +8 -0
- package/dist/connectors/telegram/telegramFailureRetry.d.ts.map +1 -1
- package/dist/connectors/telegram/telegramFailureRetry.js +8 -0
- package/dist/connectors/telegram/telegramFailureRetry.js.map +1 -1
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +4 -0
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +4 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +4 -0
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +4 -0
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +4 -0
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +4 -0
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +4 -0
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +4 -0
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +4 -0
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +4 -0
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +4 -0
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +4 -0
- package/dist/i18n/zh.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -1
- package/dist/i18n.js.map +1 -1
- package/dist/requests/requestHeader.d.ts.map +1 -1
- package/dist/requests/requestHeader.js +1 -0
- package/dist/requests/requestHeader.js.map +1 -1
- package/dist/requests/types.d.ts +4 -1
- package/dist/requests/types.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.d.ts +31 -1
- package/dist/requests/wakeUpEngine.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.js +94 -2
- package/dist/requests/wakeUpEngine.js.map +1 -1
- package/dist/requests/wakeUpRules.d.ts +7 -0
- package/dist/requests/wakeUpRules.d.ts.map +1 -1
- package/dist/requests/wakeUpRules.js +14 -0
- package/dist/requests/wakeUpRules.js.map +1 -1
- package/dist/scheduler/engine.d.ts +17 -4
- package/dist/scheduler/engine.d.ts.map +1 -1
- package/dist/scheduler/engine.js +55 -10
- package/dist/scheduler/engine.js.map +1 -1
- package/dist/scheduler/mcpBoot.d.ts +6 -2
- package/dist/scheduler/mcpBoot.d.ts.map +1 -1
- package/dist/scheduler/mcpBoot.js +7 -1
- package/dist/scheduler/mcpBoot.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +18 -9
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/sendErrorClassifier.d.ts +6 -0
- package/dist/sendErrorClassifier.d.ts.map +1 -1
- package/dist/sendErrorClassifier.js +9 -0
- package/dist/sendErrorClassifier.js.map +1 -1
- package/dist/startupPromptBuffer.d.ts +8 -8
- package/dist/startupPromptBuffer.d.ts.map +1 -1
- package/dist/startupPromptBuffer.js +7 -5
- package/dist/startupPromptBuffer.js.map +1 -1
- package/dist/testTimings.d.ts +3 -2
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +3 -1
- package/dist/testTimings.js.map +1 -1
- package/dist/threadRouting.d.ts +23 -0
- package/dist/threadRouting.d.ts.map +1 -1
- package/dist/threadRouting.js +28 -0
- package/dist/threadRouting.js.map +1 -1
- package/dist/trackers/taskAgentSlots.d.ts +42 -3
- package/dist/trackers/taskAgentSlots.d.ts.map +1 -1
- package/dist/trackers/taskAgentSlots.js +31 -11
- package/dist/trackers/taskAgentSlots.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/fileSendPlan.d.ts +30 -8
- package/dist/utils/fileSendPlan.d.ts.map +1 -1
- package/dist/utils/fileSendPlan.js +37 -12
- package/dist/utils/fileSendPlan.js.map +1 -1
- package/dist/utils/fileSendService.d.ts +1 -1
- package/dist/utils/fileSendService.d.ts.map +1 -1
- package/dist/utils/fileSendService.js +9 -1
- package/dist/utils/fileSendService.js.map +1 -1
- package/dist/utils/imageDimensions.d.ts +32 -0
- package/dist/utils/imageDimensions.d.ts.map +1 -0
- package/dist/utils/imageDimensions.js +181 -0
- package/dist/utils/imageDimensions.js.map +1 -0
- package/dist/utils/jsonStreamHost.d.ts +35 -9
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +59 -16
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/lostWork.d.ts +8 -2
- package/dist/utils/lostWork.d.ts.map +1 -1
- package/dist/utils/lostWork.js +9 -5
- package/dist/utils/lostWork.js.map +1 -1
- package/dist/utils/promptDelivery.d.ts +11 -2
- package/dist/utils/promptDelivery.d.ts.map +1 -1
- package/dist/utils/promptDelivery.js +3 -3
- package/dist/utils/promptDelivery.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mentionTriggerIdPrefix = exports.createdTriggerId = void 0;
|
|
3
|
+
exports.updatesPausedTriggerIdPrefix = exports.heldMentionTriggerIdPrefix = exports.commentTriggerIdPrefix = exports.mentionTriggerIdPrefix = exports.createdTriggerId = void 0;
|
|
4
4
|
exports.createMentionTrigger = createMentionTrigger;
|
|
5
|
+
exports.createCommentTrigger = createCommentTrigger;
|
|
6
|
+
exports.checkIsHandOverTriggerId = checkIsHandOverTriggerId;
|
|
7
|
+
exports.compareJiraCommentIds = compareJiraCommentIds;
|
|
5
8
|
exports.getItemField = getItemField;
|
|
6
9
|
exports.findNewestTrigger = findNewestTrigger;
|
|
7
10
|
exports.getIssueTrigger = getIssueTrigger;
|
|
@@ -26,10 +29,41 @@ const personAccountType = 'atlassian';
|
|
|
26
29
|
const appAccountType = 'app';
|
|
27
30
|
/** The trigger id of a comment that mentioned the AI account is this prefix and the comment's id (a changelog id is numeric: no clash). */
|
|
28
31
|
exports.mentionTriggerIdPrefix = 'mention:';
|
|
32
|
+
/** The trigger id of a comment on an issue handed to the AI account (its comment scan) is this prefix and the comment's id. */
|
|
33
|
+
exports.commentTriggerIdPrefix = 'comment:';
|
|
34
|
+
/**
|
|
35
|
+
* Marks a mention held back from its issue update — the cap on updates paused it, or its post failed — and not decided yet:
|
|
36
|
+
* this prefix and the comment's id. The mention scan keeps it, outside the mention window too, until it is delivered.
|
|
37
|
+
*/
|
|
38
|
+
exports.heldMentionTriggerIdPrefix = 'held-mention:';
|
|
39
|
+
/** The trigger id of a pause of an issue's updates (the cap): this prefix and the pause's end (epoch ms). */
|
|
40
|
+
exports.updatesPausedTriggerIdPrefix = 'updates-paused:';
|
|
29
41
|
/** @description The trigger of the comment `commentId`, written by `author`, that mentions the AI account. */
|
|
30
42
|
function createMentionTrigger(commentId, author) {
|
|
31
43
|
return { triggerId: `${exports.mentionTriggerIdPrefix}${commentId}`, kind: 'mentioned', author, commentId };
|
|
32
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @description The trigger of the new comments `commentIds` (oldest first) on an issue handed to the AI account while no
|
|
47
|
+
* hand-over request of it is open: the newest one names it, and its author (`author`) is the requester.
|
|
48
|
+
*/
|
|
49
|
+
function createCommentTrigger(commentIds, author) {
|
|
50
|
+
const commentId = commentIds[commentIds.length - 1];
|
|
51
|
+
return { triggerId: `${exports.commentTriggerIdPrefix}${commentId}`, kind: 'commented', author, commentId, commentIds };
|
|
52
|
+
}
|
|
53
|
+
/** @description A hand-over's trigger (a changelog entry, a creation) — not a comment's or a mention's. */
|
|
54
|
+
function checkIsHandOverTriggerId(triggerId) {
|
|
55
|
+
return !triggerId.startsWith(exports.mentionTriggerIdPrefix) && !triggerId.startsWith(exports.commentTriggerIdPrefix);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @description Order two Jira comment ids: they are numbers that grow with every comment of the site, so a later comment
|
|
59
|
+
* has the greater id. Compared as digit strings (any length); an id that is not one falls back to a text compare.
|
|
60
|
+
*/
|
|
61
|
+
function compareJiraCommentIds(left, right) {
|
|
62
|
+
const isNumeric = /^\d+$/.test(left) && /^\d+$/.test(right);
|
|
63
|
+
if (isNumeric && left.length !== right.length)
|
|
64
|
+
return left.length - right.length;
|
|
65
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
66
|
+
}
|
|
33
67
|
/** A changelog item names its field by `fieldId` (stable) or, on older entries, only by `field`. */
|
|
34
68
|
function getItemField(item) {
|
|
35
69
|
return item.fieldId ?? item.field;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../src/connectors/jira/trigger.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../src/connectors/jira/trigger.ts"],"names":[],"mappings":";;;AAiDA,oDAEC;AAMD,oDAGC;AAGD,4DAEC;AAMD,sDAIC;AAQD,oCAEC;AAuBD,8CA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W,CAAC;AACzH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAC/B,SAA0C,EAC1C,OAAyB,EACzB,WAAmB;IAEnB,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5C,MAAM,WAAW,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACrE,MAAM,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1F,IAAI,YAAY,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,WAAW,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,IAAI,IAAI,CAAC;AACvI,CAAC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAC1B,OAAyB,EACzB,SAA0C,EAC1C,QAA4B,EAC5B,WAAmB;IAEnB,IAAI,yBAAyB,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;QAAE,OAAO,OAAO,CAAC,MAAM,CAAC;IAClF,OAAO,iBAAiB,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,QAAQ,CAAC;AACxE,CAAC"}
|
|
@@ -8,20 +8,31 @@ import { RotatingJsonlFile } from '../../utils/rotatingJsonlFile';
|
|
|
8
8
|
* owned, so the core request ledger stays platform-agnostic.
|
|
9
9
|
*/
|
|
10
10
|
export declare const jiraTriggerLogFileName = "jira-triggers.jsonl";
|
|
11
|
+
/**
|
|
12
|
+
* How long a mention held back from its issue update stays in the mention scan after it was first held: past the longest
|
|
13
|
+
* pause of the cap on updates (24 h), with a day to spare for a bot that was down when the pause ended.
|
|
14
|
+
*/
|
|
15
|
+
export declare const jiraHeldMentionKeepMs: number;
|
|
11
16
|
/**
|
|
12
17
|
* @name JiraTriggerOutcome
|
|
13
18
|
* @description `request` — a request was opened; `selfAuthored` — the AI account
|
|
14
|
-
* made the change itself; `parked` — the issue was over its run budget
|
|
15
|
-
* `
|
|
16
|
-
*
|
|
17
|
-
*
|
|
19
|
+
* made the change itself; `parked` — the issue was over its run budget (and, under an
|
|
20
|
+
* `updates-paused:` or `held-mention:` trigger id, a pause of the issue's updates and a
|
|
21
|
+
* mention that pause or a failed post held back: neither decides a comment);
|
|
22
|
+
* `untrusted` — the hand-over (or the mention, or the comment) was made by someone the trusted
|
|
23
|
+
* group does not back; `covered` — with `wakeOnComment` off, a mention by the requester of an
|
|
24
|
+
* open hand-over request of the issue, recorded and not delivered (it opens no request and
|
|
25
|
+
* counts for nothing); `update` — a comment that reached the agent inside an open hand-over
|
|
26
|
+
* request (an issue update), or alongside a newer comment's request of the same poll (it opens
|
|
27
|
+
* no request and counts for nothing).
|
|
18
28
|
*/
|
|
19
|
-
export type JiraTriggerOutcome = 'request' | 'selfAuthored' | 'parked' | 'untrusted' | 'covered';
|
|
29
|
+
export type JiraTriggerOutcome = 'request' | 'selfAuthored' | 'parked' | 'untrusted' | 'covered' | 'update';
|
|
20
30
|
declare const triggerRecordSchema: z.ZodObject<{
|
|
21
31
|
issueKey: z.ZodString;
|
|
22
32
|
triggerId: z.ZodString;
|
|
23
33
|
outcome: z.ZodEnum<{
|
|
24
34
|
request: "request";
|
|
35
|
+
update: "update";
|
|
25
36
|
untrusted: "untrusted";
|
|
26
37
|
selfAuthored: "selfAuthored";
|
|
27
38
|
parked: "parked";
|
|
@@ -29,6 +40,7 @@ declare const triggerRecordSchema: z.ZodObject<{
|
|
|
29
40
|
}>;
|
|
30
41
|
at: z.ZodNumber;
|
|
31
42
|
requestId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
newestCommentId: z.ZodOptional<z.ZodString>;
|
|
32
44
|
isNoticePosted: z.ZodOptional<z.ZodBoolean>;
|
|
33
45
|
}, z.core.$strip>;
|
|
34
46
|
export type JiraTriggerRecord = z.infer<typeof triggerRecordSchema>;
|
|
@@ -37,16 +49,59 @@ export declare class JiraTriggerLog {
|
|
|
37
49
|
private readonly seen;
|
|
38
50
|
private readonly requestTimesByIssue;
|
|
39
51
|
private readonly mentionParkNoticeTimesByIssue;
|
|
52
|
+
private readonly updatesPausedNoticeTimesByIssue;
|
|
53
|
+
/** Per issue, the mentions held back from their issue update and not decided since: comment id → when first held. */
|
|
54
|
+
private readonly heldMentionsByIssue;
|
|
55
|
+
private readonly newestCommentIdByIssue;
|
|
56
|
+
/** Per issue, when each issue update was posted (its comments share the time). */
|
|
57
|
+
private readonly updateTimesByIssue;
|
|
58
|
+
private readonly lastDecidedAtByIssue;
|
|
40
59
|
constructor(file: RotatingJsonlFile<JiraTriggerRecord>);
|
|
41
60
|
static createForDataDir(filePath: string): JiraTriggerLog;
|
|
42
61
|
/** @description Index the file. A line that does not parse is skipped with a warning (never fatal). */
|
|
43
62
|
load(): Promise<void>;
|
|
44
63
|
private index;
|
|
64
|
+
/** Where a posted notice of `record` is counted: a mention's park notice, or a pause's "updates paused" one; else nowhere. */
|
|
65
|
+
private getNoticeTimesByIssue;
|
|
66
|
+
/** A held mention joins the issue's list unless its comment was decided already; a comment's or a mention's decision ends it. */
|
|
67
|
+
private indexHeldMention;
|
|
45
68
|
checkIsSeen(issueKey: string, triggerId: string): boolean;
|
|
46
69
|
/** @description Requests opened for the issue in the rolling 24 h before `nowMs`: hand-overs and mentions together. */
|
|
47
70
|
getRequestCountLastDay(issueKey: string, nowMs: number): number;
|
|
71
|
+
/**
|
|
72
|
+
* @description The newest comment id any recorded prompt of the issue was built from (see `newestCommentId`), or
|
|
73
|
+
* `null` when no decision of the issue recorded one.
|
|
74
|
+
*/
|
|
75
|
+
getNewestShownCommentId(issueKey: string): string | null;
|
|
76
|
+
/** @description When the newest decision on the issue was made (epoch ms), or `null` when none is recorded. */
|
|
77
|
+
getLastDecidedAt(issueKey: string): number | null;
|
|
78
|
+
/**
|
|
79
|
+
* @description Issue updates posted on the issue in the rolling 24 h before `nowMs` — one per post, however many comments
|
|
80
|
+
* it carried (they are recorded with its time) — for the cap on updates.
|
|
81
|
+
*/
|
|
82
|
+
getUpdateCountLastDay(issueKey: string, nowMs: number): number;
|
|
83
|
+
/**
|
|
84
|
+
* @description When the oldest issue update of the rolling 24 h before `nowMs` leaves that window — the moment a capped
|
|
85
|
+
* issue may get an update again — or `null` when there is none.
|
|
86
|
+
*/
|
|
87
|
+
getUpdateWindowEnd(issueKey: string, nowMs: number): number | null;
|
|
48
88
|
/** @description Was a mention park notice posted on the issue in the rolling 24 h before `nowMs`? */
|
|
49
89
|
checkIsMentionParkNoticePostedLastDay(issueKey: string, nowMs: number): boolean;
|
|
90
|
+
/** @description Was an "updates are paused" notice posted on the issue in the rolling 24 h before `nowMs`? */
|
|
91
|
+
checkIsUpdatesPausedNoticePostedLastDay(issueKey: string, nowMs: number): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @description The comment ids of the issue's mentions held back from their issue update (see `held-mention:`), first
|
|
94
|
+
* held within {@link jiraHeldMentionKeepMs} before `nowMs`, and not decided since.
|
|
95
|
+
*/
|
|
96
|
+
listHeldMentionIds(issueKey: string, nowMs: number): string[];
|
|
97
|
+
/** @description The issues with a held mention (see {@link listHeldMentionIds}). */
|
|
98
|
+
listHeldMentionIssueKeys(nowMs: number): string[];
|
|
99
|
+
/**
|
|
100
|
+
* @description Stop keeping a held mention: its comment was decided, a prompt carried it since, or it can never be
|
|
101
|
+
* decided (the comment or its issue gone). Indexing a decision ends it for good; a call by the scan holds for this
|
|
102
|
+
* process only — after a restart the scan finds it once more and lets it go again.
|
|
103
|
+
*/
|
|
104
|
+
forgetHeldMention(issueKey: string, commentId: string): void;
|
|
50
105
|
/** @description Persist a decision; `false` when the line could not be written (then nothing is indexed). */
|
|
51
106
|
record(record: JiraTriggerRecord): boolean;
|
|
52
107
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggerLog.d.ts","sourceRoot":"","sources":["../../../src/connectors/jira/triggerLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;GAMG;AAEH,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"triggerLog.d.ts","sourceRoot":"","sources":["../../../src/connectors/jira/triggerLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;GAMG;AAEH,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAI5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAe,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5G,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAkBvB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMpE,qBAAa,cAAc;IAYb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAXjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA+B;IACnE,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAA+B;IAC7E,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAA+B;IAC/E,qHAAqH;IACrH,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA0C;IAC9E,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA6B;I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E,MAAM,GAAG,MAAM,EAAE;IAIjD;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAO5D,6GAA6G;IAC7G,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO;IAM1C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;CAG1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JiraTriggerLog = exports.jiraTriggerLogFileName = void 0;
|
|
3
|
+
exports.JiraTriggerLog = exports.jiraHeldMentionKeepMs = exports.jiraTriggerLogFileName = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const rotatingJsonlFile_1 = require("../../utils/rotatingJsonlFile");
|
|
6
6
|
const trigger_1 = require("./trigger");
|
|
@@ -15,16 +15,27 @@ exports.jiraTriggerLogFileName = 'jira-triggers.jsonl';
|
|
|
15
15
|
/** Ample for years of triggers; the one `.1` backup is read too. */
|
|
16
16
|
const jiraTriggerLogMaxBytes = 10 * 1024 * 1024;
|
|
17
17
|
const msPerDay = 24 * 60 * 60 * 1000;
|
|
18
|
+
/**
|
|
19
|
+
* How long a mention held back from its issue update stays in the mention scan after it was first held: past the longest
|
|
20
|
+
* pause of the cap on updates (24 h), with a day to spare for a bot that was down when the pause ended.
|
|
21
|
+
*/
|
|
22
|
+
exports.jiraHeldMentionKeepMs = 2 * msPerDay;
|
|
18
23
|
const triggerRecordSchema = zod_1.z.object({
|
|
19
24
|
issueKey: zod_1.z.string().min(1),
|
|
20
25
|
triggerId: zod_1.z.string().min(1),
|
|
21
|
-
outcome: zod_1.z.enum(['request', 'selfAuthored', 'parked', 'untrusted', 'covered']),
|
|
26
|
+
outcome: zod_1.z.enum(['request', 'selfAuthored', 'parked', 'untrusted', 'covered', 'update']),
|
|
22
27
|
/** Epoch ms. */
|
|
23
28
|
at: zod_1.z.number(),
|
|
24
29
|
requestId: zod_1.z.string().optional(),
|
|
25
30
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
31
|
+
* The newest comment of the issue (by id) the prompt that went with this decision was built from: the conversation
|
|
32
|
+
* was shown every comment up to it, so only a later one is new to it — whatever a compaction or a fresh session
|
|
33
|
+
* made it forget. Absent on a decision that sent no prompt, and on every line written before it was recorded.
|
|
34
|
+
*/
|
|
35
|
+
newestCommentId: zod_1.z.string().optional(),
|
|
36
|
+
/**
|
|
37
|
+
* A `parked` mention, or a pause of the issue's updates: whether its notice was posted (at most one of each kind per issue
|
|
38
|
+
* per rolling 24 h, the others are recorded silently). Absent → posted, as every older line was.
|
|
28
39
|
*/
|
|
29
40
|
isNoticePosted: zod_1.z.boolean().optional(),
|
|
30
41
|
});
|
|
@@ -36,6 +47,13 @@ class JiraTriggerLog {
|
|
|
36
47
|
seen = new Set();
|
|
37
48
|
requestTimesByIssue = new Map();
|
|
38
49
|
mentionParkNoticeTimesByIssue = new Map();
|
|
50
|
+
updatesPausedNoticeTimesByIssue = new Map();
|
|
51
|
+
/** Per issue, the mentions held back from their issue update and not decided since: comment id → when first held. */
|
|
52
|
+
heldMentionsByIssue = new Map();
|
|
53
|
+
newestCommentIdByIssue = new Map();
|
|
54
|
+
/** Per issue, when each issue update was posted (its comments share the time). */
|
|
55
|
+
updateTimesByIssue = new Map();
|
|
56
|
+
lastDecidedAtByIssue = new Map();
|
|
39
57
|
constructor(file) {
|
|
40
58
|
this.file = file;
|
|
41
59
|
}
|
|
@@ -52,10 +70,22 @@ class JiraTriggerLog {
|
|
|
52
70
|
}
|
|
53
71
|
index(record) {
|
|
54
72
|
this.seen.add(getTriggerIdentity(record.issueKey, record.triggerId));
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
this.lastDecidedAtByIssue.set(record.issueKey, Math.max(record.at, this.lastDecidedAtByIssue.get(record.issueKey) ?? record.at));
|
|
74
|
+
const shownBefore = this.newestCommentIdByIssue.get(record.issueKey);
|
|
75
|
+
if (record.newestCommentId !== undefined && (shownBefore === undefined || (0, trigger_1.compareJiraCommentIds)(record.newestCommentId, shownBefore) > 0)) {
|
|
76
|
+
this.newestCommentIdByIssue.set(record.issueKey, record.newestCommentId);
|
|
77
|
+
}
|
|
78
|
+
const noticeTimesByIssue = this.getNoticeTimesByIssue(record);
|
|
79
|
+
if (noticeTimesByIssue) {
|
|
80
|
+
const noticeTimes = noticeTimesByIssue.get(record.issueKey) ?? [];
|
|
57
81
|
noticeTimes.push(record.at);
|
|
58
|
-
|
|
82
|
+
noticeTimesByIssue.set(record.issueKey, noticeTimes);
|
|
83
|
+
}
|
|
84
|
+
this.indexHeldMention(record);
|
|
85
|
+
if (record.outcome === 'update') {
|
|
86
|
+
const updateTimes = this.updateTimesByIssue.get(record.issueKey) ?? new Set();
|
|
87
|
+
updateTimes.add(record.at);
|
|
88
|
+
this.updateTimesByIssue.set(record.issueKey, updateTimes);
|
|
59
89
|
}
|
|
60
90
|
if (record.outcome !== 'request')
|
|
61
91
|
return;
|
|
@@ -63,6 +93,31 @@ class JiraTriggerLog {
|
|
|
63
93
|
times.push(record.at);
|
|
64
94
|
this.requestTimesByIssue.set(record.issueKey, times);
|
|
65
95
|
}
|
|
96
|
+
/** Where a posted notice of `record` is counted: a mention's park notice, or a pause's "updates paused" one; else nowhere. */
|
|
97
|
+
getNoticeTimesByIssue(record) {
|
|
98
|
+
if (record.outcome !== 'parked' || record.isNoticePosted === false)
|
|
99
|
+
return null;
|
|
100
|
+
if (record.triggerId.startsWith(trigger_1.mentionTriggerIdPrefix))
|
|
101
|
+
return this.mentionParkNoticeTimesByIssue;
|
|
102
|
+
return record.triggerId.startsWith(trigger_1.updatesPausedTriggerIdPrefix) ? this.updatesPausedNoticeTimesByIssue : null;
|
|
103
|
+
}
|
|
104
|
+
/** A held mention joins the issue's list unless its comment was decided already; a comment's or a mention's decision ends it. */
|
|
105
|
+
indexHeldMention(record) {
|
|
106
|
+
const { issueKey, triggerId } = record;
|
|
107
|
+
if (triggerId.startsWith(trigger_1.heldMentionTriggerIdPrefix)) {
|
|
108
|
+
const commentId = triggerId.slice(trigger_1.heldMentionTriggerIdPrefix.length);
|
|
109
|
+
if (this.checkIsSeen(issueKey, `${trigger_1.mentionTriggerIdPrefix}${commentId}`) || this.checkIsSeen(issueKey, `${trigger_1.commentTriggerIdPrefix}${commentId}`))
|
|
110
|
+
return;
|
|
111
|
+
const held = this.heldMentionsByIssue.get(issueKey) ?? new Map();
|
|
112
|
+
if (!held.has(commentId))
|
|
113
|
+
held.set(commentId, record.at);
|
|
114
|
+
this.heldMentionsByIssue.set(issueKey, held);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const decidedPrefix = [trigger_1.mentionTriggerIdPrefix, trigger_1.commentTriggerIdPrefix].find((prefix) => triggerId.startsWith(prefix));
|
|
118
|
+
if (decidedPrefix !== undefined)
|
|
119
|
+
this.forgetHeldMention(issueKey, triggerId.slice(decidedPrefix.length));
|
|
120
|
+
}
|
|
66
121
|
checkIsSeen(issueKey, triggerId) {
|
|
67
122
|
return this.seen.has(getTriggerIdentity(issueKey, triggerId));
|
|
68
123
|
}
|
|
@@ -70,10 +125,64 @@ class JiraTriggerLog {
|
|
|
70
125
|
getRequestCountLastDay(issueKey, nowMs) {
|
|
71
126
|
return (this.requestTimesByIssue.get(issueKey) ?? []).filter((at) => at > nowMs - msPerDay).length;
|
|
72
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* @description The newest comment id any recorded prompt of the issue was built from (see `newestCommentId`), or
|
|
130
|
+
* `null` when no decision of the issue recorded one.
|
|
131
|
+
*/
|
|
132
|
+
getNewestShownCommentId(issueKey) {
|
|
133
|
+
return this.newestCommentIdByIssue.get(issueKey) ?? null;
|
|
134
|
+
}
|
|
135
|
+
/** @description When the newest decision on the issue was made (epoch ms), or `null` when none is recorded. */
|
|
136
|
+
getLastDecidedAt(issueKey) {
|
|
137
|
+
return this.lastDecidedAtByIssue.get(issueKey) ?? null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @description Issue updates posted on the issue in the rolling 24 h before `nowMs` — one per post, however many comments
|
|
141
|
+
* it carried (they are recorded with its time) — for the cap on updates.
|
|
142
|
+
*/
|
|
143
|
+
getUpdateCountLastDay(issueKey, nowMs) {
|
|
144
|
+
return [...(this.updateTimesByIssue.get(issueKey) ?? [])].filter((at) => at > nowMs - msPerDay).length;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @description When the oldest issue update of the rolling 24 h before `nowMs` leaves that window — the moment a capped
|
|
148
|
+
* issue may get an update again — or `null` when there is none.
|
|
149
|
+
*/
|
|
150
|
+
getUpdateWindowEnd(issueKey, nowMs) {
|
|
151
|
+
const inWindow = [...(this.updateTimesByIssue.get(issueKey) ?? [])].filter((at) => at > nowMs - msPerDay);
|
|
152
|
+
return inWindow.length === 0 ? null : Math.min(...inWindow) + msPerDay;
|
|
153
|
+
}
|
|
73
154
|
/** @description Was a mention park notice posted on the issue in the rolling 24 h before `nowMs`? */
|
|
74
155
|
checkIsMentionParkNoticePostedLastDay(issueKey, nowMs) {
|
|
75
156
|
return (this.mentionParkNoticeTimesByIssue.get(issueKey) ?? []).some((at) => at > nowMs - msPerDay);
|
|
76
157
|
}
|
|
158
|
+
/** @description Was an "updates are paused" notice posted on the issue in the rolling 24 h before `nowMs`? */
|
|
159
|
+
checkIsUpdatesPausedNoticePostedLastDay(issueKey, nowMs) {
|
|
160
|
+
return (this.updatesPausedNoticeTimesByIssue.get(issueKey) ?? []).some((at) => at > nowMs - msPerDay);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* @description The comment ids of the issue's mentions held back from their issue update (see `held-mention:`), first
|
|
164
|
+
* held within {@link jiraHeldMentionKeepMs} before `nowMs`, and not decided since.
|
|
165
|
+
*/
|
|
166
|
+
listHeldMentionIds(issueKey, nowMs) {
|
|
167
|
+
return [...(this.heldMentionsByIssue.get(issueKey) ?? [])].filter(([, at]) => at > nowMs - exports.jiraHeldMentionKeepMs).map(([commentId]) => commentId);
|
|
168
|
+
}
|
|
169
|
+
/** @description The issues with a held mention (see {@link listHeldMentionIds}). */
|
|
170
|
+
listHeldMentionIssueKeys(nowMs) {
|
|
171
|
+
return [...this.heldMentionsByIssue.keys()].filter((issueKey) => this.listHeldMentionIds(issueKey, nowMs).length > 0);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @description Stop keeping a held mention: its comment was decided, a prompt carried it since, or it can never be
|
|
175
|
+
* decided (the comment or its issue gone). Indexing a decision ends it for good; a call by the scan holds for this
|
|
176
|
+
* process only — after a restart the scan finds it once more and lets it go again.
|
|
177
|
+
*/
|
|
178
|
+
forgetHeldMention(issueKey, commentId) {
|
|
179
|
+
const held = this.heldMentionsByIssue.get(issueKey);
|
|
180
|
+
if (!held)
|
|
181
|
+
return;
|
|
182
|
+
held.delete(commentId);
|
|
183
|
+
if (held.size === 0)
|
|
184
|
+
this.heldMentionsByIssue.delete(issueKey);
|
|
185
|
+
}
|
|
77
186
|
/** @description Persist a decision; `false` when the line could not be written (then nothing is indexed). */
|
|
78
187
|
record(record) {
|
|
79
188
|
if (!this.file.append(record))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggerLog.js","sourceRoot":"","sources":["../../../src/connectors/jira/triggerLog.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"triggerLog.js","sourceRoot":"","sources":["../../../src/connectors/jira/triggerLog.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAkE;AAClE,uCAA4J;AAE5J;;;;;;GAMG;AAEU,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAC5D,oEAAoE;AACpE,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAChD,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAA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E,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACxH,CAAC;IAED;;;;OAIG;IACH,iBAAiB,CAAC,QAAgB,EAAE,SAAiB;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACvB,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;YAAE,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,6GAA6G;IAC7G,MAAM,CAAC,MAAyB;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,MAAyB;QAChC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;CACF;AAjKD,wCAiKC"}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/runners` — the machines that run the agents' tests and builds, paired from Telegram. In General only (admins): one message that
|
|
3
|
+
* lists the machines (online or not, what they are, what they can do) with Pause / Resume / Remove per machine, and a button that pairs
|
|
4
|
+
* another one — ONE one-time line for the new machine (it works for an admin account with its `sudo` and for the runner account itself without it),
|
|
5
|
+
* valid 10 minutes, in a message that turns into «paired» or «expired». The line is a secret that anybody who holds it can pair a machine with, and General is read
|
|
6
|
+
* by every member of the group: so it goes to the admin who asked for it in a PRIVATE message of the bot (a short note in the topic says so); only an admin who has
|
|
7
|
+
* not opened a private chat with the bot (Telegram 403) gets it in the topic, preceded by how to receive it privately next time.
|
|
8
|
+
* The hub itself is `src/runners/`; this file is only the screen, its buttons and the two background jobs (editing the pairing message,
|
|
9
|
+
* refreshing a list with live data). See `src/runners/README.md` for the safety line and `utils/runnersScreenPlan.ts` for the texts.
|
|
10
|
+
*
|
|
11
|
+
* Two rules keep the screen true under concurrency. (1) A render is claimed BEFORE its Telegram edit is awaited: every message has a
|
|
12
|
+
* generation, and a background job (the live probe) draws only if the message still carries the generation it started from — so a
|
|
13
|
+
* question that replaced the list while its edit was still queued is never drawn over. (2) The messages that offer a pairing code are
|
|
14
|
+
* this instance's own record (`runnerPairingMessages.ts`, an entry per message), each kept until the edit that settles it was accepted. A
|
|
15
|
+
* message settles to «paired» (a runner carries its code), «closed» (the code was closed unused: its line was pasted for a machine that
|
|
16
|
+
* was already paired) or «expired».
|
|
17
|
+
*/
|
|
18
|
+
import { type Context } from 'telegraf';
|
|
19
|
+
import type { User } from 'telegraf/typings/core/types/typegram';
|
|
1
20
|
import { type SessionKey } from '../../../sessionKey';
|
|
2
21
|
import { type HostKeyScanner, type HubAddress } from '../../../runners/hubAddress';
|
|
3
22
|
import type { HubContext } from '../../../runners/hubPaths';
|
|
@@ -12,6 +31,11 @@ export declare const runnersWatchIntervalMs: number;
|
|
|
12
31
|
export interface RunnersPorts extends Pick<BotCore, 'bot' | 'command' | 'replyToThread' | 'replyToThreadDetailed' | 'editThreadMessage' | 'editThreadMessageDetailed' | 'editThreadKeyboard' | 'authoriseContext' | 'withThreadLocale' | 'checkIsGeneral'> {
|
|
13
32
|
/** The hub registry of this OS user (`src/runners/`). */
|
|
14
33
|
hub: HubContext;
|
|
34
|
+
/**
|
|
35
|
+
* The gate of a tap on a pairing message's «jobs at once» row: the line is sent to the admin who asked for it in their private chat with the bot, where
|
|
36
|
+
* only the owner's DM is a served surface — so this one also lets a group admin tap in a chat that is their own. The key, or `null` when refused.
|
|
37
|
+
*/
|
|
38
|
+
authorisePairingTap: (ctx: Context) => Promise<SessionKey | null>;
|
|
15
39
|
/** The address runners dial, as `settings.json` holds it; `null` = never chosen. */
|
|
16
40
|
readRunnerHost: () => HubAddress | null;
|
|
17
41
|
/** Remember the address; `null` on success, else the errno code of the failed write. */
|
|
@@ -46,6 +70,8 @@ export interface RunnersPorts extends Pick<BotCore, 'bot' | 'command' | 'replyTo
|
|
|
46
70
|
}
|
|
47
71
|
/** `1 Nov 14:02` in the bot's timezone (`process.env.TZ`) and the topic's language: the parts in one fixed order, so it reads the same in every locale. */
|
|
48
72
|
export declare const formatRunnersTime: FormatTime;
|
|
73
|
+
/** The admin a pairing line goes to — the one whose tap or typed address made it: the id of their private chat with the bot, and what the topic calls them. */
|
|
74
|
+
type PairingRecipient = Pick<User, 'id' | 'first_name' | 'username'>;
|
|
49
75
|
/**
|
|
50
76
|
* @description Build the `/runners` screen over its ports. `registerRunnersCommands` / `registerRunnersCallbacks` register the command and
|
|
51
77
|
* the buttons; `handleRunnersAddressText` is called by the text handler for a General message (true = taken as the address) and
|
|
@@ -56,10 +82,11 @@ export declare const formatRunnersTime: FormatTime;
|
|
|
56
82
|
export declare function createRunners(ports: RunnersPorts): {
|
|
57
83
|
registerRunnersCommands: () => void;
|
|
58
84
|
registerRunnersCallbacks: () => void;
|
|
59
|
-
handleRunnersAddressText: (key: SessionKey, text: string) => Promise<boolean>;
|
|
85
|
+
handleRunnersAddressText: (key: SessionKey, text: string, sender: PairingRecipient) => Promise<boolean>;
|
|
60
86
|
cancelRunnersAddressWait: (key: SessionKey) => void;
|
|
61
87
|
startRunnersWatcher: () => () => void;
|
|
62
88
|
watchPairingsOnce: () => Promise<void>;
|
|
63
89
|
watchLinkConcernsOnce: () => Promise<void>;
|
|
64
90
|
};
|
|
91
|
+
export {};
|
|
65
92
|
//# sourceMappingURL=runners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runners.d.ts","sourceRoot":"","sources":["../../../../src/connectors/telegram/commands/runners.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runners.d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