@inline-openclaw/inline 0.0.44 → 0.0.46
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 +2 -0
- package/dist/account-inspect-api.js +4 -2
- package/dist/account-inspect-api.js.map +3 -3
- package/dist/approval-handler.runtime.js +1093 -74
- package/dist/approval-handler.runtime.js.map +10 -10
- package/dist/channel-plugin-api.js +2262 -364
- package/dist/channel-plugin-api.js.map +16 -15
- package/dist/inline/actions.d.ts.map +1 -1
- package/dist/inline/approval-handler.runtime.d.ts +1 -0
- package/dist/inline/approval-handler.runtime.d.ts.map +1 -1
- package/dist/inline/bot-avatar-tool.d.ts +12 -0
- package/dist/inline/bot-avatar-tool.d.ts.map +1 -0
- package/dist/inline/bot-commands-sync.d.ts.map +1 -1
- package/dist/inline/channel.d.ts.map +1 -1
- package/dist/inline/config-schema.d.ts +2 -0
- package/dist/inline/config-schema.d.ts.map +1 -1
- package/dist/inline/doctor.d.ts.map +1 -1
- package/dist/inline/message-content.d.ts +5 -1
- package/dist/inline/message-content.d.ts.map +1 -1
- package/dist/inline/message-formatting.d.ts +18 -0
- package/dist/inline/message-formatting.d.ts.map +1 -1
- package/dist/inline/message-tools.d.ts.map +1 -1
- package/dist/inline/monitor.d.ts.map +1 -1
- package/dist/inline/parent-context-tool.d.ts.map +1 -1
- package/dist/inline/security.d.ts.map +1 -1
- package/dist/inline/setup-surface.d.ts.map +1 -1
- package/dist/inline/threadreply-command.d.ts +31 -0
- package/dist/inline/threadreply-command.d.ts.map +1 -1
- package/dist/runtime-register-api.d.ts.map +1 -1
- package/dist/runtime-register-api.js +1741 -259
- package/dist/runtime-register-api.js.map +14 -13
- package/dist/setup-plugin-api.js +23 -13
- package/dist/setup-plugin-api.js.map +6 -6
- package/openclaw.plugin.json +5 -3
- package/package.json +1 -1
package/dist/setup-plugin-api.js
CHANGED
|
@@ -14590,6 +14590,8 @@ var InlineExecApprovalsSchema = exports_external.object({
|
|
|
14590
14590
|
var InlineReactionNotificationsSchema = exports_external.enum(["off", "own", "all", "allowlist"]);
|
|
14591
14591
|
var InlineStreamingModeSchema = exports_external.enum(["off", "partial", "block", "progress"]);
|
|
14592
14592
|
var InlineStreamingCommandTextSchema = exports_external.enum(["raw", "status"]);
|
|
14593
|
+
var INLINE_DEFAULT_GROUP_POLICY = "open";
|
|
14594
|
+
var INLINE_DEFAULT_REQUIRE_MENTION = true;
|
|
14593
14595
|
var InlineStreamingChunkSchema = exports_external.object({
|
|
14594
14596
|
minChars: exports_external.number().int().positive().optional(),
|
|
14595
14597
|
maxChars: exports_external.number().int().positive().optional(),
|
|
@@ -14661,7 +14663,7 @@ var InlineAccountSchemaBase = exports_external.object({
|
|
|
14661
14663
|
defaultTo: InlineTargetSchema.optional(),
|
|
14662
14664
|
systemPrompt: exports_external.string().optional(),
|
|
14663
14665
|
groupAllowFrom: exports_external.array(InlineAllowEntrySchema).optional(),
|
|
14664
|
-
groupPolicy: GroupPolicySchema.optional().default(
|
|
14666
|
+
groupPolicy: GroupPolicySchema.optional().default(INLINE_DEFAULT_GROUP_POLICY),
|
|
14665
14667
|
groups: exports_external.record(exports_external.string(), InlineGroupSchema.optional()).optional(),
|
|
14666
14668
|
requireMention: exports_external.boolean().optional(),
|
|
14667
14669
|
replyThreadMode: InlineReplyThreadModeSchema.optional(),
|
|
@@ -15069,7 +15071,8 @@ var INLINE_USER_ID_HELP_LINES = [
|
|
|
15069
15071
|
"Docs: https://inline.chat/docs/openclaw"
|
|
15070
15072
|
];
|
|
15071
15073
|
var INLINE_GROUP_HELP_LINES = [
|
|
15072
|
-
"
|
|
15074
|
+
"Inline groups are open by default and require a bot mention by default.",
|
|
15075
|
+
"Optionally allowlist Inline group chats by numeric chat id.",
|
|
15073
15076
|
"Accepted forms: 123456789, chat:123456789, inline:123456789, *.",
|
|
15074
15077
|
"Use * for every group chat; the setup keeps requireMention=true for broad group access.",
|
|
15075
15078
|
"Use /whoami in a group and copy the Chat line to get the Inline chat id.",
|
|
@@ -15216,7 +15219,7 @@ function buildInlineDmAccessWarningLines(accountId) {
|
|
|
15216
15219
|
function buildInlineGroupAccessWarningLines(params) {
|
|
15217
15220
|
const resolved = resolveInlineAccount({ cfg: params.cfg, accountId: params.accountId });
|
|
15218
15221
|
const configBase = formatInlineConfigBase(params.accountId);
|
|
15219
|
-
const policy = resolved.config.groupPolicy ??
|
|
15222
|
+
const policy = resolved.config.groupPolicy ?? INLINE_DEFAULT_GROUP_POLICY;
|
|
15220
15223
|
const groups = resolved.config.groups ?? {};
|
|
15221
15224
|
const hasGroups = Object.keys(groups).length > 0;
|
|
15222
15225
|
const hasGroupAllowFrom = (resolved.config.groupAllowFrom ?? []).some((entry) => String(entry).trim());
|
|
@@ -15229,7 +15232,8 @@ function buildInlineGroupAccessWarningLines(params) {
|
|
|
15229
15232
|
];
|
|
15230
15233
|
}
|
|
15231
15234
|
const wildcard = groups["*"];
|
|
15232
|
-
|
|
15235
|
+
const requireMention = wildcard?.requireMention ?? resolved.config.requireMention ?? INLINE_DEFAULT_REQUIRE_MENTION;
|
|
15236
|
+
if (policy === "open" && requireMention !== true) {
|
|
15233
15237
|
return [
|
|
15234
15238
|
"Inline groups are open to every group chat without a default mention requirement.",
|
|
15235
15239
|
"For safer broad group access, require bot mentions or switch to an explicit group allowlist:",
|
|
@@ -15373,7 +15377,7 @@ function hasGroupSenders(account, parent) {
|
|
|
15373
15377
|
return hasEntries(readInherited(account, parent, "groupAllowFrom")) || hasGroupScopedSenders(readInherited(account, parent, "groups"));
|
|
15374
15378
|
}
|
|
15375
15379
|
function getGroupPolicy(account, parent) {
|
|
15376
|
-
return String(readInherited(account, parent, "groupPolicy") ??
|
|
15380
|
+
return String(readInherited(account, parent, "groupPolicy") ?? INLINE_DEFAULT_GROUP_POLICY);
|
|
15377
15381
|
}
|
|
15378
15382
|
function collectInlineEmptyAllowlistWarnings(params) {
|
|
15379
15383
|
if (params.channelName !== "inline")
|
|
@@ -15572,6 +15576,14 @@ function hasInlineCommandAllowFrom(cfg) {
|
|
|
15572
15576
|
const byProvider = allowFrom;
|
|
15573
15577
|
return hasEntries2(byProvider.inline) || hasEntries2(byProvider["*"]);
|
|
15574
15578
|
}
|
|
15579
|
+
function groupDefaultRequiresMention(account) {
|
|
15580
|
+
const groups = account.config.groups;
|
|
15581
|
+
const wildcard = groups && typeof groups === "object" && !Array.isArray(groups) ? groups["*"] : undefined;
|
|
15582
|
+
const wildcardRequireMention = wildcard && typeof wildcard === "object" && !Array.isArray(wildcard) ? wildcard.requireMention : undefined;
|
|
15583
|
+
if (typeof wildcardRequireMention === "boolean")
|
|
15584
|
+
return wildcardRequireMention;
|
|
15585
|
+
return account.config.requireMention ?? INLINE_DEFAULT_REQUIRE_MENTION;
|
|
15586
|
+
}
|
|
15575
15587
|
function collectInvalidAllowFromEntries(params) {
|
|
15576
15588
|
if (!Array.isArray(params.entries))
|
|
15577
15589
|
return;
|
|
@@ -15628,7 +15640,7 @@ var inlineSecurityAdapter = {
|
|
|
15628
15640
|
},
|
|
15629
15641
|
collectWarnings: ({ account, cfg }) => {
|
|
15630
15642
|
const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy;
|
|
15631
|
-
const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ??
|
|
15643
|
+
const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ?? INLINE_DEFAULT_GROUP_POLICY;
|
|
15632
15644
|
const groupRulesConfigured = Boolean(account.config.groups) && Object.keys(account.config.groups ?? {}).length > 0;
|
|
15633
15645
|
const groupSendersConfigured = hasGroupSenderEntries(account);
|
|
15634
15646
|
if (groupPolicy === "allowlist" && !groupRulesConfigured && !groupSendersConfigured) {
|
|
@@ -15639,14 +15651,12 @@ var inlineSecurityAdapter = {
|
|
|
15639
15651
|
if (groupPolicy !== "open") {
|
|
15640
15652
|
return [];
|
|
15641
15653
|
}
|
|
15642
|
-
if (
|
|
15654
|
+
if (!groupDefaultRequiresMention(account)) {
|
|
15643
15655
|
return [
|
|
15644
|
-
'- Inline groups: groupPolicy="open" allows
|
|
15656
|
+
'- Inline groups: groupPolicy="open" allows every group message to trigger replies because requireMention is disabled. Set channels.inline.requireMention=true or channels.inline.groups."*".requireMention=true.'
|
|
15645
15657
|
];
|
|
15646
15658
|
}
|
|
15647
|
-
return [
|
|
15648
|
-
'- Inline groups: groupPolicy="open" with no group rules means every group can trigger replies. Consider channels.inline.groupPolicy="allowlist".'
|
|
15649
|
-
];
|
|
15659
|
+
return [];
|
|
15650
15660
|
},
|
|
15651
15661
|
collectAuditFindings: ({ account, cfg }) => {
|
|
15652
15662
|
const findings = [];
|
|
@@ -15671,7 +15681,7 @@ var inlineSecurityAdapter = {
|
|
|
15671
15681
|
});
|
|
15672
15682
|
appendInvalidReactionAllowlistFinding(findings, invalidReactionAllowlistEntries);
|
|
15673
15683
|
const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy;
|
|
15674
|
-
const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ??
|
|
15684
|
+
const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ?? INLINE_DEFAULT_GROUP_POLICY;
|
|
15675
15685
|
const groupsConfigured = Boolean(account.config.groups) && Object.keys(account.config.groups ?? {}).length > 0;
|
|
15676
15686
|
const groupSendersConfigured = hasGroupSenderEntries(account);
|
|
15677
15687
|
const groupAccessEnabled = groupPolicy === "open" || groupPolicy === "allowlist" && (groupsConfigured || groupSendersConfigured);
|
|
@@ -15755,5 +15765,5 @@ export {
|
|
|
15755
15765
|
inlineSetupPlugin
|
|
15756
15766
|
};
|
|
15757
15767
|
|
|
15758
|
-
//# debugId=
|
|
15768
|
+
//# debugId=7D21619ED847F66664756E2164756E21
|
|
15759
15769
|
//# sourceMappingURL=setup-plugin-api.js.map
|