@wowyuarm/dsh-agent-team 0.1.5 → 0.1.7

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 (100) hide show
  1. package/README.md +23 -3
  2. package/README.zh.md +23 -3
  3. package/package.json +50 -43
  4. package/packages/agent-team/README.md +8 -0
  5. package/packages/agent-team/README.zh.md +8 -0
  6. package/packages/agent-team/core-skills/member-skill-manager/SKILL.md +41 -0
  7. package/packages/agent-team/core-skills/member-skill-manager/references/auth-and-config.md +30 -0
  8. package/packages/agent-team/core-skills/member-skill-manager/references/writing-great-skills.md +17 -0
  9. package/packages/agent-team/lib/index.js +168 -37
  10. package/packages/agent-team/lib/ledger.js +440 -18
  11. package/packages/agent-team/lib/member-context.js +7 -3
  12. package/packages/agent-team/lib/member-runtime.js +229 -0
  13. package/packages/agent-team/lib/member-skills.js +94 -0
  14. package/packages/agent-team/lib/preset-roster.js +1 -0
  15. package/packages/agent-team/lib/spec.js +56 -1
  16. package/packages/agent-team/lib/typert.host.js +359 -77
  17. package/packages/agent-team/lib/typert.remote-client.d.ts +5 -1
  18. package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
  19. package/packages/agent-team/lib/typert.remote-client.js +248 -43
  20. package/packages/agent-team/lib/types/entities.js +1 -0
  21. package/packages/agent-team/lib/types/index.d.ts +51 -7
  22. package/packages/agent-team/lib/types/index.d.ts.map +1 -1
  23. package/packages/agent-team/lib/types/ledger.d.ts +62 -1
  24. package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
  25. package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
  26. package/packages/agent-team/lib/types/member-runtime.d.ts +108 -0
  27. package/packages/agent-team/lib/types/member-runtime.d.ts.map +1 -0
  28. package/packages/agent-team/lib/types/member-skills.d.ts +45 -0
  29. package/packages/agent-team/lib/types/member-skills.d.ts.map +1 -0
  30. package/packages/agent-team/lib/types/operations.js +1 -0
  31. package/packages/agent-team/lib/types/preset-roster.d.ts.map +1 -1
  32. package/packages/agent-team/lib/types/requests-results.js +1 -0
  33. package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
  34. package/packages/agent-team/lib/types/types/entities.d.ts +339 -0
  35. package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -0
  36. package/packages/agent-team/lib/types/types/operations.d.ts +303 -0
  37. package/packages/agent-team/lib/types/types/operations.d.ts.map +1 -0
  38. package/packages/agent-team/lib/types/types/requests-results.d.ts +527 -0
  39. package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -0
  40. package/packages/agent-team/lib/types/types.d.ts +10 -985
  41. package/packages/agent-team/lib/types/types.d.ts.map +1 -1
  42. package/packages/agent-team/preset/team-member/agent.cordis.yml +11 -6
  43. package/packages/client-agent-team/README.md +4 -2
  44. package/packages/client-agent-team/README.zh.md +4 -2
  45. package/packages/client-agent-team/lib/client.js +636 -572
  46. package/packages/client-agent-team/lib/client.js.map +1 -1
  47. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts +3 -5
  48. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
  49. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +37 -26
  50. package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts +1 -1
  51. package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
  52. package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +2 -2
  53. package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts +2 -1
  54. package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
  55. package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +31 -5
  56. package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
  57. package/packages/client-agent-team/lib/types/client/TeamComposer.js +2 -1
  58. package/packages/client-agent-team/lib/types/client/TeamMemberDock.d.ts +12 -0
  59. package/packages/client-agent-team/lib/types/client/TeamMemberDock.d.ts.map +1 -0
  60. package/packages/client-agent-team/lib/types/client/TeamMemberDock.js +13 -0
  61. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts +4 -8
  62. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts.map +1 -1
  63. package/packages/client-agent-team/lib/types/client/TeamMemberEditor.js +7 -40
  64. package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
  65. package/packages/client-agent-team/lib/types/client/TeamMessage.js +10 -3
  66. package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +1 -1
  67. package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
  68. package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +61 -20
  69. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
  70. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
  71. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +2 -2
  72. package/packages/client-agent-team/lib/types/client/TeamWorkspaceRow.d.ts +1 -1
  73. package/packages/client-agent-team/lib/types/client/TeamWorkspaceRow.d.ts.map +1 -1
  74. package/packages/client-agent-team/lib/types/client/index.d.ts +1 -1
  75. package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
  76. package/packages/client-agent-team/lib/types/client/index.js +25 -28
  77. package/packages/client-agent-team/lib/types/client/locales.d.ts +32 -16
  78. package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
  79. package/packages/client-agent-team/lib/types/client/locales.js +32 -16
  80. package/packages/client-agent-team/lib/types/client/member-session-input.d.ts +1 -3
  81. package/packages/client-agent-team/lib/types/client/member-session-input.d.ts.map +1 -1
  82. package/packages/client-agent-team/lib/types/client/member-session-input.js +18 -6
  83. package/packages/client-agent-team/lib/types/client/navigation.d.ts +2 -1
  84. package/packages/client-agent-team/lib/types/client/navigation.d.ts.map +1 -1
  85. package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts +1 -1
  86. package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts.map +1 -1
  87. package/packages/client-agent-team/lib/types/client/sidebar-sections.d.ts +1 -1
  88. package/packages/client-agent-team/lib/types/client/sidebar-sections.d.ts.map +1 -1
  89. package/packages/client-agent-team/lib/types/client/slots.d.ts +3 -1
  90. package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
  91. package/packages/client-agent-team/lib/types/client/team-membership.d.ts +1 -1
  92. package/packages/client-agent-team/lib/types/client/team-membership.d.ts.map +1 -1
  93. package/packages/client-agent-team/lib/types/client/timeline-scroll.d.ts +5 -7
  94. package/packages/client-agent-team/lib/types/client/timeline-scroll.d.ts.map +1 -1
  95. package/packages/client-agent-team/lib/types/client/timeline-scroll.js +9 -22
  96. package/packages/tool-agent-team/lib/index.js +25 -5
  97. package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
  98. package/packages/client-agent-team/lib/types/client/TeamMemberSessionComposer.d.ts +0 -17
  99. package/packages/client-agent-team/lib/types/client/TeamMemberSessionComposer.d.ts.map +0 -1
  100. package/packages/client-agent-team/lib/types/client/TeamMemberSessionComposer.js +0 -135
@@ -4092,6 +4092,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4092
4092
  "model": string().readonly(),
4093
4093
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4094
4094
  }).readonly().optional(),
4095
+ "capabilities": object({
4096
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4097
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4098
+ }).readonly().optional(),
4095
4099
  "channelRefs": array(intersection(string(), unknown())).readonly()
4096
4100
  });
4097
4101
  const _wowyuarm_dsh_agent_team_agentTeam_addMember_result$schema = object({
@@ -4113,16 +4117,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4113
4117
  "model": string().readonly(),
4114
4118
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4115
4119
  })]).readonly().optional(),
4120
+ "capabilities": union([_undefined(), object({
4121
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4122
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4123
+ })]).readonly().optional(),
4116
4124
  "privateMemoryPath": string().readonly(),
4117
4125
  "state": union([
4118
4126
  literal("enabled"),
4119
4127
  literal("suspended"),
4120
- literal("inactive")
4128
+ literal("inactive"),
4129
+ literal("archived")
4121
4130
  ]).readonly()
4122
4131
  }).readonly(),
4123
4132
  "availability": union([
4124
4133
  literal("suspended"),
4125
4134
  literal("inactive"),
4135
+ literal("archived"),
4126
4136
  literal("active"),
4127
4137
  literal("unavailable")
4128
4138
  ]).readonly(),
@@ -4132,9 +4142,98 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4132
4142
  literal("working"),
4133
4143
  literal("error")
4134
4144
  ]).readonly(),
4135
- "diagnostic": string().readonly().optional()
4145
+ "diagnostic": string().readonly().optional(),
4146
+ "capabilityWarnings": union([_undefined(), array(object({
4147
+ "name": string().readonly(),
4148
+ "knownNames": array(string()).readonly()
4149
+ }))]).readonly().optional()
4136
4150
  }).readonly()
4137
4151
  });
4152
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema = object({
4153
+ "requestId": intersection(string(), unknown()).readonly(),
4154
+ "workspaceId": intersection(string(), unknown()).readonly(),
4155
+ "channelRef": intersection(string(), unknown()).readonly()
4156
+ });
4157
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema = object({
4158
+ "receipt": object({
4159
+ "operationId": intersection(string(), unknown()).readonly(),
4160
+ "requestId": intersection(string(), unknown()).readonly(),
4161
+ "sequence": number().readonly()
4162
+ }).readonly(),
4163
+ "channel": object({
4164
+ "channelRef": intersection(string(), unknown()).readonly(),
4165
+ "workspaceId": intersection(string(), unknown()).readonly(),
4166
+ "name": string().readonly(),
4167
+ "description": string().readonly(),
4168
+ "createdAtSequence": number().readonly(),
4169
+ "state": union([literal("archived"), literal("active")]).readonly()
4170
+ }).readonly(),
4171
+ "releasedClaims": array(object({
4172
+ "claimRef": intersection(string(), unknown()).readonly(),
4173
+ "taskRef": intersection(string(), unknown()).readonly(),
4174
+ "threadRef": intersection(string(), unknown()).readonly(),
4175
+ "owner": intersection(string(), unknown()).readonly(),
4176
+ "direction": string().readonly(),
4177
+ "normalizedDirection": string().readonly(),
4178
+ "state": union([
4179
+ literal("active"),
4180
+ literal("done"),
4181
+ literal("released")
4182
+ ]).readonly()
4183
+ })).readonly()
4184
+ });
4185
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema = object({
4186
+ "requestId": intersection(string(), unknown()).readonly(),
4187
+ "memberId": intersection(string(), unknown()).readonly()
4188
+ });
4189
+ const _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema = object({
4190
+ "receipt": object({
4191
+ "operationId": intersection(string(), unknown()).readonly(),
4192
+ "requestId": intersection(string(), unknown()).readonly(),
4193
+ "sequence": number().readonly()
4194
+ }).readonly(),
4195
+ "member": object({
4196
+ "memberId": intersection(string(), unknown()).readonly(),
4197
+ "sessionId": intersection(string(), unknown()).readonly(),
4198
+ "workspaceId": intersection(string(), unknown()).readonly(),
4199
+ "handle": string().readonly(),
4200
+ "description": string().readonly(),
4201
+ "presetId": string().readonly(),
4202
+ "model": union([_undefined(), object({
4203
+ "provider": string().readonly(),
4204
+ "model": string().readonly(),
4205
+ "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4206
+ })]).readonly().optional(),
4207
+ "capabilities": union([_undefined(), object({
4208
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4209
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4210
+ })]).readonly().optional(),
4211
+ "privateMemoryPath": string().readonly(),
4212
+ "state": union([
4213
+ literal("enabled"),
4214
+ literal("suspended"),
4215
+ literal("inactive"),
4216
+ literal("archived")
4217
+ ]).readonly()
4218
+ }).readonly(),
4219
+ "releasedClaims": array(object({
4220
+ "claimRef": intersection(string(), unknown()).readonly(),
4221
+ "taskRef": intersection(string(), unknown()).readonly(),
4222
+ "threadRef": intersection(string(), unknown()).readonly(),
4223
+ "owner": intersection(string(), unknown()).readonly(),
4224
+ "direction": string().readonly(),
4225
+ "normalizedDirection": string().readonly(),
4226
+ "state": union([
4227
+ literal("active"),
4228
+ literal("done"),
4229
+ literal("released")
4230
+ ]).readonly()
4231
+ })).readonly(),
4232
+ "removedAttention": array(object({
4233
+ "memberId": intersection(string(), unknown()).readonly(),
4234
+ "threadRef": intersection(string(), unknown()).readonly()
4235
+ })).readonly()
4236
+ });
4138
4237
  const _wowyuarm_dsh_agent_team_agentTeam_changeAttention_parameter_0$schema = object({
4139
4238
  "requestId": intersection(string(), unknown()).readonly(),
4140
4239
  "workspaceId": intersection(string(), unknown()).readonly(),
@@ -4153,10 +4252,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4153
4252
  "channelRef": intersection(string(), unknown()).readonly(),
4154
4253
  "threadRef": intersection(string(), unknown()).readonly(),
4155
4254
  "status": union([
4255
+ literal("done"),
4156
4256
  literal("todo"),
4157
4257
  literal("in_progress"),
4158
4258
  literal("in_review"),
4159
- literal("done"),
4160
4259
  literal("closed")
4161
4260
  ]).readonly(),
4162
4261
  "resolution": union([
@@ -4234,10 +4333,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4234
4333
  "channelRef": intersection(string(), unknown()).readonly(),
4235
4334
  "threadRef": intersection(string(), unknown()).readonly(),
4236
4335
  "status": union([
4336
+ literal("done"),
4237
4337
  literal("todo"),
4238
4338
  literal("in_progress"),
4239
4339
  literal("in_review"),
4240
- literal("done"),
4241
4340
  literal("closed")
4242
4341
  ]).readonly(),
4243
4342
  "resolution": union([
@@ -4305,16 +4404,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4305
4404
  "model": string().readonly(),
4306
4405
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4307
4406
  })]).readonly().optional(),
4407
+ "capabilities": union([_undefined(), object({
4408
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4409
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4410
+ })]).readonly().optional(),
4308
4411
  "privateMemoryPath": string().readonly(),
4309
4412
  "state": union([
4310
4413
  literal("enabled"),
4311
4414
  literal("suspended"),
4312
- literal("inactive")
4415
+ literal("inactive"),
4416
+ literal("archived")
4313
4417
  ]).readonly()
4314
4418
  }).readonly(),
4315
4419
  "availability": union([
4316
4420
  literal("suspended"),
4317
4421
  literal("inactive"),
4422
+ literal("archived"),
4318
4423
  literal("active"),
4319
4424
  literal("unavailable")
4320
4425
  ]).readonly(),
@@ -4324,7 +4429,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4324
4429
  literal("working"),
4325
4430
  literal("error")
4326
4431
  ]).readonly(),
4327
- "diagnostic": string().readonly().optional()
4432
+ "diagnostic": string().readonly().optional(),
4433
+ "capabilityWarnings": union([_undefined(), array(object({
4434
+ "name": string().readonly(),
4435
+ "knownNames": array(string()).readonly()
4436
+ }))]).readonly().optional()
4328
4437
  }).readonly()
