ACP v2 (Preview) TypeScript SDK — EXPERIMENTAL - v2.12.1
    Preparing search index...

    Type Alias ActiveSessionMessageExperimental

    ActiveSessionMessage:
        | {
            kind: "session_update";
            notification: UpdateSessionNotification;
            update: schema.SessionUpdate;
        }
        | {
            kind: "stop";
            notification: UpdateSessionNotification;
            update: schema.SessionUpdate;
            stopReason: schema.IdleStateUpdate["stopReason"];
        }

    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. Both are session-scoped: a stop message does not acknowledge processing or completion of any prompt.

    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: schema.IdleStateUpdate["stopReason"];
      }
      • kind: "stop"

        Indicates an idle foreground snapshot, not necessarily a new completion.

      • notification: UpdateSessionNotification

        Full notification containing the idle state update.

      • update: schema.SessionUpdate

        Convenience alias for notification.update.

      • stopReason: schema.IdleStateUpdate["stopReason"]

        Stop reason reported by the idle state, when provided.

        refusal only reports that the agent refused to continue. The idle update names no message, so do not remove or mark messages because of it.