delta["key"] = value;
In most cases, this works great, but in case you are trying to use booleans as your value, you will find that Google Wave will not store the boolean value in the state. Not true, not false, and it won't trigger a standard state update that one would normally expect.
The way I have worked around this is to simply use the strings "true" and "false" for these values, and then use string comparison for conditional logic. It seems a little hackish, but it also seems to work in all of the cases I have tried or needed it in.