4329
4438
  });
4330
4439
  const _wowyuarm_dsh_agent_team_agentTeam_createChannel_parameter_0$schema = object({
@@ -4345,7 +4454,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4345
4454
  "workspaceId": intersection(string(), unknown()).readonly(),
4346
4455
  "name": string().readonly(),
4347
4456
  "description": string().readonly(),
4348
- "createdAtSequence": number().readonly()
4457
+ "createdAtSequence": number().readonly(),
4458
+ "state": union([literal("archived"), literal("active")]).readonly()
4349
4459
  }).readonly(),
4350
4460
  "memberIds": array(intersection(string(), unknown())).readonly()
4351
4461
  });
@@ -4368,10 +4478,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4368
4478
  "channelRef": intersection(string(), unknown()).readonly(),
4369
4479
  "threadRef": intersection(string(), unknown()).readonly(),
4370
4480
  "status": union([
4481
+ literal("done"),
4371
4482
  literal("todo"),
4372
4483
  literal("in_progress"),
4373
4484
  literal("in_review"),
4374
- literal("done"),
4375
4485
  literal("closed")
4376
4486
  ]).readonly(),
4377
4487
  "resolution": union([
@@ -4427,15 +4537,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4427
4537
  "model": string().readonly(),
4428
4538
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4429
4539
  })]).readonly().optional(),
4540
+ "capabilities": union([_undefined(), object({
4541
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4542
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4543
+ })]).readonly().optional(),
4430
4544
  "state": union([
4431
4545
  literal("enabled"),
4432
4546
  literal("suspended"),
4433
- literal("inactive")
4547
+ literal("inactive"),
4548
+ literal("archived")
4434
4549
  ]).readonly()
4435
4550
  }).readonly(),
4436
4551
  "availability": union([
4437
4552
  literal("suspended"),
4438
4553
  literal("inactive"),
4554
+ literal("archived"),
4439
4555
  literal("active"),
4440
4556
  literal("unavailable")
4441
4557
  ]).readonly(),
@@ -4445,7 +4561,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4445
4561
  literal("working"),
4446
4562
  literal("error")
4447
4563
  ]).readonly(),
4448
- "diagnostic": string().readonly().optional()
4564
+ "diagnostic": string().readonly().optional(),
4565
+ "capabilityWarnings": union([_undefined(), array(object({
4566
+ "name": string().readonly(),
4567
+ "knownNames": array(string()).readonly()
4568
+ }))]).readonly().optional()
4449
4569
  }));
4450
4570
  const _wowyuarm_dsh_agent_team_agentTeam_promoteThread_parameter_0$schema = object({
4451
4571
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4496,10 +4616,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4496
4616
  "channelRef": intersection(string(), unknown()).readonly(),
4497
4617
  "threadRef": intersection(string(), unknown()).readonly(),
4498
4618
  "status": union([
4619
+ literal("done"),
4499
4620
  literal("todo"),
4500
4621
  literal("in_progress"),
4501
4622
  literal("in_review"),
4502
- literal("done"),
4503
4623
  literal("closed")
4504
4624
  ]).readonly(),
4505
4625
  "resolution": union([
@@ -4546,10 +4666,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4546
4666
  "channelRef": intersection(string(), unknown()).readonly(),
4547
4667
  "threadRef": intersection(string(), unknown()).readonly(),
4548
4668
  "status": union([
4669
+ literal("done"),
4549
4670
  literal("todo"),
4550
4671
  literal("in_progress"),
4551
4672
  literal("in_review"),
4552
- literal("done"),
4553
4673
  literal("closed")
4554
4674
  ]).readonly(),
4555
4675
  "resolution": union([
@@ -4695,16 +4815,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4695
4815
  "model": string().readonly(),
4696
4816
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
4697
4817
  })]).readonly().optional(),
4818
+ "capabilities": union([_undefined(), object({
4819
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
4820
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
4821
+ })]).readonly().optional(),
4698
4822
  "privateMemoryPath": string().readonly(),
4699
4823
  "state": union([
4700
4824
  literal("enabled"),
4701
4825
  literal("suspended"),
4702
- literal("inactive")
4826
+ literal("inactive"),
4827
+ literal("archived")
4703
4828
  ]).readonly()
4704
4829
  }).readonly(),
4705
4830
  "availability": union([
4706
4831
  literal("suspended"),
4707
4832
  literal("inactive"),
4833
+ literal("archived"),
4708
4834
  literal("active"),
4709
4835
  literal("unavailable")
4710
4836
  ]).readonly(),
@@ -4714,7 +4840,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4714
4840
  literal("working"),
4715
4841
  literal("error")
4716
4842
  ]).readonly(),
4717
- "diagnostic": string().readonly().optional()
4843
+ "diagnostic": string().readonly().optional(),
4844
+ "capabilityWarnings": union([_undefined(), array(object({
4845
+ "name": string().readonly(),
4846
+ "knownNames": array(string()).readonly()
4847
+ }))]).readonly().optional()
4718
4848
  }).readonly() });
4719
4849
  const _wowyuarm_dsh_agent_team_agentTeam_removeChannelMember_parameter_0$schema = object({
4720
4850
  "requestId": intersection(string(), unknown()).readonly(),
@@ -4824,10 +4954,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4824
4954
  "channelRef": intersection(string(), unknown()).readonly(),
4825
4955
  "threadRef": intersection(string(), unknown()).readonly(),
4826
4956
  "status": union([
4957
+ literal("done"),
4827
4958
  literal("todo"),
4828
4959
  literal("in_progress"),
4829
4960
  literal("in_review"),
4830
- literal("done"),
4831
4961
  literal("closed")
4832
4962
  ]).readonly(),
4833
4963
  "resolution": union([
@@ -4906,10 +5036,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4906
5036
  "channelRef": intersection(string(), unknown()).readonly(),
4907
5037
  "threadRef": intersection(string(), unknown()).readonly(),
4908
5038
  "status": union([
5039
+ literal("done"),
4909
5040
  literal("todo"),
4910
5041
  literal("in_progress"),
4911
5042
  literal("in_review"),
4912
- literal("done"),
4913
5043
  literal("closed")
4914
5044
  ]).readonly(),
4915
5045
  "resolution": union([
@@ -4969,10 +5099,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4969
5099
  "channelRef": intersection(string(), unknown()).readonly(),
4970
5100
  "threadRef": intersection(string(), unknown()).readonly(),
4971
5101
  "status": union([
5102
+ literal("done"),
4972
5103
  literal("todo"),
4973
5104
  literal("in_progress"),
4974
5105
  literal("in_review"),
4975
- literal("done"),
4976
5106
  literal("closed")
4977
5107
  ]).readonly(),
4978
5108
  "resolution": union([
@@ -5115,7 +5245,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5115
5245
  "workspaceId": intersection(string(), unknown()).readonly(),
5116
5246
  "name": string().readonly(),
5117
5247
  "description": string().readonly(),
5118
- "createdAtSequence": number().readonly()
5248
+ "createdAtSequence": number().readonly(),
5249
+ "state": union([literal("archived"), literal("active")]).readonly()
5119
5250
  }).readonly()
5120
5251
  });
5121
5252
  const _wowyuarm_dsh_agent_team_agentTeam_updateMember_parameter_0$schema = object({
@@ -5127,6 +5258,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5127
5258
  "provider": string().readonly(),
5128
5259
  "model": string().readonly(),
5129
5260
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
5261
+ }).readonly().optional(),
5262
+ "capabilities": object({
5263
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
5264
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
5130
5265
  }).readonly().optional()
5131
5266
  });
5132
5267
  const _wowyuarm_dsh_agent_team_agentTeam_updateMember_result$schema = object({
@@ -5148,16 +5283,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5148
5283
  "model": string().readonly(),
5149
5284
  "reasoningEffort": intersection(string(), unknown()).readonly().optional()
5150
5285
  })]).readonly().optional(),
5286
+ "capabilities": union([_undefined(), object({
5287
+ "tools": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional(),
5288
+ "skills": union([_undefined(), object({ "allow": array(string()).readonly().optional() })]).readonly().optional()
5289
+ })]).readonly().optional(),
5151
5290
  "privateMemoryPath": string().readonly(),
5152
5291
  "state": union([
5153
5292
  literal("enabled"),
5154
5293
  literal("suspended"),
5155
- literal("inactive")
5294
+ literal("inactive"),
5295
+ literal("archived")
5156
5296
  ]).readonly()
5157
5297
  }).readonly(),
5158
5298
  "availability": union([
5159
5299
  literal("suspended"),
5160
5300
  literal("inactive"),
5301
+ literal("archived"),
5161
5302
  literal("active"),
5162
5303
  literal("unavailable")
5163
5304
  ]).readonly(),
@@ -5167,7 +5308,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5167
5308
  literal("working"),
5168
5309
  literal("error")
5169
5310
  ]).readonly(),
5170
- "diagnostic": string().readonly().optional()
5311
+ "diagnostic": string().readonly().optional(),
5312
+ "capabilityWarnings": union([_undefined(), array(object({
5313
+ "name": string().readonly(),
5314
+ "knownNames": array(string()).readonly()
5315
+ }))]).readonly().optional()
5171
5316
  }).readonly()
5172
5317
  });
5173
5318
  const _wowyuarm_dsh_agent_team_agentTeam_view_parameter_0$schema = object({
@@ -5187,7 +5332,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5187
5332
  "workspaceId": intersection(string(), unknown()).readonly(),
5188
5333
  "name": string().readonly(),
5189
5334
  "description": string().readonly(),
5190
- "createdAtSequence": number().readonly()
5335
+ "createdAtSequence": number().readonly(),
5336
+ "state": union([literal("archived"), literal("active")]).readonly()
5191
5337
  })).readonly(),
5192
5338
  "members": array(object({
5193
5339
  "channelRef": intersection(string(), unknown()).readonly(),
@@ -5198,10 +5344,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5198
5344
  "channelRef": intersection(string(), unknown()).readonly(),
5199
5345
  "threadRef": intersection(string(), unknown()).readonly(),
5200
5346
  "status": union([
5347
+ literal("done"),
5201
5348
  literal("todo"),
5202
5349
  literal("in_progress"),
5203
5350
  literal("in_review"),
5204
- literal("done"),
5205
5351
  literal("closed")
5206
5352
  ]).readonly(),
5207
5353
  "resolution": union([
@@ -5243,10 +5389,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5243
5389
  "channelRef": intersection(string(), unknown()).readonly(),
5244
5390
  "threadRef": intersection(string(), unknown()).readonly(),
5245
5391
  "status": union([
5392
+ literal("done"),
5246
5393
  literal("todo"),
5247
5394
  literal("in_progress"),
5248
5395
  literal("in_review"),
5249
- literal("done"),
5250
5396
  literal("closed")
5251
5397
  ]).readonly(),
5252
5398
  "resolution": union([
@@ -5344,7 +5490,61 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5344
5490
  },
5345
5491
  sourceLocation: {
5346
5492
  "file": "packages/agent-team/src/index.ts",
5347
- "line": 397,
5493
+ "line": 438,
5494
+ "column": 9
5495
+ }
5496
+ },
5497
+ {
5498
+ id: "@wowyuarm/dsh-agent-team#agentTeam/archiveChannel",
5499
+ service: "agentTeam",
5500
+ namespace: "agentTeam",
5501
+ method: "archiveChannel",
5502
+ invocation: { kind: "direct" },
5503
+ parameters: [{
5504
+ name: "request",
5505
+ wire: "request",
5506
+ source: "json",
5507
+ codec: {
5508
+ mode: "strict",
5509
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveChannelRequest",
5510
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_parameter_0$schema
5511
+ }
5512
+ }],
5513
+ result: {
5514
+ mode: "strict",
5515
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveChannelResult",
5516
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveChannel_result$schema
5517
+ },
5518
+ sourceLocation: {
5519
+ "file": "packages/agent-team/src/index.ts",
5520
+ "line": 428,
5521
+ "column": 9
5522
+ }
5523
+ },
5524
+ {
5525
+ id: "@wowyuarm/dsh-agent-team#agentTeam/archiveMember",
5526
+ service: "agentTeam",
5527
+ namespace: "agentTeam",
5528
+ method: "archiveMember",
5529
+ invocation: { kind: "direct" },
5530
+ parameters: [{
5531
+ name: "request",
5532
+ wire: "request",
5533
+ source: "json",
5534
+ codec: {
5535
+ mode: "strict",
5536
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveMemberRequest",
5537
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_parameter_0$schema
5538
+ }
5539
+ }],
5540
+ result: {
5541
+ mode: "strict",
5542
+ typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamArchiveMemberResult",
5543
+ schema: _wowyuarm_dsh_agent_team_agentTeam_archiveMember_result$schema
5544
+ },
5545
+ sourceLocation: {
5546
+ "file": "packages/agent-team/src/index.ts",
5547
+ "line": 701,
5348
5548
  "column": 9
5349
5549
  }
5350
5550
  },
@@ -5371,7 +5571,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5371
5571
  },
5372
5572
  sourceLocation: {
5373
5573
  "file": "packages/agent-team/src/index.ts",
5374
- "line": 738,
5574
+ "line": 823,
5375
5575
  "column": 9
5376
5576
  }
5377
5577
  },
@@ -5399,7 +5599,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5399
5599
  },
5400
5600
  sourceLocation: {
5401
5601
  "file": "packages/agent-team/src/index.ts",
5402
- "line": 334,
5602
+ "line": 360,
5403
5603
  "column": 9
5404
5604
  }
5405
5605
  },
@@ -5426,7 +5626,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5426
5626
  },
5427
5627
  sourceLocation: {
5428
5628
  "file": "packages/agent-team/src/index.ts",
5429
- "line": 628,
5629
+ "line": 713,
5430
5630
  "column": 9
5431
5631
  }
5432
5632
  },
@@ -5453,7 +5653,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5453
5653
  },
5454
5654
  sourceLocation: {
5455
5655
  "file": "packages/agent-team/src/index.ts",
5456
- "line": 489,
5656
+ "line": 531,
5457
5657
  "column": 9
5458
5658
  }
5459
5659
  },
@@ -5480,7 +5680,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5480
5680
  },
5481
5681
  sourceLocation: {
5482
5682
  "file": "packages/agent-team/src/index.ts",
5483
- "line": 375,
5683
+ "line": 401,
5484
5684
  "column": 9
5485
5685
  }
5486
5686
  },
@@ -5507,7 +5707,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5507
5707
  },
