- Fix arithmetic. (PR #637)
- Add DIDComm. (PR #631)
- Add sub as an option for event:send. (PR #623)
- Add bit operations. (PR #621)
- Every event raised is logged. (PR #607)
- Update line colors in engine-UI to deemphasize parent-child relationships. Fixes issue #576
- Fixes the typescript errors. Errors types are now treated as unknown rather than any. (PR #581)
- Switched node-sass to sass b/c node-sass is deprecated and is a native module
- Updated some other dependencies
- Updated Docker instructions
- make krl-compiler more robust in the presences of compile-time errors
- add wrangler:name_changed for pico name change
- pass thru developer-supplied attributes when creating a child pico
- allow query to return HTML
- support for setting cookies and redirecting from send_directive
- UI fix to make box rule behave better for Testing tab
- Dockerfile
- new wrangler function
picoQuery
(deprecatingskyQuery
) - define
meta:eci
inside a query as well as an event - CORS preflight
- fixes issues: 543 and 546
- provide CORS headers; fixes issue 543
- make ruleset installation more robust (e.x., the URL can contain a blank)
- fixes issues: 539 and 540
- fix
klog
display in the Logging tab of the developer UI
- entries for the Logging tab are now prepared in KRL code
- fixes for issues: 536 and 533
- fix for issue: 532 add
meta:rulesetConfig
- provide line/col numbers for krl-compiler errors
- fixes for issues: 530, 527
- streamline Logging tab entries
- fix broken subscriptions
- fixes for issues: 529, 509, 523, 509, 492, 508, 504, 479, 478, 515
- new route /api/flush?url=
- new wrangler event
wrangler:rulesets_need_flushing
for a pico schedule event ... at
now working- remove package for
pico-engine-browser
no longer used - improved look of parent/child lines in the developer UI
- made
klog
operator work in a function context
- functions can be queried requesting either HTML or plain text results (per docs)
event:send
which allows ruleset evaulation to continue even if the ECI is not found- new Subscriptions tab in the developer UI and dashed magenta lines between subscription pico pairs
- new built-in
meta
library to match the one in 0.52.4, with docs - new built-in property
ctx:picoId
- fixes for issues 488, 490, 473, 489, 486, 501, 480, 491, 500, 502, 487, 513, 512, 503, and 518
- the
io.picolabs.subscription
ruleset installed in all picos - command line
--version
option forpico-engine
command - new and simplified
io.picolabs.wrangler
ruleset in all picos - show line/col numbers for parse and compile errors
- allow access to event attributes within functions (when called from an event context)
ursa
module for cryptographic needs of DIDs, and its dependencies
- Ruleset versioning by url to facilitate decentralized code sharing.
- A more pico-centric architecture that makes pico's easier to transfer between hosts.
- Better channel policies.
- A new UI written in React and only uses pico channels to render.
- Built on top of pico-framework and select-when.
- For more on v1.0.0 see the picolabs wiki
- Improvements to ruleset editor and agent tab - see more
- Better error: <type> is not a function - see 697a386b
- Ability to view and diff ruleset versions
- Fixing KRL editor to use the new parser
- New KRL parser - see 464 for change notes
- Ability to run Pico Engine in a web browser - see pico-engine-browser
- Allow Agent UI to remove router - see 22ff28b7
- dynamic raise statement - see 460 and 15
- optional colon for domain:type in event expressions - see 18150b01
- faster logging - see 4cf96486
- UI and agent improvements
- added
engine:registerRulesetFromSrc
- see 456 - added
engine:doesKRLParse
- see 456 - added
io.picolabs.test
for testing KRL rulesets - see 456 - added
io.picolabs.ds
andio.picolabs.wrangler.profile
for general purpose datastore and replacement forio.picolabs.pds
- see 456 - updated
io.picolabs.collection
- see 456 - use owner pico name as title - see 457
- fixed
ent:map{..}
semantics to matchmap{..}
- see 458
- Wrangler API changes - see Picolab/wrangler#139 and 456
Pico Sovrin Agents are now available!
- New KRL module:
indy:*
- New UI tab for Agent Picos
- Added
meta:rulesetLogging
to indicate the rulesetlogging
setting. Defaults tofalse
time:now(date)
can be given the number of milliseconds since the UNIX epoch.- Bugfix:
.reduce()
on a single item properly gives all 4 arguments to the reducer function. - Added
autosend
tohttp:*
to send an event when the http response is received. - Updated leveldb modules.
- added additional
math:*
functions - see 437 - reregister modules - see 442
- allow dangling commas for Arrays and Maps - see 438
- user defined
.
operators i.e.a.b(c)
is syntax sugar forb(a, c)
- see 171 - performance optimization for
ent:v := ent:v.append(..)
- see 425 - compiler performance hint for
ent:v := ent:v.put(..)
- see 425 /api/db-dump
is gone! The UI scales better now - see 424- enhance subscriptions tab - see 7a4ccc31
- Add redirect directive - see ebeb516d
- 6ebe6cc7 - fixing
system:online
event
- system started event - see 419
- wrangler system online event - see 420
- fix so a well-known channel is created with subscription - see 421
- renamed event
pico:intent_to_orphan
towrangler:garbage_collection
- see 422
- added
data = engine:exportPico(pico_id)
- see 414 - added
engine:importPico(parent_id, data) setting(newPicoId)
- see 415 - added
engine:setPicoStatus(pico_id, isLeaving, movedToHost)
- see 414 - added
status = engine:getPicoStatus(pico_id)
- see 414
- All pico-engine-core API's now use promises rather than callbacks. Including 3rd party modules and
compileAndLoadRuleset
.
- added
math:hmac(algorithm, key, message [, encoding])
- see 413 - added
.isEmpty()
- see 310 - added
.trimLeading()
.trimTrailing()
.trim()
.startsWith(target)
.endsWith(target)
.contains(target)
- see 405 - Several fixes for event expressions with duplicate matches - see 406, 268, 273
- We now only support node 8+
- Compiled rulesets now use async+await to simulate synchronous krl code. #411
- DID login
- started io.picolabs.cookies.
- 367 - Array indices should be numbers not strings
- 390 - fixing pvars index issues
- 394 - engine:remove* should not throw up if the item was already removed
- 396 - fixing ent var Array/Map index detection
- 399 - engine:* functions return null when an id is not found
- 401 - adding find and replace to krl editor
- fcb3a438 - .replace() support a replacer function - resolves #377
- de83ff75 - special handling for GIF
- fe83de54 - improve Logging tab performance
- 621e6f29 - subscriptions Id
- 9bf913c9 - persist wellknown policy
- 46f45711 - provide headers rather than just cookies
- c3a0dffd - use cookie-parser package
- 80ef8094 - initial cookies parsing
- 19777521 - initial policy ruleset
- d6451ef2 - initial policies tab
- e1881d1f - allow pending_subscription events
- a225c716 - policy for wellknown channel.
- CLI tool for
schedule:list
andschedule:remove
- be64ef7e 62b424fc val.as("RegExp")
will now coerce any val to a string - ca1c703f- Starting UI for policy - 4e243a15 72cc2eec 0b285bdf
- UI fixes - 96e4a933 5ac1542d 44aedb9c
- Fixed
event:send
with empty attributes - #371 last
should only stop evaluating the current ruleset - #366- 86f4c623 and 348f0c9b bug fix for subscriptions
- 3f69e709 initial UI work for policies
- Guess the
meta:host
rather than defaulting to localhost - #370 - 85f2d35e display outbound DID
- bf3efbe0 a bit more subscriptions UI
- c4492a81 more subscriptions UI
- 9b9d5655 UI to propose new subscription
- Fixing string to number coercion described in #368. Fixes date compare issue #369
- b74dabb - more consistent tab UX
- fbcc843 - initial attempt UI to delete subscription
- 32bab20 - fixing edge case for core.db.getStateMachine
- e200d6c - first attempt at Subscriptions tab
- f747228 - first cut of UI work for subscriptions
- Automated migration from
io.picolabs.pico
toio.picolabs.wrangler
- 4c64693 - Several fixes to
select .. setting() where ..
variable scope - #362, #329, #358, #359 - Fixing type coercion behavior to be consistent especially for numbers and comparison operators - #357, #361
- KRL editor
ctrl+S
binding - #356 schedule:remove(id)
returns true/false instead of throwing an error - #363- KRL editor syntax highlight fix - #355
- Removing unused syntax - #291, #293
- Prevent ruleset dependency cycles - #260, #261
event:send
now signals the event right away instead of waiting for the rules to complete - #364- UI fixes - 9647717, fa506d1, 94c1b63, a7ad98d, 97f7d5d
- Store password as one way hash 5954b41
- spaces in file:// urls - (see #352)
- Making the shell log output more human friendly (see #313)
- Storing pico-engine log file. Json encoded for easy parsing, and stored in
$PICO_ENGINE_HOME/pico-engine.log
(see #313) - Channel policies. Right now it defaults to allow-all. (see #350)
- allow path rewriting as directed by root pico (see commit)
- Switching to new wrangler and subscriptions. (see #351)
Because we changed io.picolabs.pico
to io.picolabs.wrangler
.
- Uninstall
io.picolabs.pico
from the Root Pico. (open the root pico -> Rulesets tab -> clickdel
onio.picolabs.pico
). - For the other picos install wrangler then uninstall the old pico ruleset.
event:attrs()
in favor ofevent:attrs
keys:<name>()
in favor ofkeys:<name>
- Map key access using
.
operator
- signed subscriptions
- encrypted subscriptions
- better type checking on
engine:*
function arguments - new KRL editor with inline compiler warnings and errors
select when
matching falsy event attributes- More forgiving handling of ruleset initialization errors on startup (i.e. breaking compiler changes)
- see issues for more
- we now only support node 6+, recommended you use the LTS version (v8)
- persistent variable indexes by using path expressions i.e.
ent:foo{key}
Wrangler provides a lot of the engine module functionality. It aims for easy, programmatically management of registering, installing, uninstalling, and listing rulesets, creation, deletion and listing of channels, as well as creation, deletion and listing of children picos. Wrangler allows you to write code to do everything that a user would us the UI for.
- added testing for wrangler (see src/tests.js)
- every pico now has an "admin" channel. To get it use
engine:getAdminECI(pico_id)
engine:newPico(pico_id)
now sets the parent id topico_id
creates an admin channel for you.- added
engine:getParent(pico_id)
andengine:listChildren(pico_id)
- added
engine:listInstalledRIDs(pico_id)
- all
engine:*
functions that have apico_id
argument now defaults tometa:picoId
- channel ECIs' are now sovrin DIDs.
- sharing
defaction
between rulesets now return the right value - system rulesets (those in
krl/
) now are loaded by dependency ordering. - error handling on infinite recursion
.put()
should create nested maps, even if keys are numeric - see issue #204
- fixing race condition with
schedule .. at
- see issue #203
- fixing race condition with
schedule .. at
- see issue #203 - better error handling for
/sky/cloud/..
- see issue #32
- infix operators:
like
,<=>
,cmp
- see issue #183
- better startup error handling - see issue #112
- consistent casting of key paths - see issue #152
- better
as("Number")
- see issue #173 - better string concatenation rules - see issues #185 and #155
- report error when action used in
pre
block - see issues #187 - using
keys:<key>
in global - see issues #132
-
random:uuid()
- return a globally unique id (using cuid) -
random:word()
- return a random english word -
random:integer(lower = 0, upper = 1)
- return a random integer betweenlower
andupper
-
random:number(lower = 0, upper = 1)
- return a random number (float) betweenlower
andupper
-
if event.eid == "none" or is not given, it will default to a uuid
-
event:send(event, host = null)
- now when given ahost
string, it will send an async http sky/event request to that engine -
better syntax for
choose
making the action block syntax consistent.
ActionBlock ->
(if <expr> then)? <Actions>
Actions ->
<action> ;
| every { <action 0> ; <action 1> ; ... }
| sample { <action 0> ; <action 1> ; ... }
| choose <expr> { <action 0> ; <action 1> ; ... }
event:attr(name)
- see issue #179
- defaction can return values (expose values to
setting(..)
)
<name> = defaction(<params...>){
<declaration 0>
<declaration 1>
...
<action block (i.e. anything you would put in a rule action)>
returns <expr 0>, <expr 1>, ...
}
NOTE: returns
is optional
For example
global {
foo = defaction(){
send_directive("foobar")
returns 1, 2, 3
}
}
rule bar {
select when ...
foo() setting(a, b, c)
fired {
//a = 1, b = 2, c = 3
}
}
Another example
global {
foo = defaction(){
every {
http:get(...) setting(resp)
}
return resp["content"].decode()["msg"]
}
}
rule bar {
select when ...
foo() setting(message)
}
- new action block type:
sample
This will randomly select an action to run.
rule bar {
select when ...
//randomly pick one of these 3 actions to run
sample {
send_directive("foo")
send_directive("bar")
send_directive("baz")
}
}
- action block syntax. The semi-colons are optional.
ActionBlock ->
<action> ;
| if <expr> then <action> ;
| if <expr> then every { <action 0> ; <action 1> ; ... }
| if <expr> then sample { <action 0> ; <action 1> ; ... }
| every { <action 0> ; <action 1> ; ... }
| sample { <action 0> ; <action 1> ; ... }
| choose <expr> { <action 0> ; <action 1> ; ... }
with
is no longer used for named arguments. Both for functions and actions.
//OLD WAY
foo(1, 2) with a = 3 and b = 4
//NEW WAY
foo(1, 2, a = 3, b = 4)
with
is no longer used onraise
/schedule
//OLD WAY
raise domain event "type" with foo = 1 and bar = 2
//NEW WAY
raise domain event "type" attributes {"foo": 1, "bar": 2}
send_directive
no longer useswith
it's nowsend_directive(name, options = {})
//OLD WAY
send_directive("name") with foo = x and bar = y
//NEW WAY
send_directive("name", {"foo": x, "bar": y})
- No optional semi-colon after
select when ...
//OLD WAY
select when foo bar;
//NEW WAY
select when foo bar
- syntax ambiguities caused by
with
- defaction can do anything a rule action can
<name> = defaction(<params...>){
<declaration 0>
<declaration 1>
...
<action block (i.e. anything you would put in a rule action)>
}
For example
chooser = defaction(val){
baz = "hello"
qux = "bye"
choose val {
asdf =>
foo(val)
fdsa =>
bar(val, "ok", "done")
}
}
- default parameters for function and defaction (no more
configure using
)
foo = function(bar = 2, baz = bar + 3){
bar + baz
}
//-or- when it gets too long
foo = function(
bar = 2,
baz = bar + 3,
qux = 4,
quux = blah(qux),
){
...
}
//defaction parameters work the same way as functions
- You can no longer use actions as functions
//the following are now actions and cannot be used as a function
engine:newPico
engine:removePico
engine:newChannel
engine:removeChannel
engine:registerRuleset
engine:unregisterRuleset
engine:installRuleset
engine:uninstallRuleset
event:send
schedule:remove
- re-registering rulesets breaks the schedule order