ACP v2 TypeScript SDK — EXPERIMENTAL DRAFT - v1.3.0
    Preparing search index...

    Type Alias ActiveSessionMessageExperimental

    ActiveSessionMessage:
        | {
            kind: "session_update";
            notification: UpdateSessionNotification;
            update: schema.SessionUpdate;
        }
        | {
            kind: "stop";
            notification: UpdateSessionNotification;
            update: schema.SessionUpdate;
            stopReason: StopReason
            | null
            | undefined;
        }

    Experimental draft ACP v2 message produced by an ActiveSession.

    session_update messages expose the typed session/update notification and stop messages report an idle state_update. A prompt turn is complete once a stop message is returned.

    Type Declaration

    • {
          kind: "session_update";
          notification: UpdateSessionNotification;
          update: schema.SessionUpdate;
      }
      • kind: "session_update"

        Indicates that this message came from a session/update notification.

      • notification: UpdateSessionNotification

        Full notification sent by the agent.

      • update: schema.SessionUpdate

        Convenience alias for notification.update.

    • {
          kind: "stop";
          notification: UpdateSessionNotification;
          update: schema.SessionUpdate;
          stopReason: StopReason | null | undefined;
      }
      • kind: "stop"

        Indicates that the prompt turn has completed.

      • notification: UpdateSessionNotification

        Full notification containing the idle state update.

      • update: schema.SessionUpdate

        Convenience alias for notification.update.

      • stopReason: StopReason | null | undefined

        Stop reason reported by the idle state, when provided.