5508
5708
  sourceLocation: {
5509
5709
  "file": "packages/agent-team/src/index.ts",
5510
- "line": 724,
5710
+ "line": 809,
5511
5711
  "column": 9
5512
5712
  }
5513
5713
  },
@@ -5534,7 +5734,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5534
5734
  },
5535
5735
  sourceLocation: {
5536
5736
  "file": "packages/agent-team/src/index.ts",
5537
- "line": 747,
5737
+ "line": 832,
5538
5738
  "column": 3
5539
5739
  }
5540
5740
  },
@@ -5561,7 +5761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5561
5761
  },
5562
5762
  sourceLocation: {
5563
5763
  "file": "packages/agent-team/src/index.ts",
5564
- "line": 648,
5764
+ "line": 733,
5565
5765
  "column": 9
5566
5766
  }
5567
5767
  },
@@ -5589,7 +5789,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5589
5789
  },
5590
5790
  sourceLocation: {
5591
5791
  "file": "packages/agent-team/src/index.ts",
5592
- "line": 325,
5792
+ "line": 351,
5593
5793
  "column": 3
5594
5794
  }
5595
5795
  },
@@ -5616,7 +5816,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5616
5816
  },
5617
5817
  sourceLocation: {
5618
5818
  "file": "packages/agent-team/src/index.ts",
5619
- "line": 638,
5819
+ "line": 723,
5620
5820
  "column": 9
5621
5821
  }
5622
5822
  },
@@ -5643,7 +5843,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5643
5843
  },
5644
5844
  sourceLocation: {
5645
5845
  "file": "packages/agent-team/src/index.ts",
5646
- "line": 711,
5846
+ "line": 796,
5647
5847
  "column": 9
5648
5848
  }
5649
5849
  },
@@ -5670,7 +5870,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5670
5870
  },
5671
5871
  sourceLocation: {
5672
5872
  "file": "packages/agent-team/src/index.ts",
5673
- "line": 754,
5873
+ "line": 839,
5674
5874
  "column": 9
5675
5875
  }
5676
5876
  },
@@ -5697,7 +5897,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5697
5897
  },
5698
5898
  sourceLocation: {
5699
5899
  "file": "packages/agent-team/src/index.ts",
5700
- "line": 450,
5900
+ "line": 492,
5701
5901
  "column": 9
5702
5902
  }
5703
5903
  },
@@ -5724,7 +5924,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5724
5924
  },
5725
5925
  sourceLocation: {
5726
5926
  "file": "packages/agent-team/src/index.ts",
5727
- "line": 659,
5927
+ "line": 744,
5728
5928
  "column": 9
5729
5929
  }
5730
5930
  },
@@ -5751,7 +5951,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5751
5951
  },
5752
5952
  sourceLocation: {
5753
5953
  "file": "packages/agent-team/src/index.ts",
5754
- "line": 732,
5954
+ "line": 817,
5755
5955
  "column": 9
5756
5956
  }
5757
5957
  },
@@ -5778,7 +5978,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5778
5978
  },
5779
5979
  sourceLocation: {
5780
5980
  "file": "packages/agent-team/src/index.ts",
5781
- "line": 312,
5981
+ "line": 338,
5782
5982
  "column": 3
5783
5983
  }
5784
5984
  },
@@ -5805,7 +6005,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5805
6005
  },
5806
6006
  sourceLocation: {
5807
6007
  "file": "packages/agent-team/src/index.ts",
5808
- "line": 668,
6008
+ "line": 753,
5809
6009
  "column": 9
5810
6010
  }
5811
6011
  },
@@ -5832,7 +6032,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5832
6032
  },
5833
6033
  sourceLocation: {
5834
6034
  "file": "packages/agent-team/src/index.ts",
5835
- "line": 770,
6035
+ "line": 855,
5836
6036
  "column": 3
5837
6037
  }
5838
6038
  },
@@ -5859,7 +6059,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5859
6059
  },
5860
6060
  sourceLocation: {
5861
6061
  "file": "packages/agent-team/src/index.ts",
5862
- "line": 763,
6062
+ "line": 848,
5863
6063
  "column": 3
5864
6064
  }
5865
6065
  },
@@ -5886,7 +6086,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5886
6086
  },
5887
6087
  sourceLocation: {
5888
6088
  "file": "packages/agent-team/src/index.ts",
5889
- "line": 387,
6089
+ "line": 413,
5890
6090
  "column": 9
5891
6091
  }
5892
6092
  },
@@ -5913,7 +6113,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5913
6113
  },
5914
6114
  sourceLocation: {
5915
6115
  "file": "packages/agent-team/src/index.ts",
5916
- "line": 598,
6116
+ "line": 641,
5917
6117
  "column": 9
5918
6118
  }
5919
6119
  },
@@ -5940,7 +6140,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5940
6140
  },
5941
6141
  sourceLocation: {
5942
6142
  "file": "packages/agent-team/src/index.ts",
5943
- "line": 777,
6143
+ "line": 862,
5944
6144
  "column": 3
5945
6145
  }
5946
6146
  }
@@ -6560,7 +6760,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6560
6760
  const mintRequestId = () => crypto.randomUUID();
6561
6761
  //#endregion
6562
6762
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/composer.module.css.mjs
6563
- const css$5 = ".x9jGQq_root{padding:0 var(--dsh-composer-side-clearance,16px) 8px;flex-direction:column;align-items:center;display:flex}.x9jGQq_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width,780px);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-shadow-lv2);border-radius:22px;flex-direction:column;gap:6px;padding:10px 0 0;display:flex;position:relative}.x9jGQq_inputArea{min-height:28px;position:relative}.x9jGQq_inputArea textarea{box-sizing:border-box;resize:none;width:100%;min-height:28px;max-height:336px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:0 0;border:0;outline:0;padding:4px 12px 0 16px;font-size:15px;line-height:24px;display:block;overflow-y:auto}.x9jGQq_inputArea textarea::placeholder{color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary))}.x9jGQq_memberSessionRoot{padding:0 var(--dsh-composer-side-clearance) 8px}.x9jGQq_memberSessionCard{font-family:var(--dsw-font-family);gap:6px;padding-top:10px;font-size:16px;line-height:24px}.x9jGQq_memberSessionInputArea textarea{min-height:28px;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font-family:var(--dsw-font-family);font-size:inherit;line-height:inherit;padding:4px 12px 0 16px}.x9jGQq_memberSessionStatus{width:100%;max-width:var(--dsh-composer-card-max-width);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-error-primary);border-radius:8px;margin:0 0 6px;padding:4px 8px;font-size:12px;line-height:18px}.x9jGQq_memberSessionToolbar{min-width:0;padding:2px 8px 6px}.x9jGQq_memberSessionPrimary{background:var(--dsw-alias-button-info-fill);border-radius:999px;place-items:center;display:grid;transform:translateY(-2px)}.x9jGQq_memberSessionPrimary:hover:not(:disabled){background:var(--dsw-alias-button-info-hover)}.x9jGQq_memberSessionPrimary:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_memberSessionPrimary:disabled{cursor:default;opacity:.4}.x9jGQq_inputArea textarea:disabled{cursor:not-allowed;opacity:.55}.x9jGQq_mentionMenu{z-index:10;border:1px solid var(--dsw-alias-border-inverted);background:var(--dsw-specific-menu);max-height:min(320px,40vh);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;padding:4px;position:absolute;bottom:calc(100% + 12px);left:0;right:0;overflow-y:auto}.x9jGQq_mentionOption{width:100%;min-height:40px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));cursor:pointer;text-align:left;background:0 0;border:0;border-radius:10px;grid-template-columns:16px minmax(0,auto) minmax(0,1fr);align-items:center;gap:8px;padding:8px 10px;font-size:14px;line-height:22px;display:grid}.x9jGQq_mentionOption:hover,.x9jGQq_mentionOption[aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.x9jGQq_mentionName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_mentionAllDot{background:var(--dsw-alias-label-primary);border-radius:50%;justify-self:center;width:8px;height:8px}.x9jGQq_mentionDescription{min-width:0;color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_toolbar{justify-content:flex-end;align-items:center;gap:6px;min-height:34px;padding:2px 8px 6px;display:flex}.x9jGQq_asTaskOn[aria-pressed=true],.x9jGQq_asTaskOn[aria-pressed=true]:hover:not(:disabled){background:var(--dsw-alias-button-primary-fill);border-color:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.x9jGQq_attachButton{background:var(--dsw-specific-selector);color:var(--dsw-alias-label-primary);cursor:pointer;border:0;border-radius:999px;flex:none;place-items:center;width:28px;height:28px;margin-right:auto;display:grid}.x9jGQq_attachButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.x9jGQq_attachButton:disabled{cursor:default;opacity:.5}.x9jGQq_attachButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,var(--dsw-specific-selector));outline-offset:1px}.x9jGQq_fileInput{display:none}.x9jGQq_fileChips{flex-wrap:wrap;gap:4px;margin:0;padding:4px 8px 0;list-style:none;display:flex}.x9jGQq_fileChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 8px;display:inline-flex}.x9jGQq_fileChipSize{color:var(--dsw-alias-label-tertiary);margin-left:6px}.x9jGQq_imageChip{align-items:center;display:flex}.x9jGQq_imageChipPreview{border:1px solid var(--dsw-alias-border-l2);object-fit:cover;border-radius:4px;width:56px;height:40px}.x9jGQq_fileChipName{text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-size:11px;line-height:16px;overflow:hidden}.x9jGQq_fileChipRemove{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:16px;height:16px;padding:0;font-size:12px;display:inline-flex}.x9jGQq_fileChipRemove:hover,.x9jGQq_fileChipRemove:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.x9jGQq_sendButton{background:var(--dsw-alias-button-info-fill,var(--dsw-alias-button-primary-fill));color:#fff;cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;padding:0;transition:background-color .1s,opacity .1s;display:inline-flex}.x9jGQq_sendButton:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--dsw-alias-button-primary-hover))}.x9jGQq_sendButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_sendButton:disabled{cursor:not-allowed;opacity:.4}.x9jGQq_confirmation{color:var(--dsw-alias-label-tertiary);align-self:stretch;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_notifyRow{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));overflow-wrap:anywhere;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_error{color:var(--dsw-alias-state-error-primary);align-self:stretch;margin:0;padding:0 4px 2px;font-size:12px;line-height:18px}@media (width<=600px){.x9jGQq_mentionOption{grid-template-columns:16px minmax(0,1fr);min-height:36px;padding-block:6px}.x9jGQq_mentionDescription{display:none}}@media (prefers-reduced-motion:reduce){.x9jGQq_sendButton{transition:none}}";
6763
+ const css$5 = ".x9jGQq_root{padding:0 var(--dsh-composer-side-clearance,16px) 8px;flex-direction:column;align-items:center;display:flex}.x9jGQq_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width,780px);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-shadow-lv2);border-radius:22px;flex-direction:column;gap:6px;padding:10px 0 0;display:flex;position:relative}.x9jGQq_inputArea{min-height:28px;position:relative}.x9jGQq_inputArea textarea{box-sizing:border-box;resize:none;width:100%;min-height:28px;max-height:336px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:0 0;border:0;outline:0;padding:4px 12px 0 16px;font-size:15px;line-height:24px;display:block;overflow-y:auto}.x9jGQq_inputArea textarea::placeholder{color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary))}.x9jGQq_memberSessionRoot{padding:0 var(--dsh-composer-side-clearance) 8px}.x9jGQq_memberSessionCard{font-family:var(--dsw-font-family);gap:6px;padding-top:10px;font-size:16px;line-height:24px}.x9jGQq_memberSessionInputArea textarea{min-height:28px;color:var(--dsw-alias-label-primary);caret-color:var(--dsw-alias-state-business-primary);font-family:var(--dsw-font-family);font-size:inherit;line-height:inherit;padding:4px 12px 0 16px}.x9jGQq_memberSessionStatus{width:100%;max-width:var(--dsh-composer-card-max-width);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-error-primary);border-radius:8px;margin:0 0 6px;padding:4px 8px;font-size:12px;line-height:18px}.x9jGQq_memberSessionToolbar{min-width:0;padding:2px 8px 6px}.x9jGQq_memberSessionPrimary{background:var(--dsw-alias-button-info-fill);border-radius:999px;place-items:center;display:grid;transform:translateY(-2px)}.x9jGQq_memberSessionPrimary:hover:not(:disabled){background:var(--dsw-alias-button-info-hover)}.x9jGQq_memberSessionPrimary:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_memberSessionPrimary:disabled{cursor:default;opacity:.4}.x9jGQq_inputArea textarea:disabled{cursor:not-allowed;opacity:.55}.x9jGQq_mentionMenu{z-index:10;border:1px solid var(--dsw-alias-border-inverted);background:var(--dsw-specific-menu);max-height:min(320px,40vh);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;padding:4px;position:absolute;bottom:calc(100% + 12px);left:0;right:0;overflow-y:auto}.x9jGQq_mentionOption{width:100%;min-height:40px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));cursor:pointer;text-align:left;background:0 0;border:0;border-radius:10px;grid-template-columns:16px minmax(0,auto) minmax(0,1fr);align-items:center;gap:8px;padding:8px 10px;font-size:14px;line-height:22px;display:grid}.x9jGQq_mentionOption:hover,.x9jGQq_mentionOption[aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.x9jGQq_mentionName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_mentionAllDot{background:var(--dsw-alias-label-primary);border-radius:50%;justify-self:center;width:8px;height:8px}.x9jGQq_mentionDescription{min-width:0;color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_toolbar{justify-content:flex-end;align-items:center;gap:6px;min-height:34px;padding:2px 8px 6px;display:flex}.x9jGQq_asTaskOn[aria-pressed=true],.x9jGQq_asTaskOn[aria-pressed=true]:hover:not(:disabled){background:var(--dsw-alias-button-primary-fill);border-color:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.x9jGQq_attachButton{background:var(--dsw-specific-selector);color:var(--dsw-alias-label-primary);cursor:pointer;border:0;border-radius:999px;flex:none;place-items:center;width:28px;height:28px;margin-right:auto;display:grid}.x9jGQq_attachButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.x9jGQq_attachButton:disabled{cursor:default;opacity:.5}.x9jGQq_attachButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,var(--dsw-specific-selector));outline-offset:1px}.x9jGQq_fileInput{display:none}.x9jGQq_fileChips{flex-wrap:wrap;gap:4px;margin:0;padding:4px 8px 0;list-style:none;display:flex}.x9jGQq_fileChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 8px;display:inline-flex}.x9jGQq_fileChipSize{color:var(--dsw-alias-label-tertiary);margin-left:6px}.x9jGQq_imageChip{align-items:center;display:flex}.x9jGQq_imageChipPreview{border:1px solid var(--dsw-alias-border-l2);object-fit:cover;border-radius:4px;width:56px;height:40px}.x9jGQq_fileChipName{text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-size:11px;line-height:16px;overflow:hidden}.x9jGQq_fileChipRemove{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:16px;height:16px;padding:0;font-size:12px;display:inline-flex}.x9jGQq_fileChipRemove:hover,.x9jGQq_fileChipRemove:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.x9jGQq_sendButton{background:var(--dsw-alias-button-info-fill,var(--dsw-alias-button-primary-fill));color:#fff;cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;padding:0;transition:background-color .1s,opacity .1s;display:inline-flex}.x9jGQq_sendButton:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--dsw-alias-button-primary-hover))}.x9jGQq_sendButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_sendButton:disabled{cursor:not-allowed;opacity:.4}.x9jGQq_confirmation{color:var(--dsw-alias-label-tertiary);align-self:stretch;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_notifyRow{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));overflow-wrap:anywhere;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_error{color:var(--dsw-alias-state-error-primary);align-self:stretch;margin:0;padding:0 4px 2px;font-size:12px;line-height:18px}@media (width<=600px){.x9jGQq_mentionOption{grid-template-columns:16px minmax(0,1fr);min-height:36px;padding-block:6px}.x9jGQq_mentionDescription{display:none}}@media (prefers-reduced-motion:reduce){.x9jGQq_sendButton{transition:none}}.x9jGQq_memberSessionDock{flex-direction:column;gap:4px;padding:4px 2px 0;display:flex}.x9jGQq_memberSessionHint{color:var(--dsw-alias-text-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:1.4;overflow:hidden}";
6564
6764
  const tagId$5 = "@wowyuarm/dsh-agent-team/composer.module.css";
