@wowyuarm/dsh-agent-team 0.1.14-alpha.2 → 0.1.14

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 (127) hide show
  1. package/README.md +5 -3
  2. package/README.zh.md +5 -3
  3. package/cordis.patch.yml +2 -185
  4. package/package.json +52 -46
  5. package/packages/agent-team/README.md +1 -1
  6. package/packages/agent-team/README.zh.md +1 -1
  7. package/packages/agent-team/core-skills/member-memory-manager/SKILL.md +30 -0
  8. package/packages/agent-team/lib/context-continuity-host.js +91 -0
  9. package/packages/agent-team/lib/context-projection.js +266 -489
  10. package/packages/agent-team/lib/context-source.js +17 -106
  11. package/packages/agent-team/lib/human-avatar.js +61 -0
  12. package/packages/agent-team/lib/human-profile.js +46 -0
  13. package/packages/agent-team/lib/human-update-check.js +119 -0
  14. package/packages/agent-team/lib/index.js +408 -264
  15. package/packages/agent-team/lib/ledger.js +120 -15
  16. package/packages/agent-team/lib/member-context.js +9 -8
  17. package/packages/agent-team/lib/member-runtime.js +1 -1
  18. package/packages/agent-team/lib/member-time-context.js +2 -5
  19. package/packages/agent-team/lib/preset-roster.js +15 -0
  20. package/packages/agent-team/lib/pressure-policy.js +9 -6
  21. package/packages/agent-team/lib/session-remediation.js +493 -0
  22. package/packages/agent-team/lib/stored-session-reader.js +2 -1
  23. package/packages/agent-team/lib/typert.host.js +605 -291
  24. package/packages/agent-team/lib/typert.remote-client.d.ts +15 -6
  25. package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
  26. package/packages/agent-team/lib/typert.remote-client.js +367 -244
  27. package/packages/agent-team/lib/types/context-continuity-host.d.ts +84 -0
  28. package/packages/agent-team/lib/types/context-continuity-host.d.ts.map +1 -0
  29. package/packages/agent-team/lib/types/context-projection.d.ts +130 -185
  30. package/packages/agent-team/lib/types/context-projection.d.ts.map +1 -1
  31. package/packages/agent-team/lib/types/context-source.d.ts +17 -81
  32. package/packages/agent-team/lib/types/context-source.d.ts.map +1 -1
  33. package/packages/agent-team/lib/types/human-avatar.d.ts +29 -0
  34. package/packages/agent-team/lib/types/human-avatar.d.ts.map +1 -0
  35. package/packages/agent-team/lib/types/human-profile.d.ts +44 -0
  36. package/packages/agent-team/lib/types/human-profile.d.ts.map +1 -0
  37. package/packages/agent-team/lib/types/human-update-check.d.ts +73 -0
  38. package/packages/agent-team/lib/types/human-update-check.d.ts.map +1 -0
  39. package/packages/agent-team/lib/types/index.d.ts +112 -38
  40. package/packages/agent-team/lib/types/index.d.ts.map +1 -1
  41. package/packages/agent-team/lib/types/ledger.d.ts +31 -2
  42. package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
  43. package/packages/agent-team/lib/types/member-context.d.ts +0 -14
  44. package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
  45. package/packages/agent-team/lib/types/member-time-context.d.ts +0 -15
  46. package/packages/agent-team/lib/types/member-time-context.d.ts.map +1 -1
  47. package/packages/agent-team/lib/types/preset-roster.d.ts +5 -0
  48. package/packages/agent-team/lib/types/preset-roster.d.ts.map +1 -0
  49. package/packages/agent-team/lib/types/pressure-policy.d.ts +6 -0
  50. package/packages/agent-team/lib/types/pressure-policy.d.ts.map +1 -1
  51. package/packages/agent-team/lib/types/session-remediation.d.ts +172 -0
  52. package/packages/agent-team/lib/types/session-remediation.d.ts.map +1 -0
  53. package/packages/agent-team/lib/types/stored-session-reader.d.ts +2 -1
  54. package/packages/agent-team/lib/types/stored-session-reader.d.ts.map +1 -1
  55. package/packages/agent-team/lib/types/types/entities.d.ts +20 -3
  56. package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
  57. package/packages/agent-team/lib/types/types/requests-results.d.ts +63 -0
  58. package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
  59. package/packages/agent-team/preset/team-member/agent.cordis.yml +166 -0
  60. package/packages/client-agent-team/lib/client.js +1667 -516
  61. package/packages/client-agent-team/lib/client.js.map +1 -1
  62. package/packages/client-agent-team/lib/types/client/HumanSettingsSection.d.ts +15 -0
  63. package/packages/client-agent-team/lib/types/client/HumanSettingsSection.d.ts.map +1 -0
  64. package/packages/client-agent-team/lib/types/client/HumanSettingsSection.js +115 -0
  65. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
  66. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +12 -8
  67. package/packages/client-agent-team/lib/types/client/TeamAvatarStack.d.ts +22 -1
  68. package/packages/client-agent-team/lib/types/client/TeamAvatarStack.d.ts.map +1 -1
  69. package/packages/client-agent-team/lib/types/client/TeamAvatarStack.js +25 -2
  70. package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts +6 -1
  71. package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
  72. package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +69 -31
  73. package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +4 -4
  74. package/packages/client-agent-team/lib/types/client/TeamComposer.js +3 -3
  75. package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts +1 -1
  76. package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts.map +1 -1
  77. package/packages/client-agent-team/lib/types/client/TeamConversation.js +12 -5
  78. package/packages/client-agent-team/lib/types/client/TeamFooterAction.js +2 -2
  79. package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts +4 -1
  80. package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts.map +1 -1
  81. package/packages/client-agent-team/lib/types/client/TeamInboxPage.js +22 -7
  82. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts +11 -1
  83. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts.map +1 -1
  84. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.js +69 -8
  85. package/packages/client-agent-team/lib/types/client/TeamMembersAction.js +2 -2
  86. package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +18 -3
  87. package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
  88. package/packages/client-agent-team/lib/types/client/TeamMessage.js +213 -67
  89. package/packages/client-agent-team/lib/types/client/TeamRowMenu.d.ts.map +1 -1
  90. package/packages/client-agent-team/lib/types/client/TeamRowMenu.js +2 -2
  91. package/packages/client-agent-team/lib/types/client/TeamSidebarSection.js +2 -2
  92. package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +5 -0
  93. package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
  94. package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +55 -29
  95. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +3 -3
  96. package/packages/client-agent-team/lib/types/client/TeamWorkspaceSelector.js +2 -2
  97. package/packages/client-agent-team/lib/types/client/avatar-image.d.ts +21 -0
  98. package/packages/client-agent-team/lib/types/client/avatar-image.d.ts.map +1 -0
  99. package/packages/client-agent-team/lib/types/client/avatar-image.js +9 -0
  100. package/packages/client-agent-team/lib/types/client/human-identity.d.ts +94 -0
  101. package/packages/client-agent-team/lib/types/client/human-identity.d.ts.map +1 -0
  102. package/packages/client-agent-team/lib/types/client/human-identity.js +117 -0
  103. package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
  104. package/packages/client-agent-team/lib/types/client/index.js +112 -41
  105. package/packages/client-agent-team/lib/types/client/locales.d.ts +72 -2
  106. package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
  107. package/packages/client-agent-team/lib/types/client/locales.js +78 -2
  108. package/packages/client-agent-team/lib/types/client/multi-menu-field.js +2 -2
  109. package/packages/client-agent-team/lib/types/client/refs.d.ts +71 -0
  110. package/packages/client-agent-team/lib/types/client/refs.d.ts.map +1 -0
  111. package/packages/client-agent-team/lib/types/client/refs.js +181 -0
  112. package/packages/client-agent-team/lib/types/client/slots.d.ts +8 -2
  113. package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
  114. package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +57 -9
  115. package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
  116. package/packages/client-agent-team/lib/types/client/team-formatters.js +85 -17
  117. package/packages/tool-agent-team/README.md +1 -1
  118. package/packages/tool-agent-team/README.zh.md +1 -1
  119. package/packages/tool-agent-team/lib/context-tools.js +20 -6
  120. package/packages/tool-agent-team/lib/index.js +2 -2
  121. package/packages/tool-agent-team/lib/types/context-tools.d.ts.map +1 -1
  122. package/packages/agent-team/lib/context-management.js +0 -371
  123. package/packages/agent-team/lib/types/context-management.d.ts +0 -154
  124. package/packages/agent-team/lib/types/context-management.d.ts.map +0 -1
  125. package/packages/client-agent-team/lib/types/client/task-refs.d.ts +0 -31
  126. package/packages/client-agent-team/lib/types/client/task-refs.d.ts.map +0 -1
  127. package/packages/client-agent-team/lib/types/client/task-refs.js +0 -99
