Skip to content

@kirsle kirsle released this Mar 14, 2020

2.1.0 - Mar 13 2020

  • The RiveScript shell.js script is now installed as a command line program
    when you npm install rivescript. Call it like riveshell /path/to/brain
    or, if installed locally, npx riveshell /path/to/brain (PR #330)
  • TypeScript definition fixes.
Assets 4

@kirsle kirsle released this Feb 26, 2019

2.0.0: The Async/Await Update

This is a major new version of RiveScript. It adds async/await support and
makes the API asynchronous everywhere. It also decaffeinates the code,
migrating it from CoffeeScript back to native ES2015+ with modern syntax.

See the Upgrading-v2 document for information about what's
new and how to upgrade your code.

v2.0.0 last minute changes:

  • Fix a bug where <reply> in +Trigger wasn't being formatted properly
    (lowercased, etc.) so matching was difficult.
  • Add a Redis driver for an example User Variable Session Manager that
    stores variables directly to the cache, and an eg/redis example bot
    that demonstrates it.
  • Write documentation for final v2.0.0 launch.

2.0.0-beta.1 - Jan 16 2019

  • Republish to npm after updating TypeScript definitions.
  • Move release status to "beta"

Before 2.0.0 final release there should be at least one User Variable Session
Driver implemented (likely Redis) to verify the session interface is working
as intended.

2.0.0-alpha.6 - Jul 9 2018

  • Make loadFile() and loadDirectory() backwards compatible so "simple" bots
    won't need to change anything to upgrade, but will get deprecation warnings
    instead. ("Simple" bots used loadFile() or loadDirectory() in conjunction
    with replyAsync(), and didn't use any other functions that changed).

2.0.0-alpha.5 - Jul 7 2018

  • Fix <botstar> not working at all.
  • Make loadFile() and loadDirectory() promise-based.
  • Add the User Variable Session Manager Interface and break backwards
    compatibility on all methods that use user variables (e.g.
    getUservar(), lastMatch(), etc.)

2.0.0-alpha.3 - June 23 2018

  • Fix a runtime error when <input> is used in a trigger.
  • Reformatted the unit tests to use ES2015 multi-line string literals.

2.0.0-alpha.2 - June 16 2018

  • Decaffeinate the source code from CoffeeScript back into native JavaScript.
  • Add async/await support into the reply process, which enables support for
    a lot of new async features, including use of <call> tags in
    *Condition checks and for replacing the user variable session manager
    with one backed by a database.
  • Deprecated: replyAsync().
Assets 4

@kirsle kirsle released this Mar 4, 2018


  • 1.19.0 2018-03-04
    • Add the new ?Keyword command to work around the problem that Unicode
      text wouldn't match properly with optional wildcards. For example,
      + [*] 你好 [*] wasn't able to match messages containing the word "你好"
      in the same way as it would if the keyword were using only ASCII symbols.
      Now, the command ? 你好 will allow you to match that keyword anywhere in
      a user's message. (PR #256)
Assets 4

@kirsle kirsle released this Nov 27, 2017


  • 1.18.0 2017-11-27
    • Fix an infinite loop when using a number as a substitution (PR #206)
    • Optimize substitution algorithm (including person substitutions) to be
      more performant when you have a large set of substitutions defined (PR #208)
    • Add support for defining a global concatenation option when constructing
      the RiveScript object. This will set the default concat mode when
      parsing files that didn't define their own local mode (PR #209)
    • Add API function lastTriggers(username) to retrieve the full set of
      triggers that were last matched for that user. For example, if some triggers
      redirected to others, all the triggers that were touched will be
      returned by this function (PR #217)
    • Remove dependency on jQuery for loading files in a web environment and
      instead use a standard XMLHttpRequest (PR #251)
Assets 4

@kirsle kirsle released this Jan 19, 2017


  • 1.17.2 2017-01-19
    • Fix <call> tags not working inside of the @Redirect command and the
      inline redirect {@} tag. Note that only synchronous object macros that
      return a string response are allowed in these, just like in *Condition
      commands (PR #203)
Assets 4

@kirsle kirsle released this Dec 8, 2016


  • 1.17.1 2016-12-08
    • Fix sorting algorithm for triggers with %Previous, making their sort order
      deterministic and correct regardless of the order they appeared in the
      source file (PR #194)
    • Fix the function prototype for getVariable to only accept the name
      parameter for a bot variable. Previously it was accepting (username, name)
      which was incorrect because bot variables are global and have no relation
      to a particular username.
Assets 4

@kirsle kirsle released this Oct 11, 2016


  • 1.17.0 2016-10-11
    • Fix accidental double-piped wildcards caused by missing arrays (PR #176).
    • Fix tags like {uppercase} in the BEGIN block from affecting object macros
      before they could be called (bug #178).
    • In the parser, include the current topic in some common error messages, such
      as syntax errors, single-character lines and unknown commands (bug #140).
    • Allow forceCase to apply to topics too, both in the > topic command and
      in the {topic=...} tag (bug #158).
    • In case of deep recursion while scanning topic inheritance trees, the error
      now includes the current topic that it gave up on (bug #167).
Assets 4

@kirsle kirsle released this Sep 6, 2016


  • 1.16.0 2016-09-06
    • Add TypeScript declaration files (PR #162).
    • Add a --watch option to shell.js to automatically reload the bot's
      brain when the source files change (PR #160).
    • Fix the json-server example not giving errors correctly (passing invalid
      data into the RiveScript library and potentially raising an exception
      from within there; bug #165).
Assets 4

@kirsle kirsle released this Aug 8, 2016


  • 1.15.0 2016-08-07
    • Add a new contructor option, forceCase, which will force-lowercase your
      triggers during parse time, enabling authors to use uppercase letters in
      triggers without it being a syntax error. Do note however that Unicode
      case folding can become an issue with certain symbols. (Bugs #143 and #69).
    • Fix a bug where inline redirects, like {@ hello} would fail to match their
      trigger due to the presence of a space between the @ and text (bug #145).
    • Add a non-fatal warning at parse time if it's detected that you used an
      @Redirect command in conjunction with a -Reply or *Condition. In such
      cases, the redirect "wins" and preempts the others, which may be surprising
      behavior, and RiveScript will warn you about this now (bug #58).
    • Prevent errors from arising when the user's history object is invalid, for
      example if somebody manually overrode the __history__ user
      variable (PR #151).
    • Fix a bug in the write() function where -Replies were being written when
      a trigger actually had no reply (resulting in a single-character -
      command which raises an error when re-parsed) (PR #141).
    • Add more documentation to the rs.Promise function, including a full
      example of how to use the replyAsync() method (bug #144).
Assets 4

@kirsle kirsle released this Jul 9, 2016


  • 1.14.0 2016-07-09
    • Add a new API function: getUserTopicTriggers returns a list of triggers
      available from a user's current topic, including triggers that came from
      topics inherited/included by their topic (PR #138).
    • Change how the parser handles inline comments (// appearing on the same
      line as RiveScript code). Previously, it required at least one space to
      be present on either side of the // characters. Now, it only requires a
      space before the //.
    • Add new examples: using RiveScript as a router, and a link to a plugin for
      using RiveScript with Hubot.
    • Add a new ASCII logo to the header output of shell.js and
      .   .       
     .:...::      RiveScript Interpreter (JavaScript)
    .::   ::.     Library Version: v1.14.0
 ..:;;. ' .;;:..  
    .  '''  .     Type '/quit' to quit.
     :;,:,;:      Type '/help' for more options.
     :     :
Assets 4