6565
6765
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
6566
6766
  const tag = document.createElement("style");
@@ -6585,6 +6785,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6585
6785
  "imageChipPreview": "x9jGQq_imageChipPreview",
6586
6786
  "inputArea": "x9jGQq_inputArea",
6587
6787
  "memberSessionCard": "x9jGQq_memberSessionCard",
6788
+ "memberSessionDock": "x9jGQq_memberSessionDock",
6789
+ "memberSessionHint": "x9jGQq_memberSessionHint",
6588
6790
  "memberSessionInputArea": "x9jGQq_memberSessionInputArea",
6589
6791
  "memberSessionPrimary": "x9jGQq_memberSessionPrimary",
6590
6792
  "memberSessionRoot": "x9jGQq_memberSessionRoot",
@@ -6624,11 +6826,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6624
6826
  }
6625
6827
  function mentionCandidates(members, query) {
6626
6828
  const normalized = query.toLocaleLowerCase();
6627
- return members.filter((status) => status.presence !== "unavailable" && status.member.state !== "inactive" && status.member.handle.toLocaleLowerCase().startsWith(normalized));
6829
+ return members.filter((status) => status.presence !== "unavailable" && status.member.state !== "inactive" && status.member.state !== "archived" && status.member.handle.toLocaleLowerCase().startsWith(normalized));
6628
6830
  }
6629
6831
  /** Every member a manual handle pick could reach: the @all expansion snapshot. */
6630
6832
  function allMentionMembers(members) {
6631
- return members.filter((status) => status.presence !== "unavailable" && status.member.state !== "inactive");
6833
+ return members.filter((status) => status.presence !== "unavailable" && status.member.state !== "inactive" && status.member.state !== "archived");
6632
6834
  }
6633
6835
  function containsAllMention(draft) {
6634
6836
  return /(?:^|[^\p{L}\p{N}_])@all(?=$|[^\p{L}\p{N}_])/u.test(draft);
@@ -7377,6 +7579,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7377
7579
  ]);
7378
7580
  const taskLabel = (0, react.useCallback)((taskNumber) => t?.("taskLabel", { number: taskNumber }) ?? `Task #${taskNumber}`, [t]);
7379
7581
  const refLabel = (0, react.useCallback)((ref) => ref.startsWith("thread:") ? t?.("threadLabel") ?? "Thread" : ref.startsWith("channel:") ? t?.("channels") ?? "Channels" : ref, [t]);
7582
+ const markdownLabels = (0, react.useMemo)(() => ({
7583
+ code: {
7584
+ copyLabel: t?.("copyCode") ?? "Copy",
7585
+ copiedLabel: t?.("copiedCode") ?? "Copied"
7586
+ },
7587
+ footnotes: t?.("markdownFootnotes") ?? "Footnotes"
7588
+ }), [t]);
7380
7589
  const [expanded, setExpanded] = (0, react.useState)(false);
7381
7590
  const clampable = shouldClampMessage(displayBody);
7382
7591
  const clamped = clampable && !expanded;
@@ -7432,7 +7641,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7432
7641
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
7433
7642
  ref: markdownRef,
7434
7643
  className: conversation_module_css_default.messageMarkdown,
7435
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: displayBody }, `${displayBody}:${onOpenRef === void 0 ? "literal" : "refs"}`)
7644
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
7645
+ text: displayBody,
7646
+ labels: markdownLabels
7647
+ }, `${displayBody}:${onOpenRef === void 0 ? "literal" : "refs"}`)
7436
7648
  });
7437
7649
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
7438
7650
  className: conversation_module_css_default.messageRow,
@@ -7623,6 +7835,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7623
7835
  open: true,
7624
7836
  ...conversation_module_css_default.attachmentModal === void 0 ? {} : { className: conversation_module_css_default.attachmentModal },
7625
7837
  title: zoomed.name,
7838
+ closeLabel: t?.("close") ?? "Close",
7626
7839
  onClose: () => {
7627
7840
  setZoomed(void 0);
7628
7841
  },
@@ -7750,46 +7963,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7750
7963
  //#endregion
7751
7964
  //#region src/client/timeline-scroll.ts
7752
7965
  const BOTTOM_MARGIN_PX = 48;
7753
- const BOUNDARY_OFFSET_PX = 12;
7754
7966
  /**
7755
7967
  * Chat-timeline scroll policy shared by the Channel and Thread pages: follow
7756
- * new facts only while the reader stays pinned to the bottom, keep prepended
7757
- * history visually stable, and honor explicit jump requests exactly once per
7758
- * content commit. The content key must change whenever rendered facts change.
7968
+ * new facts only while the reader stays pinned to the bottom, and keep
7969
+ * prepended history visually stable. The content key must change whenever
7970
+ * rendered facts change.
7759
7971
  */
7760
7972
  function useTimelineScroll(contentKey) {
7761
7973
  const ref = (0, react.useRef)(null);
7762
7974
  const pinnedRef = (0, react.useRef)(true);
7763
7975
  const heightRef = (0, react.useRef)(0);
7764
- const jumpRef = (0, react.useRef)();
7765
7976
  const onScroll = (0, react.useCallback)(() => {
7766
7977
  const element = ref.current;
7767
7978
  if (element === null) return;
7768
7979
  pinnedRef.current = element.scrollHeight - element.scrollTop - element.clientHeight < BOTTOM_MARGIN_PX;
7769
7980
  }, []);
7770
- const jumpToBoundary = (0, react.useCallback)(() => {
7771
- jumpRef.current = "boundary";
7772
- pinnedRef.current = false;
7773
- }, []);
7774
- const jumpToLatest = (0, react.useCallback)(() => {
7775
- jumpRef.current = "latest";
7981
+ const scrollToBottom = (0, react.useCallback)(() => {
7982
+ const element = ref.current;
7776
7983
  pinnedRef.current = true;
7984
+ if (element !== null) element.scrollTop = element.scrollHeight;
7777
7985
  }, []);
7778
7986
  (0, react.useEffect)(() => {
7779
7987
  const element = ref.current;
7780
7988
  if (element === null) return;
7781
7989
  const previousHeight = heightRef.current;
7782
7990
  heightRef.current = element.scrollHeight;
7783
- const jump = jumpRef.current;
7784
- jumpRef.current = void 0;
7785
- if (jump === "boundary") {
7786
- const marker = element.querySelector("[data-thread-boundary]");
7787
- if (marker !== null) {
7788
- element.scrollTop += marker.getBoundingClientRect().top - element.getBoundingClientRect().top - BOUNDARY_OFFSET_PX;
7789
- return;
7790
- }
7791
- }
7792
- if (jump === "latest" || pinnedRef.current) {
7991
+ if (pinnedRef.current) {
7793
7992
  element.scrollTop = element.scrollHeight;
7794
7993
  return;
7795
7994
  }
@@ -7799,8 +7998,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7799
7998
  ref,
7800
7999
  onScroll,
7801
8000
  isPinned: () => pinnedRef.current,
7802
- jumpToBoundary,
7803
- jumpToLatest
8001
+ scrollToBottom
7804
8002
  };
7805
8003
  }
7806
8004
  /**
@@ -7900,7 +8098,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7900
8098
  };
7901
8099
  //#endregion
7902
8100
  //#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/thread.module.css.mjs
7903
- 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);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);box-shadow:var(--dsw-shadow-lv2);color:var(--dsw-alias-label-secondary);z-index:2;border-radius:999px;justify-content:center;align-items:center;gap:8px;width:fit-content;margin:8px auto;padding:4px 6px 4px 12px;font-size:12px;line-height:18px;display:flex;position:sticky;bottom:8px}.-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)}}";
8101
+ 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);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);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)}}";
7904
8102
  const tagId$2 = "@wowyuarm/dsh-agent-team/thread.module.css";
7905
8103
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
7906
8104
  const tag = document.createElement("style");
@@ -7924,6 +8122,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7924
8122
  "emptyClaims": "-Qiwua_emptyClaims",
7925
8123
  "historySection": "-Qiwua_historySection",
7926
8124
  "newUpdates": "-Qiwua_newUpdates",
8125
+ "newUpdatesJump": "-Qiwua_newUpdatesJump",
7927
8126
  "publicSection": "-Qiwua_publicSection",
7928
8127
  "riskRow": "-Qiwua_riskRow",
7929
8128
  "riskSection": "-Qiwua_riskSection",
@@ -8005,7 +8204,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8005
8204
  const timeline = useTimelineScroll(`${view?.items.length ?? 0}:${channelLastItem?.message.messageRef ?? ""}`);
8006
8205
  const channel = view?.channels.find((item) => item.channelRef === channelRef);
8007
8206
  const channelMemberIds = new Set(view?.members.filter((item) => item.channelRef === channelRef).map((item) => item.memberId) ?? []);
8008
- const channelMembers = members.filter((status) => channelMemberIds.has(status.member.memberId) && status.member.state !== "inactive");
8207
+ const channelMembers = members.filter((status) => channelMemberIds.has(status.member.memberId) && status.member.state !== "inactive" && status.member.state !== "archived");
8009
8208
  const onlineCount = channelMembers.filter((status) => status.presence === "available" || status.presence === "working").length;
8010
8209
  const messageSender = (item) => item.message.sender;
8011
8210
  const mentionHandlesMap = new Map(members.map((status) => [status.member.memberId, status.member.handle.replace(/^@/, "")]));
@@ -8234,7 +8433,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8234
8433
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8235
8434
  ref: memberListRef,
8236
8435
  className: channel_module_css_default.memberList,
8237
- children: members.filter((status) => status.member.state !== "inactive").map((status) => {
8436
+ children: members.filter((status) => status.member.state !== "inactive" && status.member.state !== "archived").map((status) => {
8238
8437
  const joined = channelMemberIds.has(status.member.memberId);
8239
8438
  const rowPending = membership.pending.has(status.member.memberId);
8240
8439
  const disabled = rowPending || !joined && status.presence === "unavailable";
@@ -8487,7 +8686,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8487
8686
  const [readFacts, setReadFacts] = (0, react.useState)([]);
8488
8687
  const [historyCursor, setHistoryCursor] = (0, react.useState)();
8489
8688
  const [historyHasMore, setHistoryHasMore] = (0, react.useState)(false);
8490
- const [remainingUnreadCount, setRemainingUnreadCount] = (0, react.useState)(0);
8689
+ const MAX_AUTO_READ_ROUNDS = 50;
8690
+ const [autoReadExhausted, setAutoReadExhausted] = (0, react.useState)(false);
8491
8691
  const [newFactsCount, setNewFactsCount] = (0, react.useState)(0);
8492
8692
  const draftKey = `thread:${threadRef}`;
8493
8693
  const { draft, recipients } = (0, react.useSyncExternalStore)(drafts.subscribe, () => drafts.getSnapshot(draftKey));
@@ -8507,20 +8707,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8507
8707
  const currentFactsRef = (0, react.useRef)([]);
8508
8708
  const sequenceRef = (0, react.useRef)(0);
8509
8709
  const readRequestIdRef = (0, react.useRef)(mintRequestId());
8710
+ const projectionRef = (0, react.useRef)();
8510
8711
  const mutationRequests = (0, react.useRef)(/* @__PURE__ */ new Map());
8511
8712
  const threadLastFact = currentFacts[currentFacts.length - 1];
8512
8713
  const timeline = useTimelineScroll(`${currentFacts.length}:${olderFacts.length}:${threadLastFact === void 0 ? "" : factKey(threadLastFact)}`);
8513
8714
  const updateProjection = (next) => {
8715
+ projectionRef.current = next;
8514
8716
  setProjection(next);
8515
8717
  setReadFacts(next.facts);
8516
- setRemainingUnreadCount(next.remainingUnreadCount);
8517
8718
  const batch = [messageFact(next.anchor, next.anchorMentions), ...next.facts.map((fact) => fact.fact)];
8518
8719
  setCurrentFacts((current) => {
8519
8720
  const merged = mergeFacts(current, batch);
8520
8721
  currentFactsRef.current = merged;
8521
8722
  return merged;
8522
8723
  });
8523
- setNewFactsCount(0);
8724
+ };
8725
+ const drainUnread = async () => {
8726
+ for (let round = 1; round <= MAX_AUTO_READ_ROUNDS; round += 1) {
8727
+ const snapshot = projectionRef.current;
8728
+ if (snapshot === void 0 || snapshot.remainingUnreadCount <= 0) return;
8729
+ const beforeSequence = sequenceRef.current;
8730
+ if (!await readCurrent(true)) return;
8731
+ if (!mountedRef.current || sequenceRef.current !== beforeSequence + 1) return;
8732
+ if (projectionRef.current?.remainingUnreadCount === snapshot.remainingUnreadCount) return;
8733
+ }
8734
+ setAutoReadExhausted(true);
8524
8735
  };
8525
8736
  const readCurrent = async (newRequest = false) => {
8526
8737
  if (!mountedRef.current) return false;
@@ -8586,17 +8797,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8586
8797
  currentFactsRef.current = merged;
8587
8798
  return merged;
8588
8799
  });
8589
- setProjection((current) => current === void 0 ? current : {
8590
- ...current,
8591
- ...result.value.task === void 0 ? {} : { task: result.value.task },
8592
- thread: result.value.thread,
8593
- claims: result.value.claims
8800
+ setProjection((current) => {
8801
+ const next = current === void 0 ? current : {
8802
+ ...current,
8803
+ ...result.value.task === void 0 ? {} : { task: result.value.task },
8804
+ thread: result.value.thread,
8805
+ claims: result.value.claims
8806
+ };
8807
+ if (next !== void 0) projectionRef.current = next;
8808
+ return next;
8594
8809
  });
8595
8810
  if (additions.length === 0) return;
8596
- if (!timeline.isPinned()) {
8597
- setNewFactsCount((current) => current + additions.length);
8598
- return;
8599
- }
8811
+ if (!timeline.isPinned()) setNewFactsCount((current) => current + additions.length);
8600
8812
  const priorSequence = sequenceRef.current;
8601
8813
  if (await readCurrent(true)) return;
8602
8814
  if (!mountedRef.current || sequenceRef.current !== priorSequence + 1) return;
@@ -8605,6 +8817,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8605
8817
  };
8606
8818
  (0, react.useEffect)(() => {
8607
8819
  mountedRef.current = true;
8820
+ projectionRef.current = void 0;
8608
8821
  setProjection(void 0);
8609
8822
  setChannelView(void 0);
8610
8823
  setMembers([]);
@@ -8614,7 +8827,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8614
8827
  setReadFacts([]);
8615
8828
  setHistoryCursor(void 0);
8616
8829
  setHistoryHasMore(false);
8617
- setRemainingUnreadCount(0);
8830
+ setAutoReadExhausted(false);
8618
8831
  setNewFactsCount(0);
8619
8832
  setError(void 0);
8620
8833
  setStatusMessage(void 0);
@@ -8638,7 +8851,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8638
8851
  return;
8639
8852
  }
8640
8853
  updateProjection(read.value);
8641
- if (read.value.facts.some((fact) => fact.unread)) timeline.jumpToBoundary();
8854
+ timeline.scrollToBottom();
8642
8855
  if (history !== void 0 && history.ok) {
8643
8856
  setCurrentFacts((current) => {
8644
8857
  const merged = mergeFacts(current, history.value.facts);
@@ -8650,6 +8863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8650
8863
  }
8651
8864
  setError(void 0);
8652
8865
  setLoading(false);
8866
+ await drainUnread();
8653
8867
  })();
8654
8868
  refreshSupplemental();
8655
8869
  const disposers = [subscribeChanges({
@@ -8683,6 +8897,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8683
8897
  taskRef,
8684
8898
  threadRef
8685
8899
  ]);
8900
+ (0, react.useEffect)(() => {
8901
+ if (newFactsCount > 0 && timeline.isPinned()) setNewFactsCount(0);
8902
+ }, [
8903
+ newFactsCount,
8904
+ currentFacts,
8905
+ olderFacts,
8906
+ timeline
8907
+ ]);
8686
8908
  const loadOlder = async () => {
8687
8909
  if (historyHasMore === false && historyCursor === void 0) return;
8688
8910
  const beforeSequence = historyCursor ?? minSequence(currentFactsRef.current);
@@ -8831,7 +9053,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8831
9053
  if (boundaryIndex === index) nodes.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
8832
9054
  className: thread_module_css_default.unreadBoundary,
8833
9055
  role: "separator",
8834
- "data-thread-boundary": true,
8835
9056
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("unreadBoundary") })
8836
9057
  }, `boundary-${index}`));
8837
9058
  if (sender !== void 0) run.push(fact);
@@ -8841,9 +9062,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8841
9062
  return nodes;
8842
9063
  };
