@inline-openclaw/inline 0.0.64 → 0.0.66
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 +16 -14
- package/dist/approval-handler.runtime.js +23 -2
- package/dist/approval-handler.runtime.js.map +3 -3
- package/dist/channel-plugin-api.js +54 -24
- package/dist/channel-plugin-api.js.map +5 -5
- package/dist/runtime-register-api.js +24 -3
- package/dist/runtime-register-api.js.map +4 -4
- package/docs/openclaw-setup.md +13 -8
- 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);
|
|
@@ -70185,7 +70206,7 @@ ${text.slice(-UPDATE_LOG_MAX_CHARS)}`;
|
|
|
70185
70206
|
}
|
|
70186
70207
|
function resolveOpenClawUpdateInvocation(env) {
|
|
70187
70208
|
const cliPath = env.OPENCLAW_CLI_PATH?.trim();
|
|
70188
|
-
const args = ["plugins", "update", INLINE_PLUGIN_ID];
|
|
70209
|
+
const args = ["plugins", "update", INLINE_PLUGIN_ID, "--accept-capabilities"];
|
|
70189
70210
|
return cliPath ? { command: process.execPath, args: [cliPath, ...args] } : { command: "openclaw", args };
|
|
70190
70211
|
}
|
|
70191
70212
|
var defaultUpdateRunner = async (params) => await new Promise((resolve) => {
|
|
@@ -76930,6 +76951,7 @@ var channelSecrets = {
|
|
|
76930
76951
|
var inlineSecrets = channelSecrets;
|
|
76931
76952
|
|
|
76932
76953
|
// src/inline/probe.ts
|
|
76954
|
+
var maximumProbeCleanupHeadroomMs = 2500;
|
|
76933
76955
|
function formatInlineProbeUserName(user) {
|
|
76934
76956
|
const explicit = [user.firstName?.trim(), user.lastName?.trim()].filter(Boolean).join(" ");
|
|
76935
76957
|
if (explicit)
|
|
@@ -76939,37 +76961,31 @@ function formatInlineProbeUserName(user) {
|
|
|
76939
76961
|
return `@${username}`;
|
|
76940
76962
|
return "Unknown";
|
|
76941
76963
|
}
|
|
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
|
-
});
|
|
76964
|
+
function probeOperationTimeoutMs(timeoutMs) {
|
|
76965
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
|
|
76966
|
+
return null;
|
|
76967
|
+
const totalMs = Math.max(1, Math.trunc(timeoutMs));
|
|
76968
|
+
const cleanupHeadroomMs = Math.min(maximumProbeCleanupHeadroomMs, Math.max(100, Math.floor(totalMs * 0.8)), Math.max(0, totalMs - 1));
|
|
76969
|
+
return Math.max(1, totalMs - cleanupHeadroomMs);
|
|
76958
76970
|
}
|
|
76959
|
-
async function probeInlineAccountDirect(account) {
|
|
76971
|
+
async function probeInlineAccountDirect(account, signal, operationTimeoutMs) {
|
|
76960
76972
|
if (!account.baseUrl?.trim()) {
|
|
76961
76973
|
throw new Error("missing baseUrl");
|
|
76962
76974
|
}
|
|
76963
76975
|
const token = await resolveInlineToken(account);
|
|
76964
76976
|
const client = new InlineSdkClient({
|
|
76965
76977
|
baseUrl: account.baseUrl,
|
|
76966
|
-
token
|
|
76978
|
+
token,
|
|
76979
|
+
...operationTimeoutMs == null ? {} : { rpcTimeoutMs: operationTimeoutMs }
|
|
76967
76980
|
});
|
|
76968
|
-
await client.connect();
|
|
76969
76981
|
try {
|
|
76982
|
+
await client.connect(signal);
|
|
76970
76983
|
const result = await client.invokeRaw(Method.GET_ME, {
|
|
76971
76984
|
oneofKind: "getMe",
|
|
76972
76985
|
getMe: {}
|
|
76986
|
+
}, operationTimeoutMs == null ? undefined : {
|
|
76987
|
+
...signal ? { signal } : {},
|
|
76988
|
+
timeoutMs: operationTimeoutMs
|
|
76973
76989
|
});
|
|
76974
76990
|
if (result.oneofKind !== "getMe") {
|
|
76975
76991
|
throw new Error(`expected getMe result, got ${String(result.oneofKind)}`);
|
|
@@ -76993,6 +77009,9 @@ async function probeInlineAccountDirect(account) {
|
|
|
76993
77009
|
await client.close().catch(() => {});
|
|
76994
77010
|
}
|
|
76995
77011
|
}
|
|
77012
|
+
function probeTimeoutError(timeoutMs) {
|
|
77013
|
+
return `probe timeout after ${Math.trunc(timeoutMs)}ms`;
|
|
77014
|
+
}
|
|
76996
77015
|
function toErrorText(error51) {
|
|
76997
77016
|
if (error51 instanceof Error && error51.message.trim()) {
|
|
76998
77017
|
return error51.message;
|
|
@@ -77008,15 +77027,26 @@ async function probeInlineAccount(account, timeoutMs) {
|
|
|
77008
77027
|
error: "missing token"
|
|
77009
77028
|
};
|
|
77010
77029
|
}
|
|
77030
|
+
const operationTimeoutMs = probeOperationTimeoutMs(timeoutMs);
|
|
77031
|
+
let controller;
|
|
77032
|
+
let timer;
|
|
77033
|
+
if (operationTimeoutMs != null) {
|
|
77034
|
+
controller = new AbortController;
|
|
77035
|
+
timer = setTimeout(() => controller?.abort(), operationTimeoutMs);
|
|
77036
|
+
}
|
|
77037
|
+
timer?.unref?.();
|
|
77011
77038
|
try {
|
|
77012
|
-
return await
|
|
77039
|
+
return await probeInlineAccountDirect(account, controller?.signal, operationTimeoutMs);
|
|
77013
77040
|
} catch (error51) {
|
|
77014
77041
|
return {
|
|
77015
77042
|
ok: false,
|
|
77016
77043
|
accountId: account.accountId,
|
|
77017
77044
|
baseUrl: account.baseUrl,
|
|
77018
|
-
error: toErrorText(error51)
|
|
77045
|
+
error: controller?.signal.aborted ? probeTimeoutError(timeoutMs) : toErrorText(error51)
|
|
77019
77046
|
};
|
|
77047
|
+
} finally {
|
|
77048
|
+
if (timer != null)
|
|
77049
|
+
clearTimeout(timer);
|
|
77020
77050
|
}
|
|
77021
77051
|
}
|
|
77022
77052
|
|
|
@@ -79463,5 +79493,5 @@ export {
|
|
|
79463
79493
|
inlineChannelPlugin2 as inlineChannelPlugin
|
|
79464
79494
|
};
|
|
79465
79495
|
|
|
79466
|
-
//# debugId=
|
|
79496
|
+
//# debugId=3BEABAA42C98A89864756E2164756E21
|
|
79467
79497
|
//# sourceMappingURL=channel-plugin-api.js.map
|