@fungi.computer/oyster 0.47.0 → 0.47.2

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.
package/dist/agents.d.ts CHANGED
@@ -126,8 +126,10 @@ export type OysterAgents = Readonly<{
126
126
  /**
127
127
  * Offer the owner their starter Agent on an empty Team's first owner read;
128
128
  * it creates through this host's ordinary `create` and never fails the read.
129
+ * Work the read does not wait for is handed to `keepAlive` (the Worker's
130
+ * `waitUntil`), so it outlives the response.
129
131
  */
130
- ensureStarter(principal: TenantPrincipal): Promise<StarterOutcome>;
132
+ ensureStarter(principal: TenantPrincipal, keepAlive?: (work: Promise<unknown>) => void): Promise<StarterOutcome>;
131
133
  /** Owner-only HTTP transition; creator Agents use their own control tool. */
132
134
  setArchived(agentId: string, archived: boolean, principal: TenantPrincipal): Promise<Readonly<{
133
135
  archived: boolean;
package/dist/agents.js CHANGED
@@ -222,7 +222,9 @@ function createAgentRoutes(agents) {
222
222
  return refusal(400, "Choose a valid archive view");
223
223
  // The owner's own directory read is the starter Agent's one trigger.
224
224
  if (everyAgent && authority.kind === "owner" && selected !== "true")
225
- await agents.ensureStarter(authority.principal);
225
+ await agents.ensureStarter(authority.principal, (work) => {
226
+ context.executionCtx.waitUntil(work);
227
+ });
226
228
  const listed = await agents.list({ archived: selected === "true" });
227
229
  const reached = [];
228
230
  for (const item of listed)