On Celld 0.6.0, a Durable Object facet created from a class in ctx.exports with an ID from idFromName() starts correctly. Inside the facet, however, ctx.id.name is undefined.
The Cloudflare Agents SDK 0.24 requires this name, so subAgent() and agentTool() in Agents and @cloudflare/think fail on Celld. The same code works on workerd.
Versions
- Celld: v0.6.0, two nodes, fleet durability, S3-compatible bucket (SeaweedFS)
- agents: 0.24.0
- @cloudflare/think: 0.19.0
- Works on: workerd via Wrangler local dev
Reproduction
A parent Durable Object (an Agents Agent or Think agent) starts a child facet the way subAgent() does. The child class comes from this.ctx.exports.<ChildClass>, and the ID comes from idFromName("<child-name>").
// Parent DO. Adjust to the exact facets call Agents 0.24 makes.
const facet = this.ctx.facets.get("child", () => ({
class: this.ctx.exports.Child,
id: this.ctx.exports.Child.idFromName("child"), // or the namespace's idFromName
}));
await facet.fetch("https://facet/ping");
In the child facet:
export class Child extends DurableObject {
fetch() {
return new Response(String(this.ctx.id.name));
}
}
The child is exported from the Worker entry point, but has no binding or migration of its own, as with Agents sub-agents.
On Celld 0.6.0, a Durable Object facet created from a class in
ctx.exportswith an ID fromidFromName()starts correctly. Inside the facet, however,ctx.id.nameisundefined.The Cloudflare Agents SDK 0.24 requires this name, so
subAgent()andagentTool()in Agents and@cloudflare/thinkfail on Celld. The same code works on workerd.Versions
Reproduction
A parent Durable Object (an Agents Agent or Think agent) starts a child facet the way
subAgent()does. The child class comes fromthis.ctx.exports.<ChildClass>, and the ID comes fromidFromName("<child-name>").In the child facet:
The child is exported from the Worker entry point, but has no binding or migration of its own, as with Agents sub-agents.