<commit_before>import {Message} from './Message';
import {Notification} from './Notification';
import {Command} from './Command';
import {Session} from './Session';

export interface Envelope {
  id?: string;
  from?: string;
  to?: string;
  pp?: string;
  metadata?: any;
}

export const Envelope = {
  isMessage: (envelope: Envelope) => envelope.hasOwnProperty('content'),
  isNotification: (envelope: Envelope) => envelope.hasOwnProperty('event'),
  isCommand: (envelope: Envelope) => envelope.hasOwnProperty('method'),
  isSession: (envelope: Envelope) => envelope.hasOwnProperty('status')
};

export interface Reason {
  code: number;
  description?: string;
}

export interface EnvelopeListener {
  onEnvelope(envelope: Envelope): void
}<commit_msg>Fix isSession method<commit_after>import {Message} from './Message';
import {Notification} from './Notification';
import {Command} from './Command';
import {Session} from './Session';

export interface Envelope {
  id?: string;
  from?: string;
  to?: string;
  pp?: string;
  metadata?: any;
}

export const Envelope = {
  isMessage: (envelope: Envelope) => envelope.hasOwnProperty('content'),
  isNotification: (envelope: Envelope) => envelope.hasOwnProperty('event'),
  isCommand: (envelope: Envelope) => envelope.hasOwnProperty('method'),
  isSession: (envelope: Envelope) => envelope.hasOwnProperty('state')
};

export interface Reason {
  code: number;
  description?: string;
}

export interface EnvelopeListener {
  onEnvelope(envelope: Envelope): void
}
{'fraction_non_alphanumeric': 0.14756258234519104, 'fraction_numerical': 0.0, 'mean_word_length': 5.633187772925764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '335952', 'n_tokens_mistral': 436, 'n_tokens_neox': 440, 'n_words': 124}