8843
9064
  const refreshAfterFence = async () => {
8844
- timeline.jumpToLatest();
9065
+ timeline.scrollToBottom();
8845
9066
  await readCurrent(true);
8846
9067
  await refreshSupplemental();
9068
+ await drainUnread();
8847
9069
  };
8848
9070
  const convertToTask = async () => {
8849
9071
  if (pending || thread === void 0 || task !== void 0) return;
@@ -9280,32 +9502,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9280
9502
  className: thread_module_css_default.publicSection,
9281
9503
  children: renderFactBlocks(currentFactsWithAnchor, unreadBoundary)
9282
9504
  }),
9283
- newFactsCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9284
- className: thread_module_css_default.newUpdates,
9285
- role: "status",
9286
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("readNewUpdates", { count: newFactsCount }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
9287
- size: "sm",
9288
- variant: "outline",
9289
- disabled: loading,
9290
- onClick: () => {
9291
- timeline.jumpToLatest();
9292
- readCurrent(true);
9293
- },
9294
- children: t("markRead")
9295
- })]
9296
- }),
9297
- remainingUnreadCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9505
+ autoReadExhausted && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9298
9506
  className: conversation_module_css_default.timelineAction,
9299
- role: "status",
9300
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("remainingUnread", { count: remainingUnreadCount }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
9507
+ role: "alert",
9508
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("autoReadIncomplete") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
9301
9509
  size: "sm",
9302
9510
  onClick: () => {
9303
- timeline.jumpToBoundary();
9304
- readCurrent(true);
9511
+ setAutoReadExhausted(false);
9512
+ drainUnread();
9305
9513
  },
9306
9514
  disabled: loading,
9307
- children: t("continueReading")
9515
+ children: t("retry")
9308
9516
  })]
9517
+ }),
9518
+ newFactsCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9519
+ className: thread_module_css_default.newUpdates,
9520
+ role: "status",
9521
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
9522
+ type: "button",
9523
+ className: thread_module_css_default.newUpdatesJump,
9524
+ onClick: timeline.scrollToBottom,
9525
+ children: t("newUpdatesJump", { count: newFactsCount })
9526
+ })
9309
9527
  })
9310
9528
  ]
9311
9529
  })
@@ -9952,69 +10170,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9952
10170
  "unavailableDot": "_1henIG_unavailableDot"
9953
10171
  };
9954
10172
  //#endregion
9955
- //#region src/client/multi-menu-field.tsx
9956
- /**
9957
- * Render the labeled multi-select Menu field.
9958
- * @param props.label - field caption; doubles as the trigger's accessible name.
9959
- * @param props.options - selectable entries in display order.
9960
- * @param props.selected - currently checked ids.
9961
- * @param props.onToggle - invoked with an id when its row is clicked.
9962
- * @param props.disabled - disables the trigger while a mutation is in flight.
9963
- * @param props.emptyText - shown instead of the picker when there is nothing to pick.
9964
- * @param props.triggerEmptyLabel - trigger caption when nothing is selected.
9965
- * @param props.formatCount - builds the trigger caption for N selections.
9966
- */
9967
- function MultiMenuField({ label, options, selected, onToggle, disabled = false, emptyText, triggerEmptyLabel, formatCount }) {
9968
- const [open, setOpen] = (0, react.useState)(false);
9969
- const items = options.map((option) => ({
9970
- id: option.id,
9971
- label: option.hint === void 0 ? option.label : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [option.label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
9972
- className: sidebar_module_css_default.menuHint,
9973
- children: ` ${option.hint}`
9974
- })] }),
9975
- ...option.disabled === true ? { disabled: true } : {},
9976
- ...option.icon === void 0 ? {} : { icon: option.icon }
9977
- }));
9978
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9979
- className: create_module_css_default.field,
9980
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }), options.length === 0 && emptyText !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
9981
- className: sidebar_module_css_default.editHint,
9982
- children: emptyText
9983
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
9984
- open,
9985
- portal: true,
9986
- className: create_module_css_default.menuCap,
9987
- items,
9988
- selectedIds: selected,
9989
- onSelect: (id) => {
9990
- onToggle(id);
9991
- },
9992
- onClose: () => {
9993
- setOpen(false);
9994
- },
9995
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9996
- type: "button",
9997
- className: create_module_css_default.selectTrigger,
9998
- "aria-label": label,
9999
- "aria-haspopup": "listbox",
10000
- "aria-expanded": open,
10001
- disabled,
10002
- onClick: () => {
10003
- setOpen((value) => !value);
10004
- },
10005
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10006
- className: create_module_css_default.selectValue,
10007
- children: selected.length === 0 ? triggerEmptyLabel : formatCount(selected.length)
10008
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10009
- className: `${create_module_css_default.chevron} ${open ? create_module_css_default.chevronOpen : ""}`,
10010
- "aria-hidden": true,
10011
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
10012
- })]
10013
- })
10014
- })]
10015
- });
10016
- }
10017
- //#endregion
10018
10173
  //#region src/client/TeamMemberEditor.tsx
10019
10174
  /** Model option key inside one editor; opaque and resolved against the loaded groups. */
10020
10175
  function modelKey(provider, model) {
@@ -10175,10 +10330,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10175
10330
  }
10176
10331
  /**
10177
10332
  * Agent editor: handle, description, and per-Member model selection commit
10178
- * through one durable update; Channel membership below keeps its own
10179
- * immediate add/remove flow.
10333
+ * through one durable update. Channel membership is managed from the Channel
10334
+ * side, not here.
10180
10335
  */
10181
- function AgentEditorDialog({ status, channels, loadChannels, updateMember, joinChannel, removeChannelMember, loadModels, onCommitted, onClose, t }) {
10336
+ function AgentEditorDialog({ status, updateMember, loadModels, onCommitted, onClose, t }) {
10182
10337
  const memberId = status.member.memberId;
10183
10338
  const [handle, setHandle] = (0, react.useState)(status.member.handle);
10184
10339
  const [description, setDescription] = (0, react.useState)(status.member.description);
@@ -10186,39 +10341,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10186
10341
  const [saving, setSaving] = (0, react.useState)(false);
10187
10342
  const [error, setError] = (0, react.useState)();
10188
10343
  const pendingRequest = (0, react.useRef)();
10189
- const [memberships, setMemberships] = (0, react.useState)();
10190
- const [loadError, setLoadError] = (0, react.useState)();
10191
- (0, react.useEffect)(() => {
10192
- let mounted = true;
10193
- loadChannels({
10194
- workspaceId: status.member.workspaceId,
10195
- topLevelOnly: true,
10196
- includeActivities: false,
10197
- limit: 1
10198
- }).then((result) => {
10199
- if (!mounted) return;
10200
- if (result.ok) {
10201
- setMemberships(result.value.members);
10202
- setLoadError(void 0);
10203
- } else setLoadError(result.error.message);
10204
- });
10205
- return () => {
10206
- mounted = false;
10207
- };
10208
- }, [loadChannels, status.member.workspaceId]);
10209
- const membership = useChannelMembership({
10210
- joinChannel,
10211
- removeChannelMember
10212
- }, (change) => change.channelRef, (change) => {
10213
- setMemberships((current) => {
10214
- const base = current ?? [];
10215
- return change.joined ? base.filter((item) => !(item.channelRef === change.channelRef && item.memberId === change.memberId)) : [...base, {
10216
- channelRef: change.channelRef,
10217
- memberId: change.memberId
10218
- }];
10219
- });
10220
- });
10221
- const joinedChannels = new Set((memberships ?? []).filter((item) => item.memberId === memberId).map((item) => item.channelRef));
10222
10344
  const dirty = handle.trim() !== status.member.handle || description.trim() !== status.member.description || !sameModel(model, status.member.model);
10223
10345
  const submit = async (event) => {
10224
10346
  event.preventDefault();
@@ -10229,7 +10351,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10229
10351
  memberId,
10230
10352
  handle: normalizedHandle,
10231
10353
  description: normalizedDescription,
10232
- ...model === void 0 ? {} : { model }
10354
+ ...model === void 0 ? {} : { model },
10355
+ ...status.member.capabilities === void 0 ? {} : { capabilities: status.member.capabilities }
10233
10356
  };
10234
10357
  const request = pendingRequest.current !== void 0 && pendingRequest.current.memberId === payload.memberId && pendingRequest.current.handle === payload.handle && pendingRequest.current.description === payload.description && sameModel(pendingRequest.current.model, model) ? pendingRequest.current : {
10235
10358
  requestId: mintRequestId(),
@@ -10313,53 +10436,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10313
10436
  disabled: saving,
10314
10437
  t
10315
10438
  }),
10316
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
10317
- className: create_module_css_default.memberPicker,
10318
- disabled: saving,
10319
- children: [
10320
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("channelMembersSection") }),
10321
- channels.map((channel) => {
10322
- const joined = joinedChannels.has(channel.channelRef);
10323
- const rowPending = membership.pending.has(channel.channelRef);
10324
- const disabled = rowPending || !joined && status.presence === "unavailable";
10325
- const rowError = membership.errors.get(channel.channelRef);
10326
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10327
- className: `${sidebar_module_css_default.editMemberRow} ${sidebar_module_css_default.editMemberRowChannels}`,
10328
- children: [
10329
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", {
10330
- className: sidebar_module_css_default.editChannelName,
10331
- children: ["# ", channel.name]
10332
- }),
10333
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
10334
- size: "sm",
10335
- variant: "outline",
10336
- disabled,
10337
- onClick: () => {
10338
- membership.change({
10339
- workspaceId: status.member.workspaceId,
10340
- channelRef: channel.channelRef,
10341
- memberId,
10342
- joined
10343
- });
10344
- },
10345
- children: rowPending ? t("membershipUpdating") : joined ? t("removeFromChannel") : t("addToChannel")
10346
- }),
10347
- rowError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10348
- className: sidebar_module_css_default.rowError,
10349
- role: "alert",
10350
- children: rowError
10351
- })
10352
- ]
10353
- }, channel.channelRef);
10354
- }),
10355
- channels.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("noChannelsForAgent") }),
10356
- loadError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10357
- className: sidebar_module_css_default.rowError,
10358
- role: "alert",
10359
- children: loadError
10360
- })
10361
- ]
10362
- }),
10363
10439
  error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10364
10440
  className: create_module_css_default.error,
10365
10441
  role: "alert",
@@ -10376,10 +10452,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10376
10452
  }
10377
10453
  //#endregion
10378
10454
  //#region src/client/TeamAgentsPanel.tsx
