@inline-openclaw/inline 0.0.38 → 0.0.39

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.
Files changed (41) hide show
  1. package/README.md +20 -3
  2. package/dist/account-inspect-api.js +34 -7
  3. package/dist/account-inspect-api.js.map +4 -4
  4. package/dist/approval-handler.runtime.js +1032 -92
  5. package/dist/approval-handler.runtime.js.map +14 -14
  6. package/dist/channel-plugin-api.js +1807 -319
  7. package/dist/channel-plugin-api.js.map +18 -17
  8. package/dist/index.d.ts +1 -1
  9. package/dist/inline/accounts.d.ts.map +1 -1
  10. package/dist/inline/actions.d.ts +1 -1
  11. package/dist/inline/actions.d.ts.map +1 -1
  12. package/dist/inline/approval-native.d.ts.map +1 -1
  13. package/dist/inline/channel.d.ts.map +1 -1
  14. package/dist/inline/config-schema.d.ts +125 -0
  15. package/dist/inline/config-schema.d.ts.map +1 -1
  16. package/dist/inline/exec-approvals.d.ts.map +1 -1
  17. package/dist/inline/message-tools.d.ts.map +1 -1
  18. package/dist/inline/monitor.d.ts.map +1 -1
  19. package/dist/inline/parent-context-tool.d.ts +10 -0
  20. package/dist/inline/parent-context-tool.d.ts.map +1 -0
  21. package/dist/inline/policy.d.ts +30 -1
  22. package/dist/inline/policy.d.ts.map +1 -1
  23. package/dist/inline/reply-threads.d.ts +12 -0
  24. package/dist/inline/reply-threads.d.ts.map +1 -1
  25. package/dist/inline/shared.d.ts +1 -1
  26. package/dist/inline/thread-participation.d.ts +10 -0
  27. package/dist/inline/thread-participation.d.ts.map +1 -0
  28. package/dist/inline/tool-targets.d.ts +36 -0
  29. package/dist/inline/tool-targets.d.ts.map +1 -0
  30. package/dist/runtime-register-api.d.ts.map +1 -1
  31. package/dist/runtime-register-api.js +1805 -151
  32. package/dist/runtime-register-api.js.map +19 -15
  33. package/dist/runtime-setter-api.js +11 -15
  34. package/dist/runtime-setter-api.js.map +3 -3
  35. package/dist/runtime.d.ts +2 -2
  36. package/dist/runtime.d.ts.map +1 -1
  37. package/dist/setup-entry.d.ts +1 -1
  38. package/dist/setup-plugin-api.js +34 -7
  39. package/dist/setup-plugin-api.js.map +4 -4
  40. package/openclaw.plugin.json +723 -56
  41. package/package.json +6 -6
