@feltdb/feltkit 0.5.3 → 0.5.4

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.
@@ -718,6 +718,13 @@ export interface ActionAgent {
718
718
  sessionId: string;
719
719
  created: boolean;
720
720
  }>;
721
+ /**
722
+ * Deliver new work into a session this caller started with `startSession` (a message the agent takes a turn for).
723
+ * The delegation is checked again first: a revoked or lapsed one delivers nothing. Needs feltkit.agent.delegated.
724
+ */
725
+ sendToSession(agent: string, sessionId: string, message: string): Promise<{
726
+ delivered: boolean;
727
+ }>;
721
728
  /** End a session started with `startSession` (the caller that started it, or a person of its workspace). Needs feltkit.agent.delegated. */
722
729
  endSession(agent: string, sessionId: string, reason?: string): Promise<{
723
730
  ended: boolean;
@@ -229,6 +229,9 @@ export interface ProjectAgentSessions {
229
229
  sessionId: string;
230
230
  created: boolean;
231
231
  }>;
232
+ send(agent: string, caller: Principal | null, sessionId: string, message: string): Promise<{
233
+ delivered: boolean;
234
+ }>;
232
235
  end(agent: string, caller: Principal | null, sessionId: string, reason?: string): Promise<{
233
236
  ended: boolean;
234
237
  }>;
@@ -2685,6 +2685,7 @@ export class FeltKitRuntime {
2685
2685
  checkpoint: (taskId) => agent.control.checkpoint(taskId, signedIn()),
2686
2686
  acknowledge: (taskId, instructionId, input) => agent.control.acknowledge(taskId, instructionId, input, signedIn()),
2687
2687
  startSession: (agentName, input) => this.#agentSessions().start(agentName, principal, input),
2688
+ sendToSession: (agentName, sessionId, message) => this.#agentSessions().send(agentName, principal, sessionId, message),
2688
2689
  endSession: (agentName, sessionId, reason) => this.#agentSessions().end(agentName, principal, sessionId, reason),
2689
2690
  propose: async (taskId, proposal) => {
2690
2691
  const p = signedIn();