@inline-openclaw/inline 0.0.66 → 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.
@@ -33881,7 +33881,8 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
33881
33881
  constructor() {
33882
33882
  super("AgentProjectCatalog", [
33883
33883
  { no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentProjectOption },
33884
- { no: 2, name: "can_select_folder", kind: "scalar", opt: true, T: 8 }
33884
+ { no: 2, name: "can_select_folder", kind: "scalar", opt: true, T: 8 },
33885
+ { no: 3, name: "default_project_id", kind: "scalar", opt: true, T: 9 }
33885
33886
  ]);
33886
33887
  }
33887
33888
  create(value) {
@@ -33902,6 +33903,9 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
33902
33903
  case 2:
33903
33904
  message.canSelectFolder = reader.bool();
33904
33905
  break;
33906
+ case 3:
33907
+ message.defaultProjectId = reader.string();
33908
+ break;
33905
33909
  default:
33906
33910
  let u = options.readUnknownField;
33907
33911
  if (u === "throw")
@@ -33918,6 +33922,8 @@ class AgentProjectCatalog$Type extends import_runtime4.MessageType {
33918
33922
  AgentProjectOption.internalBinaryWrite(message.options[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
33919
33923
  if (message.canSelectFolder !== undefined)
33920
33924
  writer.tag(2, import_runtime.WireType.Varint).bool(message.canSelectFolder);
33925
+ if (message.defaultProjectId !== undefined)
33926
+ writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.defaultProjectId);
33921
33927
  let u = options.writeUnknownFields;
33922
33928
  if (u !== false)
33923
33929
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -34031,7 +34037,8 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
34031
34037
  { no: 1, name: "id", kind: "scalar", T: 9 },
34032
34038
  { no: 2, name: "label", kind: "scalar", T: 9 },
34033
34039
  { no: 3, name: "description", kind: "scalar", opt: true, T: 9 },
34034
- { no: 4, name: "reasoning_effort_ids", kind: "scalar", repeat: 2, T: 9 }
34040
+ { no: 4, name: "reasoning_effort_ids", kind: "scalar", repeat: 2, T: 9 },
34041
+ { no: 5, name: "default_reasoning_effort_id", kind: "scalar", opt: true, T: 9 }
34035
34042
  ]);
34036
34043
  }