@@ -4,10 +4,10 @@ window.__ModuleLoader__.load({
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
- let _deepseek_ai_dsh_api_gateway_client = require("@deepseek-ai/dsh-api-gateway/client");
8
7
  let react = require("react");
9
8
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _deepseek_ai_dsh_api_gateway_client = require("@deepseek-ai/dsh-api-gateway/client");
11
11
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
12
12
  var _a$1;
13
13
  function $constructor(name, initializer, params) {
@@ -1008,7 +1008,7 @@ window.__ModuleLoader__.load({
1008
1008
  };
1009
1009
  //#endregion
1010
1010
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
1011
- const version$1 = {
1011
+ const version = {
1012
1012
  major: 4,
1013
1013
  minor: 4,
1014
1014
  patch: 3
@@ -1020,7 +1020,7 @@ window.__ModuleLoader__.load({
1020
1020
  inst ?? (inst = {});
1021
1021
  inst._zod.def = def;
1022
1022
  inst._zod.bag = inst._zod.bag || {};
1023
- inst._zod.version = version$1;
1023
+ inst._zod.version = version;
1024
1024
  const checks = [...inst._zod.def.checks ?? []];
1025
1025
  if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
1026
1026
  for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
@@ -4082,8 +4082,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4082
4082
  }
4083
4083
  //#endregion
4084
4084
  //#region ../agent-team/lib/typert.remote-client.js
4085
- let _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema$value;
4086
- const _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema$value ??= object({
4085
+ const _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema = object({
4087
4086
  "requestId": intersection(string(), unknown()).readonly(),
4088
4087
  "workspaceId": intersection(string(), unknown()).readonly(),
4089
4088
  "handle": string().readonly(),
@@ -4100,8 +4099,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4100
4099
  }).readonly().optional(),
4101
4100
  "channelRefs": array(intersection(string(), unknown())).readonly()
4102
4101
  });
4103
- let _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema$value;
4104
- const _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema$value ??= object({
4102
+ const _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema = object({
4103
+ "workspaceIds": array(intersection(string(), unknown())).readonly(),
4105
4104
  "receipt": object({
4106
4105
  "operationId": intersection(string(), unknown()).readonly(),
4107
4106
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4169,14 +4168,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4169
4168
  }))]).readonly().optional()
4170
4169
  }).readonly()
4171
4170
  });
4172
- let _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema$value;
4173
- const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema$value ??= object({
4171
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema = object({
4174
4172
  "requestId": intersection(string(), unknown()).readonly(),
4175
4173
  "workspaceId": intersection(string(), unknown()).readonly(),
4176
4174
  "channelRef": intersection(string(), unknown()).readonly()
4177
4175
  });
4178
- let _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema$value;
4179
- const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema$value ??= object({
4176
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema = object({
4180
4177
  "receipt": object({
4181
4178
  "operationId": intersection(string(), unknown()).readonly(),
4182
4179
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4205,13 +4202,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4205
4202
  ]).readonly()
4206
4203
  })).readonly()
4207
4204
  });
4208
- let _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema$value;
4209
- const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema$value ??= object({
4205
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema = object({
4210
4206
  "requestId": intersection(string(), unknown()).readonly(),
4211
4207
  "memberId": intersection(string(), unknown()).readonly()
4212
4208
  });
4213
- let _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema$value;
4214
- const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema$value ??= object({
4209
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema = object({
4215
4210
  "receipt": object({
4216
4211
  "operationId": intersection(string(), unknown()).readonly(),
4217
4212
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4260,16 +4255,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4260
4255
  "threadRef": intersection(string(), unknown()).readonly()
4261
4256
  })).readonly()
4262
4257
  });
4263
- let _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema$value;
4264
- const _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema$value ??= object({
4258
+ const _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema = object({
4265
4259
  "requestId": intersection(string(), unknown()).readonly(),
4266
4260
  "workspaceId": intersection(string(), unknown()).readonly(),
4267
4261
  "threadRef": intersection(string(), unknown()).readonly().optional(),
4268
4262
  "taskRef": intersection(string(), unknown()).readonly().optional(),
4269
4263
  "action": union([literal("follow"), literal("unfollow")]).readonly()
4270
4264
  });
4271
- let _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema$value;
4272
- const _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema$value ??= object({
4265
+ const _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema = object({
4273
4266
  "receipt": object({
4274
4267
  "operationId": intersection(string(), unknown()).readonly(),
4275
4268
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4305,8 +4298,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4305
4298
  "readThroughSequence": number().readonly()
4306
4299
  }).readonly().optional()
4307
4300
  });
4308
- let _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema$value;
4309
- const _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema$value ??= object({ "scope": union([
4301
+ const _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema = object({ "scope": union([
4310
4302
  object({
4311
4303
  "kind": literal("workspace").readonly(),
4312
4304
  "workspaceId": intersection(string(), unknown()).readonly()
@@ -4324,10 +4316,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4324
4316
  "workspaceId": intersection(string(), unknown()).readonly()
4325
4317
  })
4326
4318
  ]).readonly().optional() });
4327
- let _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema$value;
4328
- const _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema$value ??= object({ "version": number().readonly() });
4329
- let _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema$value;
4330
- const _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema$value ??= object({
4319
+ const _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema = object({ "version": number().readonly() });
4320
+ const _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema = object({
4331
4321
  "requestId": intersection(string(), unknown()).readonly(),
4332
4322
  "workspaceId": intersection(string(), unknown()).readonly(),
4333
4323
  "taskRef": intersection(string(), unknown()).readonly(),
@@ -4338,8 +4328,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4338
4328
  ]).readonly(),
4339
4329
  "baseRevision": number().readonly()
4340
4330
  });
4341
- let _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema$value;
4342
- const _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema$value ??= union([
4331
+ const _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema = union([
4343
4332
  object({
4344
4333
  "kind": literal("committed").readonly(),
4345
4334
  "receipt": object({
@@ -4416,14 +4405,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4416
4405
  "revision": number().readonly()
4417
4406
  })
4418
4407
  ]);
4419
- let _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema$value;
4420
- const _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema$value ??= object({
4408
+ const _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema = object({
4421
4409
  "requestId": intersection(string(), unknown()).readonly(),
4422
4410
  "workspaceId": intersection(string(), unknown()).readonly(),
4423
4411
  "memberId": intersection(string(), unknown()).readonly()
4424
4412
  });
4425
- let _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema$value;
4426
- const _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema$value ??= object({
4413
+ const _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema = object({
4427
4414
  "receipt": object({
4428
4415
  "operationId": intersection(string(), unknown()).readonly(),
4429
4416
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4491,16 +4478,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4491
4478
  }))]).readonly().optional()
4492
4479
  }).readonly()
4493
4480
  });
4494
- let _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema$value;
4495
- const _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema$value ??= object({
4481
+ const _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema = object({
4496
4482
  "requestId": intersection(string(), unknown()).readonly(),
4497
4483
  "workspaceId": intersection(string(), unknown()).readonly(),
4498
4484
  "name": string().readonly(),
4499
4485
  "description": string().readonly(),
4500
4486
  "memberIds": array(intersection(string(), unknown())).readonly().optional()
4501
4487
  });
4502
- let _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema$value;
4503
- const _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema$value ??= object({
4488
+ const _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema = object({
4504
4489
  "receipt": object({
4505
4490
  "operationId": intersection(string(), unknown()).readonly(),
4506
4491
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4517,22 +4502,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4517
4502
  }).readonly(),
4518
4503
  "memberIds": array(intersection(string(), unknown())).readonly()
4519
4504
  });
4520
- let _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema$value;
4521
- const _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema$value ??= object({ "attachmentId": intersection(string(), unknown()).readonly() });
4522
- let _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema$value;
4523
- const _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema$value ??= object({
4505
+ const _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema = object({ "attachmentId": intersection(string(), unknown()).readonly() });
4506
+ const _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema = object({
4524
4507
  "name": string().readonly(),
4525
4508
  "mediaType": string().readonly(),
4526
4509
  "byteSize": number().readonly(),
4527
4510
  "bytesBase64": string().readonly()
4528
4511
  });
4529
- let _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema$value;
4530
- const _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema$value ??= object({
4512
+ const _wowyuarm_dsh_agent_team_agentTeam_getHumanAvatar_parameter_0$schema = object({ "avatarRef": string().readonly() });
4513
+ const _wowyuarm_dsh_agent_team_agentTeam_getHumanAvatar_result$schema = object({
4514
+ "name": string().readonly(),
4515
+ "mediaType": string().readonly(),
4516
+ "byteSize": number().readonly(),
4517
+ "bytesBase64": string().readonly()
4518
+ });
4519
+ const _wowyuarm_dsh_agent_team_agentTeam_humanProfile_parameter_0$schema = object({});
4520
+ const _wowyuarm_dsh_agent_team_agentTeam_humanProfile_result$schema = object({
4521
+ "name": string().readonly(),
4522
+ "avatarRef": union([_undefined(), string()]).readonly().optional(),
4523
+ "version": string().readonly(),
4524
+ "repoUrl": string().readonly(),
4525
+ "updateAvailable": boolean().readonly(),
4526
+ "latestVersion": union([_undefined(), string()]).readonly().optional()
4527
+ });
4528
+ const _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema = object({
4531
4529
  "workspaceId": intersection(string(), unknown()).readonly(),
4532
4530
  "limit": number().readonly().optional()
4533
4531
  });
4534
- let _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema$value;
4535
- const _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema$value ??= object({
4532
+ const _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema = object({
4533
+ "humanMemberId": intersection(string(), unknown()).readonly(),
4536
4534
  "items": array(object({
4537
4535
  "workspaceId": intersection(string(), unknown()).readonly(),
4538
4536
  "channelRef": intersection(string(), unknown()).readonly(),
@@ -4630,15 +4628,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4630
4628
  "totalUnreadCount": number().readonly(),
4631
4629
  "totalDirectCount": number().readonly()
4632
4630
  });
4633
- let _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema$value;
4634
- const _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema$value ??= object({
4631
+ const _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema = object({
4635
4632
  "requestId": intersection(string(), unknown()).readonly(),
4636
4633
  "workspaceId": intersection(string(), unknown()).readonly(),
4637
4634
  "channelRef": intersection(string(), unknown()).readonly(),
4638
4635
  "memberId": intersection(string(), unknown()).readonly()
4639
4636
  });
4640
- let _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema$value;
4641
- const _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema$value ??= object({
4637
+ const _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema = object({
4642
4638
  "receipt": object({
4643
4639
  "operationId": intersection(string(), unknown()).readonly(),
4644
4640
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4648,14 +4644,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4648
4644
  "channelRef": intersection(string(), unknown()).readonly(),
4649
4645
  "memberId": intersection(string(), unknown()).readonly()
4650
4646
  });
4651
- let _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema$value;
4652
- const _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema$value ??= object({
4647
+ const _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema = object({
4653
4648
  "requestId": intersection(string(), unknown()).readonly(),
4654
4649
  "workspaceId": intersection(string(), unknown()).readonly(),
4655
4650
  "memberId": intersection(string(), unknown()).readonly()
4656
4651
  });
4657
- let _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema$value;
4658
- const _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema$value ??= object({
4652
+ const _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema = object({
4659
4653
  "receipt": object({
4660
4654
  "operationId": intersection(string(), unknown()).readonly(),
4661
4655
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4665,14 +4659,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4665
4659
  "memberId": intersection(string(), unknown()).readonly(),
4666
4660
  "workspaceId": intersection(string(), unknown()).readonly()
4667
4661
  });
4668
- let _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema$value;
4669
- const _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema$value ??= object({
4662
+ const _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema = object({
4670
4663
  "requestId": intersection(string(), unknown()).readonly(),
4671
4664
  "workspaceId": intersection(string(), unknown()).readonly(),
4672
4665
  "memberId": intersection(string(), unknown()).readonly()
4673
4666
  });
4674
- let _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema$value;
4675
- const _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema$value ??= object({
4667
+ const _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema = object({
4676
4668
  "receipt": object({
4677
4669
  "operationId": intersection(string(), unknown()).readonly(),
4678
4670
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4699,10 +4691,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4699
4691
  "threadRef": intersection(string(), unknown()).readonly()
4700
4692
  })).readonly()
4701
4693
  });
4702
- let _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema$value;
4703
- const _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema$value ??= object({ "workspaceId": intersection(string(), unknown()).readonly().optional() });
4704
- let _wowyuarm_dsh_agent_team_agentTeam_members_result$schema$value;
4705
- const _wowyuarm_dsh_agent_team_agentTeam_members_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_members_result$schema$value ??= array(object({
4694
+ const _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema = object({ "workspaceId": intersection(string(), unknown()).readonly().optional() });
4695
+ const _wowyuarm_dsh_agent_team_agentTeam_members_result$schema = array(object({
4706
4696
  "member": object({
4707
4697
  "memberId": intersection(string(), unknown()).readonly(),
4708
4698
  "sessionId": intersection(string(), unknown()).readonly(),
@@ -4762,15 +4752,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4762
4752
  "knownNames": array(string()).readonly()
4763
4753
  }))]).readonly().optional()
4764
4754
  }));
4765
- let _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema$value;
4766
- const _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema$value ??= object({
4755
+ const _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema = object({
4767
4756
  "requestId": intersection(string(), unknown()).readonly(),
4768
4757
  "workspaceId": intersection(string(), unknown()).readonly(),
4769
4758
  "threadRef": intersection(string(), unknown()).readonly(),
4770
4759
  "baseRevision": number().readonly()
4771
4760
  });
4772
- let _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema$value;
4773
- const _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema$value ??= union([
4761
+ const _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema = union([
4774
4762
  object({
4775
4763
  "kind": literal("unread_required").readonly(),
4776
4764
  "taskRef": intersection(string(), unknown()).readonly().optional(),
@@ -4834,31 +4822,39 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4834
4822
  }).readonly()
4835
4823
  })
4836
4824
  ]);
4837
- let _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema$value;
4838
- const _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema$value ??= object({
4825
+ const _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema = object({
4839
4826
  "requestId": intersection(string(), unknown()).readonly(),
4840
4827
  "workspaceId": intersection(string(), unknown()).readonly(),
4841
4828
  "name": string().readonly(),
4842
4829
  "mediaType": union([_undefined(), string()]).readonly().optional(),
4843
4830
  "bytesBase64": string().readonly()
4844
4831
  });
4845
- let _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema$value;
4846
- const _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema$value ??= object({
4832
+ const _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema = object({
4847
4833
  "attachmentId": intersection(string(), unknown()).readonly(),
4848
4834
  "path": string().readonly(),
4849
4835
  "name": string().readonly(),
4850
4836
  "byteSize": number().readonly(),
4851
4837
  "mediaType": string().readonly()
4852
4838
  });
4853
- let _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema$value;
4854
- const _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema$value ??= object({
4839
+ const _wowyuarm_dsh_agent_team_agentTeam_putHumanAvatar_parameter_0$schema = object({
4840
+ "name": string().readonly(),
4841
+ "mediaType": union([_undefined(), string()]).readonly().optional(),
4842
+ "bytesBase64": string().readonly()
4843
+ });
4844
+ const _wowyuarm_dsh_agent_team_agentTeam_putHumanAvatar_result$schema = object({
4845
+ "avatarRef": string().readonly(),
4846
+ "path": string().readonly(),
4847
+ "name": string().readonly(),
4848
+ "byteSize": number().readonly(),
4849
+ "mediaType": string().readonly()
4850
+ });
4851
+ const _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema = object({
4855
4852
  "requestId": intersection(string(), unknown()).readonly(),
4856
4853
  "workspaceId": intersection(string(), unknown()).readonly(),
4857
4854
  "threadRef": intersection(string(), unknown()).readonly().optional(),
4858
4855
  "taskRef": intersection(string(), unknown()).readonly().optional()
4859
4856
  });
4860
- let _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema$value;
4861
- const _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema$value ??= object({
4857
+ const _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema = object({
4862
4858
  "receipt": object({
4863
4859
  "operationId": intersection(string(), unknown()).readonly(),
4864
4860
  "requestId": intersection(string(), unknown()).readonly(),
@@ -5018,14 +5014,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5018
5014
  "guidance": string().readonly()
5019
5015
  }).readonly().optional()
5020
5016
  });
5021
- let _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema$value;
5022
- const _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema$value ??= object({
5017
+ const _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema = object({
5023
5018
  "requestId": intersection(string(), unknown()).readonly(),
5024
5019
  "workspaceId": intersection(string(), unknown()).readonly(),
5025
5020
  "memberId": intersection(string(), unknown()).readonly()
5026
5021
  });
5027
- let _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema$value;
5028
- const _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema$value ??= object({ "status": object({
5022
+ const _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema = object({ "status": object({
5029
5023
  "member": object({
5030
5024
  "memberId": intersection(string(), unknown()).readonly(),
5031
5025
  "sessionId": intersection(string(), unknown()).readonly(),
@@ -5085,15 +5079,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5085
5079
  "knownNames": array(string()).readonly()
5086
5080
  }))]).readonly().optional()
5087
5081
  }).readonly() });
5088
- let _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema$value;
5089
- const _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema$value ??= object({
5082
+ const _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema = object({
5090
5083
  "requestId": intersection(string(), unknown()).readonly(),
5091
5084
  "workspaceId": intersection(string(), unknown()).readonly(),
5092
5085
  "channelRef": intersection(string(), unknown()).readonly(),
5093
5086
  "memberId": intersection(string(), unknown()).readonly()
5094
5087
  });
5095
- let _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema$value;
5096
- const _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema$value ??= object({
5088
+ const _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema = object({
5097
5089
  "receipt": object({
5098
5090
  "operationId": intersection(string(), unknown()).readonly(),
5099
5091
  "requestId": intersection(string(), unknown()).readonly(),
@@ -5120,8 +5112,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5120
5112
  "threadRef": intersection(string(), unknown()).readonly()
5121
5113
  })).readonly()
5122
5114
  });
5123
- let _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema$value;
5124
- const _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema$value ??= object({
5115
+ const _wowyuarm_dsh_agent_team_agentTeam_removeHumanAvatar_parameter_0$schema = object({ "avatarRef": string().readonly() });
5116
+ const _wowyuarm_dsh_agent_team_agentTeam_removeHumanAvatar_result$schema = object({ "removed": boolean().readonly() });
5117
+ const _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema = object({
5125
5118
  "requestId": intersection(string(), unknown()).readonly(),
5126
5119
  "workspaceId": intersection(string(), unknown()).readonly(),
5127
5120
  "threadRef": intersection(string(), unknown()).readonly().optional(),
@@ -5133,8 +5126,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5133
5126
  "attachments": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
5134
5127
  "confirmationToken": intersection(string(), unknown()).readonly().optional()
5135
5128
  });
5136
- let _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema$value;
5137
- const _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema$value ??= union([
5129
+ const _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema = union([
5138
5130
  object({
5139
5131
  "kind": literal("unread_required").readonly(),
5140
5132
  "taskRef": intersection(string(), unknown()).readonly().optional(),
@@ -5231,20 +5223,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5231
5223
  "undeliveredMentions": array(intersection(string(), unknown())).readonly().optional()
5232
5224
  })
5233
5225
  ]);
5234
- let _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema$value;
5235
- const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema$value ??= object({
5226
+ const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema = object({
5236
5227
  "workspaceId": intersection(string(), unknown()).readonly(),
5237
5228
  "taskRefs": array(intersection(string(), unknown())).readonly()
5238
5229
  });
5239
- let _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema$value;
5240
- const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema$value ??= object({ "resolved": array(object({
5230
+ const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema = object({ "resolved": array(object({
5241
5231
  "taskRef": intersection(string(), unknown()).readonly(),
5242
5232
  "channelRef": intersection(string(), unknown()).readonly(),
5243
5233
  "threadRef": intersection(string(), unknown()).readonly(),
5244
5234
  "taskNumber": number().readonly()
5245
5235
  })).readonly() });
5246
- let _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema$value;
5247
- const _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema$value ??= object({
5236
+ const _wowyuarm_dsh_agent_team_agentTeam_resolveThreadRefs_parameter_0$schema = object({
5237
+ "workspaceId": intersection(string(), unknown()).readonly(),
5238
+ "threadRefs": array(intersection(string(), unknown())).readonly()
5239
+ });
5240
+ const _wowyuarm_dsh_agent_team_agentTeam_resolveThreadRefs_result$schema = object({ "resolved": array(object({
5241
+ "threadRef": intersection(string(), unknown()).readonly(),
5242
+ "channelRef": intersection(string(), unknown()).readonly(),
5243
+ "taskRef": intersection(string(), unknown()).readonly().optional(),
5244
+ "taskNumber": number().readonly().optional(),
5245
+ "title": string().readonly()
5246
+ })).readonly() });
5247
+ const _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema = object({
5248
5248
  "requestId": intersection(string(), unknown()).readonly(),
5249
5249
  "workspaceId": intersection(string(), unknown()).readonly(),
5250
5250
  "channelRef": intersection(string(), unknown()).readonly(),
@@ -5255,8 +5255,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5255
5255
  "confirmationToken": intersection(string(), unknown()).readonly().optional(),
5256
5256
  "asTask": boolean().readonly().optional()
5257
5257
  });
5258
- let _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema$value;
5259
- const _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema$value ??= union([
5258
+ const _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema = union([
5260
5259
  object({
5261
5260
  "kind": literal("committed").readonly(),
5262
5261
  "receipt": object({
@@ -5337,16 +5336,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5337
5336
  "revision": number().readonly().optional()
5338
5337
  })
5339
5338
  ]);
5340
- let _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema$value;
5341
- const _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema$value ??= object({
5339
+ const _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema = object({
5342
5340
  "workspaceId": intersection(string(), unknown()).readonly(),
5343
5341
  "threadRef": intersection(string(), unknown()).readonly().optional(),
5344
5342
  "taskRef": intersection(string(), unknown()).readonly().optional(),
5345
5343
  "beforeSequence": number().readonly().optional(),
5346
5344
  "limit": number().readonly().optional()
5347
5345
  });
5348
- let _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema$value;
5349
- const _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema$value ??= object({
5346
+ const _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema = object({
5350
5347
  "task": object({
5351
5348
  "taskRef": intersection(string(), unknown()).readonly(),
5352
5349
  "channelRef": intersection(string(), unknown()).readonly(),
@@ -5470,15 +5467,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5470
5467
  "cursor": number().readonly(),
5471
5468
  "hasMore": boolean().readonly()
5472
5469
  });
5473
- let _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema$value;
5474
- const _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema$value ??= object({
5470
+ const _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema = object({
5475
5471
  "workspaceId": intersection(string(), unknown()).readonly(),
5476
5472
  "threadRef": intersection(string(), unknown()).readonly().optional(),
5477
5473
  "taskRef": intersection(string(), unknown()).readonly().optional(),
5478
5474
  "limit": number().readonly().optional()
5479
5475
  });
5480
- let _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema$value;
5481
- const _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema$value ??= object({
5476
+ const _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema = object({
5482
5477
  "items": array(object({
5483
5478
  "sequence": number().readonly(),
5484
5479
  "threadRef": intersection(string(), unknown()).readonly(),
@@ -5488,16 +5483,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5488
5483
  })).readonly(),
5489
5484
  "followers": array(intersection(string(), unknown())).readonly()
5490
5485
  });
5491
- let _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema$value;
5492
- const _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema$value ??= object({
5486
+ const _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema = object({
5493
5487
  "requestId": intersection(string(), unknown()).readonly(),
5494
5488
  "workspaceId": intersection(string(), unknown()).readonly(),
5495
5489
  "channelRef": intersection(string(), unknown()).readonly(),
5496
5490
  "name": string().readonly(),
5497
5491
  "description": string().readonly()
5498
5492
  });
5499
- let _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema$value;
5500
- const _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema$value ??= object({
5493
+ const _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema = object({
5501
5494
  "receipt": object({
5502
5495
  "operationId": intersection(string(), unknown()).readonly(),
5503
5496
  "requestId": intersection(string(), unknown()).readonly(),
@@ -5513,8 +5506,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5513
5506
  "state": union([literal("archived"), literal("active")]).readonly()
5514
5507
  }).readonly()
5515
5508
  });
5516
- let _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema$value;
5517
- const _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema$value ??= object({
5509
+ const _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema = object({
5518
5510
  "requestId": intersection(string(), unknown()).readonly(),
5519
5511
  "memberId": intersection(string(), unknown()).readonly(),
5520
5512
  "handle": string().readonly(),
@@ -5529,8 +5521,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5529
5521
  "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
5530
5522
  }).readonly().optional()
5531
5523
  });
5532
- let _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema$value;
5533
- const _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema$value ??= object({
5524
+ const _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema = object({
5534
5525
  "receipt": object({
5535
5526
  "operationId": intersection(string(), unknown()).readonly(),
5536
5527
  "requestId": intersection(string(), unknown()).readonly(),
@@ -5598,8 +5589,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5598
5589
  }))]).readonly().optional()
5599
5590
  }).readonly()
5600
5591
  });
5601
- let _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema$value;
5602
- const _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema = () => _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema$value ??= object({
5592
+ const _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema = object({
5603
5593
  "workspaceId": intersection(string(), unknown()).readonly(),
5604
5594
  "channelRef": intersection(string(), unknown()).readonly().optional(),
5605
5595
  "threadRef": intersection(string(), unknown()).readonly().optional(),
@@ -5609,8 +5599,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5609
5599
  "topLevelOnly": boolean().readonly().optional(),
5610
5600
  "includeActivities": boolean().readonly().optional()
5611
5601
  });
5612
- let _wowyuarm_dsh_agent_team_agentTeam_view_result$schema$value;
5613
- const _wowyuarm_dsh_agent_team_agentTeam_view_result$schema = () => _wowyuarm_dsh_agent_team_agentTeam_view_result$schema$value ??= object({
5602
+ const _wowyuarm_dsh_agent_team_agentTeam_view_result$schema = object({
5614
5603
  "humanMemberId": intersection(string(), unknown()).readonly(),
5615
5604
  "workspaces": array(object({
5616
5605
  "workspaceId": intersection(string(), unknown()).readonly(),
@@ -5776,17 +5765,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5776
5765
  codec: {
5777
5766
  mode: "strict",
5778
5767
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamAddMemberRequest",
5779
- create: _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema
5768
+ schema: _wowyuarm_dsh_agent_team_agentTeam_addMember_parameter_0$schema
5780
5769
  }
5781
5770
  }],
5782
5771
  result: {
5783
5772
  mode: "strict",
5784
- typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamMemberResult",
5785
- create: _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema
5773
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamAddMemberResult",
5774
+ schema: _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema
5786
5775
  },
5787
5776
  sourceLocation: {
5788
5777
  "file": "packages/agent-team/src/index.ts",
5789
- "line": 708,
5778
+ "line": 837,
5790
5779
  "column": 9
5791
5780
  }
5792
5781
  },
@@ -5803,17 +5792,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5803
5792
  codec: {
5804
5793
  mode: "strict",
5805
5794
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveChannelRequest",
5806
- create: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema
5795
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema
5807
5796
  }
5808
5797
  }],
5809
5798
  result: {
5810
5799
  mode: "strict",
5811
5800
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveChannelResult",
5812
- create: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema
5801
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema
5813
5802
  },
5814
5803
  sourceLocation: {
5815
5804
  "file": "packages/agent-team/src/index.ts",
5816
- "line": 698,
5805
+ "line": 827,
5817
5806
  "column": 9
5818
5807
  }
5819
5808
  },
@@ -5830,17 +5819,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5830
5819
  codec: {
5831
5820
  mode: "strict",
5832
5821
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveMemberRequest",
5833
- create: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema
5822
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema
5834
5823
  }
5835
5824
  }],
5836
5825
  result: {
5837
5826
  mode: "strict",
5838
5827
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveMemberResult",
5839
- create: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema
5828
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema
5840
5829
  },
5841
5830
  sourceLocation: {
5842
5831
  "file": "packages/agent-team/src/index.ts",
5843
- "line": 1077,
5832
+ "line": 1229,
5844
5833
  "column": 9
5845
5834
  }
5846
5835
  },
@@ -5857,17 +5846,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5857
5846
  codec: {
5858
5847
  mode: "strict",
5859
5848
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadAttentionRequest",
5860
- create: _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema
5849
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema
5861
5850
  }
5862
5851
  }],
5863
5852
  result: {
5864
5853
  mode: "strict",
5865
5854
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadAttentionResult",
5866
- create: _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema
5855
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changeAttention_result$schema
5867
5856
  },
5868
5857
  sourceLocation: {
5869
5858
  "file": "packages/agent-team/src/index.ts",
5870
- "line": 1217,
5859
+ "line": 1420,
5871
5860
  "column": 9
5872
5861
  }
5873
5862
  },
@@ -5885,18 +5874,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5885
5874
  codec: {
5886
5875
  mode: "strict",
5887
5876
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamChangesRequest",
5888
- create: _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema
5877
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changes_parameter_0$schema
5889
5878
  }
5890
5879
  }],
5891
5880
  cancellation: { parameter: "signal" },
5892
5881
  result: {
5893
5882
  mode: "strict",
5894
5883
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamChangesResult",
5895
- create: _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema
5884
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changes_result$schema
5896
5885
  },
5897
5886
  sourceLocation: {
5898
5887
  "file": "packages/agent-team/src/index.ts",
5899
- "line": 631,
5888
+ "line": 760,
5900
5889
  "column": 11
5901
5890
  }
5902
5891
  },
@@ -5913,17 +5902,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5913
5902
  codec: {
5914
5903
  mode: "strict",
5915
5904
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamTaskRequest",
5916
- create: _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema
5905
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changeTask_parameter_0$schema
5917
5906
  }
5918
5907
  }],
5919
5908
  result: {
5920
5909
  mode: "strict",
5921
5910
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamTaskResult",
5922
- create: _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema
5911
+ schema: _wowyuarm_dsh_agent_team_agentTeam_changeTask_result$schema
5923
5912
  },
5924
5913
  sourceLocation: {
5925
5914
  "file": "packages/agent-team/src/index.ts",
5926
- "line": 1089,
5915
+ "line": 1241,
5927
5916
  "column": 9
5928
5917
  }
5929
5918
  },
@@ -5940,17 +5929,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5940
5929
  codec: {
5941
5930
  mode: "strict",
5942
5931
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamClearMemberContextRequest",
5943
- create: _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema
5932
+ schema: _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_parameter_0$schema
5944
5933
  }
5945
5934
  }],
5946
5935
  result: {
5947
5936
  mode: "strict",
5948
5937
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamClearMemberContextResult",
5949
- create: _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema
5938
+ schema: _wowyuarm_dsh_agent_team_agentTeam_clearMemberContext_result$schema
5950
5939
  },
5951
5940
  sourceLocation: {
5952
5941
  "file": "packages/agent-team/src/index.ts",
5953
- "line": 811,
5942
+ "line": 955,
5954
5943
  "column": 9
5955
5944
  }
5956
5945
  },
@@ -5967,17 +5956,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5967
5956
  codec: {
5968
5957
  mode: "strict",
5969
5958
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamCreateChannelRequest",
5970
- create: _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema
5959
+ schema: _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema
5971
5960
  }
5972
5961
  }],
5973
5962
  result: {
5974
5963
  mode: "strict",
5975
5964
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamCreateChannelResult",
5976
- create: _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema
5965
+ schema: _wowyuarm_dsh_agent_team_agentTeam_createChannel_result$schema
5977
5966
  },
5978
5967
  sourceLocation: {
5979
5968
  "file": "packages/agent-team/src/index.ts",
5980
- "line": 671,
5969
+ "line": 800,
5981
5970
  "column": 9
5982
5971
  }
5983
5972
  },
@@ -5994,20 +5983,75 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5994
5983
  codec: {
5995
5984
  mode: "strict",
5996
5985
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamGetAttachmentRequest",
5997
- create: _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema
5986
+ schema: _wowyuarm_dsh_agent_team_agentTeam_getAttachment_parameter_0$schema
5998
5987
  }
5999
5988
  }],
6000
5989
  result: {
6001
5990
  mode: "strict",
6002
5991
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamGetAttachmentResult",
6003
- create: _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema
5992
+ schema: _wowyuarm_dsh_agent_team_agentTeam_getAttachment_result$schema
5993
+ },
5994
+ sourceLocation: {
5995
+ "file": "packages/agent-team/src/index.ts",
5996
+ "line": 1355,
5997
+ "column": 9
5998
+ }
5999
+ },
6000
+ {
6001
+ id: "@wowyuarm/dsh-agent-team#agentTeam/getHumanAvatar",
6002
+ service: "agentTeam",
6003
+ namespace: "agentTeam",
6004
+ method: "getHumanAvatar",
6005
+ invocation: { kind: "direct" },
6006
+ parameters: [{
6007
+ name: "request",
6008
+ wire: "request",
6009
+ source: "json",
6010
+ codec: {
6011
+ mode: "strict",
6012
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamGetHumanAvatarRequest",
6013
+ schema: _wowyuarm_dsh_agent_team_agentTeam_getHumanAvatar_parameter_0$schema
6014
+ }
6015
+ }],
6016
+ result: {
6017
+ mode: "strict",
6018
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamGetHumanAvatarResult",
6019
+ schema: _wowyuarm_dsh_agent_team_agentTeam_getHumanAvatar_result$schema
6004
6020
  },
6005
6021
  sourceLocation: {
6006
6022
  "file": "packages/agent-team/src/index.ts",
6007
- "line": 1203,
6023
+ "line": 1398,
6008
6024
  "column": 9
6009
6025
  }
6010
6026
  },
6027
+ {
6028
+ id: "@wowyuarm/dsh-agent-team#agentTeam/humanProfile",
6029
+ service: "agentTeam",
6030
+ namespace: "agentTeam",
6031
+ method: "humanProfile",
6032
+ implementation: "humanProfileForClient",
6033
+ invocation: { kind: "direct" },
6034
+ parameters: [{
6035
+ name: "_request",
6036
+ wire: "_request",
6037
+ source: "json",
6038
+ codec: {
6039
+ mode: "strict",
6040
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamHumanProfileRequest",
6041
+ schema: _wowyuarm_dsh_agent_team_agentTeam_humanProfile_parameter_0$schema
6042
+ }
6043
+ }],
6044
+ result: {
6045
+ mode: "strict",
6046
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamHumanProfileResult",
6047
+ schema: _wowyuarm_dsh_agent_team_agentTeam_humanProfile_result$schema
6048
+ },
6049
+ sourceLocation: {
6050
+ "file": "packages/agent-team/src/index.ts",
6051
+ "line": 1370,
6052
+ "column": 3
6053
+ }
6054
+ },
6011
6055
  {
6012
6056
  id: "@wowyuarm/dsh-agent-team#agentTeam/inbox",
6013
6057
  service: "agentTeam",
@@ -6021,17 +6065,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6021
6065
  codec: {
6022
6066
  mode: "strict",
6023
6067
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamInboxRequest",
6024
- create: _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema
6068
+ schema: _wowyuarm_dsh_agent_team_agentTeam_inbox_parameter_0$schema
6025
6069
  }
6026
6070
  }],
6027
6071
  result: {
6028
6072
  mode: "strict",
6029
6073
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamInbox",
6030
- create: _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema
6074
+ schema: _wowyuarm_dsh_agent_team_agentTeam_inbox_result$schema
6031
6075
  },
6032
6076
  sourceLocation: {
6033
6077
  "file": "packages/agent-team/src/index.ts",
6034
- "line": 1226,
6078
+ "line": 1429,
6035
6079
  "column": 3
6036
6080
  }
6037
6081
  },
@@ -6048,17 +6092,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6048
6092
  codec: {
6049
6093
  mode: "strict",
6050
6094
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamJoinChannelRequest",
6051
- create: _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema
6095
+ schema: _wowyuarm_dsh_agent_team_agentTeam_joinChannel_parameter_0$schema
6052
6096
  }
6053
6097
  }],
6054
6098
  result: {
6055
6099
  mode: "strict",
6056
6100
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamJoinChannelResult",
6057
- create: _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema
6101
+ schema: _wowyuarm_dsh_agent_team_agentTeam_joinChannel_result$schema
6058
6102
  },
6059
6103
  sourceLocation: {
6060
6104
  "file": "packages/agent-team/src/index.ts",
6061
- "line": 1109,
6105
+ "line": 1261,
6062
6106
  "column": 9
6063
6107
  }
6064
6108
  },
@@ -6075,17 +6119,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6075
6119
  codec: {
6076
6120
  mode: "strict",
6077
6121
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamJoinWorkspaceRequest",
6078
- create: _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema
6122
+ schema: _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_parameter_0$schema
6079
6123
  }
6080
6124
  }],
6081
6125
  result: {
6082
6126
  mode: "strict",
6083
6127
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamJoinWorkspaceResult",
6084
- create: _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema
6128
+ schema: _wowyuarm_dsh_agent_team_agentTeam_joinWorkspace_result$schema
6085
6129
  },
6086
6130
  sourceLocation: {
6087
6131
  "file": "packages/agent-team/src/index.ts",
6088
- "line": 1129,
6132
+ "line": 1281,
6089
6133
  "column": 9
6090
6134
  }
6091
6135
  },
@@ -6102,17 +6146,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6102
6146
  codec: {
6103
6147
  mode: "strict",
6104
6148
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamLeaveWorkspaceRequest",
6105
- create: _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema
6149
+ schema: _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_parameter_0$schema
6106
6150
  }
6107
6151
  }],
6108
6152
  result: {
6109
6153
  mode: "strict",
6110
6154
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamLeaveWorkspaceResult",
6111
- create: _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema
6155
+ schema: _wowyuarm_dsh_agent_team_agentTeam_leaveWorkspace_result$schema
6112
6156
  },
6113
6157
  sourceLocation: {
6114
6158
  "file": "packages/agent-team/src/index.ts",
6115
- "line": 1138,
6159
+ "line": 1290,
6116
6160
  "column": 9
6117
6161
  }
6118
6162
  },
@@ -6130,17 +6174,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6130
6174
  codec: {
6131
6175
  mode: "strict",
6132
6176
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamMembersRequest",
6133
- create: _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema
6177
+ schema: _wowyuarm_dsh_agent_team_agentTeam_members_parameter_0$schema
6134
6178
  }
6135
6179
  }],
6136
6180
  result: {
6137
6181
  mode: "strict",
6138
6182
  typeSymbol: "@wowyuarm/dsh-agent-team#agentTeam/members:result",
6139
- create: _wowyuarm_dsh_agent_team_agentTeam_members_result$schema
6183
+ schema: _wowyuarm_dsh_agent_team_agentTeam_members_result$schema
6140
6184
  },
6141
6185
  sourceLocation: {
6142
6186
  "file": "packages/agent-team/src/index.ts",
6143
- "line": 621,
6187
+ "line": 750,
6144
6188
  "column": 3
6145
6189
  }
6146
6190
  },
@@ -6157,17 +6201,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6157
6201
  codec: {
6158
6202
  mode: "strict",
6159
6203
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPromoteThreadRequest",
6160
- create: _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema
6204
+ schema: _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema
6161
6205
  }
6162
6206
  }],
6163
6207
  result: {
6164
6208
  mode: "strict",
6165
6209
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPromoteThreadResult",
6166
- create: _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema
6210
+ schema: _wowyuarm_dsh_agent_team_agentTeam_promoteThread_result$schema
6167
6211
  },
6168
6212
  sourceLocation: {
6169
6213
  "file": "packages/agent-team/src/index.ts",
6170
- "line": 1099,
6214
+ "line": 1251,
6171
6215
  "column": 9
6172
6216
  }
6173
6217
  },
@@ -6184,17 +6228,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6184
6228
  codec: {
6185
6229
  mode: "strict",
6186
6230
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPutAttachmentRequest",
6187
- create: _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema
6231
+ schema: _wowyuarm_dsh_agent_team_agentTeam_putAttachment_parameter_0$schema
6188
6232
  }
6189
6233
  }],
6190
6234
  result: {
6191
6235
  mode: "strict",
6192
6236
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPutAttachmentResult",
6193
- create: _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema
6237
+ schema: _wowyuarm_dsh_agent_team_agentTeam_putAttachment_result$schema
6194
6238
  },
6195
6239
  sourceLocation: {
6196
6240
  "file": "packages/agent-team/src/index.ts",
6197
- "line": 1190,
6241
+ "line": 1342,
6242
+ "column": 9
6243
+ }
6244
+ },
6245
+ {
6246
+ id: "@wowyuarm/dsh-agent-team#agentTeam/putHumanAvatar",
6247
+ service: "agentTeam",
6248
+ namespace: "agentTeam",
6249
+ method: "putHumanAvatar",
6250
+ invocation: { kind: "direct" },
6251
+ parameters: [{
6252
+ name: "request",
6253
+ wire: "request",
6254
+ source: "json",
6255
+ codec: {
6256
+ mode: "strict",
6257
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPutHumanAvatarRequest",
6258
+ schema: _wowyuarm_dsh_agent_team_agentTeam_putHumanAvatar_parameter_0$schema
6259
+ }
6260
+ }],
6261
+ result: {
6262
+ mode: "strict",
6263
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamPutHumanAvatarResult",
6264
+ schema: _wowyuarm_dsh_agent_team_agentTeam_putHumanAvatar_result$schema
6265
+ },
6266
+ sourceLocation: {
6267
+ "file": "packages/agent-team/src/index.ts",
6268
+ "line": 1390,
6198
6269
  "column": 9
6199
6270
  }
6200
6271
  },
@@ -6211,17 +6282,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6211
6282
  codec: {
6212
6283
  mode: "strict",
6213
6284
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadReadRequest",
6214
- create: _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema
6285
+ schema: _wowyuarm_dsh_agent_team_agentTeam_readThread_parameter_0$schema
6215
6286
  }
6216
6287
  }],
6217
6288
  result: {
6218
6289
  mode: "strict",
6219
6290
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadReadResult",
6220
- create: _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema
6291
+ schema: _wowyuarm_dsh_agent_team_agentTeam_readThread_result$schema
6221
6292
  },
6222
6293
  sourceLocation: {
6223
6294
  "file": "packages/agent-team/src/index.ts",
6224
- "line": 1233,
6295
+ "line": 1436,
6225
6296
  "column": 9
6226
6297
  }
6227
6298
  },
@@ -6238,17 +6309,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6238
6309
  codec: {
6239
6310
  mode: "strict",
6240
6311
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRecoverMemberRequest",
6241
- create: _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema
6312
+ schema: _wowyuarm_dsh_agent_team_agentTeam_recoverMember_parameter_0$schema
6242
6313
  }
6243
6314
  }],
6244
6315
  result: {
6245
6316
  mode: "strict",
6246
6317
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRecoverMemberResult",
6247
- create: _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema
6318
+ schema: _wowyuarm_dsh_agent_team_agentTeam_recoverMember_result$schema
6248
6319
  },
6249
6320
  sourceLocation: {
6250
6321
  "file": "packages/agent-team/src/index.ts",
6251
- "line": 768,
6322
+ "line": 900,
6252
6323
  "column": 9
6253
6324
  }
6254
6325
  },
@@ -6265,17 +6336,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6265
6336
  codec: {
6266
6337
  mode: "strict",
6267
6338
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRemoveChannelMemberRequest",
6268
- create: _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema
6339
+ schema: _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema
6269
6340
  }
6270
6341
  }],
6271
6342
  result: {
6272
6343
  mode: "strict",
6273
6344
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRemoveChannelMemberResult",
6274
- create: _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema
6345
+ schema: _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_result$schema
6275
6346
  },
6276
6347
  sourceLocation: {
6277
6348
  "file": "packages/agent-team/src/index.ts",
6278
- "line": 1120,
6349
+ "line": 1272,
6350
+ "column": 9
6351
+ }
6352
+ },
6353
+ {
6354
+ id: "@wowyuarm/dsh-agent-team#agentTeam/removeHumanAvatar",
6355
+ service: "agentTeam",
6356
+ namespace: "agentTeam",
6357
+ method: "removeHumanAvatar",
6358
+ invocation: { kind: "direct" },
6359
+ parameters: [{
6360
+ name: "request",
6361
+ wire: "request",
6362
+ source: "json",
6363
+ codec: {
6364
+ mode: "strict",
6365
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRemoveHumanAvatarRequest",
6366
+ schema: _wowyuarm_dsh_agent_team_agentTeam_removeHumanAvatar_parameter_0$schema
6367
+ }
6368
+ }],
6369
+ result: {
6370
+ mode: "strict",
6371
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamRemoveHumanAvatarResult",
6372
+ schema: _wowyuarm_dsh_agent_team_agentTeam_removeHumanAvatar_result$schema
6373
+ },
6374
+ sourceLocation: {
6375
+ "file": "packages/agent-team/src/index.ts",
6376
+ "line": 1406,
6279
6377
  "column": 9
6280
6378
  }
6281
6379
  },
@@ -6292,17 +6390,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6292
6390
  codec: {
6293
6391
  mode: "strict",
6294
6392
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamReplyRequest",
6295
- create: _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema
6393
+ schema: _wowyuarm_dsh_agent_team_agentTeam_reply_parameter_0$schema
6296
6394
  }
6297
6395
  }],
6298
6396
  result: {
6299
6397
  mode: "strict",
6300
6398
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamReplyResult",
6301
- create: _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema
6399
+ schema: _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema
6302
6400
  },
6303
6401
  sourceLocation: {
6304
6402
  "file": "packages/agent-team/src/index.ts",
6305
- "line": 1211,
6403
+ "line": 1414,
6306
6404
  "column": 9
6307
6405
  }
6308
6406
  },
@@ -6319,17 +6417,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6319
6417
  codec: {
6320
6418
  mode: "strict",
6321
6419
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveTaskRefsRequest",
6322
- create: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema
6420
+ schema: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema
6323
6421
  }
6324
6422
  }],
6325
6423
  result: {
6326
6424
  mode: "strict",
6327
6425
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveTaskRefsResult",
6328
- create: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema
6426
+ schema: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema
6427
+ },
6428
+ sourceLocation: {
6429
+ "file": "packages/agent-team/src/index.ts",
6430
+ "line": 724,
6431
+ "column": 3
6432
+ }
6433
+ },
6434
+ {
6435
+ id: "@wowyuarm/dsh-agent-team#agentTeam/resolveThreadRefs",
6436
+ service: "agentTeam",
6437
+ namespace: "agentTeam",
6438
+ method: "resolveThreadRefs",
6439
+ invocation: { kind: "direct" },
6440
+ parameters: [{
6441
+ name: "request",
6442
+ wire: "request",
6443
+ source: "json",
6444
+ codec: {
6445
+ mode: "strict",
6446
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveThreadRefsRequest",
6447
+ schema: _wowyuarm_dsh_agent_team_agentTeam_resolveThreadRefs_parameter_0$schema
6448
+ }
6449
+ }],
6450
+ result: {
6451
+ mode: "strict",
6452
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveThreadRefsResult",
6453
+ schema: _wowyuarm_dsh_agent_team_agentTeam_resolveThreadRefs_result$schema
6329
6454
  },
6330
6455
  sourceLocation: {
6331
6456
  "file": "packages/agent-team/src/index.ts",
6332
- "line": 608,
6457
+ "line": 737,
6333
6458
  "column": 3
6334
6459
  }
6335
6460
  },
@@ -6346,17 +6471,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6346
6471
  codec: {
6347
6472
  mode: "strict",
6348
6473
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamSendMessageRequest",
6349
- create: _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema
6474
+ schema: _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema
6350
6475
  }
6351
6476
  }],
6352
6477
  result: {
6353
6478
  mode: "strict",
6354
6479
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamSendMessageResult",
6355
- create: _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema
6480
+ schema: _wowyuarm_dsh_agent_team_agentTeam_sendMessage_result$schema
6356
6481
  },
6357
6482
  sourceLocation: {
6358
6483
  "file": "packages/agent-team/src/index.ts",
6359
- "line": 1147,
6484
+ "line": 1299,
6360
6485
  "column": 9
6361
6486
  }
6362
6487
  },
@@ -6373,17 +6498,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6373
6498
  codec: {
6374
6499
  mode: "strict",
6375
6500
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadHistoryRequest",
6376
- create: _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema
6501
+ schema: _wowyuarm_dsh_agent_team_agentTeam_threadHistory_parameter_0$schema
6377
6502
  }
6378
6503
  }],
6379
6504
  result: {
6380
6505
  mode: "strict",
6381
6506
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadHistory",
6382
- create: _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema
6507
+ schema: _wowyuarm_dsh_agent_team_agentTeam_threadHistory_result$schema
6383
6508
  },
6384
6509
  sourceLocation: {
6385
6510
  "file": "packages/agent-team/src/index.ts",
6386
- "line": 1251,
6511
+ "line": 1454,
6387
6512
  "column": 3
6388
6513
  }
6389
6514
  },
@@ -6400,17 +6525,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6400
6525
  codec: {
6401
6526
  mode: "strict",
6402
6527
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadObservationsRequest",
6403
- create: _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema
6528
+ schema: _wowyuarm_dsh_agent_team_agentTeam_threadObservations_parameter_0$schema
6404
6529
  }
6405
6530
  }],
6406
6531
  result: {
6407
6532
  mode: "strict",
6408
6533
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamThreadObservations",
6409
- create: _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema
6534
+ schema: _wowyuarm_dsh_agent_team_agentTeam_threadObservations_result$schema
6410
6535
  },
6411
6536
  sourceLocation: {
6412
6537
  "file": "packages/agent-team/src/index.ts",
6413
- "line": 1244,
6538
+ "line": 1447,
6414
6539
  "column": 3
6415
6540
  }
6416
6541
  },
@@ -6427,17 +6552,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6427
6552
  codec: {
6428
6553
  mode: "strict",
6429
6554
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamUpdateChannelRequest",
6430
- create: _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema
6555
+ schema: _wowyuarm_dsh_agent_team_agentTeam_updateChannel_parameter_0$schema
6431
6556
  }
6432
6557
  }],
6433
6558
  result: {
6434
6559
  mode: "strict",
6435
6560
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamUpdateChannelResult",
6436
- create: _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema
6561
+ schema: _wowyuarm_dsh_agent_team_agentTeam_updateChannel_result$schema
6437
6562
  },
6438
6563
  sourceLocation: {
6439
6564
  "file": "packages/agent-team/src/index.ts",
6440
- "line": 683,
6565
+ "line": 812,
6441
6566
  "column": 9
6442
6567
  }
6443
6568
  },
@@ -6454,17 +6579,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6454
6579
  codec: {
6455
6580
  mode: "strict",
6456
6581
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamUpdateMemberRequest",
6457
- create: _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema
6582
+ schema: _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema
6458
6583
  }
6459
6584
  }],
6460
6585
  result: {
6461
6586
  mode: "strict",
6462
6587
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamMemberResult",
6463
- create: _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema
6588
+ schema: _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema
6464
6589
  },
6465
6590
  sourceLocation: {
6466
6591
  "file": "packages/agent-team/src/index.ts",
6467
- "line": 1017,
6592
+ "line": 1169,
6468
6593
  "column": 9
6469
6594
  }
6470
6595
  },
@@ -6481,23 +6606,458 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6481
6606
  codec: {
6482
6607
  mode: "strict",
6483
6608
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamViewRequest",
6484
- create: _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema
6609
+ schema: _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema
6485
6610
  }
6486
6611
  }],
6487
6612
  result: {
6488
6613
  mode: "strict",
6489
6614
  typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamView",
6490
- create: _wowyuarm_dsh_agent_team_agentTeam_view_result$schema
6615
+ schema: _wowyuarm_dsh_agent_team_agentTeam_view_result$schema
6491
6616
  },
6492
6617
  sourceLocation: {
6493
6618
  "file": "packages/agent-team/src/index.ts",
6494
- "line": 1258,
6619
+ "line": 1461,
6495
6620
  "column": 3
6496
6621
  }
6497
6622
  }
6498
6623
  ]
6499
6624
  };
6500
6625
  //#endregion
6626
+ //#region src/client/human-identity.ts
6627
+ /**
6628
+ * The Client's one projection of the Human identity.
6629
+ *
6630
+ * The durable facts live in the Host: the display name and the avatar
6631
+ * reference in the `agent-team-human` settings section, the avatar bytes in the
6632
+ * persistent avatar store. This store is the only place the Team Client reads
6633
+ * them, so every seat that names or draws the Human — message rows, member
6634
+ * refs, mention chips, the settings page — shows one rename and one face, and a
6635
+ * single refresh after a write moves all of them together.
6636
+ *
6637
+ * Seats render before the first read settles; `name` stays undefined until then
6638
+ * and every caller falls back to its own localized name for the Human. Reads
6639
+ * are demand-driven: the first subscriber starts the read, so a Client that
6640
+ * never opens Team mode or the profile page never calls the Remote.
6641
+ */
6642
+ /**
6643
+ * Host settings namespace that holds the Human profile. The Host declares the
6644
+ * same string (`HUMAN_PROFILE_SETTINGS_NAMESPACE`) on its own side of the
6645
+ * bundle boundary, and a test pins the two together.
6646
+ */
6647
+ const HUMAN_PROFILE_NAMESPACE = "agent-team-human";
6648
+ const INITIAL = {
6649
+ status: "loading",
6650
+ updateAvailable: false
6651
+ };
6652
+ var TeamHumanIdentity = class {
6653
+ snapshot = INITIAL;
6654
+ listeners = /* @__PURE__ */ new Set();
6655
+ reading;
6656
+ loader;
6657
+ constructor(loader) {
6658
+ this.loader = loader;
6659
+ }
6660
+ getSnapshot = () => this.snapshot;
6661
+ /**
6662
+ * Observe the identity, starting the first read when nobody has read yet.
6663
+ * @param listener - invoked after every snapshot replacement.
6664
+ * @returns the disposer removing this listener.
6665
+ */
6666
+ subscribe = (listener) => {
6667
+ this.listeners.add(listener);
6668
+ if (this.snapshot.status === "loading" && this.reading === void 0) this.refresh();
6669
+ return () => {
6670
+ this.listeners.delete(listener);
6671
+ };
6672
+ };
6673
+ /**
6674
+ * Re-read the Host projection. Concurrent callers share one round trip, and a
6675
+ * failed refresh keeps the last accepted value beside the reported error —
6676
+ * the seats never blank out because a background read failed.
6677
+ * @returns settlement of this read (or of the read already in flight).
6678
+ */
6679
+ refresh() {
6680
+ if (this.reading !== void 0) return this.reading;
6681
+ const reading = this.read().finally(() => {
6682
+ if (this.reading === reading) this.reading = void 0;
6683
+ });
6684
+ this.reading = reading;
6685
+ return reading;
6686
+ }
6687
+ dispose() {
6688
+ this.listeners.clear();
6689
+ }
6690
+ async read() {
6691
+ let profile;
6692
+ try {
6693
+ const result = await this.loader.loadProfile();
6694
+ if (!result.ok) {
6695
+ this.fail(result.error.message);
6696
+ return;
6697
+ }
6698
+ profile = result.value;
6699
+ } catch (error) {
6700
+ this.fail(error instanceof Error ? error.message : String(error));
6701
+ return;
6702
+ }
6703
+ const avatarUrl = profile.avatarRef === void 0 ? void 0 : profile.avatarRef === this.snapshot.avatarRef && this.snapshot.avatarUrl !== void 0 ? this.snapshot.avatarUrl : await this.loader.loadAvatarUrl(profile.avatarRef) ?? void 0;
6704
+ this.commit({
6705
+ status: "ready",
6706
+ name: profile.name,
6707
+ ...profile.avatarRef === void 0 ? {} : { avatarRef: profile.avatarRef },
6708
+ ...avatarUrl === void 0 ? {} : { avatarUrl },
6709
+ version: profile.version,
6710
+ repoUrl: profile.repoUrl,
6711
+ updateAvailable: profile.updateAvailable,
6712
+ ...profile.latestVersion === void 0 ? {} : { latestVersion: profile.latestVersion }
6713
+ });
6714
+ }
6715
+ /**
6716
+ * Record one read failure. A value that was already accepted stays on screen
6717
+ * (the seats never blank out over a background read), and only an identity
6718
+ * that never loaded becomes `unavailable` — the state that offers a retry.
6719
+ */
6720
+ fail(message) {
6721
+ const held = this.snapshot;
6722
+ this.commit(held.name === void 0 ? {
6723
+ ...held,
6724
+ status: "unavailable",
6725
+ error: message
6726
+ } : {
6727
+ ...held,
6728
+ status: "ready",
6729
+ error: message
6730
+ });
6731
+ }
6732
+ commit(snapshot) {
6733
+ this.snapshot = snapshot;
6734
+ for (const listener of this.listeners) listener();
6735
+ }
6736
+ };
6737
+ /** Subscribe one rendered seat to the identity. */
6738
+ function useHumanIdentity(identity) {
6739
+ return (0, react.useSyncExternalStore)(identity.subscribe, identity.getSnapshot, identity.getSnapshot);
6740
+ }
6741
+ //#endregion
6742
+ //#region src/client/avatar-image.ts
6743
+ function useAvatarImage(url) {
6744
+ const [broken, setBroken] = (0, react.useState)(void 0);
6745
+ return {
6746
+ src: url === void 0 || url === broken ? void 0 : url,
6747
+ failed: () => {
6748
+ if (url !== void 0) setBroken(url);
6749
+ }
6750
+ };
6751
+ }
6752
+ //#endregion
6753
+ //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/human-settings.module.css.mjs
6754
+ const css$14 = ".HwTxra_section{max-width:760px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex;container-type:inline-size}.HwTxra_heading{margin:0;font-size:18px;font-weight:600}.HwTxra_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}.HwTxra_rows{flex-direction:column;display:flex}.HwTxra_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:12px;padding:16px 0;display:flex}.HwTxra_row:last-child{border-bottom:none}.HwTxra_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.HwTxra_title{font-size:14px;line-height:22px}.HwTxra_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.HwTxra_controls{flex:none;align-items:center;gap:12px;display:inline-flex}.HwTxra_nameInput{width:200px;height:36px}.HwTxra_identity{corner-shape:round;border-radius:50%;flex:none;width:40px;height:40px}.HwTxra_identityImage{object-fit:cover;display:block}.HwTxra_identityFallback{background:var(--dsw-alias-state-business-primary);color:var(--dsw-static-neutral-bluish-00);justify-content:center;align-items:center;font-size:16px;font-weight:600;line-height:40px;display:inline-flex}.HwTxra_footnote{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;line-height:18px;display:flex}.HwTxra_link{color:var(--dsw-alias-brand-primary);cursor:pointer;text-decoration:none}.HwTxra_link:hover{text-decoration:underline}.HwTxra_link:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:2px}.HwTxra_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}.HwTxra_state{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}.HwTxra_stateAction{align-items:center;gap:12px;display:flex}@container (width<=420px){.HwTxra_row{flex-direction:column;align-items:stretch;gap:12px}.HwTxra_rowText{padding-right:0}.HwTxra_nameInput{width:100%}.HwTxra_controls{flex-wrap:wrap}}";
6755
+ const tagId$14 = "@wowyuarm/dsh-agent-team/human-settings.module.css";
6756
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$14) + "]") === null) {
6757
+ const tag = document.createElement("style");
6758
+ tag.dataset.plugin = "@wowyuarm/dsh-agent-team";
6759
+ tag.dataset.pluginCss = tagId$14;
6760
+ tag.textContent = css$14;
6761
+ document.head.appendChild(tag);
6762
+ }
6763
+ var human_settings_module_css_default = {
6764
+ "controls": "HwTxra_controls",
6765
+ "desc": "HwTxra_desc",
6766
+ "footnote": "HwTxra_footnote",
6767
+ "heading": "HwTxra_heading",
6768
+ "identity": "HwTxra_identity",
6769
+ "identityFallback": "HwTxra_identityFallback",
6770
+ "identityImage": "HwTxra_identityImage",
6771
+ "intro": "HwTxra_intro",
6772
+ "link": "HwTxra_link",
6773
+ "nameInput": "HwTxra_nameInput",
6774
+ "notice": "HwTxra_notice",
6775
+ "row": "HwTxra_row",
6776
+ "rowText": "HwTxra_rowText",
6777
+ "rows": "HwTxra_rows",
6778
+ "section": "HwTxra_section",
6779
+ "state": "HwTxra_state",
6780
+ "stateAction": "HwTxra_stateAction",
6781
+ "title": "HwTxra_title"
6782
+ };
6783
+ //#endregion
6784
+ //#region src/client/HumanSettingsSection.tsx
6785
+ /**
6786
+ * The Human's own settings page: display name, avatar, and the version
6787
+ * footnote.
6788
+ *
6789
+ * The page owns no durable fact and no copy of one. Name, avatar, and version
6790
+ * all arrive from the shared identity projection, so a save here moves the
6791
+ * message rows and member refs at the same moment; a failed write keeps the
6792
+ * typed name in the field and reports the Host's own reason.
6793
+ */
6794
+ /** Host-side avatar ceiling (`ATTACHMENT_MAX_BYTES`): the settings page refuses larger files before the round trip. */
6795
+ const AVATAR_MAX_BYTES = 10 * 1024 * 1024;
6796
+ /**
6797
+ * Run one durable write and reduce every failure to the message the page
6798
+ * reports. A rejected Remote call (a dropped carrier, a refused write) is a
6799
+ * failure like any other: without this the field would sit on "saving" forever
6800
+ * and report nothing.
6801
+ */
6802
+ async function failureOf(action) {
6803
+ try {
6804
+ return await action();
6805
+ } catch (error) {
6806
+ return error instanceof Error ? error.message : String(error);
6807
+ }
6808
+ }
6809
+ /** First visible character of a display name, or the neutral `H` before one is known. */
6810
+ function avatarInitial(name) {
6811
+ const trimmed = (name ?? "").replace(/^@/, "").trim();
6812
+ return trimmed === "" ? "H" : trimmed.slice(0, 1).toUpperCase();
6813
+ }
6814
+ function HumanSettingsSection(props) {
6815
+ const { t, identity } = props;
6816
+ const profile = useHumanIdentity(identity);
6817
+ const [draft, setDraft] = (0, react.useState)(void 0);
6818
+ const [saving, setSaving] = (0, react.useState)(false);
6819
+ const [uploading, setUploading] = (0, react.useState)(false);
6820
+ const [notice, setNotice] = (0, react.useState)(null);
6821
+ const filePicker = (0, react.useRef)(null);
6822
+ const name = draft ?? profile.name ?? "";
6823
+ const dirty = draft !== void 0 && draft.trim() !== (profile.name ?? "");
6824
+ const emptyName = draft !== void 0 && draft.trim() === "";
6825
+ const hasAvatar = profile.avatarRef !== void 0;
6826
+ const avatar = useAvatarImage(profile.avatarUrl);
6827
+ const submitName = async () => {
6828
+ if (!dirty || emptyName || saving) return;
6829
+ setSaving(true);
6830
+ setNotice(null);
6831
+ const failure = await failureOf(() => props.saveName(name.trim()));
6832
+ setSaving(false);
6833
+ if (failure !== void 0) {
6834
+ setNotice(t("humanSettingsNameFailed", { message: failure }));
6835
+ return;
6836
+ }
6837
+ setDraft(void 0);
6838
+ };
6839
+ const pickAvatar = async (file) => {
6840
+ if (file === void 0) return;
6841
+ setNotice(null);
6842
+ if (!file.type.startsWith("image/")) {
6843
+ setNotice(t("humanSettingsAvatarNotImage"));
6844
+ return;
6845
+ }
6846
+ if (file.size > AVATAR_MAX_BYTES) {
6847
+ setNotice(t("humanSettingsAvatarTooLarge"));
6848
+ return;
6849
+ }
6850
+ setUploading(true);
6851
+ const failure = await failureOf(() => props.uploadAvatar(file));
6852
+ setUploading(false);
6853
+ if (failure !== void 0) setNotice(t("humanSettingsAvatarFailed", { message: failure }));
6854
+ };
6855
+ const removeAvatar = async () => {
6856
+ setNotice(null);
6857
+ const failure = await failureOf(() => props.removeAvatar());
6858
+ if (failure !== void 0) setNotice(t("humanSettingsAvatarFailed", { message: failure }));
6859
+ };
6860
+ const pageHeader = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
6861
+ className: human_settings_module_css_default.heading,
6862
+ children: t("humanSettingsTitle")
6863
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
6864
+ className: human_settings_module_css_default.intro,
6865
+ children: t("humanSettingsIntro")
6866
+ })] });
6867
+ if (profile.status === "loading" && profile.name === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6868
+ className: human_settings_module_css_default.section,
6869
+ children: [pageHeader, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
6870
+ className: human_settings_module_css_default.state,
6871
+ role: "status",
6872
+ children: t("humanSettingsLoading")
6873
+ })]
6874
+ });
6875
+ if (profile.name === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6876
+ className: human_settings_module_css_default.section,
6877
+ children: [
6878
+ pageHeader,
6879
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
6880
+ className: human_settings_module_css_default.state,
6881
+ role: "alert",
6882
+ children: t("humanSettingsUnavailable", { message: profile.error ?? "" })
6883
+ }),
6884
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6885
+ className: human_settings_module_css_default.stateAction,
6886
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
6887
+ variant: "outline",
6888
+ onClick: () => {
6889
+ identity.refresh();
6890
+ },
6891
+ children: t("retry")
6892
+ })
6893
+ })
6894
+ ]
6895
+ });
6896
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6897
+ className: human_settings_module_css_default.section,
6898
+ children: [
6899
+ pageHeader,
6900
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6901
+ className: human_settings_module_css_default.rows,
6902
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6903
+ className: human_settings_module_css_default.row,
6904
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6905
+ className: human_settings_module_css_default.rowText,
6906
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6907
+ className: human_settings_module_css_default.title,
6908
+ children: t("humanSettingsName")
6909
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6910
+ className: human_settings_module_css_default.desc,
6911
+ children: t("humanSettingsNameHint")
6912
+ })]
6913
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
6914
+ className: human_settings_module_css_default.controls,
6915
+ onSubmit: (event) => {
6916
+ event.preventDefault();
6917
+ submitName();
6918
+ },
6919
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
6920
+ className: human_settings_module_css_default.nameInput,
6921
+ "aria-label": t("humanSettingsName"),
6922
+ "aria-invalid": emptyName || void 0,
6923
+ value: name,
6924
+ disabled: saving,
6925
+ onChange: (event) => {
6926
+ setDraft(event.target.value);
6927
+ }
6928
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
6929
+ type: "submit",
6930
+ variant: "primary",
6931
+ disabled: saving || !dirty || emptyName,
6932
+ children: saving ? t("humanSettingsSaving") : t("humanSettingsSave")
6933
+ })]
6934
+ })]
6935
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6936
+ className: human_settings_module_css_default.row,
6937
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6938
+ className: human_settings_module_css_default.rowText,
6939
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6940
+ className: human_settings_module_css_default.title,
6941
+ children: t("humanSettingsAvatar")
6942
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6943
+ className: human_settings_module_css_default.desc,
6944
+ children: t("humanSettingsAvatarHint")
6945
+ })]
6946
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6947
+ className: human_settings_module_css_default.controls,
6948
+ children: [
6949
+ avatar.src === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6950
+ className: `${human_settings_module_css_default.identity} ${human_settings_module_css_default.identityFallback}`,
6951
+ "data-avatar": "initial",
6952
+ "aria-hidden": "true",
6953
+ children: avatarInitial(profile.name)
6954
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
6955
+ className: `${human_settings_module_css_default.identity} ${human_settings_module_css_default.identityImage}`,
6956
+ "data-avatar": "image",
6957
+ src: avatar.src,
6958
+ alt: "",
6959
+ onError: avatar.failed
6960
+ }),
6961
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
6962
+ ref: filePicker,
6963
+ type: "file",
6964
+ accept: "image/*",
6965
+ tabIndex: -1,
6966
+ "aria-hidden": "true",
6967
+ hidden: true,
6968
+ onChange: (event) => {
6969
+ pickAvatar(event.target.files?.[0]);
6970
+ event.target.value = "";
6971
+ }
6972
+ }),
6973
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
6974
+ variant: "outline",
6975
+ disabled: uploading,
6976
+ onClick: () => {
6977
+ filePicker.current?.click();
6978
+ },
6979
+ children: uploading ? t("humanSettingsUploading") : hasAvatar ? t("humanSettingsReplace") : t("humanSettingsUpload")
6980
+ }),
6981
+ hasAvatar && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
6982
+ disabled: uploading,
6983
+ onClick: () => {
6984
+ removeAvatar();
6985
+ },
6986
+ children: t("humanSettingsRemoveAvatar")
6987
+ })
6988
+ ]
6989
+ })]
6990
+ })]
6991
+ }),
6992
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6993
+ className: human_settings_module_css_default.footnote,
6994
+ children: [
6995
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("humanSettingsVersion", { version: profile.version ?? "" }) }),
6996
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6997
+ "aria-hidden": "true",
6998
+ children: "·"
6999
+ }),
7000
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
7001
+ className: human_settings_module_css_default.link,
7002
+ href: profile.repoUrl ?? "",
7003
+ target: "_blank",
7004
+ rel: "noreferrer",
7005
+ children: "GitHub"
7006
+ }),
7007
+ profile.updateAvailable && profile.latestVersion !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
7008
+ className: human_settings_module_css_default.link,
7009
+ href: `${profile.repoUrl ?? ""}/releases`,
7010
+ target: "_blank",
7011
+ rel: "noreferrer",
7012
+ children: t("humanSettingsUpdateAvailable", { version: profile.latestVersion })
7013
+ }) : null
7014
+ ]
7015
+ }),
7016
+ emptyName && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
7017
+ className: human_settings_module_css_default.notice,
7018
+ children: t("humanSettingsNameEmpty")
7019
+ }),
7020
+ notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
7021
+ className: human_settings_module_css_default.notice,
7022
+ role: "alert",
7023
+ children: notice
7024
+ })
7025
+ ]
7026
+ });
7027
+ }
7028
+ //#endregion
7029
+ //#region src/client/attachment-preview.ts
7030
+ /** Base64 one file payload in chunks so large uploads stay off the call-stack limit. */
7031
+ function bytesToBase64(bytes) {
7032
+ let binary = "";
7033
+ const chunk = 32768;
7034
+ for (let start = 0; start < bytes.length; start += chunk) binary += String.fromCharCode(...bytes.subarray(start, start + chunk));
7035
+ return btoa(binary);
7036
+ }
7037
+ /**
7038
+ * Thumbnail data URLs live in one session-wide cache: message lists re-render
7039
+ * often, and each miss costs a Host round-trip plus a base64 decode. Failed
7040
+ * loads (bytes already GC'd) are cached as `null` so the chip fallback is stable.
7041
+ */
7042
+ const dataUrlCache = /* @__PURE__ */ new Map();
7043
+ function cachedAttachmentDataUrl(attachmentId) {
7044
+ return dataUrlCache.get(attachmentId);
7045
+ }
7046
+ async function loadAttachmentDataUrl(getAttachment, attachment) {
7047
+ const cached = dataUrlCache.get(attachment.attachmentId);
7048
+ if (cached !== void 0) return cached;
7049
+ const result = await getAttachment({ attachmentId: attachment.attachmentId });
7050
+ const url = result.ok && attachment.mediaType.startsWith("image/") ? `data:${attachment.mediaType};base64,${result.value.bytesBase64}` : null;
7051
+ dataUrlCache.set(attachment.attachmentId, url);
7052
+ return url;
7053
+ }
7054
+ /** Human-readable byte size for attachment chips. */
7055
+ function formatByteSize(byteSize) {
7056
+ if (byteSize < 1024) return `${byteSize} B`;
7057
+ if (byteSize < 1024 * 1024) return `${(byteSize / 1024).toFixed(0)} KB`;
7058
+ return `${(byteSize / (1024 * 1024)).toFixed(1)} MB`;
7059
+ }
7060
+ //#endregion
6501
7061
  //#region src/client/navigation.ts