10379
- function TeamAgentsPanel({ workspaceId, loadMembers, subscribeChanges, loadChannels, addMember, updateMember, recoverMember, clearMemberContext, joinChannel, removeChannelMember, loadModels, memberSessionId, openMemberSession, onCreatingChange, t }) {
10455
+ function TeamAgentsPanel({ workspaceId, loadMembers, subscribeChanges, addMember, updateMember, recoverMember, clearMemberContext, archiveMember, loadModels, memberSessionId, openMemberSession, onCreatingChange, t }) {
10380
10456
  const [members, setMembers] = (0, react.useState)([]);
10381
- const [channels, setChannels] = (0, react.useState)([]);
10382
- const [channelRefs, setChannelRefs] = (0, react.useState)([]);
10383
10457
  const [loading, setLoading] = (0, react.useState)(true);
10384
10458
  const [error, setError] = (0, react.useState)();
10385
10459
  const [formOpen, setFormOpen] = (0, react.useState)(false);
@@ -10406,7 +10480,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10406
10480
  setLoading(true);
10407
10481
  const result = await loadMembers({ workspaceId });
10408
10482
  if (result.ok) {
10409
- setMembers(result.value);
10483
+ setMembers(result.value.filter((status) => status.member.state !== "inactive" && status.member.state !== "archived"));
10410
10484
  setError(void 0);
10411
10485
  } else setError(result.error.message);
10412
10486
  setLoading(false);
@@ -10414,18 +10488,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10414
10488
  (0, react.useEffect)(() => {
10415
10489
  refresh();
10416
10490
  }, [refresh]);
10417
- const loadWorkspaceChannels = (0, react.useCallback)(async () => {
10418
- const result = await loadChannels({
10419
- workspaceId,
10420
- topLevelOnly: true,
10421
- includeActivities: false,
10422
- limit: 1
10423
- });
10424
- if (result.ok) setChannels(result.value.channels);
10425
- }, [loadChannels, workspaceId]);
10426
- (0, react.useEffect)(() => {
10427
- loadWorkspaceChannels();
10428
- }, [loadWorkspaceChannels]);
10429
10491
  (0, react.useEffect)(() => subscribeChanges({
10430
10492
  kind: "workspace",
10431
10493
  workspaceId
@@ -10435,11 +10497,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10435
10497
  return;
10436
10498
  }
10437
10499
  refresh();
10438
- loadWorkspaceChannels();
10439
10500
  }), [
10440
10501
  subscribeChanges,
10441
10502
  refresh,
10442
- loadWorkspaceChannels,
10443
10503
  workspaceId
10444
10504
  ]);
10445
10505
  const closeForm = () => {
@@ -10458,12 +10518,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10458
10518
  const result = await addMember(request);
10459
10519
  if (result.ok) {
10460
10520
  setMembers((current) => {
10461
- return [...current.filter((status) => status.member.memberId !== result.value.status.member.memberId), result.value.status];
10521
+ const retained = current.filter((status) => status.member.memberId !== result.value.status.member.memberId);
10522
+ return result.value.status.member.state === "inactive" || result.value.status.member.state === "archived" ? retained : [...retained, result.value.status];
10462
10523
  });
10463
10524
  setHandle("");
10464
10525
  setDescription("");
10465
10526
  setModel(void 0);
10466
- setChannelRefs([]);
10467
10527
  setFormOpen(false);
10468
10528
  if (result.value.status.presence === "unavailable") setError(result.value.status.diagnostic ?? t("statusUnavailable"));
10469
10529
  else setRetryRequest(void 0);
@@ -10486,13 +10546,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10486
10546
  const normalizedHandle = handle.trim();
10487
10547
  const normalizedDescription = description.trim();
10488
10548
  if (normalizedHandle.length === 0 || creating) return;
10489
- provision(retryRequest !== void 0 && retryRequest.workspaceId === workspaceId && retryRequest.handle === normalizedHandle && retryRequest.description === normalizedDescription && sameModel(retryRequest.model, model) && retryRequest.channelRefs.length === channelRefs.length && retryRequest.channelRefs.every((ref) => channelRefs.includes(ref)) ? retryRequest : {
10549
+ provision(retryRequest !== void 0 && retryRequest.workspaceId === workspaceId && retryRequest.handle === normalizedHandle && retryRequest.description === normalizedDescription && sameModel(retryRequest.model, model) && retryRequest.channelRefs.length === 0 ? retryRequest : {
10490
10550
  requestId: mintRequestId(),
10491
10551
  workspaceId,
10492
10552
  handle: normalizedHandle,
10493
10553
  description: normalizedDescription,
10494
10554
  presetId: "team-member",
10495
- channelRefs,
10555
+ channelRefs: [],
10496
10556
  ...model === void 0 ? {} : { model }
10497
10557
  });
10498
10558
  };
@@ -10558,22 +10618,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10558
10618
  disabled: creating,
10559
10619
  t
10560
10620
  }),
10561
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MultiMenuField, {
10562
- label: `${t("initialChannels")}${t("optionalSuffix")}`,
10563
- disabled: creating,
10564
- options: channels.map((channel) => ({
10565
- id: channel.channelRef,
10566
- label: channel.name
10567
- })),
10568
- selected: channelRefs,
10569
- onToggle: (ref) => {
10570
- setChannelRefs((current) => current.includes(ref) ? current.filter((item) => item !== ref) : [...current, ref]);
10571
- setRetryRequest(void 0);
10572
- },
10573
- emptyText: t("noChannelsForAgent"),
10574
- triggerEmptyLabel: t("channelsPickerEmpty"),
10575
- formatCount: (count) => t("channelsPickerCount", { count })
10576
- }),
10577
10621
  formOpen && error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10578
10622
  className: create_module_css_default.error,
10579
10623
  role: "alert",
@@ -10620,13 +10664,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10620
10664
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AgentRow, {
10621
10665
  status,
10622
10666
  ...memberSessionId === void 0 ? {} : { current: status.member.sessionId === memberSessionId },
10623
- channels,
10624
- loadChannels,
10625
10667
  updateMember,
10626
10668
  recoverMember,
10627
10669
  clearMemberContext,
10628
- joinChannel,
10629
- removeChannelMember,
10670
+ archiveMember,
10630
10671
  loadModels,
10631
10672
  openMemberSession,
10632
10673
  onUpdated: () => {
@@ -10659,10 +10700,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10659
10700
  * conversation page, the avatar carries identity plus the presence badge, and
10660
10701
  * the row menu opens the editor.
10661
10702
  */
10662
- function AgentRow({ status, current, channels, loadChannels, updateMember, recoverMember, clearMemberContext, joinChannel, removeChannelMember, loadModels, openMemberSession, onUpdated, t }) {
10703
+ function AgentRow({ status, current, updateMember, recoverMember, clearMemberContext, archiveMember, loadModels, openMemberSession, onUpdated, t }) {
10663
10704
  const [menuOpen, setMenuOpen] = (0, react.useState)(false);
10664
10705
  const [editing, setEditing] = (0, react.useState)(false);
10665
10706
  const [clearing, setClearing] = (0, react.useState)(false);
10707
+ const [archiving, setArchiving] = (0, react.useState)(false);
10666
10708
  const [rowAlert, setRowAlert] = (0, react.useState)();
10667
10709
  const recover = async () => {
10668
10710
  try {
@@ -10705,6 +10747,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10705
10747
  }
10706
10748
  };
10707
10749
  const contextClearable = status.presence === "available" || status.presence === "error";
10750
+ const archive = async () => {
10751
+ try {
10752
+ const result = await archiveMember({
10753
+ requestId: mintRequestId(),
10754
+ memberId: status.member.memberId
10755
+ });
10756
+ await onUpdated();
10757
+ if (!result.ok) setRowAlert(t("archiveAgentFailed", { message: result.error.message }));
10758
+ } catch (cause) {
10759
+ setRowAlert(t("archiveAgentFailed", { message: cause instanceof Error ? cause.message : String(cause) }));
10760
+ }
10761
+ };
10708
10762
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
10709
10763
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10710
10764
  className: sidebar_module_css_default.agentRow,
@@ -10756,11 +10810,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10756
10810
  type: "label",
10757
10811
  id: "clear-context-reason",
10758
10812
  text: status.presence === "working" ? t("clearContextWorkingReason") : t("clearContextUnavailableReason")
10759
- }] : []
10813
+ }] : [],
10814
+ {
10815
+ id: "archive",
10816
+ label: t("archiveAgent"),
10817
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 }),
10818
+ danger: true
10819
+ }
10760
10820
  ],
10761
10821
  onSelect: (id) => {
10762
10822
  if (id === "edit") setEditing(true);
10763
10823
  else if (id === "clear-context") setClearing(true);
10824
+ else if (id === "archive") setArchiving(true);
10764
10825
  else recover();
10765
10826
  },
10766
10827
  onOpenChange: setMenuOpen
@@ -10799,13 +10860,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10799
10860
  children: t("clearContextNotice", { name: status.member.handle })
10800
10861
  })
10801
10862
  }),
10863
+ archiving && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
10864
+ open: true,
10865
+ onClose: () => {
10866
+ setArchiving(false);
10867
+ },
10868
+ title: t("archiveAgentTitle", { name: status.member.handle }),
10869
+ closeLabel: t("close"),
10870
+ contentClassName: create_module_css_default.dialogContent,
10871
+ footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
10872
+ variant: "outline",
10873
+ onClick: () => {
10874
+ setArchiving(false);
10875
+ },
10876
+ children: t("cancel")
10877
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
10878
+ variant: "primary",
10879
+ onClick: () => {
10880
+ setArchiving(false);
10881
+ archive();
10882
+ },
10883
+ children: t("archiveAgentConfirm")
10884
+ })] }),
10885
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10886
+ className: create_module_css_default.error,
10887
+ children: t("archiveAgentNotice", { name: status.member.handle })
10888
+ })
10889
+ }),
10802
10890
  editing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AgentEditorDialog, {
10803
10891
  status,
10804
- channels,
10805
- loadChannels,
10806
10892
  updateMember,
10807
- joinChannel,
10808
- removeChannelMember,
10809
10893
  loadModels,
10810
10894
  onCommitted: onUpdated,
10811
10895
  onClose: () => {
@@ -10816,6 +10900,69 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10816
10900
  ] });
10817
10901
  }
10818
10902
  //#endregion
10903
+ //#region src/client/multi-menu-field.tsx
10904
+ /**
10905
+ * Render the labeled multi-select Menu field.
10906
+ * @param props.label - field caption; doubles as the trigger's accessible name.
10907
+ * @param props.options - selectable entries in display order.
10908
+ * @param props.selected - currently checked ids.
10909
+ * @param props.onToggle - invoked with an id when its row is clicked.
10910
+ * @param props.disabled - disables the trigger while a mutation is in flight.
10911
+ * @param props.emptyText - shown instead of the picker when there is nothing to pick.
10912
+ * @param props.triggerEmptyLabel - trigger caption when nothing is selected.
10913
+ * @param props.formatCount - builds the trigger caption for N selections.
10914
+ */
10915
+ function MultiMenuField({ label, options, selected, onToggle, disabled = false, emptyText, triggerEmptyLabel, formatCount }) {
10916
+ const [open, setOpen] = (0, react.useState)(false);
10917
+ const items = options.map((option) => ({
10918
+ id: option.id,
10919
+ label: option.hint === void 0 ? option.label : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [option.label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
10920
+ className: sidebar_module_css_default.menuHint,
10921
+ children: ` ${option.hint}`
10922
+ })] }),
10923
+ ...option.disabled === true ? { disabled: true } : {},
10924
+ ...option.icon === void 0 ? {} : { icon: option.icon }
10925
+ }));
10926
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10927
+ className: create_module_css_default.field,
10928
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }), options.length === 0 && emptyText !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
10929
+ className: sidebar_module_css_default.editHint,
10930
+ children: emptyText
10931
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
10932
+ open,
10933
+ portal: true,
10934
+ className: create_module_css_default.menuCap,
10935
+ items,
10936
+ selectedIds: selected,
10937
+ onSelect: (id) => {
10938
+ onToggle(id);
10939
+ },
10940
+ onClose: () => {
10941
+ setOpen(false);
10942
+ },
10943
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
10944
+ type: "button",
10945
+ className: create_module_css_default.selectTrigger,
10946
+ "aria-label": label,
10947
+ "aria-haspopup": "listbox",
10948
+ "aria-expanded": open,
10949
+ disabled,
10950
+ onClick: () => {
10951
+ setOpen((value) => !value);
10952
+ },
10953
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10954
+ className: create_module_css_default.selectValue,
10955
+ children: selected.length === 0 ? triggerEmptyLabel : formatCount(selected.length)
10956
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10957
+ className: `${create_module_css_default.chevron} ${open ? create_module_css_default.chevronOpen : ""}`,
10958
+ "aria-hidden": true,
10959
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, {})
10960
+ })]
10961
+ })
10962
+ })]
10963
+ });
10964
+ }
10965
+ //#endregion
10819
10966
  //#region src/client/TeamChannelsPanel.tsx
10820
10967
  function TeamChannelsPanel(props) {
10821
10968
  const { workspaceId, loadMembers, loadChannels, subscribeChanges, createChannel, updateChannel, creatingAgents, selectedChannelRef, selectChannel, t } = props;
@@ -10852,7 +10999,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10852
10999
  }), loadMembers({ workspaceId })]);