@@ -28,23 +28,19 @@ var __export = (target, all) => {
28
28
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
29
29
 
30
30
  // src/runtime.ts
31
- var runtimeKey = "__inlineOpenClawRuntime";
32
- function runtimeStore() {
33
- return globalThis;
34
- }
35
- function setInlineRuntime(next) {
36
- runtimeStore()[runtimeKey] = next;
37
- }
38
- function getInlineRuntime() {
39
- const runtime = runtimeStore()[runtimeKey];
40
- if (!runtime) {
41
- throw new Error("Inline runtime not initialized");
42
- }
43
- return runtime;
44
- }
31
+ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
32
+ var {
33
+ setRuntime: setInlineRuntime,
34
+ clearRuntime: clearInlineRuntime,
35
+ tryGetRuntime: getOptionalInlineRuntime,
36
+ getRuntime: getInlineRuntime
37
+ } = createPluginRuntimeStore({
38
+ pluginId: "inline",
39
+ errorMessage: "Inline runtime not initialized"
40
+ });
45
41
  export {
46
42
  setInlineRuntime
47
43
  };
48
44
 
49
- //# debugId=B228768E4F74247C64756E2164756E21
45
+ //# debugId=3E2A3D0CAFE6B9B564756E2164756E21
50
46
  //# sourceMappingURL=runtime-setter-api.js.map
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/runtime.ts"],
4
4
  "sourcesContent": [
5
- "import type { PluginRuntime } from \"openclaw/plugin-sdk/core\"\n\nconst runtimeKey = \"__inlineOpenClawRuntime\"\n\ntype InlineRuntimeGlobal = typeof globalThis & {\n [runtimeKey]?: PluginRuntime | null\n}\n\nfunction runtimeStore(): InlineRuntimeGlobal {\n return globalThis as InlineRuntimeGlobal\n}\n\nexport function setInlineRuntime(next: PluginRuntime): void {\n runtimeStore()[runtimeKey] = next\n}\n\nexport function getInlineRuntime(): PluginRuntime {\n const runtime = runtimeStore()[runtimeKey]\n if (!runtime) {\n throw new Error(\"Inline runtime not initialized\")\n }\n return runtime\n}\n"
5
+ "import type { PluginRuntime } from \"openclaw/plugin-sdk/core\"\nimport { createPluginRuntimeStore } from \"openclaw/plugin-sdk/runtime-store\"\n\nconst {\n setRuntime: setInlineRuntime,\n clearRuntime: clearInlineRuntime,\n tryGetRuntime: getOptionalInlineRuntime,\n getRuntime: getInlineRuntime,\n} = createPluginRuntimeStore<PluginRuntime>({\n pluginId: \"inline\",\n errorMessage: \"Inline runtime not initialized\",\n})\n\nexport {\n clearInlineRuntime,\n getInlineRuntime,\n getOptionalInlineRuntime,\n setInlineRuntime,\n}\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,aAAa;AAMnB,SAAS,YAAY,GAAwB;AAAA,EAC3C,OAAO;AAAA;AAGF,SAAS,gBAAgB,CAAC,MAA2B;AAAA,EAC1D,aAAa,EAAE,cAAc;AAAA;AAGxB,SAAS,gBAAgB,GAAkB;AAAA,EAChD,MAAM,UAAU,aAAa,EAAE;AAAA,EAC/B,IAAI,CAAC,SAAS;AAAA,IACZ,MAAM,IAAI,MAAM,gCAAgC;AAAA,EAClD;AAAA,EACA,OAAO;AAAA;",
8
- "debugId": "B228768E4F74247C64756E2164756E21",
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAEA;AAAA,EACE,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,YAAY;AAAA,IACV,yBAAwC;AAAA,EAC1C,UAAU;AAAA,EACV,cAAc;AAChB,CAAC;",
8
+ "debugId": "3E2A3D0CAFE6B9B564756E2164756E21",
9
9
  "names": []
10
10
  }
package/dist/runtime.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import type { PluginRuntime } from "openclaw/plugin-sdk/core";
2
- export declare function setInlineRuntime(next: PluginRuntime): void;
3
- export declare function getInlineRuntime(): PluginRuntime;
2
+ declare const setInlineRuntime: (next: PluginRuntime) => void, clearInlineRuntime: () => void, getOptionalInlineRuntime: () => PluginRuntime | null, getInlineRuntime: () => PluginRuntime;
3
+ export { clearInlineRuntime, getInlineRuntime, getOptionalInlineRuntime, setInlineRuntime, };
4
4
  //# sourceMappingURL=runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAY7D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAE1D;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAMhD"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAG7D,QAAA,MACc,gBAAgB,iCACd,kBAAkB,cACjB,wBAAwB,8BAC3B,gBAAgB,qBAI5B,CAAA;AAEF,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,GACjB,CAAA"}
@@ -1,3 +1,3 @@
1
- declare const _default: import("openclaw/plugin-sdk/channel-entry-contract").BundledChannelSetupEntryContract<import("openclaw/plugin-sdk").ChannelPlugin>;
1
+ declare const _default: import("openclaw/plugin-sdk/channel-entry-contract").BundledChannelSetupEntryContract<import("openclaw/plugin-sdk/core").ChannelPlugin>;
2
2
  export default _default;
3
3
  //# sourceMappingURL=setup-entry.d.ts.map
@@ -14562,10 +14562,15 @@ var InlineActionsSchema = exports_external.object({
14562
14562
  var InlineCapabilitiesSchema = exports_external.object({
14563
14563
  replyThreads: exports_external.boolean().optional()
14564
14564
  }).strict();
14565
+ var InlineReplyThreadModeSchema = exports_external.enum(["auto", "thread", "main"]);
14565
14566
  var InlineTargetSchema = exports_external.union([exports_external.string(), exports_external.number()]);
14566
14567
  var InlineAllowEntrySchema = exports_external.union([exports_external.string(), exports_external.number()]);
14567
14568
  var InlineGroupSchema = exports_external.object({
14568
14569
  requireMention: exports_external.boolean().optional(),
14570
+ replyThreadMode: InlineReplyThreadModeSchema.optional(),
14571
+ replyThreadAutoCreateMinMessages: exports_external.number().int().min(0).optional(),
14572
+ replyThreadRequireExplicitMention: exports_external.boolean().optional(),
14573
+ replyThreadParentHistoryLimit: exports_external.number().int().min(0).optional(),
14569
14574
  allowFrom: exports_external.array(InlineAllowEntrySchema).optional(),
14570
14575
  systemPrompt: exports_external.string().optional(),
14571
14576
  tools: ToolPolicySchema.optional(),
@@ -14605,6 +14610,7 @@ var InlineStreamingSchema = exports_external.union([
14605
14610
  label: exports_external.union([exports_external.string(), exports_external.literal(false)]).optional(),
14606
14611
  labels: exports_external.array(exports_external.string()).optional(),
14607
14612
  maxLines: exports_external.number().int().positive().optional(),
14613
+ maxLineChars: exports_external.number().int().positive().optional(),
14608
14614
  render: exports_external.enum(["text", "rich"]).optional(),
14609
14615
  toolProgress: exports_external.boolean().optional(),
14610
14616
  commandText: InlineStreamingCommandTextSchema.optional()
@@ -14632,6 +14638,7 @@ var InlineRuntimeStreamingSchema = exports_external.union([
14632
14638
  label: exports_external.union([exports_external.string(), exports_external.literal(false)]).optional(),
14633
14639
  labels: exports_external.array(exports_external.string()).optional(),
14634
14640
  maxLines: exports_external.number().int().positive().optional(),
14641
+ maxLineChars: exports_external.number().int().positive().optional(),
14635
14642
  render: exports_external.enum(["text", "rich"]).optional(),
14636
14643
  toolProgress: exports_external.boolean().optional(),
14637
14644
  commandText: InlineStreamingCommandTextSchema.optional()
@@ -14657,6 +14664,10 @@ var InlineAccountSchemaBase = exports_external.object({
14657
14664
  groupPolicy: GroupPolicySchema.optional().default("allowlist"),
14658
14665
  groups: exports_external.record(exports_external.string(), InlineGroupSchema.optional()).optional(),
14659
14666
  requireMention: exports_external.boolean().optional(),
14667
+ replyThreadMode: InlineReplyThreadModeSchema.optional(),
14668
+ replyThreadAutoCreateMinMessages: exports_external.number().int().min(0).optional(),
14669
+ replyThreadRequireExplicitMention: exports_external.boolean().optional(),
14670
+ replyThreadParentHistoryLimit: exports_external.number().int().min(0).optional(),
14660
14671
  replyToBotWithoutMention: exports_external.boolean().optional(),
14661
14672
  historyLimit: exports_external.number().int().min(0).optional(),
14662
14673
  dmHistoryLimit: exports_external.number().int().min(0).optional(),
@@ -14928,9 +14939,7 @@ function inspectInlineAccount(params) {
14928
14939
  }
14929
14940
  const tokenFile = account.tokenFile?.trim() ?? "";
14930
14941
  if (tokenFile) {
14931
- const token = tryReadSecretFileSync(tokenFile, "Inline bot token", {
14932
- rejectSymlink: true
14933
- }) ?? "";
14942
+ const token = tryReadInlineTokenFile(tokenFile);
14934
14943
  return {
14935
14944
  ...account,
14936
14945
  token: token || null,
@@ -14990,13 +14999,31 @@ async function resolveInlineToken(account) {
14990
14999
  }
14991
15000
  throw new Error("Inline token missing (set channels.inline.token, channels.inline.tokenFile, INLINE_TOKEN, or INLINE_BOT_TOKEN)");
14992
15001
  }
14993
- const token = tryReadSecretFileSync(tokenFile, "Inline bot token", {
14994
- rejectSymlink: true
14995
- });
15002
+ const token = readInlineTokenFile(tokenFile);
14996
15003
  if (!token)
14997
15004
  throw new Error(`Inline tokenFile is empty or unreadable: ${tokenFile}`);
14998
15005
  return token;
14999
15006
  }
15007
+ function tryReadInlineTokenFile(tokenFile) {
15008
+ try {
15009
+ return tryReadSecretFileSync(tokenFile, "Inline bot token", {
15010
+ rejectSymlink: true
15011
+ }) ?? "";
15012
+ } catch {
15013
+ return "";
15014
+ }
15015
+ }
15016
+ function readInlineTokenFile(tokenFile) {
15017
+ try {
15018
+ return tryReadSecretFileSync(tokenFile, "Inline bot token", {
15019
+ rejectSymlink: true
15020
+ }) ?? "";
15021
+ } catch (error51) {
15022
+ throw new Error(`Inline tokenFile is empty or unreadable: ${tokenFile}`, {
15023
+ cause: error51
15024
+ });
15025
+ }
15026
+ }
15000
15027
 
15001
15028
  // src/inline/setup-core.ts
15002
15029
  var channel = "inline";
@@ -15728,5 +15755,5 @@ export {
15728
15755
  inlineSetupPlugin
15729
15756
  };
15730
15757
 
15731
- //# debugId=E3B80DB576991F9E64756E2164756E21
15758
+ //# debugId=B2FCAFCFD2D22A3F64756E2164756E21
15732
15759
  //# sourceMappingURL=setup-plugin-api.js.map