6502
7062
  const STORAGE_KEY$3 = "dsh.agent-team.navigation";
6503
7063
  function readSnapshot() {
@@ -6917,7 +7477,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6917
7477
  };
6918
7478
  //#endregion
6919
7479
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/team.module.css.mjs
6920
- const css$13 = ".YvAbSa_footerStack{flex:none;width:100%;height:42px;margin:8px 0 0;display:flex}.YvAbSa_footerAction,.YvAbSa_settingsAction{box-sizing:border-box;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:8px;width:calc(100% + 4px);height:42px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.YvAbSa_footerAction{margin:0 -2px}.YvAbSa_settingsAction{margin:4px -2px}.YvAbSa_footerAction:hover,.YvAbSa_footerAction:focus-visible,.YvAbSa_settingsAction:hover,.YvAbSa_settingsAction:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}.YvAbSa_footerAction:focus-visible,.YvAbSa_settingsAction:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.YvAbSa_footerAction.YvAbSa_rail,.YvAbSa_settingsAction.YvAbSa_rail{corner-shape:round;border-radius:50%;justify-content:center;width:36px;height:36px;padding:0}.YvAbSa_footerAction.YvAbSa_rail{margin:0}.YvAbSa_settingsAction.YvAbSa_rail{margin:8px 0 10px}.YvAbSa_railStack{align-items:center;width:36px;height:36px;margin:0}";
7480
+ const css$13 = ".YvAbSa_footerStack{flex:none;align-self:flex-end;width:100%;height:42px;margin:8px 0 0;display:flex}.YvAbSa_footerAction,.YvAbSa_settingsAction{box-sizing:border-box;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:8px;width:calc(100% + 4px);height:42px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.YvAbSa_footerAction{margin:0 -2px}.YvAbSa_settingsAction{margin:4px -2px}.YvAbSa_footerAction:hover,.YvAbSa_footerAction:focus-visible,.YvAbSa_settingsAction:hover,.YvAbSa_settingsAction:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}.YvAbSa_footerAction:focus-visible,.YvAbSa_settingsAction:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.YvAbSa_footerAction.YvAbSa_rail,.YvAbSa_settingsAction.YvAbSa_rail{corner-shape:round;border-radius:50%;justify-content:center;width:36px;height:36px;padding:0}.YvAbSa_footerAction.YvAbSa_rail{margin:0}.YvAbSa_settingsAction.YvAbSa_rail{margin:8px 0 10px}.YvAbSa_railStack{align-items:center;width:36px;height:36px;margin:0}";
6921
7481
  const tagId$13 = "@wowyuarm/dsh-agent-team/team.module.css";
6922
7482
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]") === null) {
6923
7483
  const tag = document.createElement("style");
@@ -6960,7 +7520,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6960
7520
  "aria-label": label,
6961
7521
  "data-team-action": inTeam ? "leave" : "enter",
6962
7522
  onClick: inTeam ? leaveTeam : enterTeam,
6963
- children: [inTeam ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, { size: wide ? 16 : 18 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutlineRegular, { size: wide ? 16 : 18 }), wide && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
7523
+ children: [inTeam ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutline14, { size: wide ? 16 : 18 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutline16, { size: wide ? 16 : 18 }), wide && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
6964
7524
  })
6965
7525
  })
6966
7526
  }) });
@@ -7069,6 +7629,40 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7069
7629
  released: "claimStateReleased"
7070
7630
  }[state]);
7071
7631
  }
7632
+ const RISK_CLASS_KEYS = {
7633
+ "session-refused": ["riskClassSessionRefused", "riskSessionRefused"],
7634
+ "session-unreadable": ["riskClassSessionUnreadable", "riskSessionUnreadable"],
7635
+ "preset-composition": ["riskClassPresetComposition", "riskPresetComposition"],
7636
+ "rollover": ["riskClassRollover", "riskRollover"],
7637
+ "runtime": ["riskClassRuntime", "riskRuntime"],
7638
+ "activation": ["riskClassActivation", "riskActivation"]
7639
+ };
7640
+ /**
7641
+ * The two localized halves of one runtime-risk statement: the class label names
7642
+ * what kind of problem this is, and the sentence key states it of the Member
7643
+ * (it keeps its `{member}` placeholder so the caller supplies the handle). The
7644
+ * Host's own diagnostic stays English and belongs in the row's title, so the
7645
+ * visible line reads in the interface language.
7646
+ */
7647
+ function formatRiskClass(status, t) {
7648
+ const [labelKey, sentenceKey] = RISK_CLASS_KEYS[status.diagnostic?.class ?? "runtime"];
7649
+ return {
7650
+ label: t(labelKey),
7651
+ sentenceKey
7652
+ };
7653
+ }
7654
+ /**
7655
+ * The first sentence of a Host diagnostic: risk rows read one line, and the
7656
+ * Host writes the reason as its first sentence with recovery context after it.
7657
+ * A terminator the Host used mid-sentence becomes a full stop so the clamped
7658
+ * line reads as a sentence; the untouched text stays in the row's title.
7659
+ */
7660
+ function firstSentence(detail) {
7661
+ const trimmed = detail.trim();
7662
+ const end = trimmed.search(/[.。;;]/);
7663
+ if (end === -1) return trimmed;
7664
+ return trimmed[end] === "." || trimmed[end] === "。" ? trimmed.slice(0, end + 1) : `${trimmed.slice(0, end)}.`;
7665
+ }
7072
7666
  /**
7073
7667
  * Status indicator for a Task status, the dot every Task surface renders.
7074
7668
  * Active states map to StateDot variants; every status renders a dot so they
@@ -7095,7 +7689,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7095
7689
  for (let index = 0; index < memberId.length; index += 1) hash = (hash * 31 + memberId.charCodeAt(index)) % 360;
7096
7690
  return hash;
7097
7691
  }
7098
- const BRANDED_REF_PATTERN = /\b(task|channel|thread):{1,2}[0-9a-f]{6,}(?:-[0-9a-f]{1,})*\b/gi;
7692
+ const BRANDED_REF_PATTERN = /\b(task|channel|thread|member):{1,2}[0-9a-f]{6,}(?:-[0-9a-f]{1,})*\b/gi;
7099
7693
  /**
7100
7694
  * Canonical form of one matched ref: models occasionally double the colon or
7101
7695
  * uppercase the UUID when citing a ref in prose, while Host lookups and
@@ -7138,36 +7732,59 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7138
7732
  const matches = [...trimmed.matchAll(BRANDED_REF_PATTERN)];
7139
7733
  return matches.length === 1 && matches[0][0] === trimmed;
7140
7734
  }
7735
+ /** The Human's handle before they could rename themselves; the Host keeps it as an alias. */
7736
+ const HUMAN_HISTORIC_HANDLE = "human";
7737
+ /** Normalize one mention entry into its printed name and every handle that matches it. */
7738
+ function mentionHandlesOf(mention) {
7739
+ return typeof mention === "string" ? {
7740
+ name: mention,
7741
+ handles: [mention]
7742
+ } : {
7743
+ name: mention.name,
7744
+ handles: [mention.name, ...mention.also]
7745
+ };
7746
+ }
7747
+ /** The printed name of one mention entry; its aliases follow that name, never the body. */
7748
+ function mentionNameOf(mention) {
7749
+ return typeof mention === "string" ? mention : mention.name;
7750
+ }
7141
7751
  /**
7142
7752
  * Locate one Message's delivered mention names inside its literal body. Matching
7143
7753
  * is the shared Host delivery scan — an authored `@`, case-insensitive on Unicode
7144
7754
  * word boundaries, longest handle first, code quoted rather than called — so a chip
7145
- * never lands where delivery would not reach. Mention segments render the canonical
7146
- * `@Handle`; names absent from the body come back unmatched so the consumer can
7147
- * append them as a fallback chip row.
7755
+ * never lands where delivery would not reach. A chip names the person by their
7756
+ * current name, the way member refs do: a body that wrote an older handle of a
7757
+ * renamed Human chips as the name they answer to today. A person whose entry
7758
+ * matched through any of their handles counts as matched, so the fallback row
7759
+ * never repeats someone already chipped inline; names absent from the body come
7760
+ * back unmatched so the consumer can append them as a fallback chip row.
7148
7761
  */
