@inline-openclaw/inline 0.0.65 → 0.0.67
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 +15 -7
- package/dist/approval-handler.runtime.js +44 -5
- package/dist/approval-handler.runtime.js.map +3 -3
- package/dist/channel-plugin-api.js +110 -29
- package/dist/channel-plugin-api.js.map +8 -7
- package/dist/runtime-register-api.js +238 -11
- package/dist/runtime-register-api.js.map +9 -6
- package/docs/openclaw-setup.md +1 -1
- package/openclaw.plugin.json +0 -1
- package/package.json +1 -1
|
@@ -5651,6 +5651,20 @@ var BlockDisclosure_Kind;
|
|
|
5651
5651
|
BlockDisclosure_Kind2[BlockDisclosure_Kind2["DEFAULT"] = 0] = "DEFAULT";
|
|
5652
5652
|
BlockDisclosure_Kind2[BlockDisclosure_Kind2["PROGRESS"] = 1] = "PROGRESS";
|
|
5653
5653
|
})(BlockDisclosure_Kind || (BlockDisclosure_Kind = {}));
|
|
5654
|
+
var BlockDisclosure_ActivityKind;
|
|
5655
|
+
(function(BlockDisclosure_ActivityKind2) {
|
|
5656
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5657
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["REASONING"] = 1] = "REASONING";
|
|
5658
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["EXPLORE"] = 2] = "EXPLORE";
|
|
5659
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["READ"] = 3] = "READ";
|
|
5660
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["SEARCH"] = 4] = "SEARCH";
|
|
5661
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["EDIT"] = 5] = "EDIT";
|
|
5662
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["DELETE"] = 6] = "DELETE";
|
|
5663
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["MOVE"] = 7] = "MOVE";
|
|
5664
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["COMMAND"] = 8] = "COMMAND";
|
|
5665
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["WEB"] = 9] = "WEB";
|
|
5666
|
+
BlockDisclosure_ActivityKind2[BlockDisclosure_ActivityKind2["TOOL"] = 10] = "TOOL";
|
|
5667
|
+
})(BlockDisclosure_ActivityKind || (BlockDisclosure_ActivityKind = {}));
|
|
5654
5668
|
var BlockTable_Alignment;
|
|
5655
5669
|
(function(BlockTable_Alignment2) {
|
|
5656
5670
|
BlockTable_Alignment2[BlockTable_Alignment2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
@@ -9570,13 +9584,15 @@ class BlockDisclosure$Type extends import_runtime4.MessageType {
|
|
|
9570
9584
|
{ no: 2, name: "kind", kind: "enum", T: () => ["BlockDisclosure.Kind", BlockDisclosure_Kind, "KIND_"] },
|
|
9571
9585
|
{ no: 3, name: "initially_open", kind: "scalar", opt: true, T: 8 },
|
|
9572
9586
|
{ no: 4, name: "children", kind: "message", repeat: 1, T: () => Block },
|
|
9573
|
-
{ no: 5, name: "is_rtl", kind: "scalar", opt: true, T: 8 }
|
|
9587
|
+
{ no: 5, name: "is_rtl", kind: "scalar", opt: true, T: 8 },
|
|
9588
|
+
{ no: 6, name: "activity_kind", kind: "enum", T: () => ["BlockDisclosure.ActivityKind", BlockDisclosure_ActivityKind, "ACTIVITY_KIND_"] }
|
|
9574
9589
|
]);
|
|
9575
9590
|
}
|
|
9576
9591
|
create(value) {
|
|
9577
9592
|
const message = globalThis.Object.create(this.messagePrototype);
|
|
9578
9593
|
message.kind = 0;
|
|
9579
9594
|
message.children = [];
|
|
9595
|
+
message.activityKind = 0;
|
|
9580
9596
|
if (value !== undefined)
|
|
9581
9597
|
import_runtime3.reflectionMergePartial(this, message, value);
|
|
9582
9598
|
return message;
|
|
@@ -9601,6 +9617,9 @@ class BlockDisclosure$Type extends import_runtime4.MessageType {
|
|
|
9601
9617
|
case 5:
|
|
9602
9618
|
message.isRtl = reader.bool();
|
|
9603
9619
|
break;
|
|
9620
|
+
case 6:
|
|
9621
|
+
message.activityKind = reader.int32();
|
|
9622
|
+
break;
|
|
9604
9623
|
default:
|
|
9605
9624
|
let u = options.readUnknownField;
|
|
9606
9625
|
if (u === "throw")
|
|
@@ -9623,6 +9642,8 @@ class BlockDisclosure$Type extends import_runtime4.MessageType {
|
|
|
9623
9642
|
Block.internalBinaryWrite(message.children[i], writer.tag(4, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
9624
9643
|
if (message.isRtl !== undefined)
|
|
9625
9644
|
writer.tag(5, import_runtime.WireType.Varint).bool(message.isRtl);
|
|
9645
|
+
if (message.activityKind !== 0)
|
|
9646
|
+
writer.tag(6, import_runtime.WireType.Varint).int32(message.activityKind);
|
|
9626
9647
|
let u = options.writeUnknownFields;
|
|
9627
9648
|
if (u !== false)
|
|
9628
9649
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -33889,7 +33910,8 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
|
|
|
33889
33910
|
constructor() {
|
|
33890
33911
|
super("AgentProjectCatalog", [
|
|
33891
33912
|
{ no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentProjectOption },
|
|
33892
|
-
{ no: 2, name: "can_select_folder", kind: "scalar", opt: true, T: 8 }
|
|
33913
|
+
{ no: 2, name: "can_select_folder", kind: "scalar", opt: true, T: 8 },
|
|
33914
|
+
{ no: 3, name: "default_project_id", kind: "scalar", opt: true, T: 9 }
|
|
33893
33915
|
]);
|
|
33894
33916
|
}
|
|
33895
33917
|
create(value) {
|
|
@@ -33910,6 +33932,9 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
|
|
|
33910
33932
|
case 2:
|
|
33911
33933
|
message.canSelectFolder = reader.bool();
|
|
33912
33934
|
break;
|
|
33935
|
+
case 3:
|
|
33936
|
+
message.defaultProjectId = reader.string();
|
|
33937
|
+
break;
|
|
33913
33938
|
default:
|
|
33914
33939
|
let u = options.readUnknownField;
|
|
33915
33940
|
if (u === "throw")
|
|
@@ -33926,6 +33951,8 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
|
|
|
33926
33951
|
AgentProjectOption.internalBinaryWrite(message.options[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
33927
33952
|
if (message.canSelectFolder !== undefined)
|
|
33928
33953
|
writer.tag(2, import_runtime.WireType.Varint).bool(message.canSelectFolder);
|
|
33954
|
+
if (message.defaultProjectId !== undefined)
|
|
33955
|
+
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.defaultProjectId);
|
|
33929
33956
|
let u = options.writeUnknownFields;
|
|
33930
33957
|
if (u !== false)
|
|
33931
33958
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -34039,7 +34066,8 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
|
|
|
34039
34066
|
{ no: 1, name: "id", kind: "scalar", T: 9 },
|
|
34040
34067
|
{ no: 2, name: "label", kind: "scalar", T: 9 },
|
|
34041
34068
|
{ no: 3, name: "description", kind: "scalar", opt: true, T: 9 },
|
|
34042
|
-
{ no: 4, name: "reasoning_effort_ids", kind: "scalar", repeat: 2, T: 9 }
|
|
34069
|
+
{ no: 4, name: "reasoning_effort_ids", kind: "scalar", repeat: 2, T: 9 },
|
|
34070
|
+
{ no: 5, name: "default_reasoning_effort_id", kind: "scalar", opt: true, T: 9 }
|
|
34043
34071
|
]);
|
|
34044
34072
|
}
|
|
34045
34073
|
create(value) {
|
|
@@ -34068,6 +34096,9 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
|
|
|
34068
34096
|
case 4:
|
|
34069
34097
|
message.reasoningEffortIds.push(reader.string());
|
|
34070
34098
|
break;
|
|
34099
|
+
case 5:
|
|
34100
|
+
message.defaultReasoningEffortId = reader.string();
|
|
34101
|
+
break;
|
|
34071
34102
|
default:
|
|
34072
34103
|
let u = options.readUnknownField;
|
|
34073
34104
|
if (u === "throw")
|
|
@@ -34088,6 +34119,8 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
|
|
|
34088
34119
|
writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.description);
|
|
34089
34120
|
for (let i = 0;i < message.reasoningEffortIds.length; i++)
|
|
34090
34121
|
writer.tag(4, import_runtime.WireType.LengthDelimited).string(message.reasoningEffortIds[i]);
|
|
34122
|
+
if (message.defaultReasoningEffortId !== undefined)
|
|
34123
|
+
writer.tag(5, import_runtime.WireType.LengthDelimited).string(message.defaultReasoningEffortId);
|
|
34091
34124
|
let u = options.writeUnknownFields;
|
|
34092
34125
|
if (u !== false)
|
|
34093
34126
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -34099,7 +34132,8 @@ var AgentModelOption = new AgentModelOption$Type;
|
|
|
34099
34132
|
class AgentModelCatalog$Type extends import_runtime4.MessageType {
|
|
34100
34133
|
constructor() {
|
|
34101
34134
|
super("AgentModelCatalog", [
|
|
34102
|
-
{ no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentModelOption }
|
|
34135
|
+
{ no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentModelOption },
|
|
34136
|
+
{ no: 2, name: "default_model_id", kind: "scalar", opt: true, T: 9 }
|
|
34103
34137
|
]);
|
|
34104
34138
|
}
|
|
34105
34139
|
create(value) {
|
|
@@ -34117,6 +34151,9 @@ class AgentModelCatalog$Type extends import_runtime4.MessageType {
|
|
|
34117
34151
|
case 1:
|
|
34118
34152
|
message.options.push(AgentModelOption.internalBinaryRead(reader, reader.uint32(), options));
|
|
34119
34153
|
break;
|
|
34154
|
+
case 2:
|
|
34155
|
+
message.defaultModelId = reader.string();
|
|
34156
|
+
break;
|
|
34120
34157
|
default:
|
|
34121
34158
|
let u = options.readUnknownField;
|
|
34122
34159
|
if (u === "throw")
|
|
@@ -34131,6 +34168,8 @@ class AgentModelCatalog$Type extends import_runtime4.MessageType {
|
|
|
34131
34168
|
internalBinaryWrite(message, writer, options) {
|
|
34132
34169
|
for (let i = 0;i < message.options.length; i++)
|
|
34133
34170
|
AgentModelOption.internalBinaryWrite(message.options[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
|
|
34171
|
+
if (message.defaultModelId !== undefined)
|
|
34172
|
+
writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.defaultModelId);
|
|
34134
34173
|
let u = options.writeUnknownFields;
|
|
34135
34174
|
if (u !== false)
|
|
34136
34175
|
(u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -70262,13 +70301,44 @@ function createInlineUpdateCommand(api2) {
|
|
|
70262
70301
|
};
|
|
70263
70302
|
}
|
|
70264
70303
|
|
|
70304
|
+
// src/inline/maintenance-command-specs.ts
|
|
70305
|
+
var INLINE_SYNC_COMMAND_SPEC = {
|
|
70306
|
+
name: "inline-sync",
|
|
70307
|
+
nativeNames: { inline: "inline_sync" },
|
|
70308
|
+
nativeProgressMessages: { inline: "Syncing Inline commands and skills…" },
|
|
70309
|
+
description: "Resync Inline commands and skills",
|
|
70310
|
+
channels: ["inline"],
|
|
70311
|
+
acceptsArgs: false
|
|
70312
|
+
};
|
|
70313
|
+
var INLINE_VERSION_COMMAND_SPEC = {
|
|
70314
|
+
name: "inline-version",
|
|
70315
|
+
nativeNames: { inline: "inline_version" },
|
|
70316
|
+
description: "Show Inline plugin and sync information",
|
|
70317
|
+
channels: ["inline"],
|
|
70318
|
+
acceptsArgs: false
|
|
70319
|
+
};
|
|
70320
|
+
function listInlineMaintenanceCommandSpecs() {
|
|
70321
|
+
return [INLINE_SYNC_COMMAND_SPEC, INLINE_VERSION_COMMAND_SPEC].map((spec) => ({
|
|
70322
|
+
name: spec.nativeNames.inline,
|
|
70323
|
+
description: spec.description,
|
|
70324
|
+
acceptsArgs: spec.acceptsArgs
|
|
70325
|
+
}));
|
|
70326
|
+
}
|
|
70327
|
+
|
|
70265
70328
|
// src/inline/bot-commands-sync.ts
|
|
70266
70329
|
var INLINE_COMMAND_NAME_RE = /^[a-z0-9_]{1,32}$/;
|
|
70267
70330
|
var INLINE_COMMAND_LIMIT = 100;
|
|
70268
70331
|
var INLINE_COMMAND_DESCRIPTION_LIMIT = 256;
|
|
70269
70332
|
var INLINE_COMMAND_RETRY_RATIO = 0.8;
|
|
70270
70333
|
var INLINE_NATIVE_COMMAND_PROVIDER = "inline";
|
|
70271
|
-
var INLINE_REQUIRED_COMMAND_NAMES = new Set([
|
|
70334
|
+
var INLINE_REQUIRED_COMMAND_NAMES = new Set([
|
|
70335
|
+
"follow",
|
|
70336
|
+
"unfollow",
|
|
70337
|
+
"threadreply",
|
|
70338
|
+
"inline_update",
|
|
70339
|
+
"inline_sync",
|
|
70340
|
+
"inline_version"
|
|
70341
|
+
]);
|
|
70272
70342
|
function resolveInlineChannelCommands(cfg) {
|
|
70273
70343
|
const inline = cfg.channels?.inline;
|
|
70274
70344
|
if (typeof inline !== "object" || inline === null || Array.isArray(inline))
|
|
@@ -70378,7 +70448,8 @@ async function buildInlineNativeCommandsForConfig(params) {
|
|
|
70378
70448
|
...getPluginCommandSpecs("inline", { config: params.cfg }),
|
|
70379
70449
|
...listInlineFollowCommandSpecs(),
|
|
70380
70450
|
...listInlineBuiltinCommandSpecs(),
|
|
70381
|
-
...listInlineUpdateCommandSpecs()
|
|
70451
|
+
...listInlineUpdateCommandSpecs(),
|
|
70452
|
+
...listInlineMaintenanceCommandSpecs()
|
|
70382
70453
|
];
|
|
70383
70454
|
const seen = new Set;
|
|
70384
70455
|
const resolved = [];
|
|
@@ -71502,7 +71573,8 @@ function listInlinePluginCommandSpecs(cfg) {
|
|
|
71502
71573
|
return [
|
|
71503
71574
|
...listHostInlinePluginCommandSpecs(cfg),
|
|
71504
71575
|
...listInlineFollowCommandSpecs(),
|
|
71505
|
-
...listInlineBuiltinCommandSpecs()
|
|
71576
|
+
...listInlineBuiltinCommandSpecs(),
|
|
71577
|
+
...listInlineMaintenanceCommandSpecs()
|
|
71506
71578
|
];
|
|
71507
71579
|
}
|
|
71508
71580
|
function hasInlineCommandSpec(specs, commandName) {
|
|
@@ -76930,6 +77002,7 @@ var channelSecrets = {
|
|
|
76930
77002
|
var inlineSecrets = channelSecrets;
|
|
76931
77003
|
|
|
76932
77004
|
// src/inline/probe.ts
|
|
77005
|
+
var maximumProbeCleanupHeadroomMs = 2500;
|
|
76933
77006
|
function formatInlineProbeUserName(user) {
|
|
76934
77007
|
const explicit = [user.firstName?.trim(), user.lastName?.trim()].filter(Boolean).join(" ");
|
|
76935
77008
|
if (explicit)
|
|
@@ -76939,37 +77012,31 @@ function formatInlineProbeUserName(user) {
|
|
|
76939
77012
|
return `@${username}`;
|
|
76940
77013
|
return "Unknown";
|
|
76941
77014
|
}
|
|
76942
|
-
|
|
76943
|
-
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
|
|
76944
|
-
return
|
|
76945
|
-
|
|
76946
|
-
|
|
76947
|
-
|
|
76948
|
-
reject(new Error(`probe timeout after ${Math.trunc(timeoutMs)}ms`));
|
|
76949
|
-
}, timeoutMs);
|
|
76950
|
-
promise2.then((value) => {
|
|
76951
|
-
clearTimeout(timer);
|
|
76952
|
-
resolve(value);
|
|
76953
|
-
}, (error51) => {
|
|
76954
|
-
clearTimeout(timer);
|
|
76955
|
-
reject(error51);
|
|
76956
|
-
});
|
|
76957
|
-
});
|
|
77015
|
+
function probeOperationTimeoutMs(timeoutMs) {
|
|
77016
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
|
|
77017
|
+
return null;
|
|
77018
|
+
const totalMs = Math.max(1, Math.trunc(timeoutMs));
|
|
77019
|
+
const cleanupHeadroomMs = Math.min(maximumProbeCleanupHeadroomMs, Math.max(100, Math.floor(totalMs * 0.8)), Math.max(0, totalMs - 1));
|
|
77020
|
+
return Math.max(1, totalMs - cleanupHeadroomMs);
|
|
76958
77021
|
}
|
|
76959
|
-
async function probeInlineAccountDirect(account) {
|
|
77022
|
+
async function probeInlineAccountDirect(account, signal, operationTimeoutMs) {
|
|
76960
77023
|
if (!account.baseUrl?.trim()) {
|
|
76961
77024
|
throw new Error("missing baseUrl");
|
|
76962
77025
|
}
|
|
76963
77026
|
const token = await resolveInlineToken(account);
|
|
76964
77027
|
const client = new InlineSdkClient({
|
|
76965
77028
|
baseUrl: account.baseUrl,
|
|
76966
|
-
token
|
|
77029
|
+
token,
|
|
77030
|
+
...operationTimeoutMs == null ? {} : { rpcTimeoutMs: operationTimeoutMs }
|
|
76967
77031
|
});
|
|
76968
|
-
await client.connect();
|
|
76969
77032
|
try {
|
|
77033
|
+
await client.connect(signal);
|
|
76970
77034
|
const result = await client.invokeRaw(Method.GET_ME, {
|
|
76971
77035
|
oneofKind: "getMe",
|
|
76972
77036
|
getMe: {}
|
|
77037
|
+
}, operationTimeoutMs == null ? undefined : {
|
|
77038
|
+
...signal ? { signal } : {},
|
|
77039
|
+
timeoutMs: operationTimeoutMs
|
|
76973
77040
|
});
|
|
76974
77041
|
if (result.oneofKind !== "getMe") {
|
|
76975
77042
|
throw new Error(`expected getMe result, got ${String(result.oneofKind)}`);
|
|
@@ -76993,6 +77060,9 @@ async function probeInlineAccountDirect(account) {
|
|
|
76993
77060
|
await client.close().catch(() => {});
|
|
76994
77061
|
}
|
|
76995
77062
|
}
|
|
77063
|
+
function probeTimeoutError(timeoutMs) {
|
|
77064
|
+
return `probe timeout after ${Math.trunc(timeoutMs)}ms`;
|
|
77065
|
+
}
|
|
76996
77066
|
function toErrorText(error51) {
|
|
76997
77067
|
if (error51 instanceof Error && error51.message.trim()) {
|
|
76998
77068
|
return error51.message;
|
|
@@ -77008,15 +77078,26 @@ async function probeInlineAccount(account, timeoutMs) {
|
|
|
77008
77078
|
error: "missing token"
|
|
77009
77079
|
};
|
|
77010
77080
|
}
|
|
77081
|
+
const operationTimeoutMs = probeOperationTimeoutMs(timeoutMs);
|
|
77082
|
+
let controller;
|
|
77083
|
+
let timer;
|
|
77084
|
+
if (operationTimeoutMs != null) {
|
|
77085
|
+
controller = new AbortController;
|
|
77086
|
+
timer = setTimeout(() => controller?.abort(), operationTimeoutMs);
|
|
77087
|
+
}
|
|
77088
|
+
timer?.unref?.();
|
|
77011
77089
|
try {
|
|
77012
|
-
return await
|
|
77090
|
+
return await probeInlineAccountDirect(account, controller?.signal, operationTimeoutMs);
|
|
77013
77091
|
} catch (error51) {
|
|
77014
77092
|
return {
|
|
77015
77093
|
ok: false,
|
|
77016
77094
|
accountId: account.accountId,
|
|
77017
77095
|
baseUrl: account.baseUrl,
|
|
77018
|
-
error: toErrorText(error51)
|
|
77096
|
+
error: controller?.signal.aborted ? probeTimeoutError(timeoutMs) : toErrorText(error51)
|
|
77019
77097
|
};
|
|
77098
|
+
} finally {
|
|
77099
|
+
if (timer != null)
|
|
77100
|
+
clearTimeout(timer);
|
|
77020
77101
|
}
|
|
77021
77102
|
}
|
|
77022
77103
|
|
|
@@ -79463,5 +79544,5 @@ export {
|
|
|
79463
79544
|
inlineChannelPlugin2 as inlineChannelPlugin
|
|
79464
79545
|
};
|
|
79465
79546
|
|
|
79466
|
-
//# debugId=
|
|
79547
|
+
//# debugId=0CD7141E321D85A264756E2164756E21
|
|
79467
79548
|
//# sourceMappingURL=channel-plugin-api.js.map
|