@moxt-ai/mobius 0.0.334 → 0.0.335

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/dist/runtime.js CHANGED
@@ -22468,14 +22468,7 @@ var sharedSessionEventFields = {
22468
22468
  sessionId: identifierStringSchema
22469
22469
  };
22470
22470
  var sessionLiveEventFields = { ...sharedSessionEventFields, position: positionSchema };
22471
- var sessionEventSchema = external_exports.discriminatedUnion("type", [
22472
- external_exports.object({ ...sharedSessionEventFields, payload: acpSessionUpdateSchema, type: external_exports.literal("acp") }).readonly(),
22473
- external_exports.object({
22474
- ...sharedSessionEventFields,
22475
- payload: lifecycleMetadataSchema,
22476
- type: external_exports.literal("lifecycle-metadata")
22477
- }).readonly()
22478
- ]);
22471
+ var sessionEventSchema = external_exports.object({ ...sharedSessionEventFields, payload: acpSessionUpdateSchema, type: external_exports.literal("acp") }).readonly();
22479
22472
  var sessionLiveEventSchema = external_exports.discriminatedUnion("type", [
22480
22473
  external_exports.object({ ...sessionLiveEventFields, payload: acpSessionUpdateSchema, type: external_exports.literal("acp") }).readonly(),
22481
22474
  external_exports.object({
@@ -32576,7 +32569,7 @@ import { fetch as fetch3 } from "undici";
32576
32569
  // package.json
32577
32570
  var package_default = {
32578
32571
  name: "@moxt-ai/mobius",
32579
- version: "0.0.334",
32572
+ version: "0.0.335",
32580
32573
  description: "Mobius CLI for pairing and running local AI agent services.",
32581
32574
  type: "module",
32582
32575
  bin: {
@@ -83925,6 +83918,31 @@ var unmeasuredOperationMetrics = Object.freeze({
83925
83918
  // src/session/live/agent-session.ts
83926
83919
  import { methods as methods14 } from "@agentclientprotocol/sdk";
83927
83920
 
83921
+ // ../mobius-sdk/src/conversation-title.ts
83922
+ var CONVERSATION_TITLE_CHARACTER_LIMIT = 42;
83923
+ function conversationTitleFromText(text2) {
83924
+ let compact = "";
83925
+ for (const line of text2.split(/\r?\n/u)) {
83926
+ const candidate = line.replaceAll(/\s+/g, " ").trim();
83927
+ if (candidate.length === 0 || candidate.startsWith("```") || candidate.startsWith("~~~")) {
83928
+ continue;
83929
+ }
83930
+ const readable = candidate.replace(/^(?:>\s*)+/u, "").replace(/^#{1,6}(?:\s+|$)/u, "").replace(/^(?:[-*+]|\d+[.)])\s+/u, "").trim();
83931
+ if (readable.length > 0) {
83932
+ compact = readable;
83933
+ break;
83934
+ }
83935
+ }
83936
+ if (compact.length === 0) {
83937
+ compact = text2.replaceAll(/\s+/g, " ").trim();
83938
+ }
83939
+ const characters = Array.from(compact);
83940
+ if (characters.length <= CONVERSATION_TITLE_CHARACTER_LIMIT) {
83941
+ return compact;
83942
+ }
83943
+ return `${characters.slice(0, CONVERSATION_TITLE_CHARACTER_LIMIT - 1).join("")}\u2026`;
83944
+ }
83945
+
83928
83946
  // src/session/api/session-api.ts
83929
83947
  var NullSessionObserver = class {
83930
83948
  onBackgroundActivity = (_source, _active) => {
@@ -85360,7 +85378,7 @@ var AgentSession = class _AgentSession {
85360
85378
  }
85361
85379
  validatePromptContent(options, this.#capabilities);
85362
85380
  if (this.#sessionTitle === null || this.#sessionTitle.length === 0) {
85363
- this.#sessionTitle = truncate(options.prompt, 500);
85381
+ this.#sessionTitle = conversationTitleFromText(options.prompt);
85364
85382
  }
85365
85383
  this.#prompted = true;
85366
85384
  this.writeStoredSession((/* @__PURE__ */ new Date()).toISOString());