7149
- function splitMentionNames(text, names) {
7150
- if (names.length === 0) return {
7762
+ function splitMentionNames(text, mentions) {
7763
+ if (mentions.length === 0) return {
7151
7764
  segments: [{
7152
7765
  text,
7153
7766
  mention: false
7154
7767
  }],
7155
7768
  unmatched: []
7156
7769
  };
7770
+ const entries = mentions.map(mentionHandlesOf);
7157
7771
  const segments = [];
7158
7772
  const matched = /* @__PURE__ */ new Set();
7159
7773
  let cursor = 0;
7160
- for (const match of scanBodyHandles(text, names)) {
7774
+ for (const match of scanBodyHandles(text, entries.flatMap((entry) => entry.handles))) {
7161
7775
  if (match.start > cursor) segments.push({
7162
7776
  text: text.slice(cursor, match.start),
7163
7777
  mention: false
7164
7778
  });
7779
+ const handle = match.handle.toLowerCase();
7780
+ const owner = entries.find((entry) => entry.handles.some((candidate) => candidate.toLowerCase() === handle));
7781
+ const printed = owner === void 0 || owner.name.toLowerCase() === handle ? match.handle : owner.name;
7165
7782
  segments.push({
7166
- text: `@${match.handle}`,
7783
+ text: `@${printed}`,
7167
7784
  mention: true,
7168
- name: match.handle
7785
+ name: printed
7169
7786
  });
7170
- matched.add(match.handle.toLowerCase());
7787
+ if (owner !== void 0) matched.add(owner.name.toLowerCase());
7171
7788
  cursor = match.end;
7172
7789
  }
7173
7790
  if (cursor < text.length) segments.push({
@@ -7176,7 +7793,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7176
7793
  });
7177
7794
  return {
7178
7795
  segments,
7179
- unmatched: names.filter((name) => !matched.has(name.toLowerCase()))
7796
+ unmatched: entries.map((entry) => entry.name).filter((name) => !matched.has(name.toLowerCase()))
7180
7797
  };
7181
7798
  }
7182
7799
  /**
@@ -7218,9 +7835,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7218
7835
  handle: status.member.handle
7219
7836
  })), "member:human").memberIds;
7220
7837
  }
7221
- /** Canonical chip handles for one Message's structured mention refs. */
7222
- function mentionNamesOf(mentions, handles) {
7223
- return mentions.map((memberId) => memberId === "member:human" ? "human" : handles.get(memberId)).filter((name) => name !== void 0);
7838
+ /**
7839
+ * Canonical chip handles for one Message's structured mention refs. The Human
7840
+ * is Team authority, not an Agent projection, so `members()` does not include
7841
+ * it: the caller hands over the profile name every seat names them by, so a
7842
+ * rename reaches old mention chips the same way it reaches the roster.
7843
+ *
7844
+ * A renamed Human also keeps the historic `human` handle, because the Host
7845
+ * accepts it as an alias and Message bodies written before the rename say
7846
+ * exactly that: without the alias those mentions would stop chipping inline and
7847
+ * reappear as a trailing chip under a name the body never used.
7848
+ */
7849
+ function mentionNamesOf(mentions, handles, humanName) {
7850
+ return mentions.map((memberId) => memberId === "member:human" ? humanName.toLowerCase() === "human" ? humanName : {
7851
+ name: humanName,
7852
+ also: [HUMAN_HISTORIC_HANDLE]
7853
+ } : handles.get(memberId)).filter((name) => name !== void 0);
7224
7854
  }
7225
7855
  /** Accessible label for one "who is on this work" stack: its owners' handles, comma-separated. */
7226
7856
  function claimersLabel(owners, t) {
@@ -7330,7 +7960,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7330
7960
  const displayBody = stripped === "" ? body : stripped;
7331
7961
  const richAgentBody = !options.human && !isPlainTextBody(displayBody);
7332
7962
  const inline = (options.human || isPlainTextBody(displayBody)) && options.mentionNames !== void 0 && options.mentionNames.length > 0 ? splitMentionNames(displayBody, options.mentionNames) : void 0;
7333
- const fallbackNames = inline !== void 0 ? inline.unmatched : richAgentBody && options.canOpenRefs && options.mentionNames !== void 0 ? splitMentionNames(displayBody, options.mentionNames).unmatched : options.mentionNames ?? [];
7963
+ const fallbackNames = inline !== void 0 ? inline.unmatched : richAgentBody && options.canOpenRefs && options.mentionNames !== void 0 ? splitMentionNames(displayBody, options.mentionNames).unmatched : (options.mentionNames ?? []).map(mentionNameOf);
7334
7964
  const refs = splitBrandedRefs(displayBody).flatMap((segment) => segment.ref === void 0 ? [] : [segment.ref]);
7335
7965
  return {
7336
7966
  displayBody,
@@ -7339,7 +7969,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7339
7969
  ...inline === void 0 ? {} : { inline },
7340
7970
  fallbackNames,
7341
7971
  fallbackRefs: richAgentBody && !options.canOpenRefs ? refs : [],
7342
- taskRefs: options.canOpenRefs && !richAgentBody ? refs.filter((ref) => ref.startsWith("task:")).map((ref) => ref) : []
7972
+ taskRefs: options.canOpenRefs && !richAgentBody ? refs.filter((ref) => ref.startsWith("task:")).map((ref) => ref) : [],
7973
+ threadRefs: options.canOpenRefs && !richAgentBody ? refs.filter((ref) => ref.startsWith("thread:")).map((ref) => ref) : []
7343
7974
  };
7344
7975
  }
7345
7976
  //#endregion
@@ -7431,7 +8062,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7431
8062
  }
7432
8063
  //#endregion
7433
8064
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/sidebar.module.css.mjs
7434
- const css$10 = "html[data-agent-team-mode=team] button[class*=newSession]{display:none}.d0xfxa_workspaceBrowser{flex-direction:column;height:100%;min-height:0;padding:0 8px 8px;display:flex}.d0xfxa_railButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.d0xfxa_railButton:hover,.d0xfxa_railButton:focus-visible{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_railButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_workspaceTrigger{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);box-sizing:border-box;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;border-radius:8px;align-items:center;gap:6px;width:100%;min-height:34px;margin:0 0 2px;padding:4px 8px;font-size:14px;line-height:22px;display:flex}.d0xfxa_workspaceTrigger:hover,.d0xfxa_workspaceTrigger[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_workspaceTrigger:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_workspaceIcon{color:var(--dsw-alias-state-business-primary);flex:0 0 16px;justify-content:center;align-items:center;height:20px;display:inline-flex}.d0xfxa_workspaceValue{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.d0xfxa_workspaceChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s;display:inline-flex}.d0xfxa_workspaceChevronOpen{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.d0xfxa_workspaceChevron{transition:none}}.d0xfxa_emptyState{color:var(--dsw-alias-label-tertiary);margin:8px;font-size:12px;line-height:18px}.d0xfxa_inboxCard{color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:none;align-items:center;gap:6px;width:100%;height:34px;margin:4px 0 2px;padding:0 8px;display:flex}.d0xfxa_inboxCard:hover,.d0xfxa_inboxCard:focus-visible,.d0xfxa_inboxCard[aria-current=page]{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_inboxCard:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_inboxCard .d0xfxa_inboxMark{color:var(--dsw-alias-label-tertiary)}.d0xfxa_inboxCardLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.d0xfxa_inboxMark{flex:0 0 16px;display:inline-flex;position:relative}.d0xfxa_inboxDot{background:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--team-mark-ring,var(--dsw-alias-bg-base));corner-shape:round;border-radius:50%;width:8px;height:8px;position:absolute;top:-2px;left:-2px}.d0xfxa_railWorkspace{flex-direction:column;align-items:center;gap:8px;padding-top:8px;display:flex}.d0xfxa_railButton{corner-shape:round;border-radius:50%;width:36px;height:36px;position:relative}.d0xfxa_railButton[aria-current=page]{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_workspaceSection{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:2px;display:flex;overflow-y:auto}.d0xfxa_section{flex-direction:column;display:flex}.d0xfxa_sectionHeader{align-items:center;min-height:26px;padding-right:2px;display:flex}.d0xfxa_sectionToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:4px;min-width:0;min-height:24px;padding:0 6px;font-size:12px;line-height:18px;display:inline-flex}.d0xfxa_sectionToggle:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_sectionToggle:hover .d0xfxa_sectionChevron,.d0xfxa_sectionToggle:focus-visible .d0xfxa_sectionChevron{color:var(--dsw-alias-label-primary)}.d0xfxa_sectionChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s,color .12s}.d0xfxa_sectionToggle[aria-expanded=false] .d0xfxa_sectionChevron{transform:rotate(-90deg)}.d0xfxa_sectionTitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d0xfxa_sectionActions{align-items:center;margin-left:auto;display:inline-flex}.d0xfxa_panel{flex-direction:column;display:flex}.d0xfxa_iconButton{corner-shape:round;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;padding:0;display:inline-flex}.d0xfxa_iconButton:hover,.d0xfxa_iconButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_iconButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_textButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:5px;padding:2px 5px;font-size:11px;line-height:18px}.d0xfxa_textButton:hover,.d0xfxa_textButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_textButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_textButton:disabled{cursor:not-allowed;opacity:.4}.d0xfxa_channelList,.d0xfxa_agentList{flex-direction:column;gap:1px;padding:0 4px 4px;display:flex}.d0xfxa_sidebarRowDragging{opacity:.5}.d0xfxa_sidebarRowDropBefore,.d0xfxa_sidebarRowDropAfter{position:relative}.d0xfxa_sidebarRowDropBefore:before,.d0xfxa_sidebarRowDropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.d0xfxa_sidebarRowDropBefore:before{top:-7px}.d0xfxa_sidebarRowDropAfter:after{bottom:-7px}.d0xfxa_channelRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:30px;display:flex;position:relative}.d0xfxa_channelSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:1;align-items:center;min-width:0;min-height:30px;padding:3px 4px 3px 8px;display:flex}.d0xfxa_channelSelect:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_channelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_agentRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:38px;display:flex;position:relative}.d0xfxa_agentSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:1;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:0 8px;min-width:0;min-height:38px;padding:3px 4px 3px 8px;display:grid}.d0xfxa_agentSelect:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_agentSelect[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);border-radius:8px}.d0xfxa_agentRow:hover .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow:focus-within .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow[data-menu-open] .d0xfxa_agentSelect[aria-current=page]{background:0 0}.d0xfxa_agentAvatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);corner-shape:round;color:#fff;cursor:default;border-radius:50%;flex:0 0 24px;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;font-weight:600;display:inline-flex;position:relative}.d0xfxa_agentAvatarBadge{background:var(--dsw-specific-sidebar-fill);corner-shape:round;box-shadow:0 0 0 1px var(--dsw-specific-sidebar-fill);border-radius:50%;justify-content:center;align-items:center;width:12px;height:12px;padding:1px;line-height:0;display:inline-flex;position:absolute;bottom:-3px;right:-3px}.d0xfxa_agentCopy{flex-direction:column;justify-content:flex-start;min-width:0;display:flex}.d0xfxa_agentCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:17px;overflow:hidden}.d0xfxa_agentCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:13px;overflow:hidden}.d0xfxa_unavailableDot{background:var(--dsw-alias-label-tertiary);corner-shape:round;border-radius:50%;width:7px;height:7px;display:inline-block}.d0xfxa_rowMenu{flex:none;align-items:center;padding-right:4px;display:none}.d0xfxa_channelRow:hover .d0xfxa_rowMenu,.d0xfxa_channelRow:focus-within .d0xfxa_rowMenu,.d0xfxa_channelRow[data-menu-open] .d0xfxa_rowMenu,.d0xfxa_agentRow:hover .d0xfxa_rowMenu,.d0xfxa_agentRow:focus-within .d0xfxa_rowMenu,.d0xfxa_agentRow[data-menu-open] .d0xfxa_rowMenu{display:inline-flex}.d0xfxa_channelRow[data-menu-open],.d0xfxa_agentRow[data-menu-open],.d0xfxa_channelRow:hover,.d0xfxa_agentRow:hover,.d0xfxa_channelRow:focus-within,.d0xfxa_agentRow:focus-within,.d0xfxa_channelRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_rowMenuButton{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.d0xfxa_rowMenuButton:hover,.d0xfxa_rowMenuButton:focus-visible{color:var(--dsw-alias-label-primary)}.d0xfxa_rowMenuButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_retryError{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;font-size:11px;display:flex}.d0xfxa_rowAlert{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;padding:2px 8px 6px;font-size:11px}.d0xfxa_error{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;margin:0;padding:4px 12px 6px;font-size:11px;line-height:16px}.d0xfxa_editDescription{color:var(--dsw-alias-label-secondary);margin:0 0 10px;font-size:12px;line-height:18px}.d0xfxa_editMemberList{gap:2px;display:grid}.d0xfxa_editChannelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_editHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:16px}.d0xfxa_menuHint{color:var(--dsw-alias-label-tertiary);margin-left:4px;font-size:10px;line-height:14px}.d0xfxa_rowError{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:2px 0;font-size:11px;line-height:16px}";
8065
+ const css$10 = "html[data-agent-team-mode=team] button[class*=newSession]{display:none}.d0xfxa_workspaceBrowser{flex-direction:column;height:100%;min-height:0;padding:0 8px 8px;display:flex}.d0xfxa_railButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.d0xfxa_railButton:hover,.d0xfxa_railButton:focus-visible{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_railButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_workspaceTrigger{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);box-sizing:border-box;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;border-radius:8px;align-items:center;gap:6px;width:100%;min-height:34px;margin:0 0 2px;padding:4px 8px;font-size:14px;line-height:22px;display:flex}.d0xfxa_workspaceTrigger:hover,.d0xfxa_workspaceTrigger[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_workspaceTrigger:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_workspaceIcon{color:var(--dsw-alias-state-business-primary);flex:0 0 16px;justify-content:center;align-items:center;height:20px;display:inline-flex}.d0xfxa_workspaceValue{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.d0xfxa_workspaceChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s;display:inline-flex}.d0xfxa_workspaceChevronOpen{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.d0xfxa_workspaceChevron{transition:none}}.d0xfxa_emptyState{color:var(--dsw-alias-label-tertiary);margin:8px;font-size:12px;line-height:18px}.d0xfxa_inboxCard{color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:none;align-items:center;gap:6px;width:100%;height:34px;margin:4px 0 2px;padding:0 8px;display:flex}.d0xfxa_inboxCard:hover,.d0xfxa_inboxCard:focus-visible,.d0xfxa_inboxCard[aria-current=page]{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_inboxCard:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_inboxCard .d0xfxa_inboxMark{color:var(--dsw-alias-label-tertiary)}.d0xfxa_inboxCardLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.d0xfxa_inboxMark{flex:0 0 16px;display:inline-flex;position:relative}.d0xfxa_inboxDot{background:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px var(--team-mark-ring,var(--dsw-specific-sidebar-fill)), 0 0 0 2px var(--dsw-specific-sidebar-fill);corner-shape:round;border-radius:50%;width:8px;height:8px;position:absolute;top:-2px;left:-2px}.d0xfxa_railWorkspace{flex-direction:column;align-items:center;gap:8px;padding-top:8px;display:flex}.d0xfxa_railButton{corner-shape:round;border-radius:50%;width:36px;height:36px;position:relative}.d0xfxa_railButton[aria-current=page]{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_workspaceSection{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:2px;display:flex;overflow-y:auto}.d0xfxa_section{flex-direction:column;display:flex}.d0xfxa_sectionHeader{align-items:center;min-height:26px;padding-right:2px;display:flex}.d0xfxa_sectionToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:4px;min-width:0;min-height:24px;padding:0 6px;font-size:12px;line-height:18px;display:inline-flex}.d0xfxa_sectionToggle:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_sectionToggle:hover .d0xfxa_sectionChevron,.d0xfxa_sectionToggle:focus-visible .d0xfxa_sectionChevron{color:var(--dsw-alias-label-primary)}.d0xfxa_sectionChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s,color .12s}.d0xfxa_sectionToggle[aria-expanded=false] .d0xfxa_sectionChevron{transform:rotate(-90deg)}.d0xfxa_sectionTitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d0xfxa_sectionActions{align-items:center;margin-left:auto;display:inline-flex}.d0xfxa_panel{flex-direction:column;display:flex}.d0xfxa_iconButton{corner-shape:round;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;padding:0;display:inline-flex}.d0xfxa_iconButton:hover,.d0xfxa_iconButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_iconButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_textButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:5px;padding:2px 5px;font-size:11px;line-height:18px}.d0xfxa_textButton:hover,.d0xfxa_textButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_textButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_textButton:disabled{cursor:not-allowed;opacity:.4}.d0xfxa_channelList,.d0xfxa_agentList{flex-direction:column;gap:1px;padding:0 4px 4px;display:flex}.d0xfxa_sidebarRowDragging{opacity:.5}.d0xfxa_sidebarRowDropBefore,.d0xfxa_sidebarRowDropAfter{position:relative}.d0xfxa_sidebarRowDropBefore:before,.d0xfxa_sidebarRowDropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.d0xfxa_sidebarRowDropBefore:before{top:-7px}.d0xfxa_sidebarRowDropAfter:after{bottom:-7px}.d0xfxa_channelRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:30px;display:flex;position:relative}.d0xfxa_channelSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:1;align-items:center;min-width:0;min-height:30px;padding:3px 4px 3px 8px;display:flex}.d0xfxa_channelSelect:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_channelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_agentRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:38px;display:flex;position:relative}.d0xfxa_agentSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;flex:1;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:0 8px;min-width:0;min-height:38px;padding:3px 4px 3px 8px;display:grid}.d0xfxa_agentSelect:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.d0xfxa_agentSelect[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);border-radius:8px}.d0xfxa_agentRow:hover .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow:focus-within .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow[data-menu-open] .d0xfxa_agentSelect[aria-current=page]{background:0 0}.d0xfxa_agentAvatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);corner-shape:round;color:#fff;cursor:default;border-radius:50%;flex:0 0 24px;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;font-weight:600;display:inline-flex;position:relative}.d0xfxa_agentAvatarBadge{background:var(--dsw-specific-sidebar-fill);corner-shape:round;box-shadow:0 0 0 1px var(--dsw-specific-sidebar-fill);border-radius:50%;justify-content:center;align-items:center;width:12px;height:12px;padding:1px;line-height:0;display:inline-flex;position:absolute;bottom:-3px;right:-3px}.d0xfxa_agentCopy{flex-direction:column;justify-content:flex-start;min-width:0;display:flex}.d0xfxa_agentCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:17px;overflow:hidden}.d0xfxa_agentCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:13px;overflow:hidden}.d0xfxa_unavailableDot{background:var(--dsw-alias-label-tertiary);corner-shape:round;border-radius:50%;width:7px;height:7px;display:inline-block}.d0xfxa_rowMenu{flex:none;align-items:center;padding-right:4px;display:none}.d0xfxa_channelRow:hover .d0xfxa_rowMenu,.d0xfxa_channelRow:focus-within .d0xfxa_rowMenu,.d0xfxa_channelRow[data-menu-open] .d0xfxa_rowMenu,.d0xfxa_agentRow:hover .d0xfxa_rowMenu,.d0xfxa_agentRow:focus-within .d0xfxa_rowMenu,.d0xfxa_agentRow[data-menu-open] .d0xfxa_rowMenu{display:inline-flex}.d0xfxa_channelRow[data-menu-open],.d0xfxa_agentRow[data-menu-open],.d0xfxa_channelRow:hover,.d0xfxa_agentRow:hover,.d0xfxa_channelRow:focus-within,.d0xfxa_agentRow:focus-within,.d0xfxa_channelRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_rowMenuButton{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.d0xfxa_rowMenuButton:hover,.d0xfxa_rowMenuButton:focus-visible{color:var(--dsw-alias-label-primary)}.d0xfxa_rowMenuButton:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:1px}.d0xfxa_retryError{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;font-size:11px;display:flex}.d0xfxa_rowAlert{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;padding:2px 8px 6px;font-size:11px}.d0xfxa_error{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;margin:0;padding:4px 12px 6px;font-size:11px;line-height:16px}.d0xfxa_editDescription{color:var(--dsw-alias-label-secondary);margin:0 0 10px;font-size:12px;line-height:18px}.d0xfxa_editMemberList{gap:2px;display:grid}.d0xfxa_editChannelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_editHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:16px}.d0xfxa_menuHint{color:var(--dsw-alias-label-tertiary);margin-left:4px;font-size:10px;line-height:14px}.d0xfxa_rowError{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:2px 0;font-size:11px;line-height:16px}";
7435
8066
  const tagId$10 = "@wowyuarm/dsh-agent-team/sidebar.module.css";
7436
8067
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]") === null) {
7437
8068
  const tag = document.createElement("style");
@@ -7647,7 +8278,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7647
8278
  "aria-label": t("members"),
7648
8279
  "aria-haspopup": "dialog",
7649
8280
  onClick: openMembers,
7650
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUserOutlineRegular, { size: wide ? 16 : 18 }), wide && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("members") })]
8281
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUserOutline16, { size: wide ? 16 : 18 }), wide && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("members") })]
7651
8282
  })
7652
8283
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
7653
8284
  open: panelOpen,
@@ -7691,38 +8322,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7691
8322
  })] });
7692
8323
  }
7693
8324
  //#endregion
7694
- //#region src/client/attachment-preview.ts
7695
- /** Base64 one file payload in chunks so large uploads stay off the call-stack limit. */
7696
- function bytesToBase64(bytes) {
7697
- let binary = "";
7698
- const chunk = 32768;
7699
- for (let start = 0; start < bytes.length; start += chunk) binary += String.fromCharCode(...bytes.subarray(start, start + chunk));
7700
- return btoa(binary);
7701
- }
7702
- /**
7703
- * Thumbnail data URLs live in one session-wide cache: message lists re-render
7704
- * often, and each miss costs a Host round-trip plus a base64 decode. Failed
7705
- * loads (bytes already GC'd) are cached as `null` so the chip fallback is stable.
7706
- */
7707
- const dataUrlCache = /* @__PURE__ */ new Map();
7708
- function cachedAttachmentDataUrl(attachmentId) {
7709
- return dataUrlCache.get(attachmentId);
7710
- }
7711
- async function loadAttachmentDataUrl(getAttachment, attachment) {
7712
- const cached = dataUrlCache.get(attachment.attachmentId);
7713
- if (cached !== void 0) return cached;
7714
- const result = await getAttachment({ attachmentId: attachment.attachmentId });
7715
- const url = result.ok && attachment.mediaType.startsWith("image/") ? `data:${attachment.mediaType};base64,${result.value.bytesBase64}` : null;
7716
- dataUrlCache.set(attachment.attachmentId, url);
7717
- return url;
7718
- }
7719
- /** Human-readable byte size for attachment chips. */
7720
- function formatByteSize(byteSize) {
7721
- if (byteSize < 1024) return `${byteSize} B`;
7722
- if (byteSize < 1024 * 1024) return `${(byteSize / 1024).toFixed(0)} KB`;
7723
- return `${(byteSize / (1024 * 1024)).toFixed(1)} MB`;
7724
- }
7725
- //#endregion
7726
8325
  //#region src/client/requests.ts
7727
8326
  /** Fresh idempotency identity for one Client-initiated durable request. */
7728
8327
  const mintRequestId = () => crypto.randomUUID();
@@ -8157,7 +8756,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8157
8756
  onClick: () => {
8158
8757
  fileInputRef.current?.click();
8159
8758
  },
8160
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPaperclipOutlineRegular, { size: 14 })
8759
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPaperclipOutline16, { size: 14 })
8161
8760
  })
8162
8761
  })] }),
8163
8762
  onAsTaskChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
@@ -8170,7 +8769,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8170
8769
  onClick: () => {
8171
8770
  onAsTaskChange(asTask !== true);
8172
8771
  },
8173
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutlineRegular, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8772
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutline14, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8174
8773
  className: composer_module_css_default.asTaskLabel,
8175
8774
  children: t("asTask")
8176
8775
  })]
@@ -8184,7 +8783,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8184
8783
  event.preventDefault();
8185
8784
  inputRef.current?.focus({ preventScroll: true });
8186
8785
  },
8187
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSendOutlineRegular, { size: 16 })
8786
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSendOutline16, { size: 16 })
8188
8787
  })
8189
8788
  ]
8190
8789
  })
@@ -8197,65 +8796,145 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8197
8796
  });
8198
8797
  }
8199
8798
  //#endregion
