@ihazz/bitrix24 1.1.7 → 1.1.9
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/README.md +11 -10
- package/dist/src/channel.d.ts +8 -1
- package/dist/src/channel.d.ts.map +1 -1
- package/dist/src/channel.js +227 -39
- package/dist/src/channel.js.map +1 -1
- package/dist/src/commands.d.ts +7 -4
- package/dist/src/commands.d.ts.map +1 -1
- package/dist/src/commands.js +57 -75
- package/dist/src/commands.js.map +1 -1
- package/dist/src/i18n.d.ts +33 -0
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/i18n.js +448 -0
- package/dist/src/i18n.js.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +307 -46
- package/src/commands.ts +75 -81
- package/src/i18n.ts +512 -0
package/dist/src/commands.js
CHANGED
|
@@ -3,88 +3,66 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Standard OpenClaw bot commands registered via imbot.v2.Command.register.
|
|
5
5
|
*/
|
|
6
|
+
import { commandDescription, commandGroupLabel, commandHelpTextLabels, commandParams, commandRegistrationParams, commandRegistrationTitle, modelsCommandReplyLabels, } from './i18n.js';
|
|
6
7
|
const SHORT_HELP_COMMANDS = new Set(['help', 'status', 'commands', 'new', 'models']);
|
|
7
8
|
const COMMAND_META_COLOR = '#6C788A';
|
|
8
9
|
const COMMAND_GROUP_ORDER = ['status', 'session', 'options', 'management', 'tools', 'export'];
|
|
9
10
|
const MODELS_PROVIDER_LINE_RE = /^[•*-]\s+([^()\s]+)\s+\((\d+)\)$/i;
|
|
10
|
-
const COMMAND_GROUP_LABELS = {
|
|
11
|
-
ru: {
|
|
12
|
-
status: 'Справка и статус',
|
|
13
|
-
session: 'Сессия',
|
|
14
|
-
options: 'Параметры',
|
|
15
|
-
management: 'Управление',
|
|
16
|
-
tools: 'Инструменты',
|
|
17
|
-
export: 'Экспорт',
|
|
18
|
-
},
|
|
19
|
-
en: {
|
|
20
|
-
status: 'Help and status',
|
|
21
|
-
session: 'Session',
|
|
22
|
-
options: 'Options',
|
|
23
|
-
management: 'Management',
|
|
24
|
-
tools: 'Tools',
|
|
25
|
-
export: 'Export',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
11
|
/**
|
|
29
12
|
* Standard OpenClaw commands.
|
|
30
13
|
* Excludes: focus/unfocus/agents (Discord-specific), allowlist/bash (text-only scope).
|
|
31
14
|
*/
|
|
32
15
|
export const OPENCLAW_COMMANDS = [
|
|
33
16
|
// ── Status ──
|
|
34
|
-
{ command: 'help',
|
|
35
|
-
{ command: 'commands',
|
|
36
|
-
{ command: 'status',
|
|
37
|
-
{ command: 'context',
|
|
38
|
-
{ command: 'whoami',
|
|
39
|
-
{ command: 'usage',
|
|
17
|
+
{ command: 'help', group: 'status' },
|
|
18
|
+
{ command: 'commands', group: 'status' },
|
|
19
|
+
{ command: 'status', group: 'status' },
|
|
20
|
+
{ command: 'context', group: 'status' },
|
|
21
|
+
{ command: 'whoami', group: 'status' },
|
|
22
|
+
{ command: 'usage', hasParams: true, group: 'status' },
|
|
40
23
|
// ── Session ──
|
|
41
|
-
{ command: 'new',
|
|
42
|
-
{ command: 'reset',
|
|
43
|
-
{ command: 'stop',
|
|
44
|
-
{ command: 'compact',
|
|
45
|
-
{ command: 'session',
|
|
24
|
+
{ command: 'new', group: 'session' },
|
|
25
|
+
{ command: 'reset', group: 'session' },
|
|
26
|
+
{ command: 'stop', group: 'session' },
|
|
27
|
+
{ command: 'compact', hasParams: true, group: 'session' },
|
|
28
|
+
{ command: 'session', hasParams: true, group: 'session' },
|
|
46
29
|
// ── Options ──
|
|
47
|
-
{ command: 'model',
|
|
48
|
-
{ command: 'models',
|
|
49
|
-
{ command: 'think',
|
|
50
|
-
{ command: 'verbose',
|
|
51
|
-
{ command: 'reasoning',
|
|
52
|
-
{ command: 'elevated',
|
|
53
|
-
{ command: 'exec',
|
|
54
|
-
{ command: 'queue',
|
|
30
|
+
{ command: 'model', hasParams: true, group: 'options' },
|
|
31
|
+
{ command: 'models', hasParams: true, group: 'options' },
|
|
32
|
+
{ command: 'think', hasParams: true, group: 'options' },
|
|
33
|
+
{ command: 'verbose', hasParams: true, group: 'options' },
|
|
34
|
+
{ command: 'reasoning', hasParams: true, group: 'options' },
|
|
35
|
+
{ command: 'elevated', hasParams: true, group: 'options' },
|
|
36
|
+
{ command: 'exec', hasParams: true, group: 'options' },
|
|
37
|
+
{ command: 'queue', hasParams: true, group: 'options' },
|
|
55
38
|
// ── Management ──
|
|
56
|
-
{ command: 'config',
|
|
57
|
-
{ command: 'debug',
|
|
58
|
-
{ command: 'approve',
|
|
59
|
-
{ command: 'activation',
|
|
60
|
-
{ command: 'send',
|
|
61
|
-
{ command: 'subagents',
|
|
62
|
-
{ command: 'kill',
|
|
63
|
-
{ command: 'steer',
|
|
39
|
+
{ command: 'config', hasParams: true, group: 'management' },
|
|
40
|
+
{ command: 'debug', hasParams: true, group: 'management' },
|
|
41
|
+
{ command: 'approve', group: 'management' },
|
|
42
|
+
{ command: 'activation', hasParams: true, group: 'management' },
|
|
43
|
+
{ command: 'send', hasParams: true, group: 'management' },
|
|
44
|
+
{ command: 'subagents', group: 'management' },
|
|
45
|
+
{ command: 'kill', hasParams: true, group: 'management' },
|
|
46
|
+
{ command: 'steer', hasParams: true, group: 'management' },
|
|
64
47
|
// ── Tools ──
|
|
65
|
-
{ command: 'skill',
|
|
66
|
-
{ command: 'restart',
|
|
48
|
+
{ command: 'skill', hasParams: true, group: 'tools' },
|
|
49
|
+
{ command: 'restart', group: 'tools' },
|
|
67
50
|
// ── Export ──
|
|
68
|
-
{ command: 'export-session',
|
|
51
|
+
{ command: 'export-session', group: 'export' },
|
|
69
52
|
];
|
|
70
53
|
export function buildCommandsHelpText(lang, options) {
|
|
71
|
-
const isRu = lang?.toLowerCase().startsWith('ru') ?? false;
|
|
72
54
|
const concise = options?.concise === true;
|
|
73
55
|
const defs = concise
|
|
74
56
|
? OPENCLAW_COMMANDS.filter((def) => SHORT_HELP_COMMANDS.has(def.command))
|
|
75
57
|
: OPENCLAW_COMMANDS;
|
|
76
|
-
const labels =
|
|
58
|
+
const labels = commandHelpTextLabels(lang);
|
|
77
59
|
const header = concise
|
|
78
|
-
?
|
|
79
|
-
:
|
|
60
|
+
? `[B]${labels.conciseHeader}[/B]`
|
|
61
|
+
: `[B]${labels.fullHeader}[/B]`;
|
|
80
62
|
const footer = concise
|
|
81
|
-
? (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})}`
|
|
85
|
-
: `[COLOR=${COMMAND_META_COLOR}]Full list:[/COLOR] ${formatCommandTrigger({
|
|
86
|
-
command: 'commands',
|
|
87
|
-
})}`)
|
|
63
|
+
? `[COLOR=${COMMAND_META_COLOR}]${labels.fullListLabel}:[/COLOR] ${formatCommandTrigger({
|
|
64
|
+
command: 'commands',
|
|
65
|
+
})}`
|
|
88
66
|
: '';
|
|
89
67
|
const sections = COMMAND_GROUP_ORDER
|
|
90
68
|
.map((group) => {
|
|
@@ -92,11 +70,11 @@ export function buildCommandsHelpText(lang, options) {
|
|
|
92
70
|
if (groupDefs.length === 0) {
|
|
93
71
|
return '';
|
|
94
72
|
}
|
|
95
|
-
const lines = groupDefs.map((def) => formatCommandEntry(def,
|
|
73
|
+
const lines = groupDefs.map((def) => formatCommandEntry(def, lang, labels.paramsLabel));
|
|
96
74
|
if (concise) {
|
|
97
75
|
return lines.join('\n');
|
|
98
76
|
}
|
|
99
|
-
return [`[B]${
|
|
77
|
+
return [`[B]${commandGroupLabel(lang, group)}[/B]`, ...lines].join('\n');
|
|
100
78
|
})
|
|
101
79
|
.filter(Boolean);
|
|
102
80
|
return [header, ...sections, footer]
|
|
@@ -119,14 +97,10 @@ export function formatModelsCommandReply(text, lang) {
|
|
|
119
97
|
if (providers.length === 0) {
|
|
120
98
|
return null;
|
|
121
99
|
}
|
|
122
|
-
const
|
|
123
|
-
const header =
|
|
124
|
-
const showModelsLabel =
|
|
125
|
-
|
|
126
|
-
: `[COLOR=${COMMAND_META_COLOR}]Show provider models:[/COLOR]`;
|
|
127
|
-
const switchModelLabel = isRu
|
|
128
|
-
? `[COLOR=${COMMAND_META_COLOR}]Сменить модель:[/COLOR]`
|
|
129
|
-
: `[COLOR=${COMMAND_META_COLOR}]Switch model:[/COLOR]`;
|
|
100
|
+
const labels = modelsCommandReplyLabels(lang);
|
|
101
|
+
const header = `[B]${labels.header}[/B]`;
|
|
102
|
+
const showModelsLabel = `[COLOR=${COMMAND_META_COLOR}]${labels.showProviderModels}:[/COLOR]`;
|
|
103
|
+
const switchModelLabel = `[COLOR=${COMMAND_META_COLOR}]${labels.switchModel}:[/COLOR]`;
|
|
130
104
|
const providerLines = providers.map((provider) => {
|
|
131
105
|
return `• [send=/models ${provider.name}]${provider.name}[/send] [COLOR=${COMMAND_META_COLOR}](${provider.count})[/COLOR]`;
|
|
132
106
|
});
|
|
@@ -138,21 +112,29 @@ export function formatModelsCommandReply(text, lang) {
|
|
|
138
112
|
`${switchModelLabel} [put=/model ]/model <provider/model>[/put]`,
|
|
139
113
|
].join('\n');
|
|
140
114
|
}
|
|
141
|
-
function
|
|
142
|
-
const
|
|
143
|
-
const
|
|
115
|
+
export function getCommandRegistrationPayload(def) {
|
|
116
|
+
const title = commandRegistrationTitle(def.command);
|
|
117
|
+
const params = commandRegistrationParams(def.command);
|
|
118
|
+
return {
|
|
119
|
+
title,
|
|
120
|
+
...(params ? { params } : {}),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function formatCommandEntry(def, lang, paramsLabel) {
|
|
124
|
+
const description = commandDescription(lang, def.command);
|
|
125
|
+
const params = commandParams(lang, def.command);
|
|
144
126
|
const command = formatCommandTrigger(def);
|
|
145
|
-
if (!
|
|
127
|
+
if (!params) {
|
|
146
128
|
return `${command} — ${description}`;
|
|
147
129
|
}
|
|
148
130
|
return [
|
|
149
131
|
`${command} — ${description}`,
|
|
150
|
-
`[COLOR=${COMMAND_META_COLOR}]${paramsLabel}: ${
|
|
132
|
+
`[COLOR=${COMMAND_META_COLOR}]${paramsLabel}: ${params}[/COLOR]`,
|
|
151
133
|
].join('\n');
|
|
152
134
|
}
|
|
153
135
|
function formatCommandTrigger(def) {
|
|
154
136
|
const visibleCommand = `/${def.command}`;
|
|
155
|
-
if (!def.
|
|
137
|
+
if (!def.hasParams) {
|
|
156
138
|
return `[send=/${def.command}]${visibleCommand}[/send]`;
|
|
157
139
|
}
|
|
158
140
|
return `[put=/${def.command} ]${visibleCommand}[/put]`;
|
package/dist/src/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AASnB,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AACrF,MAAM,kBAAkB,GAAG,SAAS,CAAC;AACrC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AACvG,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,eAAe;IACf,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;IACpC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;IACxC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,EAAE,O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GED
|
@@ -19,6 +19,30 @@ export declare function watchOwnerDmNotice(lang: string | undefined, params: {
|
|
|
19
19
|
export declare function welcomeMessage(lang: string | undefined, botName: string): string;
|
|
20
20
|
export declare function pairingWelcomeMessage(lang: string | undefined, botName: string): string;
|
|
21
21
|
export declare function onboardingMessage(lang: string | undefined, botName: string, dmPolicy: 'pairing' | 'webhookUser' | 'allowlist' | 'open' | undefined): string;
|
|
22
|
+
export type CommandGroup = 'status' | 'session' | 'options' | 'management' | 'tools' | 'export';
|
|
23
|
+
interface CommandHelpTextLabels {
|
|
24
|
+
conciseHeader: string;
|
|
25
|
+
fullHeader: string;
|
|
26
|
+
fullListLabel: string;
|
|
27
|
+
paramsLabel: string;
|
|
28
|
+
}
|
|
29
|
+
interface ModelsCommandReplyLabels {
|
|
30
|
+
header: string;
|
|
31
|
+
showProviderModels: string;
|
|
32
|
+
switchModel: string;
|
|
33
|
+
}
|
|
34
|
+
interface NewSessionReplyTexts {
|
|
35
|
+
started: string;
|
|
36
|
+
active: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function commandGroupLabel(lang: string | undefined, group: CommandGroup): string;
|
|
39
|
+
export declare function commandHelpTextLabels(lang: string | undefined): CommandHelpTextLabels;
|
|
40
|
+
export declare function commandDescription(lang: string | undefined, command: string): string;
|
|
41
|
+
export declare function commandParams(lang: string | undefined, command: string): string | undefined;
|
|
42
|
+
export declare function commandRegistrationTitle(command: string): Record<string, string>;
|
|
43
|
+
export declare function commandRegistrationParams(command: string): Record<string, string> | undefined;
|
|
44
|
+
export declare function modelsCommandReplyLabels(lang: string | undefined): ModelsCommandReplyLabels;
|
|
45
|
+
export declare function newSessionReplyTexts(lang: string | undefined): NewSessionReplyTexts;
|
|
22
46
|
interface CommandKeyboardLabels {
|
|
23
47
|
help: string;
|
|
24
48
|
status: string;
|
|
@@ -26,7 +50,16 @@ interface CommandKeyboardLabels {
|
|
|
26
50
|
newSession: string;
|
|
27
51
|
models: string;
|
|
28
52
|
}
|
|
53
|
+
interface WelcomeKeyboardLabels {
|
|
54
|
+
todayTasks: string;
|
|
55
|
+
stalledDeals: string;
|
|
56
|
+
help: string;
|
|
57
|
+
newSession: string;
|
|
58
|
+
commands: string;
|
|
59
|
+
}
|
|
29
60
|
export declare function commandKeyboardLabels(lang: string | undefined): CommandKeyboardLabels;
|
|
61
|
+
export declare function welcomeKeyboardLabels(lang: string | undefined): WelcomeKeyboardLabels;
|
|
30
62
|
export declare function replyGenerationFailed(lang: string | undefined): string;
|
|
63
|
+
export declare function normalizeNewSessionReply(lang: string | undefined, text: string): string | null;
|
|
31
64
|
export {};
|
|
32
65
|
//# sourceMappingURL=i18n.d.ts.map
|
package/dist/src/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE9D;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE9D;AAoBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvF;AAaD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAErE;AAaD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAErE;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE/D;AAWD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEzE;AAWD,wBAAgB,YA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