ResourcePort 实现——host声明目录+TTS合成(issue #108 Q2) #152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#108 Q2(issue #108 grill,2026-08-18 拍板:真建资源 port);ADR 更新见 PR #150
What to build
新增
ResourcePort(host 声明的静态资源目录 + TTS 合成契约),ArisePorts.resource: ResourcePort | None可选字段,新增模型工具
list_resources(kind)。原文(
docs/adr/0001-standalone-core-and-ports.md「更新(2026-08-18,issue #108 grill Q2)」节):Acceptance criteria
ResourcePortProtocol 按上述原文实现,ArisePorts新增resource: ResourcePort | None = Nonelist_resources(kind),透传到ports.resource.list_resources(kind);resource为
None时该工具不注册进可见工具集(同delegate池熔断时深挖工具消失的既有先例,is_delegate_enabled一类的可见性判断逻辑)
tools.py里content_type=sticker/voice的字段描述更新,引导模型先查list_resources再引用查到的
resource_idCapabilitySet布尔位——这是 AC 明确排除的做法,resourceport 是否为None就是完整信号
synthesize契约实现,EgressPort.send_voice接上audio_refresource=None时list_resources/语音相关工具不出现在可见工具集;resource存在时
list_resources正确透传 host 声明的目录Not in scope
search_stickers(习得贴纸)不受影响,两者并存不合并(ADR-0024 既有边界)char_count喂经济 hook 的接线属于 #157(ArisePorts.economic_hook),本票只管synthesize产出char_count,不管它被谁消费——若 #157 晚于本票落地,char_count暂时产出但未被消费是可接受的中间状态,不要在本票里顺手把经济 hook 也建了