8200
- //#region src/client/task-refs.ts
8201
- const resolved = /* @__PURE__ */ new Map();
8202
- const pending = /* @__PURE__ */ new Set();
8203
- /** Refs the Host did not recognize; never re-queried (no retry loops). */
8204
- const unresolvable = /* @__PURE__ */ new Set();
8205
- const listeners$2 = /* @__PURE__ */ new Set();
8206
- let version = 0;
8207
- const emit = () => {
8208
- version += 1;
8209
- for (const listener of listeners$2) listener();
8210
- };
8211
- const subscribe = (listener) => {
8212
- listeners$2.add(listener);
8213
- return () => {
8214
- listeners$2.delete(listener);
8215
- };
8216
- };
8217
- /** Stable snapshot token; the map is read directly after this changes. */
8218
- const getSnapshot = () => version;
8219
- /** React binding: re-renders the caller when any ref resolution lands. */
8220
- const useResolvedTaskRefVersion = () => (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
8221
- const cachedResolvedTaskRef = (taskRef) => resolved.get(taskRef);
8222
- /** Store one resolution (click path) and wake every rendered link. */
8223
- const rememberResolvedTaskRef = (entry) => {
8224
- resolved.set(entry.taskRef, entry);
8225
- pending.delete(entry.taskRef);
8226
- emit();
8227
- };
8799
+ //#region src/client/refs.ts
8228
8800
  /** Compare refs by branded prefix plus hyphen-stripped UUID, so abbreviated spellings line up with their full form. */
8229
8801
  function refKeyOf(ref) {
8230
8802
  return ref.toLowerCase().replaceAll("-", "");
8231
8803
  }
8232
8804
  /**
8233
- * Click-path Host lookup: remember every resolved entry and hand them back
8234
- * for immediate navigation. The Host keeps `resolved` in the same order as
8235
- * the input `taskRefs` (one entry per resolvable input, unknowns omitted);
8236
- * the pairing walk below relies on that contract, so it must be preserved
8237
- * together with this implementation.
8805
+ * One versioned resolution cache per Host-resolved ref kind. Concurrent
8806
+ * callers deduplicate through the pending set; refs the Host does not know
8807
+ * are parked for the session so renders never retry-loop; a landing
8808
+ * resolution wakes every rendered link through the version token.
8238
8809
  */
8239
- const hostTaskRefLookup = (resolveTaskRefs, workspaceId) => async (taskRefs) => {
8240
- const result = await resolveTaskRefs({
8241
- workspaceId,
8242
- taskRefs
8243
- });
8810
+ function createRefStore(refOf) {
8811
+ const resolved = /* @__PURE__ */ new Map();
8812
+ const pending = /* @__PURE__ */ new Set();
8813
+ /** Refs the Host did not recognize; never re-queried (no retry loops). */
8814
+ const unresolvable = /* @__PURE__ */ new Set();
8815
+ const listeners = /* @__PURE__ */ new Set();
8816
+ let version = 0;
8817
+ const emit = () => {
8818
+ version += 1;
8819
+ for (const listener of listeners) listener();
8820
+ };
8821
+ const subscribe = (listener) => {
8822
+ listeners.add(listener);
8823
+ return () => {
8824
+ listeners.delete(listener);
8825
+ };
8826
+ };
8827
+ /** Stable snapshot token; the map is read directly after this changes. */
8828
+ const getSnapshot = () => version;
8829
+ /** React binding: re-renders the caller when any ref resolution lands. */
8830
+ const useVersion = () => (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
8831
+ const cached = (ref) => resolved.get(ref);
8832
+ /** Store one resolution (click path) and wake every rendered link. */
8833
+ const remember = (entry) => {
8834
+ resolved.set(refOf(entry), entry);
8835
+ pending.delete(refOf(entry));
8836
+ emit();
8837
+ };
8838
+ /**
8839
+ * Batch-resolve unknown refs through the Host lookup. Concurrent callers
8840
+ * deduplicate through the pending set; failures just clear the pending mark
8841
+ * so a later interaction can retry.
8842
+ */
8843
+ const resolveUnknown = async (refs, lookup) => {
8844
+ const missing = refs.filter((ref) => !resolved.has(ref) && !pending.has(ref) && !unresolvable.has(ref));
8845
+ if (missing.length === 0) return;
8846
+ for (const ref of missing) pending.add(ref);
8847
+ try {
8848
+ const entries = await lookup(missing);
8849
+ for (const entry of entries) {
8850
+ resolved.set(refOf(entry), entry);
8851
+ pending.delete(refOf(entry));
8852
+ }
8853
+ for (const ref of missing) if (!resolved.has(ref)) unresolvable.add(ref);
8854
+ if (entries.length > 0) emit();
8855
+ } finally {
8856
+ for (const ref of missing) pending.delete(ref);
8857
+ }
8858
+ };
8859
+ return {
8860
+ useVersion,
8861
+ cached,
8862
+ remember,
8863
+ resolveUnknown
8864
+ };
8865
+ }
8866
+ const taskStore = createRefStore((entry) => entry.taskRef);
8867
+ const threadStore = createRefStore((entry) => entry.threadRef);
8868
+ /** React binding: re-renders the caller when any Task ref resolution lands. */
8869
+ const useResolvedTaskRefVersion = taskStore.useVersion;
8870
+ const cachedResolvedTaskRef = taskStore.cached;
8871
+ /** Store one Task resolution (click path) and wake every rendered link. */
8872
+ const rememberResolvedTaskRef = taskStore.remember;
8873
+ const resolveUnknownTaskRefs = taskStore.resolveUnknown;
8874
+ /** React binding: re-renders the caller when any Thread ref resolution lands. */
8875
+ const useResolvedThreadRefVersion = threadStore.useVersion;
8876
+ const cachedResolvedThreadRef = threadStore.cached;
8877
+ /** Store one Thread resolution (click path) and wake every rendered link. */
8878
+ const rememberResolvedThreadRef = threadStore.remember;
8879
+ const resolveUnknownThreadRefs = threadStore.resolveUnknown;
8880
+ /**
8881
+ * Click-path Host lookup shared by both ref kinds: remember every resolved
8882
+ * entry and hand them back for immediate navigation. The Host keeps
8883
+ * `resolved` in the same order as the input refs (one entry per resolvable
8884
+ * input, unknowns omitted); the pairing walk below relies on that contract,
8885
+ * so it must be preserved together with this implementation. The Host
8886
+ * answers with full refs even for abbreviated inputs; the returned entries
8887
+ * keep the input order, so the walk remembers each authored spelling as an
8888
+ * alias of its resolution.
8889
+ */
8890
+ async function hostRefLookup(remember, refOf, alias, request, refs) {
8891
+ const result = await request(refs);
8244
8892
  if (!result.ok) return [];
8245
- const entries = result.value.resolved;
8893
+ const entries = result.value;
8246
8894
  let entryIndex = 0;
8247
- for (const requested of taskRefs) {
8895
+ for (const requested of refs) {
8248
8896
  const entry = entries[entryIndex];
8249
- if (entry === void 0 || !refKeyOf(entry.taskRef).startsWith(refKeyOf(requested))) continue;
8250
- if (entry.taskRef !== requested) rememberResolvedTaskRef({
8251
- ...entry,
8252
- taskRef: requested
8253
- });
8254
- rememberResolvedTaskRef(entry);
8897
+ if (entry === void 0 || !refKeyOf(refOf(entry)).startsWith(refKeyOf(requested))) continue;
8898
+ if (refOf(entry) !== requested) remember(alias(entry, requested));
8899
+ remember(entry);
8255
8900
  entryIndex += 1;
8256
8901
  }
8257
8902
  return entries;
8258
- };
8903
+ }
8904
+ /**
8905
+ * Click-path Task lookup: remember every resolved entry and hand them back
8906
+ * for immediate navigation (see hostRefLookup for the ordering contract).
8907
+ */
8908
+ const hostTaskRefLookup = (resolveTaskRefs, workspaceId) => async (taskRefs) => hostRefLookup(rememberResolvedTaskRef, (entry) => entry.taskRef, (entry, taskRef) => ({
8909
+ ...entry,
8910
+ taskRef
8911
+ }), async (refs) => {
8912
+ const result = await resolveTaskRefs({
8913
+ workspaceId,
8914
+ taskRefs: refs
8915
+ });
8916
+ return result.ok ? {
8917
+ ok: true,
8918
+ value: result.value.resolved
8919
+ } : result;
8920
+ }, taskRefs);
8921
+ /**
8922
+ * Click-path Thread lookup: remember every resolved entry and hand them back
8923
+ * for immediate navigation (see hostRefLookup for the ordering contract).
8924
+ */
8925
+ const hostThreadRefLookup = (resolveThreadRefs, workspaceId) => async (threadRefs) => hostRefLookup(rememberResolvedThreadRef, (entry) => entry.threadRef, (entry, threadRef) => ({
8926
+ ...entry,
8927
+ threadRef
8928
+ }), async (refs) => {
8929
+ const result = await resolveThreadRefs({
8930
+ workspaceId,
8931
+ threadRefs: refs
8932
+ });
8933
+ return result.ok ? {
8934
+ ok: true,
8935
+ value: result.value.resolved
8936
+ } : result;
8937
+ }, threadRefs);
8259
8938
  /** Resolve one Task ref through the Host and jump to its home Channel Thread. */
8260
8939
  const jumpToTaskThread = (resolveTaskRefs, workspaceId, taskRef, selectThread) => {
8261
8940
  resolveTaskRefs({
@@ -8267,30 +8946,54 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8267
8946
  if (hit !== void 0) selectThread(hit.threadRef, hit.channelRef, hit.taskRef, hit.taskNumber);
8268
8947
  });
8269
8948
  };
8949
+ /** Resolve one Thread ref through the Host and jump to its home Channel Thread. */
8950
+ const jumpToThread = (resolveThreadRefs, workspaceId, threadRef, selectThread) => {
8951
+ resolveThreadRefs({
8952
+ workspaceId,
8953
+ threadRefs: [threadRef]
8954
+ }).then((result) => {
8955
+ if (!result.ok) return;
8956
+ const hit = result.value.resolved[0];
8957
+ if (hit !== void 0) selectThread(hit.threadRef, hit.channelRef, hit.taskRef, hit.taskNumber);
8958
+ });
8959
+ };
8960
+ /** Exactly one roster entry whose full key extends the authored spelling; ambiguity resolves to nothing. */
8961
+ function uniqueByPrefix(entries, keyOf, authored) {
8962
+ const key = refKeyOf(authored);
8963
+ const hits = entries.filter((entry) => refKeyOf(keyOf(entry)).startsWith(key));
8964
+ return hits.length === 1 ? hits[0] : void 0;
8965
+ }
8270
8966
  /**
8271
- * Batch-resolve unknown refs through the Host lookup. Concurrent callers
8272
- * deduplicate through the pending set; failures just clear the pending mark
8273
- * so a later interaction can retry.
8967
+ * Display name for one authored channel ref, or undefined when the loaded
8968
+ * roster does not know it — the caller keeps plain text. Archived Channels
8969
+ * never resolve: they are gone from every Team surface, so their refs are
8970
+ * not links either.
8274
8971
  */
8275
- const resolveUnknownTaskRefs = async (refs, lookup) => {
8276
- const missing = refs.filter((taskRef) => !resolved.has(taskRef) && !pending.has(taskRef) && !unresolvable.has(taskRef));
8277
- if (missing.length === 0) return;
8278
- for (const taskRef of missing) pending.add(taskRef);
8279
- try {
8280
- const entries = await lookup(missing);
8281
- for (const entry of entries) {
8282
- resolved.set(entry.taskRef, entry);
8283
- pending.delete(entry.taskRef);
8284
- }
8285
- for (const taskRef of missing) if (!resolved.has(taskRef)) unresolvable.add(taskRef);
8286
- if (entries.length > 0) emit();
8287
- } finally {
8288
- for (const taskRef of missing) pending.delete(taskRef);
8289
- }
8972
+ const rosterChannelName = (channels, channelRef) => uniqueByPrefix(channels.filter((channel) => channel.state === "active"), (channel) => channel.channelRef, channelRef)?.name;
8973
+ /**
8974
+ * Roster facts for one authored member ref, or undefined when nobody on the
8975
+ * roster answers to it — the caller keeps plain text. The Human resolves to
8976
+ * a handle with no session: informative, never a link.
8977
+ */
8978
+ const rosterMember = (members, humanMemberId, humanHandle, memberRef) => {
8979
+ if (humanMemberId !== void 0 && refKeyOf(memberRef) === refKeyOf(humanMemberId)) return {
8980
+ memberId: humanMemberId,
8981
+ handle: humanHandle,
8982
+ openable: false
8983
+ };
8984
+ const hit = uniqueByPrefix(members, (status) => status.member.memberId, memberRef);
8985
+ if (hit === void 0) return void 0;
8986
+ const openable = hit.availability === "active";
8987
+ return {
8988
+ memberId: hit.member.memberId,
8989
+ handle: hit.member.handle.replace(/^@/, ""),
8990
+ ...openable ? { sessionId: hit.member.sessionId } : {},
8991
+ openable
8992
+ };
8290
8993
  };
8291
8994
  //#endregion
8292
8995
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/conversation.module.css.mjs
8293
- const css$6 = ".omcBaG_surface{grid-template-rows:auto minmax(0,1fr) auto;min-width:0;height:100%;min-height:0;display:grid;overflow:hidden}.omcBaG_surfaceHeader{border-bottom:1px solid var(--dsw-alias-border-l2);min-width:0;padding:14px clamp(18px,3vw,36px) 12px}.omcBaG_headerRow{justify-content:space-between;align-items:flex-start;gap:16px;min-width:0;max-width:880px;margin:0 auto;display:flex}.omcBaG_headerCopy{min-width:0}.omcBaG_headerCopy h1{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0;font-size:20px;font-weight:600;line-height:28px}.omcBaG_headerCopy p{color:var(--dsw-alias-label-secondary);margin:3px 0 0;font-size:13px;line-height:20px}.omcBaG_headerActions{flex:none;align-items:center;gap:6px;display:flex}.omcBaG_backRow{max-width:880px;margin:0 auto 8px}.omcBaG_timeline{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px clamp(18px,3vw,36px) 24px;overflow:hidden auto}.omcBaG_timelineContent{flex-direction:column;min-width:0;max-width:880px;min-height:100%;margin:0 auto;display:flex}.omcBaG_emptySurface{margin:auto;padding:32px 0}.omcBaG_emptySurface .omcBaG_emptyState{text-align:center;justify-items:center}.omcBaG_timelineAction{justify-content:center;padding:2px 0 8px;display:flex}.omcBaG_messageRow{gap:10px;padding:10px 0;display:flex}.omcBaG_messageRow[data-grouped]{padding-top:2px}.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child,.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child>:first-child{margin-top:0}.omcBaG_messageIdentity{background:hsl(var(--team-avatar-hue,212) 42% 46%);corner-shape:round;color:#fff;border-radius:50%;flex:0 0 28px;justify-content:center;align-items:center;height:28px;font-size:12px;font-weight:600;display:flex}.omcBaG_messageRow[data-human] .omcBaG_messageIdentity{background:var(--dsw-alias-state-business-primary)}.omcBaG_messageRow[data-grouped] .omcBaG_messageIdentity{visibility:hidden}.omcBaG_messageBody{min-width:0}.omcBaG_nameRow{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.omcBaG_nameRow strong{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.omcBaG_messageTime{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:20px}.omcBaG_stateCluster{flex:none;align-items:center;gap:6px;display:inline-flex}.omcBaG_statusWord{color:var(--dsw-alias-label-secondary);font-size:11px;line-height:18px}.omcBaG_entryLine{flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;margin:4px 0 0;display:flex}.omcBaG_entryRow{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;padding:2px 0;font-size:12px;line-height:18px;display:inline-flex}.omcBaG_entryRow:hover,.omcBaG_entryRow:focus-visible{color:var(--dsw-alias-label-primary)}.omcBaG_entryRow:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.omcBaG_entryArrow{align-items:center;transition:transform .12s;display:inline-flex}.omcBaG_entryRow:hover .omcBaG_entryArrow,.omcBaG_entryRow:focus-visible .omcBaG_entryArrow{transform:translate(2px)}.omcBaG_messageText{white-space:pre-wrap;word-break:break-word;margin:6px 0;font-size:14px;line-height:22px}.omcBaG_messageClamp{max-height:176px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 72%,#0000 100%);mask-image:linear-gradient(#000 72%,#0000 100%)}.omcBaG_messageExpand{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;width:fit-content;margin-top:4px;padding:0;font-size:12px;line-height:20px;display:block}.omcBaG_messageExpand:hover,.omcBaG_messageExpand:focus-visible{color:var(--dsw-alias-label-primary);text-underline-offset:2px;outline:none;text-decoration:underline}.omcBaG_messageBody .omcBaG_messageMarkdown{font-size:14px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown>div:first-child{color:var(--dsw-alias-label-primary);font:inherit}.omcBaG_messageBody .omcBaG_messageMarkdown p{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(ul,ol){margin:6px 0;padding-left:22px}.omcBaG_messageBody .omcBaG_messageMarkdown li+li{margin-top:2px}.omcBaG_messageBody .omcBaG_messageMarkdown strong{font-weight:600}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1,h2,h3,h4,h5,h6){margin:12px 0 4px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1){font-size:17px;line-height:26px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h2){font-size:16px;line-height:24px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h3,h4,h5,h6){font-size:15px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown pre{margin:8px 0;padding:10px 12px;font-size:13px}.omcBaG_messageBody .omcBaG_messageMarkdown blockquote{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(th,td){padding-block:5px}.omcBaG_emptyState,.omcBaG_loadingState{color:var(--dsw-alias-label-tertiary);margin:0;padding:14px 0;font-size:13px;line-height:20px}.omcBaG_emptyState{gap:3px;display:grid}.omcBaG_emptyState strong{color:var(--dsw-alias-label-secondary);font-weight:500}.omcBaG_emptyState span{font-size:12px}.omcBaG_loadingState{align-items:center;gap:8px;display:flex}.omcBaG_loadingMark{background:var(--dsw-alias-bg-skeleton);corner-shape:round;border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite omcBaG_pulse}.omcBaG_error{color:var(--dsw-alias-state-error-primary);max-width:880px;margin:0;padding-top:6px;font-size:12px;line-height:18px}.omcBaG_errorState{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;max-width:880px;margin:auto;padding:32px 0;font-size:12px;line-height:18px;display:flex}.omcBaG_welcomeSurface{justify-content:center;align-items:center;min-width:0;height:100%;padding:32px;display:flex}.omcBaG_welcome{text-align:center;max-width:420px}.omcBaG_welcomeEyebrow{color:var(--dsw-alias-label-tertiary);text-transform:uppercase;font-size:12px;line-height:18px}.omcBaG_welcome h1{color:var(--dsw-alias-label-primary);margin:8px 0;font-size:24px;font-weight:600;line-height:32px}.omcBaG_welcome p{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}@keyframes omcBaG_pulse{0%,to{opacity:.35}50%{opacity:1}}@media (width<=600px){.omcBaG_surfaceHeader{padding:12px 12px 10px}.omcBaG_headerRow{flex-direction:column;align-items:stretch;gap:8px}.omcBaG_headerActions{flex-wrap:wrap}.omcBaG_backRow{margin-bottom:6px}.omcBaG_timeline{scrollbar-gutter:auto;padding:8px 12px 16px}.omcBaG_messageRow{padding:8px 0}}@media (prefers-reduced-motion:reduce){.omcBaG_loadingMark{animation:none}.omcBaG_entryArrow{transition:none}.omcBaG_entryRow:hover .omcBaG_entryArrow,.omcBaG_entryRow:focus-visible .omcBaG_entryArrow{transform:none}}.omcBaG_messageRun{margin:2px 0;padding:3px 0}.omcBaG_messageRow[data-grouped]:has([data-thread-entry]){margin-top:3px;padding-top:7px;position:relative}.omcBaG_messageRow[data-grouped]:has([data-thread-entry]):before{background:var(--dsw-alias-border-l2);content:\"\";height:1px;position:absolute;inset:0 0 auto 38px}.omcBaG_runDivider{border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);margin:2px 0 0 38px;padding:5px 0 0;font-size:11px;line-height:16px}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has([data-thread-entry]){margin-top:0}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has([data-thread-entry]):before{content:none}.omcBaG_mention{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);color:var(--dsw-alias-state-business-primary);border-radius:6px;padding:0 4px;font-weight:500;box-shadow:0 1px 2px #00000014}.omcBaG_mentionsRow{gap:4px;width:fit-content;margin-top:3px;font-size:.85em;display:flex}.omcBaG_attachmentStrip{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.omcBaG_attachmentThumb{cursor:zoom-in;border:0;border-radius:8px;padding:0}.omcBaG_attachmentThumb img{object-fit:cover;border-radius:8px;width:128px;height:96px;display:block}.omcBaG_attachmentThumb:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:1px}.omcBaG_confirmBody{margin:0 0 8px}.omcBaG_confirmList{gap:6px;margin:0;padding-left:18px;display:grid}.omcBaG_refLink{color:var(--dsw-alias-state-business-primary);cursor:pointer;font:inherit;text-align:left;text-underline-offset:3px;background:0 0;border:none;border-radius:4px;padding:0;text-decoration:underline}.omcBaG_refLink:hover{text-decoration-thickness:2px}.omcBaG_refLink:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.omcBaG_attachmentModal{width:min(1100px,92vw)}.omcBaG_attachmentZoom{object-fit:contain;border-radius:12px;max-width:100%;max-height:78vh;margin:0 auto;display:block}.omcBaG_attachmentChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:baseline;gap:6px;max-width:100%;padding:3px 8px;display:inline-flex}.omcBaG_attachmentChipName{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.omcBaG_attachmentChipSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px;line-height:17px}";
8996
+ const css$6 = ".omcBaG_surface{grid-template-rows:auto minmax(0,1fr) auto;min-width:0;height:100%;min-height:0;display:grid;overflow:hidden}.omcBaG_surfaceHeader{border-bottom:1px solid var(--dsw-alias-border-l2);min-width:0;padding:14px clamp(18px,3vw,36px) 12px}.omcBaG_headerRow{justify-content:space-between;align-items:flex-start;gap:16px;min-width:0;max-width:880px;margin:0 auto;display:flex}.omcBaG_headerCopy{min-width:0}.omcBaG_headerCopy h1{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0;font-size:20px;font-weight:600;line-height:28px}.omcBaG_headerCopy p{color:var(--dsw-alias-label-secondary);margin:3px 0 0;font-size:13px;line-height:20px}.omcBaG_headerActions{flex:none;align-items:center;gap:6px;display:flex}.omcBaG_backRow{max-width:880px;margin:0 auto 8px}.omcBaG_timeline{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px clamp(18px,3vw,36px) 24px;overflow:hidden auto}.omcBaG_timelineContent{flex-direction:column;min-width:0;max-width:880px;min-height:100%;margin:0 auto;display:flex}.omcBaG_emptySurface{margin:auto;padding:32px 0}.omcBaG_emptySurface .omcBaG_emptyState{text-align:center;justify-items:center}.omcBaG_timelineAction{justify-content:center;padding:2px 0 8px;display:flex}.omcBaG_messageRow{gap:10px;padding:10px 0;display:flex}.omcBaG_messageRow[data-grouped]{padding-top:2px}.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child,.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child>:first-child{margin-top:0}.omcBaG_messageIdentity{background:hsl(var(--team-avatar-hue,212) 42% 46%);corner-shape:round;color:#fff;border-radius:50%;flex:0 0 28px;justify-content:center;align-items:center;height:28px;font-size:12px;font-weight:600;display:flex}.omcBaG_messageRow[data-human] .omcBaG_messageIdentity{background:var(--dsw-alias-state-business-primary)}.omcBaG_messageIdentityImage{corner-shape:round;object-fit:cover;border-radius:50%;flex:0 0 28px;height:28px}.omcBaG_messageRow[data-grouped] .omcBaG_messageIdentity,.omcBaG_messageRow[data-grouped] .omcBaG_messageIdentityImage{visibility:hidden}.omcBaG_messageBody{min-width:0}.omcBaG_nameRow{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.omcBaG_nameRow strong{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.omcBaG_messageTime{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:20px}.omcBaG_stateCluster{flex:none;align-items:center;gap:6px;display:inline-flex}.omcBaG_statusWord{color:var(--dsw-alias-label-secondary);font-size:11px;line-height:18px}.omcBaG_entryLine{flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;margin:4px 0 0;display:flex}.omcBaG_entryRow{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;padding:2px 0;font-size:12px;line-height:18px;display:inline-flex}.omcBaG_entryRow:hover,.omcBaG_entryRow:focus-visible{color:var(--dsw-alias-label-primary)}.omcBaG_entryRow:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.omcBaG_entryArrow{align-items:center;transition:transform .12s;display:inline-flex}.omcBaG_entryRow:hover .omcBaG_entryArrow,.omcBaG_entryRow:focus-visible .omcBaG_entryArrow{transform:translate(2px)}.omcBaG_messageText{white-space:pre-wrap;word-break:break-word;margin:6px 0;font-size:14px;line-height:22px}.omcBaG_messageClamp{max-height:176px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 72%,#0000 100%);mask-image:linear-gradient(#000 72%,#0000 100%)}.omcBaG_messageExpand{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;width:fit-content;margin-top:4px;padding:0;font-size:12px;line-height:20px;display:block}.omcBaG_messageExpand:hover,.omcBaG_messageExpand:focus-visible{color:var(--dsw-alias-label-primary);text-underline-offset:2px;outline:none;text-decoration:underline}.omcBaG_messageBody .omcBaG_messageMarkdown{font-size:14px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown>div:first-child{color:var(--dsw-alias-label-primary);font:inherit}.omcBaG_messageBody .omcBaG_messageMarkdown p{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(ul,ol){margin:6px 0;padding-left:22px}.omcBaG_messageBody .omcBaG_messageMarkdown li+li{margin-top:2px}.omcBaG_messageBody .omcBaG_messageMarkdown strong{font-weight:600}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1,h2,h3,h4,h5,h6){margin:12px 0 4px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1){font-size:17px;line-height:26px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h2){font-size:16px;line-height:24px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h3,h4,h5,h6){font-size:15px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown pre{margin:8px 0;padding:10px 12px;font-size:13px}.omcBaG_messageBody .omcBaG_messageMarkdown blockquote{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(th,td){padding-block:5px}.omcBaG_emptyState,.omcBaG_loadingState{color:var(--dsw-alias-label-tertiary);margin:0;padding:14px 0;font-size:13px;line-height:20px}.omcBaG_emptyState{gap:3px;display:grid}.omcBaG_emptyState strong{color:var(--dsw-alias-label-secondary);font-weight:500}.omcBaG_emptyState span{font-size:12px}.omcBaG_loadingState{align-items:center;gap:8px;display:flex}.omcBaG_loadingMark{background:var(--dsw-alias-bg-skeleton);corner-shape:round;border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite omcBaG_pulse}.omcBaG_error{color:var(--dsw-alias-state-error-primary);max-width:880px;margin:0;padding-top:6px;font-size:12px;line-height:18px}.omcBaG_errorState{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;max-width:880px;margin:auto;padding:32px 0;font-size:12px;line-height:18px;display:flex}.omcBaG_welcomeSurface{justify-content:center;align-items:center;min-width:0;height:100%;padding:32px;display:flex}.omcBaG_welcome{text-align:center;max-width:420px}.omcBaG_welcomeEyebrow{color:var(--dsw-alias-label-tertiary);text-transform:uppercase;font-size:12px;line-height:18px}.omcBaG_welcome h1{color:var(--dsw-alias-label-primary);margin:8px 0;font-size:24px;font-weight:600;line-height:32px}.omcBaG_welcome p{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}@keyframes omcBaG_pulse{0%,to{opacity:.35}50%{opacity:1}}@media (width<=600px){.omcBaG_surfaceHeader{padding:12px 12px 10px}.omcBaG_headerRow{flex-direction:column;align-items:stretch;gap:8px}.omcBaG_headerActions{flex-wrap:wrap}.omcBaG_backRow{margin-bottom:6px}.omcBaG_timeline{scrollbar-gutter:auto;padding:8px 12px 16px}.omcBaG_messageRow{padding:8px 0}}@media (prefers-reduced-motion:reduce){.omcBaG_loadingMark{animation:none}.omcBaG_entryArrow{transition:none}.omcBaG_entryRow:hover .omcBaG_entryArrow,.omcBaG_entryRow:focus-visible .omcBaG_entryArrow{transform:none}}.omcBaG_messageRun{margin:2px 0;padding:3px 0}.omcBaG_messageRow[data-grouped]:has([data-thread-entry]){margin-top:3px;padding-top:7px;position:relative}.omcBaG_messageRow[data-grouped]:has([data-thread-entry]):before{background:var(--dsw-alias-border-l2);content:\"\";height:1px;position:absolute;inset:0 0 auto 38px}.omcBaG_runDivider{border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);margin:2px 0 0 38px;padding:5px 0 0;font-size:11px;line-height:16px}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has([data-thread-entry]){margin-top:0}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has([data-thread-entry]):before{content:none}.omcBaG_mention{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);color:var(--dsw-alias-state-business-primary);border-radius:6px;padding:0 4px;font-weight:500;box-shadow:0 1px 2px #00000014}.omcBaG_mentionsRow{gap:4px;width:fit-content;margin-top:3px;font-size:.85em;display:flex}.omcBaG_attachmentStrip{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.omcBaG_attachmentThumb{cursor:zoom-in;border:0;border-radius:8px;padding:0}.omcBaG_attachmentThumb img{object-fit:cover;border-radius:8px;width:128px;height:96px;display:block}.omcBaG_attachmentThumb:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:1px}.omcBaG_confirmBody{margin:0 0 8px}.omcBaG_confirmList{gap:6px;margin:0;padding-left:18px;display:grid}.omcBaG_refLink{color:var(--dsw-alias-state-business-primary);cursor:pointer;font:inherit;text-align:left;text-underline-offset:3px;background:0 0;border:none;border-radius:4px;padding:0;text-decoration:underline}.omcBaG_refLink:hover{text-decoration-thickness:2px}.omcBaG_refLink:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.omcBaG_attachmentModal{width:min(1100px,92vw)}.omcBaG_attachmentZoom{object-fit:contain;border-radius:12px;max-width:100%;max-height:78vh;margin:0 auto;display:block}.omcBaG_attachmentChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:baseline;gap:6px;max-width:100%;padding:3px 8px;display:inline-flex}.omcBaG_attachmentChipName{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.omcBaG_attachmentChipSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px;line-height:17px}";
8294
8997
  const tagId$6 = "@wowyuarm/dsh-agent-team/conversation.module.css";
8295
8998
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
8296
8999
  const tag = document.createElement("style");
@@ -8328,6 +9031,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8328
9031
  "messageClamp": "omcBaG_messageClamp",
8329
9032
  "messageExpand": "omcBaG_messageExpand",
8330
9033
  "messageIdentity": "omcBaG_messageIdentity",
9034
+ "messageIdentityImage": "omcBaG_messageIdentityImage",
8331
9035
  "messageMarkdown": "omcBaG_messageMarkdown",
8332
9036
  "messageRow": "omcBaG_messageRow",
8333
9037
  "messageRun": "omcBaG_messageRun",
@@ -8358,8 +9062,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8358
9062
  * skipping a render here never detaches it. Callers must therefore keep the
8359
9063
  * props they derive per render (mention names, ref callbacks) identity-stable.
8360
9064
  */
8361
- const TeamMessage = (0, react.memo)(function TeamMessage({ senderName, memberId, human, body, occurredAt, mentionNames, senderTitle, grouped, showGroupedTime, attachments, loadAttachment, t, onOpenRef, onResolveTaskRefs, children }) {
9065
+ const TeamMessage = (0, react.memo)(function TeamMessage({ senderName, memberId, human, avatarUrl, body, occurredAt, mentionNames, senderTitle, grouped, showGroupedTime, attachments, loadAttachment, t, onOpenRef, onResolveTaskRefs, onResolveThreadRefs, channelNameOf, memberOf, onOpenMemberSession, children }) {
8362
9066
  const avatarStyle = human ? void 0 : { "--team-avatar-hue": memberHue(memberId) };
9067
+ const identityImage = useAvatarImage(human ? avatarUrl : void 0);
8363
9068
  const plan = planMessageBody(body, {
8364
9069
  human,
8365
9070
  ...mentionNames === void 0 ? {} : { mentionNames },
@@ -8367,19 +9072,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8367
9072
  });
8368
9073
  const displayBody = plan.displayBody;
8369
9074
  const { richAgentBody } = plan;
8370
- const refVersion = useResolvedTaskRefVersion();
9075
+ const taskRefVersion = useResolvedTaskRefVersion();
9076
+ const threadRefVersion = useResolvedThreadRefVersion();
8371
9077
  const bodyTaskRefs = plan.taskRefs;
8372
9078
  const bodyTaskRefKey = bodyTaskRefs.join(",");
9079
+ const bodyThreadRefs = plan.threadRefs;
9080
+ const bodyThreadRefKey = bodyThreadRefs.join(",");
8373
9081
  (0, react.useEffect)(() => {
8374
- if (onResolveTaskRefs === void 0 || bodyTaskRefKey === "") return;
8375
- resolveUnknownTaskRefs(bodyTaskRefs, onResolveTaskRefs);
9082
+ if (onResolveTaskRefs !== void 0 && bodyTaskRefKey !== "") resolveUnknownTaskRefs(bodyTaskRefs, onResolveTaskRefs);
9083
+ if (onResolveThreadRefs !== void 0 && bodyThreadRefKey !== "") resolveUnknownThreadRefs(bodyThreadRefs, onResolveThreadRefs);
8376
9084
  }, [
8377
9085
  onResolveTaskRefs,
9086
+ onResolveThreadRefs,
8378
9087
  bodyTaskRefKey,
8379
- refVersion
9088
+ bodyThreadRefKey,
9089
+ taskRefVersion,
9090
+ threadRefVersion
8380
9091
  ]);
8381
9092
  const taskLabel = (0, react.useCallback)((taskNumber) => t?.("taskLabel", { number: taskNumber }) ?? `Task #${taskNumber}`, [t]);
8382
- const refLabel = (0, react.useCallback)((ref) => ref.startsWith("thread:") ? t?.("threadLabel") ?? "Thread" : ref.startsWith("channel:") ? t?.("channels") ?? "Channels" : ref, [t]);
9093
+ const threadChipLabel = (0, react.useCallback)((title) => {
9094
+ const base = t?.("threadLabel") ?? "Thread";
9095
+ return title === "" ? base : `${base} · ${title}`;
9096
+ }, [t]);
9097
+ const channelChipLabel = (0, react.useCallback)((name) => t?.("channelLabel", { name }) ?? `Channel · ${name}`, [t]);
9098
+ const memberChipLabel = (0, react.useCallback)((name) => t?.("memberLabel", { name }) ?? `Member · @${name}`, [t]);
8383
9099
  const markdownLabels = (0, react.useMemo)(() => ({
8384
9100
  code: {
8385
9101
  copyLabel: t?.("copyCode") ?? "Copy",
@@ -8397,21 +9113,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8397
9113
  const textNodes = markdownProseTextNodes(root);
8398
9114
  const styledRefCodes = markdownStyledRefCodeElements(root);
8399
9115
  const taskRefs = [...new Set([...textNodes.map((node) => node.data), ...styledRefCodes.map((code) => code.textContent ?? "")].flatMap((text) => splitBrandedRefs(text).filter((segment) => segment.ref?.startsWith("task:") === true).map((segment) => segment.ref)))];
9116
+ const threadRefs = [...new Set([...textNodes.map((node) => node.data), ...styledRefCodes.map((code) => code.textContent ?? "")].flatMap((text) => splitBrandedRefs(text).filter((segment) => segment.ref?.startsWith("thread:") === true).map((segment) => segment.ref)))];
8400
9117
  if (onResolveTaskRefs !== void 0 && taskRefs.length > 0) resolveUnknownTaskRefs(taskRefs, onResolveTaskRefs);
8401
- for (const code of styledRefCodes) renderResolvedMarkdownCodeRef(code, taskLabel, refLabel);
8402
- for (const node of textNodes) renderResolvedMarkdownText(node, mentionNames ?? [], taskLabel, refLabel);
9118
+ if (onResolveThreadRefs !== void 0 && threadRefs.length > 0) resolveUnknownThreadRefs(threadRefs, onResolveThreadRefs);
9119
+ for (const code of styledRefCodes) renderResolvedMarkdownCodeRef(code, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf);
9120
+ for (const node of textNodes) renderResolvedMarkdownText(node, mentionNames ?? [], taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf);
8403
9121
  for (const button of root.querySelectorAll("button[data-task-ref]")) {
8404
9122
  const taskRef = button.dataset.taskRef;
8405
9123
  const hit = taskRef === void 0 ? void 0 : cachedResolvedTaskRef(taskRef);
8406
9124
  if (taskRef !== void 0 && hit !== void 0) button.textContent = taskLabel(hit.taskNumber);
8407
9125
  }
9126
+ for (const button of root.querySelectorAll("button[data-thread-ref]")) {
9127
+ const threadRef = button.dataset.threadRef;
9128
+ const hit = threadRef === void 0 ? void 0 : cachedResolvedThreadRef(threadRef);
9129
+ if (threadRef !== void 0 && hit !== void 0) button.textContent = threadChipLabel(hit.title);
9130
+ }
8408
9131
  }, [
8409
9132
  richAgentBody,
8410
9133
  onOpenRef,
8411
9134
  onResolveTaskRefs,
8412
- refVersion,
9135
+ onResolveThreadRefs,
9136
+ taskRefVersion,
9137
+ threadRefVersion,
8413
9138
  taskLabel,
8414
- refLabel,
9139
+ threadChipLabel,
9140
+ channelChipLabel,
9141
+ memberChipLabel,
9142
+ channelNameOf,
9143
+ memberOf,
8415
9144
  mentionNames
8416
9145
  ]);
8417
9146
  (0, react.useEffect)(() => {
@@ -8420,25 +9149,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8420
9149
  const openTask = (event) => {
8421
9150
  const target = event.target;
8422
9151
  if (!(target instanceof Element)) return;
8423
- const button = target.closest("button[data-ref], button[data-task-ref]");
9152
+ const button = target.closest("button[data-ref], button[data-task-ref], button[data-thread-ref], button[data-member-session]");
8424
9153
  if (button === null || !root.contains(button)) return;
8425
- const ref = button instanceof HTMLElement ? button.dataset.ref ?? button.dataset.taskRef : void 0;
8426
- if (ref !== void 0) onOpenRef(ref);
9154
+ if (button instanceof HTMLElement) {
9155
+ const sessionId = button.dataset.memberSession;
9156
+ if (sessionId !== void 0) {
9157
+ onOpenMemberSession?.(sessionId);
9158
+ return;
9159
+ }
9160
+ const ref = button.dataset.ref ?? button.dataset.taskRef ?? button.dataset.threadRef;
9161
+ if (ref !== void 0) onOpenRef(ref);
9162
+ }
8427
9163
  };
8428
9164
  root.addEventListener("click", openTask);
8429
9165
  return () => {
8430
9166
  root.removeEventListener("click", openTask);
8431
9167
  };
8432
- }, [richAgentBody, onOpenRef]);
9168
+ }, [
9169
+ richAgentBody,
9170
+ onOpenRef,
9171
+ onOpenMemberSession
9172
+ ]);
8433
9173
  const bodyNode = plan.render === "inline" && plan.inline !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8434
9174
  className: conversation_module_css_default.messageText,
8435
9175
  children: plan.inline.segments.map((segment, index) => segment.mention ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8436
9176
  className: conversation_module_css_default.mention,
8437
9177
  children: segment.text
8438
- }, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderRefs(segment.text, onOpenRef, taskLabel, refLabel) }, index))
9178
+ }, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderRefs(segment.text, onOpenRef, onOpenMemberSession, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf) }, index))
8439
9179
  }) : plan.render === "literal" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8440
