Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: link to first draft of new Wrangler page


Note

This page is unfinished. For a taste, see the engine module documentation.

Table of Contents
maxLevel4
indent15px

Wrangler is an operating system written in KRL for picos. Wrangler provides developers a way to programmatically and easily manage picos.

To use Wrangler as a module, add "use module io.picolabs.wrangler alias wrangler" in your meta block.

Functions

For all functions, enter the parameters in the order listed.

children()

Returns an array of the children of the Pico. Has optional parameter "name" which returns just the attributes for the child with the specific name if it exists, otherwise it returns attributes on every child if not provided. It gives attributes:

-parent_eci: The eci from the Pico to the respective child

-name: The child Pico's name

-id: The id of the child Pico

-eci: The main wrangler eci for the child Pico

Code Block
children = wrangler:children()
/*
[
  {
    "parent_eci": "CyrmdG4PkiVYRUo2K69k2E",
    "name": "Section CS462-1 Pico",
    "id": "cjh6pbzun005zvde06bwy2pci",
    "eci": "JfcEBxEK5WDKA69Bvach4Y"
  },
  {
    "parent_eci": "Tg5ULPBYByJjsEoKpfsbQ2",
    "name": "Section CS462-2 Pico",
    "id": "cjh6pc28r0067vde04qd23t6o",
    "eci": "56S414r4Uq4kGx6Xi1qmSs"
  }
]
*/

skyQuery

A user friendly way to make an HTTP request. It provides cleanup and returns the error if the returned HTTP status was not 200.

...

Defactions

Events/Rules

When a rule raises an event in the postlude, it will also pass along all the attributes it received (including any attributes not used in that event) in addition to any new information that may be relevant to other rules.

Ruleset Events

installRulesets

(Domain: wrangler, Type: install_rulesets_requested)

Installs the given rulesets in the pico that receives this event.

eventAttrs:

...

Directives Returned:

Code Block
send_directive("rulesets installed", { "rids": /* An array of rids that were installed*/ });

Raised Events:

...

Code Block
{
"rids": /* An array of rids that were installed*/
}

Sent Events:

...

  • Wrangler Overview
    • General description of Wrangler and its components
  • Managing Channels
    • Brief intro to channels and how to create, delete, and manipulate them using Wrangler.
  • Managing Pico Lifecycle
    • Describes how Wrangler facilitates the creation and deletion of a pico and how a ruleset can successfully interact with and manipulate the lifecycle.
  • Managing Subscriptions
    • Describes what subscriptions are, how they work, and various aspects of their API.
  • Prototypes
    • Describes what prototypes are, how they work, and various aspects of their API.
  • Wrangler Full API
    • Describes the specific API for each ruleset's events and functions. Useful as a quick reference, while the other pages give full explanations.
  • Replacing subscription with DID Comm
    • Considers a possibility for replacing the notion of subscription with DID Comm connections (between picos which are Aries agents).