34037
34044
  create(value) {
@@ -34060,6 +34067,9 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
34060
34067
  case 4:
34061
34068
  message.reasoningEffortIds.push(reader.string());
34062
34069
  break;
34070
+ case 5:
34071
+ message.defaultReasoningEffortId = reader.string();
34072
+ break;
34063
34073
  default:
34064
34074
  let u = options.readUnknownField;
34065
34075
  if (u === "throw")
@@ -34080,6 +34090,8 @@ class AgentModelOption$Type extends import_runtime4.MessageType {
34080
34090
  writer.tag(3, import_runtime.WireType.LengthDelimited).string(message.description);
34081
34091
  for (let i = 0;i < message.reasoningEffortIds.length; i++)
34082
34092
  writer.tag(4, import_runtime.WireType.LengthDelimited).string(message.reasoningEffortIds[i]);
34093
+ if (message.defaultReasoningEffortId !== undefined)
34094
+ writer.tag(5, import_runtime.WireType.LengthDelimited).string(message.defaultReasoningEffortId);
34083
34095
  let u = options.writeUnknownFields;
34084
34096
  if (u !== false)
34085
34097
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -34091,7 +34103,8 @@ var AgentModelOption = new AgentModelOption$Type;
34091
34103
  class AgentModelCatalog$Type extends import_runtime4.MessageType {
34092
34104
  constructor() {
34093
34105
  super("AgentModelCatalog", [
34094
- { no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentModelOption }
34106
+ { no: 1, name: "options", kind: "message", repeat: 1, T: () => AgentModelOption },
34107
+ { no: 2, name: "default_model_id", kind: "scalar", opt: true, T: 9 }
34095
34108
  ]);
34096
34109
  }
34097
34110
  create(value) {
@@ -34109,6 +34122,9 @@ class AgentModelCatalog$Type extends import_runtime4.MessageType {
34109
34122
  case 1:
34110
34123
  message.options.push(AgentModelOption.internalBinaryRead(reader, reader.uint32(), options));
34111
34124
  break;
34125
+ case 2:
34126
+ message.defaultModelId = reader.string();
34127
+ break;
34112
34128
  default:
34113
34129
  let u = options.readUnknownField;
34114
34130
  if (u === "throw")
@@ -34123,6 +34139,8 @@ class AgentModelCatalog$Type extends import_runtime4.MessageType {
34123
34139
  internalBinaryWrite(message, writer, options) {
34124
34140
  for (let i = 0;i < message.options.length; i++)
34125
34141
  AgentModelOption.internalBinaryWrite(message.options[i], writer.tag(1, import_runtime.WireType.LengthDelimited).fork(), options).join();
34142
+ if (message.defaultModelId !== undefined)
34143
+ writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.defaultModelId);
34126
34144
  let u = options.writeUnknownFields;
34127
34145
  if (u !== false)
34128
34146
  (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -66300,13 +66318,44 @@ function createInlineUpdateCommand(api2) {
66300
66318
  };
66301
66319
  }
66302
66320
 
66321
+ // src/inline/maintenance-command-specs.ts
66322
+ var INLINE_SYNC_COMMAND_SPEC = {
66323
+ name: "inline-sync",
66324
+ nativeNames: { inline: "inline_sync" },
66325
+ nativeProgressMessages: { inline: "Syncing Inline commands and skills…" },
66326
+ description: "Resync Inline commands and skills",
66327
+ channels: ["inline"],
66328
+ acceptsArgs: false
66329
+ };
66330
+ var INLINE_VERSION_COMMAND_SPEC = {
66331
+ name: "inline-version",
66332
+ nativeNames: { inline: "inline_version" },
66333
+ description: "Show Inline plugin and sync information",
66334
+ channels: ["inline"],
66335
+ acceptsArgs: false
66336
+ };
66337
+ function listInlineMaintenanceCommandSpecs() {
66338
+ return [INLINE_SYNC_COMMAND_SPEC, INLINE_VERSION_COMMAND_SPEC].map((spec) => ({
66339
+ name: spec.nativeNames.inline,
66340
+ description: spec.description,
66341
+ acceptsArgs: spec.acceptsArgs
66342
+ }));
66343
+ }
66344
+
66303
66345
  // src/inline/bot-commands-sync.ts
66304
66346
  var INLINE_COMMAND_NAME_RE = /^[a-z0-9_]{1,32}$/;
66305
66347
  var INLINE_COMMAND_LIMIT = 100;
66306
66348
  var INLINE_COMMAND_DESCRIPTION_LIMIT = 256;
66307
66349
  var INLINE_COMMAND_RETRY_RATIO = 0.8;
66308
66350
  var INLINE_NATIVE_COMMAND_PROVIDER = "inline";
66309
- var INLINE_REQUIRED_COMMAND_NAMES = new Set(["follow", "unfollow", "threadreply", "inline_update"]);
66351
+ var INLINE_REQUIRED_COMMAND_NAMES = new Set([
66352
+ "follow",
66353
+ "unfollow",
66354
+ "threadreply",
66355
+ "inline_update",
66356
+ "inline_sync",
66357
+ "inline_version"
66358
+ ]);
66310
66359
  function resolveInlineChannelCommands(cfg) {
66311
66360
  const inline = cfg.channels?.inline;
66312
66361
  if (typeof inline !== "object" || inline === null || Array.isArray(inline))
@@ -66416,7 +66465,8 @@ async function buildInlineNativeCommandsForConfig(params) {
66416
66465
  ...getPluginCommandSpecs("inline", { config: params.cfg }),
66417
66466
  ...listInlineFollowCommandSpecs(),
66418
66467
  ...listInlineBuiltinCommandSpecs(),
66419
- ...listInlineUpdateCommandSpecs()
66468
+ ...listInlineUpdateCommandSpecs(),
66469
+ ...listInlineMaintenanceCommandSpecs()
66420
66470
  ];
66421
66471
  const seen = new Set;
66422
66472
  const resolved = [];
@@ -66597,6 +66647,155 @@ async function syncInlineAgentSkills(params) {
66597
66647
  return { attempted, synced, failed };
66598
66648
  }
66599
66649
 
66650
+ // src/inline/catalog-sync.ts
66651
+ var syncTail = Promise.resolve();
66652
+ var lastStatus;
66653
+ async function performInlineCatalogSync(params) {
66654
+ const commands = await syncInlineNativeCommands({
66655
+ cfg: params.cfg,
66656
+ ...params.logger ? { logger: params.logger } : {}
66657
+ });
66658
+ const skills = await syncInlineAgentSkills({
66659
+ cfg: params.cfg,
66660
+ ...params.logger ? { logger: params.logger } : {}
66661
+ });
66662
+ const status = {
66663
+ reason: params.reason,
66664
+ completedAt: new Date().toISOString(),
66665
+ commands,
66666
+ skills
66667
+ };
66668
+ lastStatus = status;
66669
+ return status;
66670
+ }
66671
+ function syncInlineCatalogs(params) {
66672
+ const run = syncTail.then(() => performInlineCatalogSync(params), () => performInlineCatalogSync(params));
66673
+ syncTail = run;
66674
+ return run;
66675
+ }
66676
+ function getLastInlineCatalogSyncStatus() {
66677
+ return lastStatus;
66678
+ }
66679
+
66680
+ // src/inline/maintenance-command.ts
66681
+ import { stat } from "node:fs/promises";
66682
+ function formatTimestamp(value) {
66683
+ if (!value)
66684
+ return "unavailable";
66685
+ const date5 = new Date(value);
66686
+ return Number.isNaN(date5.valueOf()) ? "unavailable" : date5.toISOString();
66687
+ }
66688
+ function summarizeSync(status) {
66689
+ if (!status)
66690
+ return "not run in this process";
66691
+ const commands = `${status.commands.synced}/${status.commands.attempted} command account(s) synced`;
66692
+ const skills = `${status.skills.synced}/${status.skills.attempted} skill account(s) synced`;
66693
+ const failures = status.commands.failed + status.skills.failed;
66694
+ return `${status.completedAt} (${status.reason}; ${commands}; ${skills}; ${failures} failure(s))`;
66695
+ }
66696
+ function installRecord(api2) {
66697
+ const plugins = api2.config.plugins;
66698
+ return plugins?.installs?.[api2.id] ?? plugins?.installs?.inline;
66699
+ }
66700
+ async function resolveInstallMetadata(api2) {
66701
+ let record3 = installRecord(api2);
66702
+ try {
66703
+ if (await api2.runtime.gateway.isAvailable()) {
66704
+ const inspection = await api2.runtime.gateway.request("plugins.inspect", {
66705
+ pluginId: api2.id
66706
+ });
66707
+ record3 = {
66708
+ ...record3,
66709
+ ...inspection.plugin?.version ? { version: inspection.plugin.version } : {},
66710
+ ...inspection.source?.kind ? { source: inspection.source.kind } : {}
66711
+ };
66712
+ }
66713
+ } catch {}
66714
+ if (record3?.installedAt || !api2.rootDir) {
66715
+ return { record: record3, timestampIsFilesystemMetadata: false };
66716
+ }
66717
+ try {
66718
+ const metadata = await stat(api2.rootDir);
66719
+ const timestampMs = Math.max(metadata.birthtimeMs, metadata.ctimeMs, metadata.mtimeMs);
66720
+ if (Number.isFinite(timestampMs) && timestampMs > 0) {
66721
+ record3 = { ...record3, installedAt: new Date(timestampMs).toISOString() };
66722
+ return { record: record3, timestampIsFilesystemMetadata: true };
66723
+ }
66724
+ } catch {}
66725
+ return { record: record3, timestampIsFilesystemMetadata: false };
66726
+ }
66727
+ function buildInlineVersionText(api2, metadata = {
66728
+ record: installRecord(api2),
66729
+ timestampIsFilesystemMetadata: false
66730
+ }) {
66731
+ const { record: record3 } = metadata;
66732
+ const pluginVersion = api2.version ?? record3?.resolvedVersion ?? record3?.version ?? "unknown";
66733
+ const resolvedVersion = record3?.resolvedVersion;
66734
+ const lines = [
66735
+ "Inline OpenClaw plugin",
66736
+ `Plugin version: ${pluginVersion}`,
66737
+ `OpenClaw version: ${api2.runtime.version || "unknown"}`,
66738
+ `Install source: ${record3?.source ?? "unavailable"}`,
66739
+ `Last install/update: ${formatTimestamp(record3?.installedAt)}${metadata.timestampIsFilesystemMetadata ? " (filesystem metadata)" : ""}`
66740
+ ];
66741
+ if (resolvedVersion && resolvedVersion !== pluginVersion) {
66742
+ lines.push(`Resolved version: ${resolvedVersion}`);
66743
+ }
66744
+ if (record3?.resolvedAt) {
66745
+ lines.push(`Resolved at: ${formatTimestamp(record3.resolvedAt)}`);
66746
+ }
66747
+ lines.push(`Last catalog sync: ${summarizeSync(getLastInlineCatalogSyncStatus())}`);
66748
+ return lines.join(`
66749
+ `);
66750
+ }
66751
+ async function handleInlineSyncCommand(api2, ctx) {
66752
+ if (!ctx.isAuthorizedSender) {
66753
+ return { text: "This Inline command is not available to this sender." };
66754
+ }
66755
+ if (ctx.args?.trim()) {
66756
+ return { text: "Usage: /inline_sync" };
66757
+ }
66758
+ try {
66759
+ const status = await syncInlineCatalogs({
66760
+ cfg: api2.config,
66761
+ logger: api2.logger,
66762
+ reason: "manual"
66763
+ });
66764
+ const failed = status.commands.failed + status.skills.failed;
66765
+ if (failed > 0) {
66766
+ return {
66767
+ text: `Inline catalog sync completed with ${failed} failure(s). Commands: ${status.commands.synced}/${status.commands.attempted} accounts. Skills: ${status.skills.synced}/${status.skills.attempted} accounts. Check OpenClaw logs for [inline] sync details.`
66768
+ };
66769
+ }
66770
+ return {
66771
+ text: `Inline catalogs synced. Commands: ${status.commands.synced}/${status.commands.attempted} accounts. Skills: ${status.skills.synced}/${status.skills.attempted} accounts. Open or reopen the Skilled Agent editor in Inline to load the updated catalog.`
66772
+ };
66773
+ } catch (error51) {
66774
+ api2.logger.warn?.(`[inline] manual catalog sync failed: ${String(error51)}`);
66775
+ return { text: "Inline catalog sync failed. Check OpenClaw logs for [inline] sync details." };
66776
+ }
66777
+ }
66778
+ function createInlineMaintenanceCommands(api2) {
66779
+ return [
66780
+ {
66781
+ ...INLINE_SYNC_COMMAND_SPEC,
66782
+ handler: async (ctx) => await handleInlineSyncCommand(api2, ctx)
66783
+ },
66784
+ {
66785
+ ...INLINE_VERSION_COMMAND_SPEC,
66786
+ handler: async (ctx) => {
66787
+ if (!ctx.isAuthorizedSender) {
66788
+ return { text: "This Inline command is not available to this sender." };
66789
+ }
66790
+ if (ctx.args?.trim()) {
66791
+ return { text: "Usage: /inline_version" };
66792
+ }
66793
+ return { text: buildInlineVersionText(api2, await resolveInstallMetadata(api2)) };
66794
+ }
66795
+ }
66796
+ ];
66797
+ }
66798
+
66600
66799
  // src/runtime-register-api.ts
66601
66800
  function registerInlinePluginFull(api2) {
66602
66801
  api2.registerTool((ctx) => createInlineMembersTool(ctx), {
@@ -66627,6 +66826,9 @@ function registerInlinePluginFull(api2) {
66627
66826
  registerCommand(command);
66628
66827
  }
66629
66828
  registerCommand(createInlineUpdateCommand(api2));
66829
+ for (const command of createInlineMaintenanceCommands(api2)) {
66830
+ registerCommand(command);
66831
+ }
66630
66832
  }
66631
66833
  api2.on("message_sending", (event, ctx) => {
66632
66834
  if (ctx.channelId !== "inline")
@@ -66645,13 +66847,17 @@ function registerInlinePluginFull(api2) {
66645
66847
  return { content };
66646
66848
  });
66647
66849
  api2.on("gateway_start", async () => {
66648
- await syncInlineNativeCommands({
66850
+ await syncInlineCatalogs({
66649
66851
  cfg: api2.config,
66650
- logger: api2.logger
66852
+ logger: api2.logger,
66853
+ reason: "gateway_start"
66651
66854
  });
66652
- await syncInlineAgentSkills({
66855
+ });
66856
+ api2.on("skill_changed", async () => {
66857
+ await syncInlineCatalogs({
66653
66858
  cfg: api2.config,
66654
- logger: api2.logger
66859
+ logger: api2.logger,
66860
+ reason: "skill_changed"
66655
66861
  });
66656
66862
  });
66657
66863
  }
@@ -66659,5 +66865,5 @@ export {
66659
66865
  registerInlinePluginFull
66660
66866
  };
66661
66867
 
66662
- //# debugId=C7ECA624482A65A064756E2164756E21
66868
+ //# debugId=DA1777113556991A64756E2164756E21
66663
66869
  //# sourceMappingURL=runtime-register-api.js.map