9180
  className: conversation_module_css_default.messageText,
8441
- children: onOpenRef === void 0 ? displayBody : renderRefs(displayBody, onOpenRef, taskLabel, refLabel)
9181
+ children: onOpenRef === void 0 ? displayBody : renderRefs(displayBody, onOpenRef, onOpenMemberSession, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf)
8442
9182
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8443
9183
  ref: markdownRef,
8444
9184
  className: conversation_module_css_default.messageMarkdown,
@@ -8451,11 +9191,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8451
9191
  className: conversation_module_css_default.messageRow,
8452
9192
  "data-human": human || void 0,
8453
9193
  "data-grouped": grouped || void 0,
8454
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9194
+ children: [identityImage.src === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8455
9195
  className: conversation_module_css_default.messageIdentity,
9196
+ "data-avatar": "initial",
8456
9197
  style: avatarStyle,
8457
9198
  "aria-hidden": "true",
8458
9199
  children: senderName.replace("@", "").slice(0, 1).toUpperCase()
9200
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
9201
+ className: conversation_module_css_default.messageIdentityImage,
9202
+ "data-avatar": "image",
9203
+ src: identityImage.src,
9204
+ alt: "",
9205
+ "aria-hidden": "true",
9206
+ onError: identityImage.failed
8459
9207
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8460
9208
  className: conversation_module_css_default.messageBody,
8461
9209
  children: [
@@ -8545,28 +9293,77 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8545
9293
  button.textContent = label;
8546
9294
  return button;
8547
9295
  }
8548
- /** Replace a whole-ref code span with its resolved Task chip once known. */
8549
- function renderResolvedMarkdownCodeRef(code, taskLabel, refLabel) {
9296
+ /** One resolved Thread-ref chip built outside React, matching the styled ref link. */
9297
+ function resolvedThreadRefButton(threadRef, label) {
9298
+ const button = document.createElement("button");
9299
+ button.type = "button";
9300
+ if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
9301
+ button.dataset.threadRef = threadRef;
9302
+ button.title = threadRef;
9303
+ button.textContent = label;
9304
+ return button;
9305
+ }
9306
+ /** One roster-resolved Channel chip built outside React, matching the styled ref link. */
9307
+ function resolvedChannelRefButton(channelRef, label) {
9308
+ const button = document.createElement("button");
9309
+ button.type = "button";
9310
+ if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
9311
+ button.dataset.ref = channelRef;
9312
+ button.title = channelRef;
9313
+ button.textContent = label;
9314
+ return button;
9315
+ }
9316
+ /**
9317
+ * One roster-resolved Member chip built outside React. Openable Members jump
9318
+ * to their session through the delegated click listener; everyone else gets
9319
+ * a labelled but inert span, never a link-shaped misfire.
9320
+ */
9321
+ function resolvedMemberRefChip(memberRef, label, sessionId) {
9322
+ if (sessionId === void 0) {
9323
+ const span = document.createElement("span");
9324
+ span.title = memberRef;
9325
+ span.textContent = label;
9326
+ return span;
9327
+ }
9328
+ const button = document.createElement("button");
9329
+ button.type = "button";
9330
+ if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
9331
+ button.dataset.memberSession = sessionId;
9332
+ button.title = memberRef;
9333
+ button.textContent = label;
9334
+ return button;
9335
+ }
9336
+ /** Replace a whole-ref code span with its resolved chip once known. */
9337
+ function renderResolvedMarkdownCodeRef(code, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf) {
8550
9338
  const segments = splitBrandedRefs((code.textContent ?? "").trim());
8551
9339
  const ref = (segments.length === 1 ? segments[0] : void 0)?.ref;
8552
9340
  if (ref === void 0) return;
8553
- const taskRef = ref.startsWith("task:") === true ? ref : void 0;
8554
- const resolved = taskRef === void 0 ? void 0 : cachedResolvedTaskRef(taskRef);
8555
- if (taskRef !== void 0 && resolved === void 0) return;
8556
- if (taskRef !== void 0) {
8557
- code.replaceWith(resolvedTaskRefButton(taskRef, taskLabel(resolved.taskNumber)));
9341
+ if (ref.startsWith("task:")) {
9342
+ const resolved = cachedResolvedTaskRef(ref);
9343
+ if (resolved === void 0) return;
9344
+ code.replaceWith(resolvedTaskRefButton(ref, taskLabel(resolved.taskNumber)));
8558
9345
  return;
8559
9346
  }
8560
- const button = document.createElement("button");
8561
- button.type = "button";
8562
- if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
8563
- button.dataset.ref = ref;
8564
- button.title = ref;
8565
- button.textContent = refLabel(ref);
8566
- code.replaceWith(button);
9347
+ if (ref.startsWith("thread:")) {
9348
+ const resolved = cachedResolvedThreadRef(ref);
9349
+ if (resolved === void 0) return;
9350
+ code.replaceWith(resolvedThreadRefButton(ref, threadChipLabel(resolved.title)));
9351
+ return;
9352
+ }
9353
+ if (ref.startsWith("channel:")) {
9354
+ const name = channelNameOf?.(ref);
9355
+ if (name === void 0) return;
9356
+ code.replaceWith(resolvedChannelRefButton(ref, channelChipLabel(name)));
9357
+ return;
9358
+ }
9359
+ if (ref.startsWith("member:")) {
9360
+ const resolved = memberOf?.(ref);
9361
+ if (resolved === void 0) return;
9362
+ code.replaceWith(resolvedMemberRefChip(ref, memberChipLabel(resolved.handle), resolved.openable ? resolved.sessionId : void 0));
9363
+ }
8567
9364
  }
8568
- /** Replace resolved Task refs and structured mention handles in one prose text node without changing Markdown structure. */
8569
- function renderResolvedMarkdownText(node, mentionNames, taskLabel, refLabel) {
9365
+ /** Replace resolved Task/Thread/Channel/Member refs and structured mention handles in one prose text node without changing Markdown structure. */
9366
+ function renderResolvedMarkdownText(node, mentionNames, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf) {
8570
9367
  let changed = false;
8571
9368
  const fragment = document.createDocumentFragment();
8572
9369
  for (const refSegment of splitBrandedRefs(node.data)) {
@@ -8584,43 +9381,105 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8584
9381
  }
8585
9382
  continue;
8586
9383
  }
8587
- const taskRef = refSegment.ref.startsWith("task:") === true ? refSegment.ref : void 0;
8588
- const resolved = taskRef === void 0 ? void 0 : cachedResolvedTaskRef(taskRef);
8589
- if (taskRef !== void 0 && resolved === void 0) {
8590
- fragment.append(refSegment.text);
8591
- continue;
8592
- }
8593
- changed = true;
8594
- if (taskRef !== void 0) fragment.append(resolvedTaskRefButton(taskRef, taskLabel(resolved.taskNumber)));
8595
- else {
8596
- const button = document.createElement("button");
8597
- button.type = "button";
8598
- if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
8599
- button.dataset.ref = refSegment.ref;
8600
- button.title = refSegment.ref;
8601
- button.textContent = refLabel(refSegment.ref);
8602
- fragment.append(button);
8603
- }
9384
+ if (refSegment.ref.startsWith("task:")) {
9385
+ const resolved = cachedResolvedTaskRef(refSegment.ref);
9386
+ if (resolved === void 0) {
9387
+ fragment.append(refSegment.text);
9388
+ continue;
9389
+ }
9390
+ changed = true;
9391
+ fragment.append(resolvedTaskRefButton(refSegment.ref, taskLabel(resolved.taskNumber)));
9392
+ } else if (refSegment.ref.startsWith("thread:")) {
9393
+ const resolved = cachedResolvedThreadRef(refSegment.ref);
9394
+ if (resolved === void 0) {
9395
+ fragment.append(refSegment.text);
9396
+ continue;
9397
+ }
9398
+ changed = true;
9399
+ fragment.append(resolvedThreadRefButton(refSegment.ref, threadChipLabel(resolved.title)));
9400
+ } else if (refSegment.ref.startsWith("channel:")) {
9401
+ const name = channelNameOf?.(refSegment.ref);
9402
+ if (name === void 0) {
9403
+ fragment.append(refSegment.text);
9404
+ continue;
9405
+ }
9406
+ changed = true;
9407
+ fragment.append(resolvedChannelRefButton(refSegment.ref, channelChipLabel(name)));
9408
+ } else if (refSegment.ref.startsWith("member:")) {
9409
+ const resolved = memberOf?.(refSegment.ref);
9410
+ if (resolved === void 0) {
9411
+ fragment.append(refSegment.text);
9412
+ continue;
9413
+ }
9414
+ changed = true;
9415
+ fragment.append(resolvedMemberRefChip(refSegment.ref, memberChipLabel(resolved.handle), resolved.openable ? resolved.sessionId : void 0));
9416
+ } else fragment.append(refSegment.text);
8604
9417
  }
8605
9418
  if (changed) node.replaceWith(fragment);
8606
9419
  }
8607
9420
  /** Render one literal text run, linkifying branded refs when navigation is available. */
8608
- function renderRefs(text, onOpenRef, taskLabel, refLabel) {
9421
+ function renderRefs(text, onOpenRef, onOpenMemberSession, taskLabel, threadChipLabel, channelChipLabel, memberChipLabel, channelNameOf, memberOf) {
8609
9422
  if (onOpenRef === void 0) return text;
8610
9423
  return splitBrandedRefs(text).map((segment, index) => {
8611
9424
  if (segment.ref === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
8612
- const resolved = cachedResolvedTaskRef(segment.ref);
8613
- if (segment.ref.startsWith("task:") && resolved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
8614
- const label = resolved !== void 0 && segment.ref.startsWith("task:") ? taskLabel(resolved.taskNumber) : refLabel(segment.ref);
8615
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
8616
- type: "button",
8617
- className: conversation_module_css_default.refLink,
8618
- title: segment.ref,
8619
- onClick: () => {
8620
- onOpenRef(segment.ref);
8621
- },
8622
- children: label
8623
- }, index);
9425
+ if (segment.ref.startsWith("task:")) {
9426
+ const resolved = cachedResolvedTaskRef(segment.ref);
9427
+ if (resolved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
9428
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9429
+ type: "button",
9430
+ className: conversation_module_css_default.refLink,
9431
+ title: segment.ref,
9432
+ onClick: () => {
9433
+ onOpenRef(segment.ref);
9434
+ },
9435
+ children: taskLabel(resolved.taskNumber)
9436
+ }, index);
9437
+ }
9438
+ if (segment.ref.startsWith("thread:")) {
9439
+ const resolved = cachedResolvedThreadRef(segment.ref);
9440
+ if (resolved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
9441
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9442
+ type: "button",
9443
+ className: conversation_module_css_default.refLink,
9444
+ title: segment.ref,
9445
+ onClick: () => {
9446
+ onOpenRef(segment.ref);
9447
+ },
9448
+ children: threadChipLabel(resolved.title)
9449
+ }, index);
9450
+ }
9451
+ if (segment.ref.startsWith("channel:")) {
9452
+ const name = channelNameOf?.(segment.ref);
9453
+ if (name === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
9454
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9455
+ type: "button",
9456
+ className: conversation_module_css_default.refLink,
9457
+ title: segment.ref,
9458
+ onClick: () => {
9459
+ onOpenRef(segment.ref);
9460
+ },
9461
+ children: channelChipLabel(name)
9462
+ }, index);
9463
+ }
9464
+ if (segment.ref.startsWith("member:")) {
9465
+ const resolved = memberOf?.(segment.ref);
9466
+ if (resolved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
9467
+ if (!resolved.openable || resolved.sessionId === void 0 || onOpenMemberSession === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9468
+ title: segment.ref,
9469
+ children: memberChipLabel(resolved.handle)
9470
+ }, index);
9471
+ const sessionId = resolved.sessionId;
9472
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9473
+ type: "button",
9474
+ className: conversation_module_css_default.refLink,
9475
+ title: segment.ref,
9476
+ onClick: () => {
9477
+ onOpenMemberSession(sessionId);
9478
+ },
9479
+ children: memberChipLabel(resolved.handle)
9480
+ }, index);
9481
+ }
9482
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
8624
9483
  });
8625
9484
  }
8626
9485
  /** One message's attachment strip: image thumbnails with a large view, or name chips when bytes are gone. */
@@ -8695,7 +9554,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8695
9554
  }
8696
9555
  //#endregion
8697
9556
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/avatar-stack.module.css.mjs
8698
- const css$5 = ".aACNsW_stack{flex:none;align-items:center;display:inline-flex}.aACNsW_avatar,.aACNsW_overflow{box-shadow:0 0 0 2px var(--team-mark-ring,var(--dsw-alias-bg-base));corner-shape:round;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;font-size:9px;font-weight:600;display:inline-flex}.aACNsW_avatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff}.aACNsW_overflow{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.aACNsW_avatar+.aACNsW_avatar,.aACNsW_avatar+.aACNsW_overflow{margin-left:-6px}";
9557
+ const css$5 = ".aACNsW_stack{flex:none;align-items:center;display:inline-flex}.aACNsW_avatar,.aACNsW_avatarImage,.aACNsW_overflow{box-shadow:0 0 0 2px var(--team-mark-ring,var(--dsw-alias-bg-base)), 0 0 0 2px var(--dsw-alias-bg-base);corner-shape:round;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;font-size:9px;font-weight:600;display:inline-flex}.aACNsW_avatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff}.aACNsW_avatarImage{background:hsl(var(--team-avatar-hue,212) 42% 46%);object-fit:cover}.aACNsW_overflow{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.aACNsW_stack>:not(:first-child){margin-left:-6px}";
8699
9558
  const tagId$5 = "@wowyuarm/dsh-agent-team/avatar-stack.module.css";
8700
9559
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
8701
9560
  const tag = document.createElement("style");
@@ -8706,6 +9565,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8706
9565
  }
8707
9566
  var avatar_stack_module_css_default = {
8708
9567
  "avatar": "aACNsW_avatar",
9568
+ "avatarImage": "aACNsW_avatarImage",
8709
9569
  "overflow": "aACNsW_overflow",
8710
9570
  "stack": "aACNsW_stack"
8711
9571
  };
@@ -8714,12 +9574,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8714
9574
  /** Distinct owners past this count collapse into one `+N` chip. */
8715
9575
  const MAX_VISIBLE = 3;
8716
9576
  /**
9577
+ * Owners as a seat names them: the Client's Human identity outranks the name
9578
+ * the Host projected for that actor, so a rename moves label and initial
9579
+ * together in every seat that draws the stack.
9580
+ */
9581
+ function namedAvatarOwners(owners, human) {
9582
+ if (human === void 0) return owners;
9583
+ return owners.map((owner) => owner.memberId === human.memberId ? {
9584
+ memberId: owner.memberId,
9585
+ name: human.name
9586
+ } : owner);
9587
+ }
9588
+ /**
8717
9589
  * The compact "who is on this work" stack: overlapping 18px Member circles in
8718
9590
  * the shared identity language, capped at three plus a `+N` chip. The circles
8719
9591
  * are presentational, so the stack is one `role="img"` whose label carries the
8720
9592
  * whole roster — three anonymous initials would read as noise.
8721
9593
  */
8722
- function TeamAvatarStack({ owners, label }) {
9594
+ function TeamAvatarStack({ owners, label, human }) {
8723
9595
  if (owners.length === 0) return null;
8724
9596
  const shown = owners.slice(0, MAX_VISIBLE);
8725
9597
  const overflow = owners.length - shown.length;
@@ -8727,16 +9599,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8727
9599
  className: avatar_stack_module_css_default.stack,
8728
9600
  role: "img",
8729
9601
  "aria-label": label,
8730
- children: [shown.map((owner) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8731
- className: avatar_stack_module_css_default.avatar,
8732
- style: { "--team-avatar-hue": memberHue(owner.memberId) },
8733
- children: initial(owner.name)
9602
+ children: [shown.map((owner) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OwnerAvatar, {
9603
+ owner,
9604
+ human
8734
9605
  }, owner.memberId)), overflow > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8735
9606
  className: avatar_stack_module_css_default.overflow,
8736
9607
  children: `+${overflow}`
8737
9608
  })]
8738
9609
  });
8739
9610
  }
9611
+ /**
9612
+ * One circle. Only an owner the seat identifies as the Human consults an image
9613
+ * at all, and those bytes keep the initial whenever they do not decode — the
9614
+ * same promise, and the same hook, the timeline avatar makes.
9615
+ */
9616
+ function OwnerAvatar({ owner, human }) {
9617
+ const image = useAvatarImage(human !== void 0 && owner.memberId === human.memberId ? human.avatarUrl : void 0);
9618
+ const hue = { "--team-avatar-hue": memberHue(owner.memberId) };
9619
+ if (image.src === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9620
+ className: avatar_stack_module_css_default.avatar,
9621
+ style: hue,
9622
+ children: initial(owner.name)
9623
+ });
9624
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
9625
+ className: avatar_stack_module_css_default.avatarImage,
9626
+ style: hue,
9627
+ src: image.src,
9628
+ alt: "",
9629
+ "aria-hidden": "true",
9630
+ onError: image.failed
9631
+ });
9632
+ }
8740
9633
  /** First visible character of a handle — and of a raw Member id when that is all there is. */
8741
9634
  function initial(name) {
8742
9635
  return name.replace(/^@/, "").replace(/^member:/, "").slice(0, 1).toUpperCase();
@@ -8984,7 +9877,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8984
9877
  };
8985
9878
  //#endregion
8986
9879
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/thread.module.css.mjs
8987
- const css$2 = ".-Qiwua_titleLine{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.-Qiwua_titleLine h1{margin:0}.-Qiwua_workSection{border-top:1px solid var(--dsw-alias-border-l2);max-width:880px;margin:12px auto 0;padding-top:8px}.-Qiwua_riskSection{border-top:1px solid var(--dsw-alias-border-l2);max-width:880px;margin:12px auto 0;padding-top:10px}.-Qiwua_riskSection h2{color:var(--dsw-alias-state-error-primary);margin:0 0 5px;font-size:12px;font-weight:600;line-height:18px}.-Qiwua_riskRow{color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;margin:3px 0;font-size:12px;line-height:18px;display:flex}.-Qiwua_claimList{gap:4px;padding:4px 0 2px 22px;display:grid}.-Qiwua_claimRow{border-radius:6px;grid-template-columns:14px minmax(96px,auto) minmax(0,1fr) auto auto;align-items:center;gap:4px 8px;min-height:36px;padding:4px 6px;display:grid}.-Qiwua_claimRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.-Qiwua_claimOwner{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500;line-height:18px;overflow:hidden}.-Qiwua_claimDirection{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;min-width:0;font-size:12px;line-height:18px}.-Qiwua_claimState{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px;line-height:18px}.-Qiwua_emptyClaims{color:var(--dsw-alias-label-tertiary);margin:0;padding:5px 6px;font-size:11px;line-height:18px}.-Qiwua_activityRow{color:var(--dsw-alias-label-tertiary);text-align:center;justify-content:center;align-items:center;gap:8px;max-width:100%;margin:4px auto;padding:5px 12px;font-size:11px;line-height:18px;display:flex}.-Qiwua_activityText{overflow-wrap:anywhere;min-width:0}.-Qiwua_activityMark{background:var(--dsw-alias-border-l3);corner-shape:round;border-radius:50%;flex:0 0 5px;width:5px;height:5px}.-Qiwua_activityRow:has(+.-Qiwua_activityRow),.-Qiwua_activityRow+.-Qiwua_activityRow{text-align:left;justify-content:flex-start;padding-left:38px}.-Qiwua_historySection{border-bottom:1px solid var(--dsw-alias-border-l2);max-width:100%;margin:0 auto 12px;padding-bottom:10px}.-Qiwua_historySection h2{color:var(--dsw-alias-label-tertiary);letter-spacing:.02em;text-transform:uppercase;margin:0 0 4px;font-size:11px;font-weight:600;line-height:16px}.-Qiwua_publicSection{min-width:0}.-Qiwua_unreadBoundary{color:var(--dsw-alias-label-tertiary);align-items:center;gap:10px;margin:10px 0 6px;font-size:11px;line-height:16px;display:flex}.-Qiwua_unreadBoundary:before,.-Qiwua_unreadBoundary:after{background:var(--dsw-alias-border-l3);content:\"\";flex:1;height:1px}.-Qiwua_unreadBoundary span{flex:none}.-Qiwua_daySeparator{color:var(--dsw-alias-label-tertiary);letter-spacing:.02em;align-items:center;gap:10px;margin:12px 0 4px;font-size:11px;line-height:16px;display:flex}.-Qiwua_daySeparator:before,.-Qiwua_daySeparator:after{background:var(--dsw-alias-border-l2);content:\"\";flex:1;height:1px}.-Qiwua_daySeparator span{flex:none}.-Qiwua_newUpdates{background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));border:1px solid var(--dsw-alias-border-l2-darkmode-thin);corner-shape:round;box-shadow:var(--dsw-shadow-lv2);z-index:2;border-radius:999px;justify-content:center;align-items:center;width:fit-content;margin:8px auto;padding:4px 12px;font-size:12px;line-height:18px;display:flex;position:sticky;bottom:8px}.-Qiwua_newUpdatesJump{color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;line-height:inherit;background:0 0;border:0;padding:0}.-Qiwua_newUpdatesJump:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px;border-radius:6px}.-Qiwua_taskTitle{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin:2px 0 0;font-size:13px;line-height:20px;display:-webkit-box;overflow:hidden}.-Qiwua_closedBar{flex-direction:column;align-items:center;display:flex}.-Qiwua_closedNotice{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;padding:10px 16px 14px;font-size:13px;line-height:20px;display:flex}@media (width<=600px){.-Qiwua_claimRow{grid-template-columns:14px minmax(0,1fr) auto;align-items:start}.-Qiwua_claimState{grid-area:1/3;justify-self:end}.-Qiwua_claimDirection{grid-column:2/-1}.-Qiwua_activityRow{padding-inline:0}.-Qiwua_newUpdates{max-width:calc(100% - 16px)}}";
9880
+ const css$2 = ".-Qiwua_titleLine{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.-Qiwua_titleLine h1{margin:0}.-Qiwua_workSection,.-Qiwua_riskSection{max-width:880px;margin:14px auto 0}.-Qiwua_riskSection h2{color:var(--dsw-alias-state-error-primary);margin:0 0 6px;font-size:12px;font-weight:600;line-height:18px}.-Qiwua_riskRow{color:var(--dsw-alias-label-secondary);flex-wrap:nowrap;align-items:center;gap:6px;min-width:0;margin:0 0 2px;font-size:11px;line-height:16px;display:flex;overflow:hidden}.-Qiwua_riskRow>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.-Qiwua_riskClass{color:var(--dsw-alias-state-error-primary);font-weight:600}.-Qiwua_claimList{gap:0;padding:4px 0 0 22px;display:grid}.-Qiwua_claimRow{border-radius:6px;grid-template-columns:14px minmax(0,1fr) auto;align-items:center;column-gap:8px;min-height:30px;padding:3px 6px 5px;display:grid}.-Qiwua_claimRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.-Qiwua_claimOwner{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;grid-area:1/2;align-items:center;gap:4px;min-width:0;font-size:11px;font-weight:500;line-height:16px;display:inline-flex;overflow:hidden}.-Qiwua_claimDirection{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;grid-area:2/2;min-width:0;font-size:12px;line-height:18px}.-Qiwua_claimRowDone .-Qiwua_claimDirection{color:var(--dsw-alias-label-secondary)}.-Qiwua_claimState{color:var(--dsw-alias-label-tertiary);white-space:nowrap;grid-area:1/3;font-size:11px;line-height:18px}.-Qiwua_emptyClaims{color:var(--dsw-alias-label-tertiary);margin:0;padding:5px 6px;font-size:11px;line-height:18px}.-Qiwua_activityRow{color:var(--dsw-alias-label-tertiary);text-align:center;justify-content:center;align-items:center;gap:8px;max-width:100%;margin:4px auto;padding:5px 12px;font-size:11px;line-height:18px;display:flex}.-Qiwua_activityText{overflow-wrap:anywhere;min-width:0}.-Qiwua_activityMark{background:var(--dsw-alias-border-l3);corner-shape:round;border-radius:50%;flex:0 0 5px;width:5px;height:5px}.-Qiwua_activityRow:has(+.-Qiwua_activityRow),.-Qiwua_activityRow+.-Qiwua_activityRow{text-align:left;justify-content:flex-start;padding-left:38px}.-Qiwua_historySection{border-bottom:1px solid var(--dsw-alias-border-l2);max-width:100%;margin:0 auto 12px;padding-bottom:10px}.-Qiwua_historySection h2{color:var(--dsw-alias-label-tertiary);letter-spacing:.02em;text-transform:uppercase;margin:0 0 4px;font-size:11px;font-weight:600;line-height:16px}.-Qiwua_publicSection{min-width:0}.-Qiwua_unreadBoundary{color:var(--dsw-alias-label-tertiary);align-items:center;gap:10px;margin:10px 0 6px;font-size:11px;line-height:16px;display:flex}.-Qiwua_unreadBoundary:before,.-Qiwua_unreadBoundary:after{background:var(--dsw-alias-border-l3);content:\"\";flex:1;height:1px}.-Qiwua_unreadBoundary span{flex:none}.-Qiwua_daySeparator{color:var(--dsw-alias-label-tertiary);letter-spacing:.02em;align-items:center;gap:10px;margin:12px 0 4px;font-size:11px;line-height:16px;display:flex}.-Qiwua_daySeparator:before,.-Qiwua_daySeparator:after{background:var(--dsw-alias-border-l2);content:\"\";flex:1;height:1px}.-Qiwua_daySeparator span{flex:none}.-Qiwua_newUpdates{background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));border:1px solid var(--dsw-alias-border-l2-darkmode-thin);corner-shape:round;box-shadow:var(--dsw-shadow-lv2);z-index:2;border-radius:999px;justify-content:center;align-items:center;width:fit-content;margin:8px auto;padding:4px 12px;font-size:12px;line-height:18px;display:flex;position:sticky;bottom:8px}.-Qiwua_newUpdatesJump{color:var(--dsw-alias-label-secondary);cursor:pointer;font:inherit;line-height:inherit;background:0 0;border:0;padding:0}.-Qiwua_newUpdatesJump:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px;border-radius:6px}.-Qiwua_taskTitle{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:1;line-clamp:1;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin:2px 0 0;font-size:13px;line-height:20px;display:-webkit-box;overflow:hidden}.-Qiwua_closedBar{flex-direction:column;align-items:center;display:flex}.-Qiwua_closedNotice{color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;padding:10px 16px 14px;font-size:13px;line-height:20px;display:flex}@media (width<=600px){.-Qiwua_claimRow{align-items:start}.-Qiwua_activityRow{padding-inline:0}.-Qiwua_newUpdates{max-width:calc(100% - 16px)}}";
8988
9881
  const tagId$2 = "@wowyuarm/dsh-agent-team/thread.module.css";
8989
9882
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
8990
9883
  const tag = document.createElement("style");
@@ -9001,6 +9894,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9001
9894
  "claimList": "-Qiwua_claimList",
9002
9895
  "claimOwner": "-Qiwua_claimOwner",
9003
9896
  "claimRow": "-Qiwua_claimRow",
9897
+ "claimRowDone": "-Qiwua_claimRowDone",
9004
9898
  "claimState": "-Qiwua_claimState",
9005
9899
  "closedBar": "-Qiwua_closedBar",
9006
9900
  "closedNotice": "-Qiwua_closedNotice",
@@ -9010,6 +9904,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9010
9904
  "newUpdates": "-Qiwua_newUpdates",
9011
9905
  "newUpdatesJump": "-Qiwua_newUpdatesJump",
9012
9906
  "publicSection": "-Qiwua_publicSection",
9907
+ "riskClass": "-Qiwua_riskClass",
9013
9908
  "riskRow": "-Qiwua_riskRow",
9014
9909
  "riskSection": "-Qiwua_riskSection",
9015
9910
  "taskTitle": "-Qiwua_taskTitle",
@@ -9044,11 +9939,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9044
9939
  const lastActivityAt = item.lastActivityAt;