10853
11000
  if (channelResult.ok && memberResult.ok) {
10854
11001
  setView(channelResult.value);
10855
- const visibleMembers = memberResult.value.filter((status) => status.member.state !== "inactive");
11002
+ const visibleMembers = memberResult.value.filter((status) => status.member.state !== "inactive" && status.member.state !== "archived");
10856
11003
  setMembers(visibleMembers);
10857
11004
  const selectable = new Set(visibleMembers.filter((status) => status.presence !== "unavailable").map((status) => status.member.memberId));
10858
11005
  setSelected((current) => new Set([...current].filter((memberId) => selectable.has(memberId))));
@@ -11077,6 +11224,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11077
11224
  joinedIds: joined,
11078
11225
  selected: selectedChannelRef === channel.channelRef,
11079
11226
  updateChannel,
11227
+ archiveChannel: props.archiveChannel,
11080
11228
  joinChannel: props.joinChannel,
11081
11229
  removeChannelMember: props.removeChannelMember,
11082
11230
  onCommitted: () => {
@@ -11102,52 +11250,108 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11102
11250
  * One sidebar Channel row: the select button keeps the `#` identity while the
11103
11251
  * row menu carries the entry point; editing covers display facts and membership.
11104
11252
  */
11105
- function ChannelRow({ channel, members, joinedIds, selected, updateChannel, joinChannel, removeChannelMember, onCommitted, selectChannel, t }) {
11253
+ function ChannelRow({ channel, members, joinedIds, selected, updateChannel, archiveChannel, joinChannel, removeChannelMember, onCommitted, selectChannel, t }) {
11106
11254
  const [menuOpen, setMenuOpen] = (0, react.useState)(false);
11107
11255
  const [editing, setEditing] = (0, react.useState)(false);
11108
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
11109
- className: sidebar_module_css_default.channelRow,
11110
- "data-menu-open": menuOpen || void 0,
11111
- "aria-current": selected ? "page" : void 0,
11112
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
11113
- type: "button",
11114
- className: sidebar_module_css_default.channelSelect,
11115
- "aria-label": `# ${channel.name}`,
11116
- onClick: () => {
11117
- selectChannel(channel.channelRef);
11256
+ const [archiving, setArchiving] = (0, react.useState)(false);
11257
+ const [rowAlert, setRowAlert] = (0, react.useState)();
11258
+ const archive = async () => {
11259
+ try {
11260
+ const result = await archiveChannel({
11261
+ requestId: mintRequestId(),
11262
+ workspaceId: channel.workspaceId,
11263
+ channelRef: channel.channelRef
11264
+ });
11265
+ await onCommitted();
11266
+ if (!result.ok) setRowAlert(t("archiveChannelFailed", { message: result.error.message }));
11267
+ } catch (cause) {
11268
+ setRowAlert(t("archiveChannelFailed", { message: cause instanceof Error ? cause.message : String(cause) }));
11269
+ }
11270
+ };
11271
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
11272
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
11273
+ className: sidebar_module_css_default.channelRow,
11274
+ "data-menu-open": menuOpen || void 0,
11275
+ "aria-current": selected ? "page" : void 0,
11276
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
11277
+ type: "button",
11278
+ className: sidebar_module_css_default.channelSelect,
11279
+ "aria-label": `# ${channel.name}`,
11280
+ onClick: () => {
11281
+ selectChannel(channel.channelRef);
11282
+ },
11283
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", {
11284
+ className: sidebar_module_css_default.channelName,
11285
+ children: ["# ", channel.name]
11286
+ })
11287
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11288
+ className: sidebar_module_css_default.rowMenu,
11289
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamRowMenu, {
11290
+ label: t("actionsChannel", { name: channel.name }),
11291
+ items: [{
11292
+ id: "edit",
11293
+ label: t("editChannel"),
11294
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
11295
+ }, {
11296
+ id: "archive",
11297
+ label: t("archiveChannel"),
11298
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutline20, { size: 16 }),
11299
+ danger: true
11300
+ }],
11301
+ onSelect: (id) => {
11302
+ if (id === "edit") setEditing(true);
11303
+ else setArchiving(true);
11304
+ },
11305
+ onOpenChange: setMenuOpen
11306
+ })
11307
+ })]
11308
+ }),
11309
+ rowAlert !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11310
+ className: sidebar_module_css_default.rowAlert,
11311
+ role: "alert",
11312
+ children: rowAlert
11313
+ }),
11314
+ archiving && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
11315
+ open: true,
11316
+ onClose: () => {
11317
+ setArchiving(false);
11118
11318
  },
11119
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", {
11120
- className: sidebar_module_css_default.channelName,
11121
- children: ["# ", channel.name]
11122
- })
11123
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11124
- className: sidebar_module_css_default.rowMenu,
11125
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamRowMenu, {
11126
- label: t("actionsChannel", { name: channel.name }),
11127
- items: [{
11128
- id: "edit",
11129
- label: t("editChannel"),
11130
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
11131
- }],
11132
- onSelect: () => {
11133
- setEditing(true);
11319
+ title: t("archiveChannelTitle", { name: channel.name }),
11320
+ closeLabel: t("close"),
11321
+ contentClassName: create_module_css_default.dialogContent,
11322
+ footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
11323
+ variant: "outline",
11324
+ onClick: () => {
11325
+ setArchiving(false);
11326
+ },
11327
+ children: t("cancel")
11328
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
11329
+ variant: "primary",
11330
+ onClick: () => {
11331
+ setArchiving(false);
11332
+ archive();
11134
11333
  },
11135
- onOpenChange: setMenuOpen
11334
+ children: t("archiveChannelConfirm")
11335
+ })] }),
11336
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
11337
+ className: create_module_css_default.error,
11338
+ children: t("archiveChannelNotice", { name: channel.name })
11136
11339
  })
11137
- })]
11138
- }), editing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChannelEditorDialog, {
11139
- channel,
11140
- members,
11141
- joinedIds,
11142
- updateChannel,
11143
- joinChannel,
11144
- removeChannelMember,
11145
- onCommitted,
11146
- onClose: () => {
11147
- setEditing(false);
11148
- },
11149
- t
11150
- })] });
11340
+ }),
11341
+ editing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChannelEditorDialog, {
11342
+ channel,
11343
+ members,
11344
+ joinedIds,
11345
+ updateChannel,
11346
+ joinChannel,
11347
+ removeChannelMember,
11348
+ onCommitted,
11349
+ onClose: () => {
11350
+ setEditing(false);
11351
+ },
11352
+ t
11353
+ })
11354
+ ] });
11151
11355
  }
11152
11356
  /**
11153
11357
  * Channel editor: name and description commit through one durable update;
@@ -11299,7 +11503,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11299
11503
  }
11300
11504
  //#endregion
11301
11505
  //#region src/client/TeamWorkspaceBrowser.tsx
11302
- function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, updateMember, recoverMember, clearMemberContext, joinChannel, removeChannelMember, loadModels, openMemberSession }) {
11506
+ function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, archiveChannel, updateMember, recoverMember, clearMemberContext, archiveMember, joinChannel, removeChannelMember, loadModels, openMemberSession }) {
11303
11507
  const navigationState = (0, react.useSyncExternalStore)(navigation.subscribe, navigation.getSnapshot, navigation.getSnapshot);
11304
11508
  const workspaces = useWorkspaces((state) => state.items);
11305
11509
  const selected = navigationState.workspaceId;
@@ -11391,6 +11595,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11391
11595
  subscribeChanges,
11392
11596
  createChannel,
11393
11597
  updateChannel,
11598
+ archiveChannel,
11394
11599
  joinChannel,
11395
11600
  removeChannelMember,
11396
11601
  creatingAgents: creatingAgents.filter((request) => request.workspaceId === selectedId),
@@ -11404,13 +11609,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11404
11609
  workspaceId: selectedId,
11405
11610
  loadMembers,
11406
11611
  subscribeChanges,
11407
- loadChannels,
11408
11612
  addMember,
11409
11613
  updateMember,
11410
11614
  recoverMember,
11411
11615
  clearMemberContext,
11412
- joinChannel,
11413
- removeChannelMember,
11616
+ archiveMember,
11414
11617
  loadModels,
11415
11618
  ...navigationState.memberSessionId === void 0 ? {} : { memberSessionId: navigationState.memberSessionId },
11416
11619
  openMemberSession,
@@ -11424,6 +11627,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11424
11627
  });
11425
11628
  }
11426
11629
  //#endregion
11630
+ //#region src/client/TeamMemberDock.tsx
11631
+ /**
11632
+ * Team-owned strip above the shipped composer while a Member Session is
11633
+ * embedded. The shipped InputBar keeps the whole input surface (draft,
11634
+ * trigger menus, submit); this dock only carries what the shipped bar cannot
11635
+ * know — the Member-Session vocabulary hint and the Member turn's prompt
11636
+ * error, read through the standard useSession hook.
11637
+ */
11638
+ function TeamMemberDock({ t, useSession }) {
11639
+ const promptError = useSession((state) => state.promptError ?? null);
11640
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11641
+ className: composer_module_css_default.memberSessionDock,
11642
+ "data-team-member-dock": "true",
11643
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11644
+ className: composer_module_css_default.memberSessionHint,
11645
+ children: t("memberSessionHint")
11646
+ }), promptError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
11647
+ className: composer_module_css_default.memberSessionStatus,
11648
+ role: "alert",
11649
+ children: promptError.error.message
11650
+ })]
11651
+ });
11652
+ }
11653
+ //#endregion
11427
11654
  //#region src/client/member-session-input.ts
11428
11655
  const TEAM_COMMAND_SOURCE = "agent-team-command";
11429
11656
  const TEAM_MEMBER_SOURCE = "agent-team-member";
@@ -11462,6 +11689,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11462
11689
  token: "/compact",
11463
11690
  submit: async () => options.executeCompact(session.sessionId)
11464
11691
  } };
11692
+ },
11693
+ async matchEnter(session, line) {
11694
+ if (!options.isEmbeddedMemberSession(session.sessionId)) return void 0;
11695
+ if (line.trim() !== "/compact") return void 0;
11696
+ return { claim: {
11697
+ token: "/compact",
11698
+ submit: async () => options.executeCompact(session.sessionId)
11699
+ } };
11465
11700
  }
11466
11701
  }, {
11467
11702
  trigger: "@",
@@ -11472,7 +11707,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11472
11707
  const normalized = query.toLocaleLowerCase();
11473
11708
  const members = await options.members();
11474
11709
  if (signal.aborted) return [];
11475
- return members.filter((status) => status.member.sessionId !== session.sessionId && status.member.state !== "inactive").filter((status) => status.member.handle.toLocaleLowerCase().startsWith(normalized)).map((status) => {
11710
+ return members.filter((status) => status.member.sessionId !== session.sessionId && status.member.state !== "inactive" && status.member.state !== "archived").filter((status) => status.member.handle.toLocaleLowerCase().startsWith(normalized)).map((status) => {
11476
11711
  labels.set(status.member.memberId, `@${status.member.handle}`);
11477
11712
  return {
11478
11713
  name: `@${status.member.handle}`,
@@ -11503,10 +11738,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11503
11738
  }
11504
11739
  }];
11505
11740
  }
11506
- /** Unknown leading slash must never fall into the shipped global palette. */
11507
- function allowsMemberSessionSubmit(draft, claimToken) {
11508
- return !draft.trimStart().startsWith("/") || claimToken === "/compact";
11509
- }
11510
11741
  function escapeText(value) {
11511
11742
  return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
11512
11743
  }
@@ -11514,181 +11745,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11514
11745
  return escapeText(value).replaceAll("\"", "&quot;").replaceAll("'", "&#39;");
11515
11746
  }
11516
11747
  //#endregion
11517
- //#region src/client/TeamMemberSessionComposer.tsx
11518
- /**
11519
- * Narrow, Team-owned member-session composer. It deliberately uses the public
11520
- * input state/actions and trigger controller rather than the shipped InputBar;
11521
- * owner-provided overlay remains inside the card so the shared menu renders.
11522
- */
11523
- function TeamMemberSessionComposer({ controller, inputActions, overlay, placeholder, disabled, blocked, stop, submitInput, useInput, useSession }) {
11524
- const input = useInput((state) => state);
11525
- const session = useSession((state) => state);
11526
- const textarea = (0, react.useRef)(null);
11527
- const editedByHuman = (0, react.useRef)(void 0);
11528
- const compactWasSubmitting = (0, react.useRef)(false);
11529
- const composing = (0, react.useRef)(false);
11530
- const [submissionNotice, setSubmissionNotice] = (0, react.useState)();
11531
- const draft = input?.draft ?? "";
11532
- const isLocked = disabled === true || blocked !== void 0 || inputActions === void 0 || input === void 0;
11533
- (0, react.useEffect)(() => {
11534
- if (isLocked) return;
11535
- const active = document.activeElement;
11536
- if (active !== document.body && active?.closest("[aria-current=\"page\"]") === null) return;
11537
- textarea.current?.focus({ preventScroll: true });
11538
- }, [isLocked]);
11539
- (0, react.useLayoutEffect)(() => {
11540
- const element = textarea.current;
11541
- if (element === null) return;
11542
- element.style.height = "auto";
11543
- element.style.height = `${Math.min(element.scrollHeight, 336)}px`;
11544
- }, [draft]);
11545
- (0, react.useEffect)(() => {
11546
- if (input === void 0) return;
11547
- if (input.phase === "submitting" && input.claim?.token === "/compact") {
11548
- compactWasSubmitting.current = true;
11549
- return;
11550
- }
11551
- if (input.phase === "claimed" && input.claim?.token === "/compact" && compactWasSubmitting.current) {
11552
- compactWasSubmitting.current = false;
11553
- setSubmissionNotice("Compact 未执行,请重试。");
11554
- return;
11555
- }
11556
- if (input.phase === "plain") {
11557
- if (compactWasSubmitting.current) setSubmissionNotice(void 0);
11558
- compactWasSubmitting.current = false;
11559
- }
11560
- }, [input?.claim?.token, input?.phase]);
11561
- (0, react.useEffect)(() => {
11562
- if (input === void 0) return;
11563
- const edit = editedByHuman.current;
11564
- if (edit === void 0 || edit.draft !== input.draft) return;
11565
- editedByHuman.current = void 0;
11566
- const hit = triggerHit(input.draft, edit.caret, input.draftRev);
11567
- controller.dismiss();
11568
- if (hit !== void 0) controller.toggleSource(hit.trigger === "/" ? TEAM_COMMAND_SOURCE : TEAM_MEMBER_SOURCE, hit);
11569
- }, [
11570
- controller,
11571
- input?.draft,
11572
- input?.draftRev
11573
- ]);
11574
- const onChange = (event) => {
11575
- const caret = event.currentTarget.selectionStart;
11576
- editedByHuman.current = {
11577
- draft: event.currentTarget.value,
11578
- caret
11579
- };
11580
- setSubmissionNotice(void 0);
11581
- inputActions?.setDraft(event.currentTarget.value);
11582
- };
11583
- const submit = () => {
11584
- if (input === void 0 || inputActions === void 0) return;
11585
- if (!allowsMemberSessionSubmit(input.draft, input.claim?.token)) {
11586
- setSubmissionNotice("此 Member Session 仅支持 /compact 命令。");
11587
- return;
11588
- }
11589
- setSubmissionNotice(void 0);
11590
- submitInput(running ? "steer" : "queue");
11591
- };
11592
- const onKeyDown = (event) => {
11593
- if (event.key === "Enter" && event.shiftKey) return;
11594
- if (event.repeat || composing.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
11595
- if (event.key === "Tab" && !event.shiftKey) {
11596
- const highlight = controller.menu.getSnapshot().highlight;
11597
- if (highlight !== null) {
11598
- event.preventDefault();
11599
- controller.pick(highlight.source, highlight.index);
11600
- }
11601
- return;
11602
- }
11603
- const key = event.key === "ArrowUp" ? "up" : event.key === "ArrowDown" ? "down" : event.key === "Escape" ? "escape" : event.key === "Enter" ? "enter" : void 0;
11604
- if (key !== void 0) {
11605
- if (controller.arbitrate(key, false) !== "pass") {
11606
- event.preventDefault();
11607
- return;
11608
- }
11609
- }
11610
- if (event.key === "Enter") {
11611
- event.preventDefault();
11612
- submit();
11613
- }
11614
- };
11615
- const running = session?.running ?? false;
11616
- const promptError = session?.promptError;
11617
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11618
- className: `${composer_module_css_default.root} ${composer_module_css_default.memberSessionRoot}`,
11619
- "data-team-member-composer": "true",
11620
- children: [(submissionNotice !== void 0 || promptError !== null && promptError !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
11621
- className: composer_module_css_default.memberSessionStatus,
11622
- role: "alert",
11623
- children: submissionNotice ?? promptError?.error.message
11624
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11625
- className: `${composer_module_css_default.card} ${composer_module_css_default.memberSessionCard}`,
11626
- "data-composer-card": "true",
11627
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11628
- className: `${composer_module_css_default.inputArea} ${composer_module_css_default.memberSessionInputArea}`,
11629
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
11630
- ref: textarea,
11631
- value: draft,
11632
- disabled: isLocked,
11633
- placeholder: blocked?.reason ?? placeholder ?? "给成员发送直接消息",
11634
- onChange,
11635
- onKeyDown,
11636
- onCompositionStart: () => {
11637
- composing.current = true;
11638
- },
11639
- onCompositionEnd: () => {
11640
- composing.current = false;
11641
- }
11642
- }), overlay]
11643
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11644
- className: `${composer_module_css_default.toolbar} ${composer_module_css_default.memberSessionToolbar}`,
11645
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
11646
- className: `${composer_module_css_default.sendButton} ${composer_module_css_default.memberSessionPrimary}`,
11647
- type: "button",
11648
- "aria-label": running ? "停止生成" : "发送消息",
11649
- disabled: isLocked || !running && draft.trim() === "",
11650
- onClick: () => {
11651
- if (running) stop?.();
11652
- else submit();
11653
- },
11654
- children: running ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconStopFill16, { size: 16 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSendOutline16, { size: 16 })
11655
- })
11656
- })]
11657
- })]
11658
- });
11659
- }
11660
- function triggerHit(draft, caret, draftRev) {
11661
- const before = draft.slice(0, caret);
11662
- const leading = before.match(/^\s*\/([^\s]*)$/u);
11663
- if (leading !== null) {
11664
- const start = before.indexOf("/");
11665
- return {
11666
- trigger: "/",
11667
- query: leading[1],
11668
- quoted: false,
11669
- position: "leading",
11670
- span: {
11671
- start,
11672
- end: caret,
11673
- draftRev
11674
- }
11675
- };
11676
- }
11677
- const at = before.lastIndexOf("@");
11678
- if (at < 0 || /[\p{L}\p{N}_]/u.test(before[at - 1] ?? "") || /\s/u.test(before.slice(at + 1))) return void 0;
11679
- return {
11680
- trigger: "@",
11681
- query: before.slice(at + 1),
11682
- quoted: false,
11683
- position: "inline",
11684
- span: {
11685
- start: at,
11686
- end: caret,
11687
- draftRev
11688
- }
11689
- };
11690
- }
11691
- //#endregion
11692
11748
  //#region src/client/locales.ts
