// See Purple/licence.txt for Google BSD license
// Copyright 2011 Google, Inc. johnjbarton@johnjbarton.com

(function () {
  var thePurple = window.purple;
  
  var remote = new thePurple.Feature({
    name: "remote",
    api: {
      Console: {
        enable: function(){},
        disable: function(){}
      },
      Debugger: {
        continueToLocation: function(location) {},
        disable: function() {},
        enable: function() {},
        evaluateOnCallFrame: function(callFrameId, expression, includeCommandLineAPI, objectGroup, returnByValue) {},
        getScriptSource: function(scriptId) {},
        pause: function() {},
        removeBreakpoint: function(breakpointId) {},
        resume: function() {},
        setBreakpoint: function(condition, location) {},
        setBreakpointByUrl: function(columnNumber, condition, lineNumber, url, urlRegex) {},
        setBreakpointsActive: function(active) {},
        setPauseOnExceptions: function(state) {},
        setScriptSource: function(preview, scritpId, scriptSource) {},
        stepInto: function() {},
        stepOut: function() {},
        stepOver: function() {}
      },
      Timeline: {
        start: function(maxCallStackDepth){}, // default 5
        stop: function() {}
      },
      setResponseHandler: function (eventsHandlerObject) {} // implements events
    },
    events: {
      Debugger: {
        breakpointResolved: function(breakpointId, location) {},
        paused: function(details) {},
        resumed: function() {},
        scriptFailedToParse: function(data, errorLine, errorMessage, firstLine, url) {},
        scriptParsed: function(endColumn, endLine, isContentScript, scriptId, startColumn, startLine, url) {}
      },
      Timeline: {
        eventRecorded: function(record) {},
        started: function() {},
        stopped: function() {}
      }
    },
    types: {
      CallFrame: {
        functionName: 'string',
        id: 'string',
        location: 'Location',
        scopeChain: '[Scope]',
        'this': 'Runtime.RemoteObject'
      },
      Location: {
        columnNumber: 'integer',
        lineNumber: 'integer',
        scriptId: 'string'
      },
      Scope: {
        object: 'Runtime.RemoteObject',
        'type': 'string'
      },
      TimelineEvent: {
        children: '[TimelineEvent]',
        data: 'object',
        type: 'string'
      }
    }
  });
  
  var Features = thePurple.getPartByName('Features');
  Features.registerPart(remote);
  
}());
@@ -299,16 +299,54 @@
 tion()%7B%7D
+,%0A        clearMessages: function()%7B%7D,
 %0A      %7D
@@ -1885,24 +1885,191 @@
 nction() %7B%7D%0A
+      %7D,%0A      Console: %7B%0A        messageAdded: function(messageObj) %7B%7D,%0A        messageRepeatCountUpdated: function(count) %7B%7D,%0A        messagesCleared: function() %7B%7D%0A
       %7D%0A    
@@ -2576,24 +2576,542 @@
 e: 'string'%0A
+      %7D,%0A      ConsoleMessage: %7B%0A        level: %5B'debug', 'error', 'log', 'tip', 'error'%5D,%0A        line: 'integer',%0A        networkRequestId: 'Network.RequestId',%0A        parameters: '%5BRuntime.RemoteObject%5D',%0A        repeatCount: 'integer',%0A        source: %5B'console-api', 'html', 'javascript', 'network', 'other', 'wml', 'xml'%5D,%0A        stackTrace: 'StackTrace',%0A        text: 'string',%0A        type: %5B'assert', 'dir', 'dirxml', 'endGroup', 'log', 'startGroup', 'startGroupCollapsed', 'trace'%5D,%0A        url: 'string'%0A
       %7D%0A    

Add Console event and ConsoleMessage type