9045
9940
  return lastActivityAt === void 0 || lastActivityAt === item.message.occurredAt ? void 0 : lastActivityAt;
9046
9941
  }
9942
+ /**
9943
+ * What the door prints about follow-up activity, or nothing. A resolved Task
9944
+ * stops printing it: the status word beside the door already says nothing is
9945
+ * moving, and the instant it would print is the moment it resolved — repeated
9946
+ * on every finished row. The precise instant stays on the control's title, one
9947
+ * hover away. A taskless Thread never resolves, so a discussion keeps the
9948
+ * recency that is the whole of its state line: it wears no status word, dot, or
9949
+ * owner stack.
9950
+ */
9951
+ function printedActivityAt(item) {
9952
+ const status = item.task?.status;
9953
+ return status === "done" || status === "closed" ? void 0 : followUpAt(item);
9954
+ }
9047
9955
  /** Host unread per Thread, keyed for the feed's rows: zero unread is the absence of a badge, not a row. */
9048
9956
  function unreadCounts(inbox) {
9049
9957
  return new Map(inbox.items.filter((item) => item.unreadCount > 0).map((item) => [item.thread.threadRef, item.unreadCount]));
9050
9958
  }
9051
- function TeamChannelPage({ workspaceId, channelRef, loadChannels, subscribeChanges, loadMembers, loadInbox, drafts, putAttachment, getAttachment, sendMessage, joinChannel, removeChannelMember, selectThread, selectChannel, backToChannels, resolveTaskRefs, t }) {
9959
+ function TeamChannelPage({ workspaceId, channelRef, humanName, humanAvatarUrl, loadChannels, subscribeChanges, loadMembers, loadInbox, drafts, putAttachment, getAttachment, sendMessage, joinChannel, removeChannelMember, selectThread, selectChannel, backToChannels, resolveTaskRefs, resolveThreadRefs, openMemberSession, t }) {
9052
9960
  const [view, setView] = (0, react.useState)();
9053
9961
  const [members, setMembers] = (0, react.useState)([]);
9054
9962
  const [unreadByThread, setUnreadByThread] = (0, react.useState)(/* @__PURE__ */ new Map());
@@ -9080,19 +9988,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9080
9988
  selectThread(match.thread.threadRef, channelRef, match.task?.taskRef, match.taskNumber);
9081
9989
  return;
9082
9990
  }
9083
- loadChannels({
9084
- workspaceId,
9085
- threadRef: ref,
9086
- includeActivities: false,
9087
- limit: 1
9088
- }).then((result) => {
9089
- if (!result.ok) return;
9090
- const target = result.value.items[0];
9091
- if (target !== void 0) {
9092
- const targetChannel = result.value.channels.find((channel) => channel.channelRef === target.message.channelRef);
9093
- if (targetChannel !== void 0) selectThread(target.thread.threadRef, targetChannel.channelRef, target.task?.taskRef, target.taskNumber);
9094
- }
9095
- });
9991
+ jumpToThread(resolveThreadRefs, workspaceId, ref, selectThread);
9096
9992
  return;
9097
9993
  }
9098
9994
  if (ref.startsWith("task:")) {
@@ -9105,6 +10001,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9105
10001
  }
9106
10002
  };
9107
10003
  const lookupTaskRefs = hostTaskRefLookup(resolveTaskRefs, workspaceId);
10004
+ const lookupThreadRefs = hostThreadRefLookup(resolveThreadRefs, workspaceId);
10005
+ const rosterKey = (0, react.useMemo)(() => [
10006
+ (view?.channels ?? []).map((channel) => `${channel.channelRef}=${channel.name}=${channel.state}`).join(","),
10007
+ members.map((status) => `${status.member.memberId}=${status.member.handle}=${status.member.sessionId}=${status.availability}`).join(","),
10008
+ view?.humanMemberId ?? ""
10009
+ ].join(";"), [view, members]);
10010
+ const channelNameOf = (0, react.useMemo)(() => {
10011
+ const channels = view?.channels ?? [];
10012
+ return (ref) => rosterChannelName(channels, ref);
10013
+ }, [rosterKey]);
10014
+ const memberOf = (0, react.useMemo)(() => {
10015
+ const humanMemberId = view?.humanMemberId;
10016
+ return (ref) => rosterMember(members, humanMemberId, humanName, ref);
10017
+ }, [rosterKey, humanName]);
10018
+ const humanMemberId = view?.humanMemberId;
10019
+ const humanIdentity = humanMemberId === void 0 ? void 0 : {
10020
+ memberId: humanMemberId,
10021
+ name: humanName,
10022
+ ...humanAvatarUrl === void 0 ? {} : { avatarUrl: humanAvatarUrl }
10023
+ };
9108
10024
  const timeline = useTimelineScroll(`${view?.items.length ?? 0}:${channelLastItem?.message.messageRef ?? ""}`);
9109
10025
  const channel = view?.channels.find((item) => item.channelRef === channelRef);
9110
10026
  const channelMemberIds = new Set(view?.members.filter((item) => item.channelRef === channelRef).map((item) => item.memberId) ?? []);
@@ -9322,7 +10238,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9322
10238
  className: conversation_module_css_default.backRow,
9323
10239
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
9324
10240
  size: "sm",
9325
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, {}),
10241
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutline14, {}),
9326
10242
  onClick: backToChannels,
9327
10243
  children: t("backToChannels")
9328
10244
  })
@@ -9450,7 +10366,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9450
10366
  children: block.items.map((item, index) => {
9451
10367
  const senderStatus = members.find((member) => member.member.memberId === item.message.sender);
9452
10368
  const human = item.message.sender === view.humanMemberId;
9453
- const sender = human ? t("human") : senderStatus?.member.handle ?? item.message.sender;
10369
+ const sender = human ? humanName : senderStatus?.member.handle ?? item.message.sender;
9454
10370
  const turnGap = isRunGap(index > 0 ? block.items[index - 1].message.occurredAt : void 0, item.message.occurredAt);
9455
10371
  const task = item.task;
9456
10372
  const unread = unreadByThread.get(item.thread.threadRef) ?? 0;
@@ -9458,14 +10374,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9458
10374
  senderName: sender,
9459
10375
  memberId: item.message.sender,
9460
10376
  human,
10377
+ ...humanAvatarUrl === void 0 ? {} : { avatarUrl: humanAvatarUrl },
9461
10378
  body: item.message.body,
9462
10379
  attachments: item.message.attachments,
9463
10380
  loadAttachment: getAttachment,
9464
10381
  t,
9465
10382
  occurredAt: item.message.occurredAt,
9466
- mentionNames: mentionNamesOf(item.mentions, handleByMember),
10383
+ mentionNames: mentionNamesOf(item.mentions, handleByMember, humanName),
9467
10384
  onOpenRef: openRef,
9468
10385
  onResolveTaskRefs: lookupTaskRefs,
10386
+ onResolveThreadRefs: lookupThreadRefs,
10387
+ channelNameOf,
10388
+ memberOf,
10389
+ onOpenMemberSession: openMemberSession,
9469
10390
  grouped: index > 0,
9470
10391
  showGroupedTime: item.message.topLevel === true && !turnGap,
9471
10392
  ...senderStatus === void 0 ? {} : { senderTitle: senderStatus.member.description },
@@ -9473,6 +10394,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9473
10394
  item,
9474
10395
  owners: item.claimOwners,
9475
10396
  unread,
10397
+ human: humanIdentity,
9476
10398
  t,
9477
10399
  onOpen: () => {
9478
10400
  selectThread(item.thread.threadRef, channelRef, task?.taskRef, item.taskNumber);
@@ -9513,14 +10435,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9513
10435
  * carried nothing else. The unread capsule is the only member a taskless
9514
10436
  * discussion can carry: it needs no Task.
9515
10437
  */
9516
- function ThreadStateCluster({ task, owners, unread, t }) {
10438
+ function ThreadStateCluster({ task, owners, unread, human, t }) {
9517
10439
  if (task === void 0 && unread === 0) return null;
10440
+ const namedOwners = namedAvatarOwners(owners, human);
9518
10441
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9519
10442
  className: conversation_module_css_default.stateCluster,
9520
10443
  children: [
9521
10444
  task !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamAvatarStack, {
9522
- owners,
9523
- label: claimersLabel(owners, t)
10445
+ owners: namedOwners,
10446
+ label: claimersLabel(namedOwners, t),
10447
+ human
9524
10448
  }),
9525
10449
  task !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamStateDot, {
9526
10450
  size: 8,
@@ -9538,16 +10462,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9538
10462
  * The gate under one top-level Message: the single row that opens its Thread,
9539
10463
  * and the one line that says what stands there. State leads it, then what the
9540
10464
  * entry is: a Task entry keeps its number so the status word never floats free
9541
- * of the Task it describes, follow-up activity adds when the work last moved,
9542
- * and an unanswered Thread says only 回复. The instant uses the Inbox's own
9543
- * 今天/昨天 form with the precise local time on the control's title, and an
9544
- * unread Thread says so in the control's label rather than only in pixels.
10465
+ * of the Task it describes, follow-up activity adds when the work last moved —
10466
+ * while the work is still unfinished — and an unanswered Thread says only 回复.
10467
+ * The instant uses the Inbox's own 今天/昨天 form with the precise local time on
10468
+ * the control's title, and an unread Thread says so in the control's label
10469
+ * rather than only in pixels.
9545
10470
  */
9546
- function ThreadEntryRow({ item, owners, unread, t, onOpen }) {
10471
+ function ThreadEntryRow({ item, owners, unread, human, t, onOpen }) {
9547
10472
  const taskNumber = item.taskNumber;
9548
10473
  const followUp = followUpAt(item);
10474
+ const printedActivity = printedActivityAt(item);
9549
10475
  const label = taskNumber !== void 0 ? t("taskLabel", { number: taskNumber }) : followUp === void 0 ? t("replyAction") : t("threadLabel");
9550
- const text = followUp === void 0 ? label : `${label} · ${t("recentActivity", { time: formatInboxTime(followUp, t) })}`;
10476
+ const text = printedActivity === void 0 ? label : `${label} · ${t("recentActivity", { time: formatInboxTime(printedActivity, t) })}`;
9551
10477
  const openLabel = taskNumber === void 0 ? unread > 0 ? t("openThreadUnread", { count: unread }) : t("openThread") : unread > 0 ? t("openTaskUnread", {
9552
10478
  number: taskNumber,
9553
10479
  count: unread
@@ -9559,6 +10485,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9559
10485
  task: item.task,
9560
10486
  owners,
9561
10487
  unread,
10488
+ human,
9562
10489
  t
9563
10490
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9564
10491
  type: "button",
@@ -9569,14 +10496,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9569
10496
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: text }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9570
10497
  className: conversation_module_css_default.entryArrow,
9571
10498
  "aria-hidden": "true",
9572
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 12 })
10499
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutline14, { size: 12 })
9573
10500
  })]
9574
10501
  })]
9575
10502
  });
9576
10503
  }
9577
10504
  //#endregion
9578
10505
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/inbox.module.css.mjs
9579
- const css$1 = ".s2ibaa_list{flex-direction:column;gap:2px;display:flex}.s2ibaa_headerMeta{font-variant-numeric:tabular-nums;flex-wrap:wrap;align-items:baseline;gap:0 10px;display:flex;overflow:hidden}.s2ibaa_headerUnread{color:var(--dsw-alias-label-primary);font-weight:600}.s2ibaa_row{color:inherit;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;border-radius:8px;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:1px 8px;width:100%;padding:8px;display:grid}.s2ibaa_row:hover,.s2ibaa_row:focus-visible{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover)}.s2ibaa_row:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.s2ibaa_rowActor{grid-area:1/1;display:flex}.s2ibaa_rowLine{grid-area:1/2;align-items:baseline;gap:2px 8px;min-width:0;display:flex;container-type:inline-size}.s2ibaa_rowCrumb{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:13px;line-height:20px;overflow:hidden}.s2ibaa_rowWorkspace{color:var(--dsw-alias-label-tertiary);font-size:12px}.s2ibaa_rowChannel{color:var(--dsw-alias-label-primary);font-weight:600}.s2ibaa_rowTask{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);white-space:nowrap;border-radius:6px;flex:none;margin-left:3px;padding:0 5px;font-size:11px;font-weight:600;line-height:15px}.s2ibaa_rowTime{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;font-size:11px;line-height:18px}@container (width<=70px){.s2ibaa_rowTime{display:none}}.s2ibaa_rowPreview{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;grid-area:2/2;min-width:0;font-size:13px;line-height:20px;overflow:hidden}.s2ibaa_section{flex-direction:column;display:flex}.s2ibaa_section+.s2ibaa_section{margin-top:20px}.s2ibaa_sectionTitle{color:var(--dsw-alias-label-tertiary);margin:0 0 4px;padding:0 8px 0 34px;font-size:12px;font-weight:600;line-height:18px}.s2ibaa_sectionCount{font-variant-numeric:tabular-nums;margin-left:6px}";
10506
+ const css$1 = ".s2ibaa_list{flex-direction:column;gap:2px;display:flex}.s2ibaa_headerMeta{font-variant-numeric:tabular-nums;flex-wrap:wrap;align-items:baseline;gap:0 10px;display:flex;overflow:hidden}.s2ibaa_headerUnread{color:var(--dsw-alias-label-primary);font-weight:600}.s2ibaa_row{color:inherit;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;border-radius:8px;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:1px 8px;width:100%;padding:8px;display:grid}.s2ibaa_row:hover,.s2ibaa_row:focus-visible{--team-mark-ring:var(--dsw-alias-interactive-bg-hover);background:var(--dsw-alias-interactive-bg-hover)}.s2ibaa_row:focus-visible{outline:2px solid var(--dsw-alias-label-primary);outline-offset:-2px}.s2ibaa_rowActor{grid-area:1/1;display:flex}.s2ibaa_rowLine{grid-area:1/2;align-items:baseline;gap:2px 8px;min-width:0;display:flex}.s2ibaa_rowCrumb{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:13px;line-height:20px;overflow:hidden}.s2ibaa_rowWorkspace{color:var(--dsw-alias-label-tertiary);font-size:12px}.s2ibaa_rowChannel{color:var(--dsw-alias-label-primary);font-weight:600}.s2ibaa_rowTask{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);white-space:nowrap;border-radius:6px;flex:none;margin-left:3px;padding:0 5px;font-size:11px;font-weight:600;line-height:15px}.s2ibaa_rowTime{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;font-size:11px;line-height:18px}.s2ibaa_rowPreview{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;grid-area:2/2;min-width:0;font-size:13px;line-height:20px;overflow:hidden}.s2ibaa_section{flex-direction:column;display:flex}.s2ibaa_section+.s2ibaa_section{margin-top:20px}.s2ibaa_sectionTitle{color:var(--dsw-alias-label-tertiary);margin:0 0 4px;padding:0 8px 0 34px;font-size:12px;font-weight:600;line-height:18px}.s2ibaa_sectionCount{font-variant-numeric:tabular-nums;margin-left:6px}";
9580
10507
  const tagId$1 = "@wowyuarm/dsh-agent-team/inbox.module.css";
9581
10508
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
9582
10509
  const tag = document.createElement("style");
@@ -9636,10 +10563,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9636
10563
  * holding unread is only ever in the queue: the Host already excludes it from
9637
10564
  * the tail, and this page never re-derives that judgement.
9638
10565
  */
9639
- function TeamInboxPage({ useWorkspaces, loadInbox, subscribeChanges, selectWorkspace, selectThread, t }) {
10566
+ function TeamInboxPage({ useWorkspaces, loadInbox, subscribeChanges, selectWorkspace, selectThread, humanName, humanAvatarUrl, t }) {
9640
10567
  const workspaces = useWorkspaces((state) => state.items);
9641
10568
  const [rows, setRows] = (0, react.useState)();
9642
10569
  const [recentRows, setRecentRows] = (0, react.useState)([]);
10570
+ const [humanMemberId, setHumanMemberId] = (0, react.useState)();
9643
10571
  const [loading, setLoading] = (0, react.useState)(true);
9644
10572
  const [error, setError] = (0, react.useState)();
9645
10573
  const loadedRef = (0, react.useRef)(false);
@@ -9655,13 +10583,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9655
10583
  workspaceId: workspace.workspaceId,
9656
10584
  workspaceTitle: workspace.title,
9657
10585
  items: result.value.items,
9658
- recent: result.value.recent
10586
+ recent: result.value.recent,
10587
+ humanMemberId: result.value.humanMemberId
9659
10588
  } : {
9660
10589
  ok: false,
9661
10590
  message: result.error.message
9662
10591
  };
9663
10592
  }));
9664
10593
  const failure = results.find((result) => !result.ok);
10594
+ setHumanMemberId(results.find((result) => result.ok)?.humanMemberId);
9665
10595
  const asRows = (items, workspaceId, workspaceTitle) => items.map((item) => ({
9666
10596
  workspaceId,
9667
10597
  workspaceTitle,
@@ -9693,6 +10623,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9693
10623
  for (const row of rows ?? []) shownWorkspaces.add(row.workspaceTitle);
9694
10624
  for (const row of recentRows) shownWorkspaces.add(row.workspaceTitle);
9695
10625
  const showWorkspace = shownWorkspaces.size > 1;
10626
+ const human = humanMemberId === void 0 ? void 0 : {
10627
+ memberId: humanMemberId,
10628
+ name: humanName,
10629
+ ...humanAvatarUrl === void 0 ? {} : { avatarUrl: humanAvatarUrl }
10630
+ };
9696
10631
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("main", {
9697
10632
  className: conversation_module_css_default.surface,
9698
10633
  "data-team-inbox": true,
@@ -9762,6 +10697,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9762
10697
  row,
9763
10698
  t,
9764
10699
  showWorkspace,
10700
+ human,
9765
10701
  onOpen: () => {
9766
10702
  open(row);
9767
10703
  }
@@ -9781,6 +10717,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9781
10717
  row,
9782
10718
  t,
9783
10719
  showWorkspace,
10720
+ human,
9784
10721
  onOpen: () => {
9785
10722
  open(row);
9786
10723
  }
@@ -9819,10 +10756,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9819
10756
  * because a second visible count beside the first would cost the row the one
9820
10757
  * thing it needs to stay scannable.
9821
10758
  */
9822
- function InboxQueueRow({ row, t, showWorkspace, onOpen }) {
10759
+ function InboxQueueRow({ row, t, showWorkspace, human, onOpen }) {
9823
10760
  const { item } = row;
9824
10761
  const actor = item.newestActor;
9825
10762
  const owners = item.claimOwners;
10763
+ const namedOwners = namedAvatarOwners(owners, human);
10764
+ const namedActor = namedAvatarOwners([actor], human)[0];
9826
10765
  const named = item.directCount > 0;
9827
10766
  const countLabel = named ? t("inboxRowUnreadMentions", {
9828
10767
  count: item.unreadCount,
@@ -9837,11 +10776,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9837
10776
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9838
10777
  className: inbox_module_css_default.rowActor,
9839
10778
  children: owners.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamAvatarStack, {
9840
- owners,
9841
- label: claimersLabel(owners, t)
10779
+ owners: namedOwners,
10780
+ label: claimersLabel(namedOwners, t),
10781
+ human
9842
10782
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamAvatarStack, {
9843
- owners: [actor],
9844
- label: t("inboxRowActor", { name: `@${actor.name}` })
10783
+ owners: [namedActor],
10784
+ label: t("inboxRowActor", { name: `@${namedActor.name}` }),
10785
+ human
9845
10786
  })
9846
10787
  }),
9847
10788
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
@@ -9908,10 +10849,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9908
10849
  * what keeps a memoized row from re-rendering on every refresh.
9909
10850
  */
9910
10851
  const mentionNamesCache = /* @__PURE__ */ new WeakMap();
9911
- function stableMentionNames(mentions, handles) {
9912
- const names = mentionNamesOf(mentions, handles);
10852
+ function stableMentionNames(mentions, handles, humanName) {
10853
+ const names = mentionNamesOf(mentions, handles, humanName);
9913
10854
  const cached = mentionNamesCache.get(mentions);
9914
- if (cached !== void 0 && cached.length === names.length && cached.every((name, index) => name === names[index])) return cached;
10855
+ if (cached !== void 0 && cached.length === names.length && cached.every((name, index) => mentionNameOf(name) === mentionNameOf(names[index]))) return cached;
9915
10856
  mentionNamesCache.set(mentions, names);
9916
10857
  return names;
9917
10858
  }
@@ -9927,7 +10868,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9927
10868
  return new Map(facts.map((fact) => [factKey(fact.fact), fact]));
9928
10869
  }
9929
10870
  function TeamThreadPage(props) {
9930
- const { workspaceId, channelRef, taskRef, threadRef, taskNumber, backToWorkspace, selectChannel, selectThread, resolveTaskRefs, putAttachment, loadChannels, readThread, loadThreadHistory, threadObservations, subscribeChanges, loadMembers, drafts, getAttachment, reply, changeTask, promoteThread, t } = props;
10871
+ const { workspaceId, humanName, humanAvatarUrl, channelRef, taskRef, threadRef, taskNumber, backToWorkspace, selectChannel, selectThread, resolveTaskRefs, resolveThreadRefs, openMemberSession, putAttachment, loadChannels, readThread, loadThreadHistory, threadObservations, subscribeChanges, loadMembers, drafts, getAttachment, reply, changeTask, promoteThread, t } = props;
9931
10872
  const threadRequest = {
9932
10873
  threadRef,
9933
10874
  ...taskRef === void 0 ? {} : { taskRef }
@@ -10263,7 +11204,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10263
11204
  metadata
10264
11205
  ]);
10265
11206
  const memberName = (memberId) => {
10266
- if (memberId === channelView?.humanMemberId) return t("human");
11207
+ if (memberId === channelView?.humanMemberId) return humanName;
10267
11208
  const status = members.find((candidate) => candidate.member.memberId === memberId);
10268
11209
  return status === void 0 ? t("memberUnknown") : `@${status.member.handle}`;
10269
11210
  };
@@ -10275,18 +11216,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10275
11216
  return;
10276
11217
  }
10277
11218
  if (ref.startsWith("thread:") && ref !== threadRef) {
10278
- loadChannels({
10279
- workspaceId,
10280
- threadRef: ref,
10281
- includeActivities: false,
10282
- limit: 1
10283
- }).then((result) => {
10284
- if (!result.ok) return;
10285
- const target = result.value.items[0];
10286
- if (target === void 0) return;
10287
- const targetChannel = result.value.channels.find((channel) => channel.channelRef === target.message.channelRef);
10288
- if (targetChannel !== void 0) selectThread(target.thread.threadRef, targetChannel.channelRef, target.task?.taskRef, target.taskNumber);
10289
- });
11219
+ jumpToThread(resolveThreadRefs, workspaceId, ref, selectThread);
10290
11220
  return;
10291
11221
  }
10292
11222
  if (ref.startsWith("task:") && ref !== taskRef) jumpToTaskThread(resolveTaskRefs, workspaceId, ref, selectThread);
@@ -10297,26 +11227,46 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10297
11227
  workspaceId,
10298
11228
  selectChannel,
10299
11229
  selectThread,
10300
- loadChannels,
10301
- resolveTaskRefs
11230
+ resolveTaskRefs,
11231
+ resolveThreadRefs
10302
11232
  ]);
10303
11233
  const lookupTaskRefs = (0, react.useMemo)(() => hostTaskRefLookup(resolveTaskRefs, workspaceId), [resolveTaskRefs, workspaceId]);
11234
+ const lookupThreadRefs = (0, react.useMemo)(() => hostThreadRefLookup(resolveThreadRefs, workspaceId), [resolveThreadRefs, workspaceId]);
11235
+ const rosterKey = (0, react.useMemo)(() => [
11236
+ (channelView?.channels ?? []).map((channel) => `${channel.channelRef}=${channel.name}=${channel.state}`).join(","),
11237
+ members.map((status) => `${status.member.memberId}=${status.member.handle}=${status.member.sessionId}=${status.availability}`).join(","),
11238
+ channelView?.humanMemberId ?? ""
11239
+ ].join(";"), [channelView, members]);
11240
+ const channelNameOf = (0, react.useMemo)(() => {
11241
+ const channels = channelView?.channels ?? [];
11242
+ return (ref) => rosterChannelName(channels, ref);
11243
+ }, [rosterKey]);
11244
+ const memberOf = (0, react.useMemo)(() => {
11245
+ const humanMemberId = channelView?.humanMemberId;
11246
+ return (ref) => rosterMember(members, humanMemberId, humanName, ref);
11247
+ }, [rosterKey, humanName]);
10304
11248
  const renderFact = (fact, grouped = false) => {
10305
11249
  if (fact.kind === "message") {
10306
11250
  const sender = memberName(fact.message.sender);
10307
11251
  const senderStatus = members.find((candidate) => candidate.member.memberId === fact.message.sender);
11252
+ const human = fact.message.sender === channelView?.humanMemberId;
10308
11253
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamMessage, {
10309
11254
  senderName: sender,
10310
11255
  memberId: fact.message.sender,
10311
- human: fact.message.sender === channelView?.humanMemberId,
11256
+ human,
11257
+ ...human && humanAvatarUrl !== void 0 ? { avatarUrl: humanAvatarUrl } : {},
10312
11258
  body: fact.message.body,
10313
11259
  attachments: fact.message.attachments,
10314
11260
  loadAttachment: getAttachment,
10315
11261
  t,
10316
11262
  occurredAt: fact.message.occurredAt,
10317
- mentionNames: stableMentionNames(fact.mentions, mentionHandlesMap),
11263
+ mentionNames: stableMentionNames(fact.mentions, mentionHandlesMap, humanName),
10318
11264
  onOpenRef: openRef,
10319
11265
  onResolveTaskRefs: lookupTaskRefs,
11266
+ onResolveThreadRefs: lookupThreadRefs,
11267
+ channelNameOf,
11268
+ memberOf,
11269
+ onOpenMemberSession: openMemberSession,
10320
11270
  grouped,
10321
11271
  ...senderStatus === void 0 ? {} : { senderTitle: senderStatus.member.description }
10322
11272
  }, factKey(fact));
@@ -10589,10 +11539,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10589
11539
  const unreadBoundary = unreadIndex >= 0 ? unreadIndex : void 0;
10590
11540
  const risks = taskClaims.filter((claim) => claim.state === "active").flatMap((claim) => {
10591
11541
  const status = members.find((candidate) => candidate.member.memberId === claim.owner);
10592
- return status?.presence === "error" ? [{
11542
+ if (status?.presence !== "error") return [];
11543
+ const risk = formatRiskClass(status, t);
11544
+ const detail = diagnosticText(status);
11545
+ return [{
10593
11546
  claim,
10594
- status
10595
- }] : [];
11547
+ status,
11548
+ ...risk,
11549
+ reason: detail === "" ? t("statusError") : firstSentence(detail),
11550
+ full: detail === "" ? t("statusError") : detail
11551
+ }];
10596
11552
  });
10597
11553
  const backLabel = channelRef === void 0 ? t("backToWorkspace") : t("backToChannel");
10598
11554
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("main", {
@@ -10606,7 +11562,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10606
11562
  className: conversation_module_css_default.backRow,
10607
11563
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
10608
11564
  size: "sm",
10609
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, {}),
11565
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutline14, {}),
10610
11566
  onClick: backToWorkspace,
10611
11567
  children: backLabel
10612
11568
  })
@@ -10679,19 +11635,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10679
11635
  risks.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
10680
11636
  className: thread_module_css_default.riskSection,
10681
11637
  "aria-label": t("runtimeRisk"),
10682
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: t("runtimeRisk") }), risks.map(({ claim, status }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
11638
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: t("runtimeRisk") }), risks.map(({ claim, status, label, sentenceKey, reason, full }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
10683
11639
  className: thread_module_css_default.riskRow,
10684
11640
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamPresenceDot, {
10685
11641
  status,
10686
11642
  t
10687
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
10688
- t("runtimeRiskDetail", {
10689
- member: status.member.handle,
10690
- diagnostic: diagnosticText(status) || t("statusError")
10691
- }),
10692
- " · ",
10693
- claim.direction
10694
- ] })]
11643
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
11644
+ title: full,
11645
+ children: [
11646
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
11647
+ className: thread_module_css_default.riskClass,
11648
+ children: label
11649
+ }),
11650
+ " · ",
11651
+ t(sentenceKey, { member: status.member.handle }),
11652
+ " — ",
11653
+ reason
11654
+ ]
11655
+ })]
10695
11656
  }, claim.claimRef))]
10696
11657
  }),
10697
11658
  task !== void 0 && thread !== void 0 && (() => {
@@ -10741,7 +11702,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10741
11702
  onToggle: () => {
10742
11703
  setClaimsOpen((current) => !current);
10743
11704
  },
10744
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutlineRegular, { size: 14 }),
11705
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutline14, { size: 14 }),
10745
11706
  title: `${t("claims")} · ${taskClaims.length}`,
10746
11707
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10747
11708
  className: thread_module_css_default.claimList,
@@ -10751,7 +11712,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10751
11712
  }), taskClaims.map((claim) => {
10752
11713
  const ownerStatus = members.find((status) => status.member.memberId === claim.owner);
10753
11714
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
10754
- className: thread_module_css_default.claimRow,
11715
+ className: `${thread_module_css_default.claimRow}${claim.state === "done" ? ` ${thread_module_css_default.claimRowDone}` : ""}`,
10755
11716
  children: [
10756
11717
  ownerStatus === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamPresenceDot, {
10757
11718
  status: ownerStatus,
@@ -10759,6 +11720,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10759
11720
  }),
10760
11721
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
10761
11722
  className: thread_module_css_default.claimOwner,
11723
+ title: memberName(claim.owner),
10762
11724
  children: memberName(claim.owner)
10763
11725
  }),
10764
11726
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -10896,8 +11858,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10896
11858
  }
10897
11859
  //#endregion
10898
11860
  //#region src/client/TeamConversation.tsx