11693
11749
  const zh = {
11694
11750
  team: "团队",
@@ -11704,11 +11760,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11704
11760
  addAgent: "添加 Agent",
11705
11761
  cancel: "取消",
11706
11762
  close: "关闭",
11763
+ memberSessionHint: "成员会话:/compact 压缩上下文 · @成员 引用;普通消息直接发给该成员。",
11764
+ copyCode: "复制",
11765
+ copiedCode: "已复制",
11766
+ markdownFootnotes: "脚注",
11707
11767
  retry: "重试",
11708
11768
  agentName: "名称",
11709
11769
  agentDescription: "说明",
11710
- initialChannels: "初始频道",
11711
- noChannelsForAgent: "请先创建至少一个频道",
11712
11770
  createAgent: "创建 Agent",
11713
11771
  creatingAgent: "正在创建…",
11714
11772
  loadingAgents: "正在加载 Agents…",
@@ -11739,10 +11797,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11739
11797
  clearContextNotice: "将结束 {name} 当前的会话上下文并从空白开始:旧对话会归档保留在会话记录中。{name} 的身份、私有记忆与 notes、频道和会话绑定都保持不变,后续协作从新上下文继续累积。",
11740
11798
  clearContextConfirm: "开始全新上下文",
11741
11799
  clearContextFailed: "清空上下文失败:{message}",
11800
+ archiveAgent: "归档",
11801
+ archiveAgentTitle: "归档 Agent:{name}",
11802
+ archiveAgentNotice: "将把 {name} 从所有列表收起:会话与私有记忆保留在磁盘上、活跃 Claim 会释放,但暂无恢复入口。",
11803
+ archiveAgentConfirm: "归档",
11804
+ archiveAgentFailed: "归档失败:{message}",
11805
+ archiveChannel: "归档频道",
11806
+ archiveChannelTitle: "归档频道:{name}",
11807
+ archiveChannelNotice: "将把 {name} 及其全部讨论从所有列表收起:数据保留、所有成员在此频道的活跃 Claim 会释放,但暂无恢复入口。",
11808
+ archiveChannelConfirm: "归档频道",
11809
+ archiveChannelFailed: "归档频道失败:{message}",
11742
11810
  optionalSuffix: "(可选)",
11743
11811
  agentDescriptionPlaceholder: "留空则暂无描述",
11744
- channelsPickerEmpty: "选择初始频道",
11745
- channelsPickerCount: "已选 {count} 个频道",
11746
11812
  membersPickerEmpty: "选择初始成员",
11747
11813
  membersPickerCount: "已选 {count} 个成员",
11748
11814
  reasoningEffort: "推理强度",
@@ -11804,10 +11870,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11804
11870
  backToWorkspace: "返回工作区",
11805
11871
  loadingThread: "正在加载 Thread…",
11806
11872
  unreadBoundary: "以下是本次打开收到的更新",
11807
- readNewUpdates: "读取 {count} 条新更新",
11808
- markRead: "标记为已读",
11809
- remainingUnread: "还有 {count} 条未读更新",
11810
- continueReading: "继续阅读",
11873
+ newUpdatesJump: " {count} 条新更新",
11874
+ autoReadIncomplete: "仍有未读更新未能自动读取",
11811
11875
  olderHistory: "更早历史",
11812
11876
  runtimeRisk: "当前运行风险",
11813
11877
  runtimeRiskDetail: "@{member} 当前不可用:{diagnostic}",
@@ -11852,11 +11916,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11852
11916
  addAgent: "Add Agent",
11853
11917
  cancel: "Cancel",
11854
11918
  close: "Close",
11919
+ memberSessionHint: "Member session: /compact compresses context · @member inserts a reference; plain messages go straight to the member.",
11920
+ copyCode: "Copy",
11921
+ copiedCode: "Copied",
11922
+ markdownFootnotes: "Footnotes",
11855
11923
  retry: "Retry",
11856
11924
  agentName: "Name",
11857
11925
  agentDescription: "Description",
11858
- initialChannels: "Initial Channels",
11859
- noChannelsForAgent: "Create at least one Channel first",
11860
11926
  createAgent: "Create Agent",
11861
11927
  creatingAgent: "Creating…",
11862
11928
  loadingAgents: "Loading Agents…",
@@ -11887,10 +11953,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11887
11953
  clearContextNotice: "This ends {name}'s current session context and starts blank: the previous conversation is archived and stays in the session history. {name}'s identity, private memory and notes, channel and session bindings are untouched, and future collaboration accumulates from the new context.",
11888
11954
  clearContextConfirm: "Start from new context",
11889
11955
  clearContextFailed: "Failed to clear context: {message}",
11956
+ archiveAgent: "Archive",
11957
+ archiveAgentTitle: "Archive Agent: {name}",
11958
+ archiveAgentNotice: "This hides {name} from every list: the session log and private memory stay on disk and active Claims release, but there is no restore entry point yet.",
11959
+ archiveAgentConfirm: "Archive",
11960
+ archiveAgentFailed: "Failed to archive: {message}",
11961
+ archiveChannel: "Archive Channel",
11962
+ archiveChannelTitle: "Archive Channel: {name}",
11963
+ archiveChannelNotice: "This hides {name} and all of its discussions from every list: the data stays, every Member's active Claims in this Channel release, but there is no restore entry point yet.",
11964
+ archiveChannelConfirm: "Archive Channel",
11965
+ archiveChannelFailed: "Failed to archive Channel: {message}",
11890
11966
  optionalSuffix: " (optional)",
11891
11967
  agentDescriptionPlaceholder: "Leave empty if not needed",
11892
- channelsPickerEmpty: "Choose initial channels",
11893
- channelsPickerCount: "{count} selected",
11894
11968
  membersPickerEmpty: "Choose initial members",
11895
11969
  membersPickerCount: "{count} selected",
11896
11970
  reasoningEffort: "Reasoning effort",
@@ -11952,10 +12026,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11952
12026
  backToWorkspace: "Back to Workspace",
11953
12027
  loadingThread: "Loading Thread…",
11954
12028
  unreadBoundary: "Updates received when you opened this Thread",
11955
- readNewUpdates: "Read {count} new update(s)",
11956
- markRead: "Mark read",
11957
- remainingUnread: "{count} unread update(s) remain",
11958
- continueReading: "Continue reading",
12029
+ newUpdatesJump: " {count} new update(s)",
12030
+ autoReadIncomplete: "Some unread updates could not be read automatically",
11959
12031
  olderHistory: "Older history",
11960
12032
  runtimeRisk: "Current runtime risk",
11961
12033
  runtimeRiskDetail: "@{member} is unavailable: {diagnostic}",
@@ -11994,6 +12066,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11994
12066
  "workspaces",
11995
12067
  "locale",
11996
12068
  "remote",
12069
+ "remote.session",
11997
12070
  "sessions",
11998
12071
  "connection",
11999
12072
  "conversation",
@@ -12016,12 +12089,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12016
12089
  joinChannel: (request) => ctx.remote.agentTeam.joinChannel(request),
12017
12090
  removeChannelMember: (request) => ctx.remote.agentTeam.removeChannelMember(request),
12018
12091
  updateChannel: (request) => ctx.remote.agentTeam.updateChannel(request),
12092
+ archiveChannel: (request) => ctx.remote.agentTeam.archiveChannel(request),
12019
12093
  updateMember: (request) => ctx.remote.agentTeam.updateMember(request),
12020
12094
  recoverMember: (request) => ctx.remote.agentTeam.recoverMember(request),
12021
12095
  clearMemberContext: (request) => ctx.remote.agentTeam.clearMemberContext(request),
12022
- loadModels: async () => {
12023
- return (await ctx.get("connection").api.llm.models({})).result;
12024
- },
12096
+ archiveMember: (request) => ctx.remote.agentTeam.archiveMember(request),
12097
+ loadModels: () => ctx.remote.session.modelCatalog(),
12025
12098
  openMemberSession: openMemberSessionImpl
12026
12099
  };
12027
12100
  ctx.slots.inject(name, () => {
@@ -12069,8 +12142,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12069
12142
  };
12070
12143
  });
12071
12144
  }
12072
- function registerMemberSessionComposer(ctx, navigation) {
12073
- ctx.slots.inject("conversation.composer.bar", () => {
12145
+ function registerMemberSessionDock(ctx, navigation) {
12146
+ ctx.slots.inject("conversation.input.dock", () => {
12074
12147
  let dispose;
12075
12148
  let registeredSessionId;
12076
12149
  const reconcile = () => {
@@ -12083,23 +12156,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12083
12156
  }
12084
12157
  if (active && dispose === void 0) {
12085
12158
  registeredSessionId = memberSessionId;
12159
+ const sessions = ctx.sessions;
12086
12160
  dispose = ctx.slots.register({
12087
- name: "conversation.composer.bar",
12088
- priority: -100,
12089
- select: () => ctx.sessions.list.getSnapshot().current === memberSessionId ? {} : null,
12090
- inject: (sessionId) => {
12091
- const actx = ctx.sessions.scope(sessionId);
12092
- if (actx === void 0) throw new Error(`agent-team: Member session ${String(sessionId)} has no client scope`);
12093
- const sessions = ctx.sessions;
12094
- return {
12095
- controller: ctx.get("inputTriggers").sessionOf(actx),
12096
- stop: () => {
12097
- sessions.sessionOf(actx)?.cancel();
12098
- },
12099
- submitInput: (mode) => ctx.conversation.input.for(actx).submit(mode)
12100
- };
12101
- }
12102
- }, TeamMemberSessionComposer);
12161
+ name: "conversation.input.dock",
12162
+ id: "agent-team-member",
12163
+ locale: NS,
12164
+ select: () => sessions.list.getSnapshot().current === memberSessionId ? {} : null
12165
+ }, TeamMemberDock);
12103
12166
  }
12104
12167
  };
12105
12168
  const offNavigation = navigation.subscribe(reconcile);
@@ -12158,10 +12221,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12158
12221
  return (await Promise.all(workspaces.map(async (workspace) => {
12159
12222
  const result = await ctx.remote.agentTeam.members({ workspaceId: workspace.workspaceId });
12160
12223
  if (!result.ok) throw new Error(result.error.message);
12224
+ const members = result.value.filter((status) => status.member.state !== "inactive" && status.member.state !== "archived");
12161
12225
  return {
12162
12226
  workspaceId: workspace.workspaceId,
12163
12227
  workspaceTitle: workspace.title,
12164
- members: result.value
12228
+ members
12165
12229
  };
12166
12230
  }))).filter((group) => group.members.length > 0);
12167
12231
  };
@@ -12189,7 +12253,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12189
12253
  }, TeamFooterAction));
12190
12254
  registerModeShadow(ctx, navigation, changes, drafts, "sidebar.workspaces", TeamWorkspaceBrowser);
12191
12255
  registerModeShadow(ctx, navigation, changes, drafts, "conversation", TeamConversation);
12192
- registerMemberSessionComposer(ctx, navigation);
12256
+ registerMemberSessionDock(ctx, navigation);
12193
12257
  registerModeShadow(ctx, navigation, changes, drafts, "sidebar.settings", TeamSettings, () => ({ loadMemberGroups }));
12194
12258
  }
12195
12259
  async function apply(ctx) {