@clawos-dev/clawd 0.2.740 → 0.2.741

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.
@@ -22336,6 +22336,8 @@ var A2aTaskViewSchema = external_exports.object({
22336
22336
  executorThreadId: external_exports.string().nullable(),
22337
22337
  /** 这条线在本机的 worker 会话:本机执行的,或发起方 daemon 挂出的云 worker 会话;本机没有就缺省 */
22338
22338
  workerSessionId: external_exports.string().optional(),
22339
+ /** 派活方给 worker 会话起的名字(首条 user 消息的 sessionLabel) */
22340
+ sessionLabel: external_exports.string().optional(),
22339
22341
  /** 任务正文(首条 user 消息) */
22340
22342
  taskText: external_exports.string(),
22341
22343
  /** worker 的一句话摘要(statusMessage.brief) */
@@ -32264,6 +32264,8 @@ var A2aTaskViewSchema = external_exports.object({
32264
32264
  executorThreadId: external_exports.string().nullable(),
32265
32265
  /** 这条线在本机的 worker 会话:本机执行的,或发起方 daemon 挂出的云 worker 会话;本机没有就缺省 */
32266
32266
  workerSessionId: external_exports.string().optional(),
32267
+ /** 派活方给 worker 会话起的名字(首条 user 消息的 sessionLabel) */
32268
+ sessionLabel: external_exports.string().optional(),
32267
32269
  /** 任务正文(首条 user 消息) */
32268
32270
  taskText: external_exports.string(),
32269
32271
  /** worker 的一句话摘要(statusMessage.brief) */
package/dist/cli.cjs CHANGED
@@ -7312,6 +7312,8 @@ var init_a2a = __esm({
7312
7312
  executorThreadId: external_exports.string().nullable(),
7313
7313
  /** 这条线在本机的 worker 会话:本机执行的,或发起方 daemon 挂出的云 worker 会话;本机没有就缺省 */
7314
7314
  workerSessionId: external_exports.string().optional(),
7315
+ /** 派活方给 worker 会话起的名字(首条 user 消息的 sessionLabel) */
7316
+ sessionLabel: external_exports.string().optional(),
7315
7317
  /** 任务正文(首条 user 消息) */
7316
7318
  taskText: external_exports.string(),
7317
7319
  /** worker 的一句话摘要(statusMessage.brief) */
@@ -57228,6 +57230,8 @@ function toTaskView(t2, workerSessionId) {
57228
57230
  const lastAgent = [...t2.history ?? []].reverse().find((m3) => m3.role === "ROLE_AGENT");
57229
57231
  const resultArtifact = t2.artifacts?.[0];
57230
57232
  const brief = l2.statusMessage?.brief;
57233
+ const label = firstUserMessage(t2)?.metadata?.sessionLabel;
57234
+ const sessionLabel = typeof label === "string" ? label : "";
57231
57235
  const filePaths = resultArtifact?.metadata?.filePaths;
57232
57236
  return {
57233
57237
  taskId: t2.id,
@@ -57244,6 +57248,7 @@ function toTaskView(t2, workerSessionId) {
57244
57248
  executorSessionRef: l2.executor.sessionRef,
57245
57249
  executorThreadId: l2.executor.threadId,
57246
57250
  ...workerSessionId ? { workerSessionId } : {},
57251
+ ...sessionLabel ? { sessionLabel } : {},
57247
57252
  taskText: textOf(firstUserMessage(t2)),
57248
57253
  brief: typeof brief === "string" && brief ? brief : null,
57249
57254
  resultText: (resultArtifact ? textOf({ messageId: "", role: "ROLE_AGENT", parts: resultArtifact.parts }) : "") || textOf(lastAgent) || null,
@@ -74342,7 +74347,12 @@ function buildHistoryHandlers(deps) {
74342
74347
  total: res.total,
74343
74348
  offset: res.offset
74344
74349
  });
74345
- const messages = args.slim ? slimHistoryMessages(res.messages) : res.messages;
74350
+ const tagged = res.messages.map((m3) => {
74351
+ if (m3.kind !== "user-text" || m3.meta || !m3.text) return m3;
74352
+ const envelope = classifyA2aEnvelope(m3.text);
74353
+ return envelope ? { ...m3, meta: a2aUserMetaOf(envelope.kind, envelope.legacy) } : m3;
74354
+ });
74355
+ const messages = args.slim ? slimHistoryMessages(tagged) : tagged;
74346
74356
  return { response: { type: "history:read", ...res, messages } };
74347
74357
  };
74348
74358
  const assertGuestOwnsToolSession = (ctx, toolSessionId, method) => {
@@ -76110,7 +76120,7 @@ function computeMethodAccess(args) {
76110
76120
  }
76111
76121
 
76112
76122
  // src/version.ts
76113
- var version = "0.2.740".length > 0 ? "0.2.740" : "dev";
76123
+ var version = "0.2.741".length > 0 ? "0.2.741" : "dev";
76114
76124
 
76115
76125
  // src/cli-probe/probe.ts
76116
76126
  var fs87 = __toESM(require("fs"), 1);
@@ -79964,7 +79974,7 @@ async function startDaemon(config) {
79964
79974
  const { response, broadcast } = manager.create(
79965
79975
  {
79966
79976
  ownerPersonaId: mirror.personaId,
79967
- label: view.taskText.split("\n")[0].slice(0, 40),
79977
+ label: (view.sessionLabel ?? view.taskText.split("\n")[0]).slice(0, 40),
79968
79978
  cloudFork: { sessionId: newSessionId(), toolSessionId: view.executorThreadId, cloudConversationId: view.executorSessionRef },
79969
79979
  a2aWorker: { contextId: view.contextId, sourceSessionId: initiator.sessionId }
79970
79980
  },
@@ -79973,6 +79983,7 @@ async function startDaemon(config) {
79973
79983
  ownerFeishuUnionId
79974
79984
  );
79975
79985
  for (const b3 of broadcast) broadcastManagerFrame(b3.frame, b3.target);
79986
+ broadcastManagerFrame({ type: "session:info", ...response }, "all");
79976
79987
  return response.sessionId;
79977
79988
  } catch (err) {
79978
79989
  logger.warn("a2a.mount-cloud-worker-failed", { contextId: view.contextId, error: err instanceof Error ? err.message : String(err) });