10899
- function TeamConversation({ t, useWorkspaces, navigation, drafts, putAttachment, getAttachment, loadChannels, readThread, loadThreadHistory, threadObservations, subscribeChanges, loadMembers, loadInbox, sendMessage, joinChannel, removeChannelMember, reply, changeTask, promoteThread, selectThread, selectChannel, selectWorkspace, backToWorkspace, backToChannels, resolveTaskRefs }) {
11861
+ function TeamConversation({ t, useWorkspaces, navigation, drafts, humanIdentity, putAttachment, getAttachment, loadChannels, readThread, loadThreadHistory, threadObservations, subscribeChanges, loadMembers, loadInbox, sendMessage, joinChannel, removeChannelMember, reply, changeTask, promoteThread, selectThread, selectChannel, selectWorkspace, backToWorkspace, backToChannels, resolveTaskRefs, resolveThreadRefs, openMemberSession }) {
10900
11862
  const navigationState = (0, react.useSyncExternalStore)(navigation.subscribe, navigation.getSnapshot, navigation.getSnapshot);
11863
+ const identity = useHumanIdentity(humanIdentity);
11864
+ const humanName = identity.name ?? t("human");
10901
11865
  const current = useWorkspaces((state) => state.items).find((workspace) => workspace.workspaceId === navigationState.workspaceId);
10902
11866
  if (navigationState.inbox === true) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamInboxPage, {
10903
11867
  useWorkspaces,
@@ -10905,9 +11869,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10905
11869
  subscribeChanges,
10906
11870
  selectWorkspace,
10907
11871
  selectThread,
11872
+ humanName,
11873
+ ...identity.avatarUrl === void 0 ? {} : { humanAvatarUrl: identity.avatarUrl },
10908
11874
  t
10909
11875
  }, "inbox");
10910
11876
  if (current !== void 0 && navigationState.threadRef !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamThreadPage, {
11877
+ humanName,
11878
+ ...identity.avatarUrl === void 0 ? {} : { humanAvatarUrl: identity.avatarUrl },
10911
11879
  workspaceId: current.workspaceId,
10912
11880
  putAttachment,
10913
11881
  threadRef: navigationState.threadRef,
@@ -10915,6 +11883,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10915
11883
  selectChannel,
10916
11884
  selectThread,
10917
11885
  resolveTaskRefs,
11886
+ resolveThreadRefs,
11887
+ openMemberSession,
10918
11888
  ...navigationState.channelRef === void 0 ? {} : { channelRef: navigationState.channelRef },
10919
11889
  ...navigationState.taskRef === void 0 ? {} : { taskRef: navigationState.taskRef },
10920
11890
  ...navigationState.taskNumber === void 0 ? {} : { taskNumber: navigationState.taskNumber },
@@ -10932,6 +11902,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10932
11902
  t
10933
11903
  }, navigationState.threadRef);
10934
11904
  if (current !== void 0 && navigationState.channelRef !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamChannelPage, {
11905
+ humanName,
11906
+ ...identity.avatarUrl === void 0 ? {} : { humanAvatarUrl: identity.avatarUrl },
10935
11907
  workspaceId: current.workspaceId,
10936
11908
  channelRef: navigationState.channelRef,
10937
11909
  drafts,
@@ -10948,6 +11920,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10948
11920
  selectChannel,
10949
11921
  backToChannels,
10950
11922
  resolveTaskRefs,
11923
+ resolveThreadRefs,
11924
+ openMemberSession,
10951
11925
  t
10952
11926
  }, navigationState.channelRef);
10953
11927
  const welcome = current === void 0 ? {
@@ -11047,7 +12021,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11047
12021
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11048
12022
  className: sidebar_module_css_default.workspaceIcon,
11049
12023
  "aria-hidden": "true",
11050
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenRegular, { size: 16 })
12024
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpen16, { size: 16 })
11051
12025
  }),
11052
12026
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11053
12027
  className: sidebar_module_css_default.workspaceValue,
@@ -11056,7 +12030,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11056
12030
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11057
12031
  className: `${sidebar_module_css_default.workspaceChevron} ${open ? sidebar_module_css_default.workspaceChevronOpen : ""}`,
11058
12032
  "aria-hidden": "true",
11059
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
12033
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
11060
12034
  })
11061
12035
  ]
11062
12036
  })
@@ -11418,7 +12392,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11418
12392
  event.stopPropagation();
11419
12393
  toggle();
11420
12394
  },
11421
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, {})
12395
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutline16, {})
11422
12396
  })
11423
12397
  });
11424
12398
  }
@@ -11437,7 +12411,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11437
12411
  onClick: () => {
11438
12412
  onToggle(!open);
11439
12413
  },
11440
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: sidebar_module_css_default.sectionChevron }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12414
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { className: sidebar_module_css_default.sectionChevron }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11441
12415
  className: sidebar_module_css_default.sectionTitle,
11442
12416
  children: title
11443
12417
  })]
@@ -11522,30 +12496,79 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11522
12496
  function modelKey(provider, model) {
11523
12497
  return `${provider}\u0000${model}`;
11524
12498
  }
12499
+ const modelCatalogCaches = /* @__PURE__ */ new WeakMap();
12500
+ function peekCatalogGroups(loadModels) {
12501
+ return modelCatalogCaches.get(loadModels)?.value?.groups;
12502
+ }
12503
+ function sharedCatalog(loadModels) {
12504
+ const cached = modelCatalogCaches.get(loadModels);
12505
+ if (cached?.inflight !== void 0) return cached.inflight;
12506
+ const next = loadModels();
12507
+ const entry = cached ?? {};
12508
+ entry.inflight = next;
12509
+ modelCatalogCaches.set(loadModels, entry);
12510
+ const forget = (result) => {
12511
+ if (modelCatalogCaches.get(loadModels) === entry && entry.inflight === next) {
12512
+ delete entry.inflight;
12513
+ if (result !== void 0 && result.ok) entry.value = result.value;
12514
+ }
12515
+ };
12516
+ next.then((result) => {
12517
+ forget(result);
12518
+ }, () => {
12519
+ forget(void 0);
12520
+ });
12521
+ return next;
12522
+ }
12523
+ /**
12524
+ * Best-effort warm of the shared catalog (the agents panel calls this while
12525
+ * the roster loads, so the pickers open with rows instead of paying the
12526
+ * first read on open). Failures belong to the picker's own error surface.
12527
+ */
12528
+ function warmModelCatalog(loadModels) {
12529
+ try {
12530
+ sharedCatalog(loadModels).catch(() => {});
12531
+ } catch {}
12532
+ }
11525
12533
  /**
11526
12534
  * Shared provider/model dropdown for the create and edit forms. The option
11527
12535
  * list rides the shared Menu primitive (one leading "follow Host default"
11528
12536
  * row, then non-selectable provider headings) with a capped, internally
11529
- * scrolling card so growing model catalogs cannot stretch the dialog.
12537
+ * scrolling card so growing model catalogs cannot stretch the dialog. Mounts
12538
+ * open with the warmed value when one exists and revalidate behind it, so a
12539
+ * slow Host read delays a refresh — never the picker itself; a refused or
12540
+ * failed read with no warmed value renders a retryable error instead of
12541
+ * stranding the field on "loading".
11530
12542
  */
11531
12543
  function ModelPickerField({ model, onModelChange, loadModels, disabled, t }) {
11532
- const [groups, setGroups] = (0, react.useState)();
12544
+ const [groups, setGroups] = (0, react.useState)(() => peekCatalogGroups(loadModels));
11533
12545
  const [modelsError, setModelsError] = (0, react.useState)();
12546
+ const [reloadToken, setReloadToken] = (0, react.useState)(0);
11534
12547
  const [open, setModelOpen] = (0, react.useState)(false);
11535
12548
  const [effortOpen, setEffortOpen] = (0, react.useState)(false);
11536
12549
  (0, react.useEffect)(() => {
11537
12550
  let mounted = true;
11538
- loadModels().then((result) => {
12551
+ let pending;
12552
+ try {
12553
+ pending = sharedCatalog(loadModels);
12554
+ } catch (error) {
12555
+ setModelsError(error instanceof Error ? error.message : String(error));
12556
+ return;
12557
+ }
12558
+ pending.then((result) => {
11539
12559
  if (!mounted) return;
11540
12560
  if (result.ok) {
11541
12561
  setGroups(result.value.groups);
11542
12562
  setModelsError(void 0);
11543
12563
  } else setModelsError(result.error.message);
12564
+ }, (error) => {
12565
+ if (!mounted) return;
12566
+ setModelsError(error instanceof Error ? error.message : String(error));
11544
12567
  });
11545
12568
  return () => {
11546
12569
  mounted = false;
11547
12570
  };
11548
- }, [loadModels]);
12571
+ }, [loadModels, reloadToken]);
11549
12572
  const items = [{
11550
12573
  id: "",
11551
12574
  label: t("modelFollowDefault")
@@ -11591,9 +12614,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11591
12614
  className: sidebar_module_css_default.editHint,
11592
12615
  children: t("modelsLoading")
11593
12616
  }),
11594
- modelsError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
12617
+ modelsError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
11595
12618
  className: sidebar_module_css_default.editHint,
11596
- children: t("modelsLoadFailed", { message: modelsError })
12619
+ children: [
12620
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12621
+ role: "alert",
12622
+ children: t("modelsLoadFailed", { message: modelsError })
12623
+ }),
12624
+ " ",
12625
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
12626
+ size: "sm",
12627
+ variant: "outline",
12628
+ disabled,
12629
+ onClick: () => {
12630
+ setModelsError(void 0);
12631
+ setReloadToken((token) => token + 1);
12632
+ },
12633
+ children: t("retry")
12634
+ })
12635
+ ]
11597
12636
  }),
11598
12637
  groups !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
11599
12638
  open,
@@ -11628,7 +12667,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11628
12667
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11629
12668
  className: `${create_module_css_default.chevron} ${open ? create_module_css_default.chevronOpen : ""}`,
11630
12669
  "aria-hidden": true,
11631
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
12670
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
11632
12671
  })]
11633
12672
  })
11634
12673
  }),
@@ -11668,7 +12707,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11668
12707
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11669
12708
  className: `${create_module_css_default.chevron} ${effortOpen ? create_module_css_default.chevronOpen : ""}`,
11670
12709
  "aria-hidden": true,
11671
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
12710
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
11672
12711
  })]
11673
12712
  })
11674
12713
  })
@@ -11966,6 +13005,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11966
13005
  (0, react.useEffect)(() => {
11967
13006
  refresh();
11968
13007
  }, [refresh]);
13008
+ (0, react.useEffect)(() => {
13009
+ warmModelCatalog(loadModels);
13010
+ }, [loadModels]);
11969
13011
  (0, react.useEffect)(() => subscribeChanges({
11970
13012
  kind: "workspace",
11971
13013
  workspaceId
@@ -12011,7 +13053,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12011
13053
  if (result.ok) {
12012
13054
  const committed = {
12013
13055
  ...result.value.status,
12014
- workspaceIds: [result.value.status.member.workspaceId]
13056
+ workspaceIds: result.value.workspaceIds
12015
13057
  };
12016
13058
  setMembers((current) => {
12017
13059
  const retained = current.filter((status) => status.member.memberId !== committed.member.memberId);
@@ -12164,7 +13206,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12164
13206
  setImporting(false);
12165
13207
  setFormOpen(true);
12166
13208
  },
12167
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 14 })
13209
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutline16, { size: 14 })
12168
13210
  })
12169
13211
  }),
12170
13212
  children: [
@@ -12306,22 +13348,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12306
13348
  {
12307
13349
  id: "edit",
12308
13350
  label: t("editAgent"),
12309
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {})
13351
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
12310
13352
  },
12311
13353
  ...status.presence === "error" ? [{
12312
13354
  id: "resume",
12313
13355
  label: t("resumeAgent"),
12314
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlayOutlineRegular, {})
13356
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlayOutline16, {})
12315
13357
  }] : [],
12316
13358
  ...status.availability === "unavailable" && restartOffered(status) ? [{
12317
13359
  id: "restart",
12318
13360
  label: t("restartAgent"),
12319
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
13361
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16, {})
12320
13362
  }] : [],
12321
13363
  {
12322
13364
  id: "archive",
12323
13365
  label: t(withdrawing ? "withdrawAgent" : "archiveAgent"),
12324
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutlineRegular, { size: 16 }),
13366
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 }),
12325
13367
  danger: true
12326
13368
  }
12327
13369
  ],
@@ -12444,7 +13486,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12444
13486
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12445
13487
  className: `${create_module_css_default.chevron} ${open ? create_module_css_default.chevronOpen : ""}`,
12446
13488
  "aria-hidden": true,
12447
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {})
13489
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
12448
13490
  })]
12449
13491
  })
12450
13492
  })]
@@ -12689,7 +13731,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12689
13731
  setError(void 0);
12690
13732
  setFormOpen(true);
12691
13733
  },
12692
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 14 })
13734
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutline16, { size: 14 })
12693
13735
  })
12694
13736
  }),
12695
13737
  children: [
@@ -12781,11 +13823,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12781
13823
  items: [{
12782
13824
  id: "edit",
12783
13825
  label: t("editChannel"),
12784
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, {})
13826
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
12785
13827
  }, {
12786
13828
  id: "archive",
12787
13829
  label: t("archiveChannel"),
12788
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutlineRegular, { size: 16 }),
13830
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 }),
12789
13831
  danger: true
12790
13832
  }],
12791
13833
  onSelect: (id) => {
@@ -12976,7 +14018,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12976
14018
  function InboxMark({ unread }) {
12977
14019
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
12978
14020
  className: sidebar_module_css_default.inboxMark,
12979
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQueueOutlineRegular, { size: 16 }), unread > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14021
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQueueOutline14, { size: 16 }), unread > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12980
14022
  className: sidebar_module_css_default.inboxDot,
12981
14023
  "data-team-inbox-dot": true,
12982
14024
  "aria-hidden": "true"
@@ -13079,7 +14121,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13079
14121
  setPendingSection("channels");
13080
14122
  expandSidebar();
13081
14123
  },
13082
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconListPenOutlineRegular, { size: 16 })
14124
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconListPenOutline16, { size: 16 })
13083
14125
  })
13084
14126
  }),
13085
14127
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
@@ -13093,7 +14135,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13093
14135
  setPendingSection("agents");
13094
14136
  expandSidebar();
13095
14137
  },
13096
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutlineRegular, { size: 16 })
14138
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutline16, { size: 16 })
13097
14139
  })
13098
14140
  })
13099
14141
  ]
@@ -13279,6 +14321,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13279
14321
  timelineLabel: "消息时间线",
13280
14322
  taskClosedNotice: "任务已关闭,重新打开后可继续讨论",
13281
14323
  human: "Human",
14324
+ humanSettingsNav: "我的资料",
14325
+ humanSettingsTitle: "我的资料",
14326
+ humanSettingsIntro: "这是 Agent Team 的资料页:名字用在 Team 的消息与成员列表里,头像出现在你发出的消息旁。",
14327
+ humanSettingsName: "名字",
14328
+ humanSettingsNameHint: "Agents 用这个名字 @ 到你;改名只对之后的消息生效。",
14329
+ humanSettingsNameEmpty: "名字不能为空。",
14330
+ humanSettingsNameFailed: "名字没保存上:{message}",
14331
+ humanSettingsAvatar: "头像",
14332
+ humanSettingsAvatarHint: "只收图片,最大 10MB;移除或损坏时回退为默认头像。",
14333
+ humanSettingsSave: "保存",
14334
+ humanSettingsSaving: "正在保存…",
14335
+ humanSettingsUpload: "上传头像",
14336
+ humanSettingsUploading: "正在上传…",
14337
+ humanSettingsReplace: "更换头像",
14338
+ humanSettingsRemoveAvatar: "移除头像",
14339
+ humanSettingsAvatarNotImage: "只收图片文件。",
14340
+ humanSettingsAvatarTooLarge: "图片不能超过 10MB。",
14341
+ humanSettingsAvatarFailed: "头像没能保存:{message}",
14342
+ humanSettingsLoading: "正在载入资料…",
14343
+ humanSettingsUnavailable: "资料读不出来:{message}",
14344
+ humanSettingsVersion: "版本 {version}",
14345
+ humanSettingsUpdateAvailable: "有新版本 {version},去查看发布说明",
13282
14346
  taskStatusTodo: "待处理",
13283
14347
  taskStatusInProgress: "进行中",
13284
14348
  taskStatusInReview: "待验收",
@@ -13291,6 +14355,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13291
14355
  openTaskUnread: "打开 Task #{number}({count} 条新动态)",
13292
14356
  openThreadUnread: "打开讨论({count} 条新动态)",
13293
14357
  threadLabel: "讨论",
14358
+ channelLabel: "频道 · {name}",
14359
+ memberLabel: "成员 · @{name}",
13294
14360
  recentActivity: "最近活动 {time}",
13295
14361
  replyAction: "回复",
13296
14362
  claimers: "由 {names} 处理",
@@ -13315,7 +14381,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13315
14381
  autoReadIncomplete: "仍有未读更新未能自动读取",
13316
14382
  olderHistory: "更早历史",
13317
14383
  runtimeRisk: "当前运行风险",
13318
- runtimeRiskDetail: "@{member} 当前不可用:{diagnostic}",
14384
+ riskClassSessionRefused: "会话被拒绝",
14385
+ riskClassSessionUnreadable: "会话不可读",
14386
+ riskClassPresetComposition: "预设装配失败",
14387
+ riskClassRollover: "上下文交接中",
14388
+ riskClassRuntime: "运行时故障",
14389
+ riskClassActivation: "激活失败",
14390
+ riskSessionRefused: "{member} 当前不可用",
14391
+ riskSessionUnreadable: "{member} 的会话无法读取",
14392
+ riskPresetComposition: "{member} 的预设无法装配",
14393
+ riskRollover: "{member} 正在交接上下文",
14394
+ riskRuntime: "{member} 遇到运行时故障",
14395
+ riskActivation: "{member} 激活失败",
13319
14396
  acceptTask: "验收",
13320
14397
  closeTask: "关闭任务",
13321
14398
  reopenTask: "重新打开",
@@ -13456,6 +14533,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13456
14533
  timelineLabel: "Message timeline",
13457
14534
  taskClosedNotice: "This task is closed; reopen it to continue the discussion",
13458
14535
  human: "Human",
14536
+ humanSettingsNav: "Profile",
14537
+ humanSettingsTitle: "Profile",
14538
+ humanSettingsIntro: "This is your Agent Team profile: the name applies to Team messages and member lists, and the avatar appears beside your messages.",
14539
+ humanSettingsName: "Name",
14540
+ humanSettingsNameHint: "Agents @ you by this name; a rename applies to later messages only.",
14541
+ humanSettingsNameEmpty: "A name is required.",
14542
+ humanSettingsNameFailed: "The name was not saved: {message}",
14543
+ humanSettingsAvatar: "Avatar",
14544
+ humanSettingsAvatarHint: "Images only, up to 10MB; removing it — or unreadable bytes — falls back to the default avatar.",
14545
+ humanSettingsSave: "Save",
14546
+ humanSettingsSaving: "Saving…",
14547
+ humanSettingsUpload: "Upload avatar",
14548
+ humanSettingsUploading: "Uploading…",
14549
+ humanSettingsReplace: "Replace avatar",
14550
+ humanSettingsRemoveAvatar: "Remove avatar",
14551
+ humanSettingsAvatarNotImage: "Images only.",
14552
+ humanSettingsAvatarTooLarge: "The image must be 10MB or smaller.",
14553
+ humanSettingsAvatarFailed: "The avatar was not saved: {message}",
14554
+ humanSettingsLoading: "Loading profile…",
14555
+ humanSettingsUnavailable: "The profile could not be read: {message}",
14556
+ humanSettingsVersion: "Version {version}",
14557
+ humanSettingsUpdateAvailable: "New version {version} available — see the release notes",
13459
14558
  taskStatusTodo: "To do",
13460
14559
  taskStatusInProgress: "In progress",
13461
14560
  taskStatusInReview: "In review",
@@ -13468,6 +14567,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13468
14567
  openTaskUnread: "Open Task #{number} ({count} new updates)",
13469
14568
  openThreadUnread: "Open thread ({count} new updates)",
13470
14569
  threadLabel: "Thread",
14570
+ channelLabel: "Channel · {name}",
14571
+ memberLabel: "Member · @{name}",
13471
14572
  recentActivity: "Last activity {time}",
13472
14573
  replyAction: "Reply",
13473
14574
  claimers: "Handled by {names}",
@@ -13492,7 +14593,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13492
14593
  autoReadIncomplete: "Some unread updates could not be read automatically",
13493
14594
  olderHistory: "Older history",
13494
14595
  runtimeRisk: "Current runtime risk",
13495
- runtimeRiskDetail: "@{member} is unavailable: {diagnostic}",
14596
+ riskClassSessionRefused: "Session refused",
14597
+ riskClassSessionUnreadable: "Session unreadable",
14598
+ riskClassPresetComposition: "Preset composition failed",
14599
+ riskClassRollover: "Context rollover",
14600
+ riskClassRuntime: "Runtime failure",
14601
+ riskClassActivation: "Activation failed",
14602
+ riskSessionRefused: "{member} is unavailable",
14603
+ riskSessionUnreadable: "{member} has an unreadable Session",
14604
+ riskPresetComposition: "{member} has an uncomposable preset",
14605
+ riskRollover: "{member} is rolling over its context",
14606
+ riskRuntime: "{member} hit a runtime failure",
14607
+ riskActivation: "{member} failed to activate",
13496
14608
  acceptTask: "Accept",
13497
14609
  closeTask: "Close task",
13498
14610
  reopenTask: "Reopen",
@@ -13531,37 +14643,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13531
14643
  "remote.session",
13532
14644
  "sessions",
13533
14645
  "connection",
13534
- "conversation",
13535
- "uiWorkspace"
14646
+ "conversation"
13536
14647
  ];
13537
- /**
13538
- * 0.1.7 moved the conversation selection into the workspace service: the
13539
- * rendered session is the one holding its `mainView` reference (the shipped
13540
- * consumers read the same projection), so the Team client reads the selection
13541
- * through retention instead of a service-owned `current`.
13542
- */
13543
- function currentMainSessionId(ctx) {
13544
- const sessions = ctx.sessions;
13545
- return Object.values(sessions.list.getSnapshot().byId).find((session) => (session.retainedBy.mainView ?? 0) > 0)?.id;
13546
- }
13547
- /**
13548
- * Session ids this client opened as Member views, per client instance. The
13549
- * 0.1.7 workspace service exposes no clear, so a dead return target leaves
13550
- * the departed Member selection in place; excluding Member sessions from the
13551
- * next capture keeps that stale selection from becoming a false return
13552
- * target.
13553
- */
13554
- const openedMemberSessions = /* @__PURE__ */ new WeakMap();
13555
- function registerModeShadow(ctx, navigation, changes, reads, drafts, name, component, extraInject, entryKey) {
14648
+ function registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, name, component, extraInject, entryKey) {
13556
14649
  const openMemberSessionImpl = (sessionId) => {
14650
+ const sessions = ctx.sessions;
13557
14651
  const snapshot = navigation.getSnapshot();
13558
- const current = currentMainSessionId(ctx);
13559
- const memberSessions = openedMemberSessions.get(ctx) ?? /* @__PURE__ */ new Set();
13560
- openedMemberSessions.set(ctx, memberSessions);
13561
- memberSessions.add(sessionId);
13562
- const returnTo = snapshot.memberSessionId === void 0 && current !== void 0 && current !== sessionId && !memberSessions.has(current) ? current : void 0;
14652
+ const current = sessions.list.getSnapshot().current;
14653
+ const returnTo = snapshot.memberSessionId === void 0 && current !== void 0 && current !== sessionId ? current : void 0;
13563
14654
  navigation.actions().enterMemberSession(sessionId, returnTo);
13564
- ctx.uiWorkspace.openSession(sessionId);
14655
+ sessions.open(sessionId);
13565
14656
  };
13566
14657
  const sharedRemotes = {
13567
14658
  loadChannels: (request) => ctx.remote.agentTeam.view(request),
@@ -13569,6 +14660,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13569
14660
  subscribeReads: (listener) => reads.subscribe(listener),
13570
14661
  subscribeChanges: (scope, listener) => changes.subscribe(scope, listener),
13571
14662
  drafts,
14663
+ humanIdentity,
13572
14664
  loadMembers: (request) => ctx.remote.agentTeam.members(request),
13573
14665
  joinChannel: (request) => ctx.remote.agentTeam.joinChannel(request),
13574
14666
  removeChannelMember: (request) => ctx.remote.agentTeam.removeChannelMember(request),
@@ -13612,7 +14704,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13612
14704
  reply: (request) => ctx.remote.agentTeam.reply(request),
13613
14705
  changeTask: (request) => ctx.remote.agentTeam.changeTask(request),
13614
14706
  promoteThread: (request) => ctx.remote.agentTeam.promoteThread(request),
13615
- resolveTaskRefs: (request) => ctx.remote.agentTeam.resolveTaskRefs(request)
14707
+ resolveTaskRefs: (request) => ctx.remote.agentTeam.resolveTaskRefs(request),
14708
+ resolveThreadRefs: (request) => ctx.remote.agentTeam.resolveThreadRefs(request)
13616
14709
  } : {},
13617
14710
  ...name === "sidebar.workspaces" ? {
13618
14711
  addMember: (request) => ctx.remote.agentTeam.addMember(request),
@@ -13643,9 +14736,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13643
14736
  const disposeNavigation = ctx.reflect.provide("teamNavigation", navigation);
13644
14737
  const drafts = new TeamDraftStore();
13645
14738
  const disposeDrafts = ctx.reflect.provide("teamDrafts", drafts);
14739
+ let settingsTransport;
14740
+ ctx.inject(["remote.settings"], (scope) => {
14741
+ settingsTransport = scope.remote.settings;
14742
+ });
14743
+ const humanIdentity = new TeamHumanIdentity({
14744
+ loadProfile: () => ctx.remote.agentTeam.humanProfile({}),
14745
+ loadAvatarUrl: async (avatarRef) => {
14746
+ const result = await ctx.remote.agentTeam.getHumanAvatar({ avatarRef });
14747
+ if (!result.ok || !result.value.mediaType.startsWith("image/")) return null;
14748
+ return `data:${result.value.mediaType};base64,${result.value.bytesBase64}`;
14749
+ }
14750
+ });
13646
14751
  ctx.effect(() => () => {
13647
14752
  navigation.dispose();
13648
14753
  drafts.dispose();
14754
+ humanIdentity.dispose();
13649
14755
  disposeNavigation();
13650
14756
  disposeDrafts();
13651
14757
  }, "agent-team: navigation service");
@@ -13657,8 +14763,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13657
14763
  const returnTo = previous.returnToSessionId;
13658
14764
  previous = snapshot;
13659
14765
  if (departed === void 0 || snapshot.memberSessionId !== void 0) return;
13660
- if (currentMainSessionId(ctx) !== departed) return;
13661
- if (returnTo !== void 0 && ctx.sessions.list.getSnapshot().byId[returnTo] !== void 0) ctx.uiWorkspace.openSession(returnTo);
14766
+ const sessions = ctx.sessions;
14767
+ if (sessions.list.getSnapshot().current !== departed) return;
14768
+ if (returnTo !== void 0 && sessions.list.getSnapshot().byId[returnTo] !== void 0) sessions.open(returnTo);
14769
+ else sessions.clear();
13662
14770
  };
13663
14771
  const unsubscribe = navigation.subscribe(restore);
13664
14772
  return () => {
@@ -13699,9 +14807,52 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13699
14807
  }
13700
14808
  })
13701
14809
  }, TeamFooterAction));
13702
- registerModeShadow(ctx, navigation, changes, reads, drafts, "sidebar.workspaces", TeamWorkspaceBrowser);
13703
- registerModeShadow(ctx, navigation, changes, reads, drafts, "main", TeamConversation, void 0, "conversation");
13704
- registerModeShadow(ctx, navigation, changes, reads, drafts, "sidebar.settings", TeamMembersAction, () => ({ loadMemberGroups }));
14810
+ registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, "sidebar.workspaces", TeamWorkspaceBrowser);
14811
+ registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, "main", TeamConversation, void 0, "conversation");
14812
+ registerModeShadow(ctx, navigation, changes, reads, drafts, humanIdentity, "sidebar.settings", TeamMembersAction, () => ({ loadMemberGroups }));
14813
+ ctx.slots.inject("settings.section", () => ctx.slots.register({
14814
+ name: "settings.section",
14815
+ id: "team-human",
14816
+ order: 5,
14817
+ label: () => ctx.locale.bind(NS)("humanSettingsNav"),
14818
+ locale: NS,
14819
+ inject: () => ({
14820
+ identity: humanIdentity,
14821
+ saveName: async (name) => {
14822
+ const settings = settingsTransport;
14823
+ if (settings === void 0) return "the settings service is unavailable";
14824
+ const saved = await settings.update(HUMAN_PROFILE_NAMESPACE, { name }, void 0);
14825
+ if (!saved.ok) return saved.error.message;
14826
+ await humanIdentity.refresh();
14827
+ },
14828
+ uploadAvatar: async (file) => {
14829
+ const put = await ctx.remote.agentTeam.putHumanAvatar({
14830
+ name: file.name,
14831
+ ...file.type === "" ? {} : { mediaType: file.type },
14832
+ bytesBase64: bytesToBase64(new Uint8Array(await file.arrayBuffer()))
14833
+ });
14834
+ if (!put.ok) return put.error.message;
14835
+ const settings = settingsTransport;
14836
+ if (settings === void 0) return "the settings service is unavailable";
14837
+ const saved = await settings.update(HUMAN_PROFILE_NAMESPACE, { avatarRef: put.value.avatarRef }, void 0);
14838
+ if (!saved.ok) return saved.error.message;
14839
+ await humanIdentity.refresh();
14840
+ },
14841
+ removeAvatar: async () => {
14842
+ const { avatarRef } = humanIdentity.getSnapshot();
14843
+ if (avatarRef === void 0) return void 0;
14844
+ const settings = settingsTransport;
14845
+ if (settings === void 0) return "the settings service is unavailable";
14846
+ await ctx.remote.agentTeam.removeHumanAvatar({ avatarRef });
14847
+ const cleared = await settings.mutate(HUMAN_PROFILE_NAMESPACE, [{
14848
+ op: "unset",
14849
+ path: ["avatarRef"]
14850
+ }], void 0);
14851
+ if (!cleared.ok) return cleared.error.message;
14852
+ await humanIdentity.refresh();
14853
+ }
14854
+ })
14855
+ }, HumanSettingsSection));
13705
14856
  }
13706
14857
  async function apply(ctx) {
13707
14858
  const disposeRemote = await ctx.remote.$mount(TYPERT_REMOTE);