For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gall Scry Reference

Gall's scry interface is mainly used to scry into the individual agents it's running. The vane itself does have its own interface, however. Both agent scries and vane scries are documented below.

Note that for all agent scries and most vane scries, q.beak, where there'd usually be a $desk, will be the agent name instead, like:

.^(some-type %gx /=agent-name-here=/some/path/noun)

Agent scries

In order to hit the +on-peek arm of a Gall agent, you need to:

  1. Put the agent in q.beak of the scry path (where the $desk usually goes), like /=some-agent=.

  2. Make sure the beginning of the $spur is not an empty %$ element, as that will route the scry to the vane endpoints instead. An agent scry must be /=some-agent=/some/path not /=some-agent=//some/path.

Any $care can be used (dependent on what the agent accepts, of course). The most common is %x.

Note that %x cares alone must include an extra $mark field at the end of the $spur. This mark field lets Gall perform any necessary mark conversions before returning your data. For plain unmarked data, you can just use the %noun mark. As an example, if an agent specifies an endpoint /x/some/path and just returns ordinary data, you'd do .^(some-type %gx /=some-agent=/some/path/noun). If the endpoint returns a %json mark or whatever (and that's what you want), you'd put that at the end instead.


Vane scries

Gall itself provides the special vane-level endpoints listed below. They are organized by the $care. In order to hit the vane-level endpoints, the beginning of the the $spur (e.g. the $path after the $beak) must be a %$ empty element. For example:

.^(desk %gd /=acme=/$)
.^((set [=dude:gall live=?]) %ge /=base=/$)
.^((list path) %gt /=acme=//foo)

Note you can use $ to make the last element empty since it won't allow a trailing /. Note how in the third example, the empty element is at the beginning of the $spur and after the $beak. If you fail to include this empty element, Gall will try route the scry to an agent for handling instead.

%b: blocked moves

A scry with a %b care will give you the moves queued for agents that have not been started yet.

Produces

A (map term (qeu blocked-move)), keyed by agent name.

Example


%d: get desk of app

A scry with a %d care and an agent in q.beak will give you the desk that agent is on.

Produces

A $desk

Example


%e: running apps

A scry with an %e care will give you the agents on the desk given in q.beak.

Produces

A (set [=dude live=?]), where live is true if running and false if not.

Examples


%f: nonces of apps

A scry with a care of %f and anything in q.beak will produce the subscription nonces of all apps. You are unlikely to use this, it's mostly for kernel debugging.

Produces

A (map dude @) where the @ is the nonce.

Examples


%g: flubbed apps

A scry with a %g care will give you, per ship, the agents that have refused a $plea — the apps for which Gall has given Ames a %flub. This is one half of the Ames/Gall backpressure mechanism: a %flub causes the corresponding flow to halt.

Produces

A (jug ship app=term).

Example


%h: halted apps

A scry with an %h care will give you, per agent, the ships whose flows are halted because that agent is missing or suspended.

Produces

A (jug app=term [ship =duct]).

Example


%i: flub ducts

A scry with an %i care will give you the duct Gall uses to send %flub notifications for each ship.

Produces

A (map ship duct).

Example


%n: get nonce of subscription

A scry with a care of %n, an agent in q.beak and a path of //[ship]/[agent]/[wire] will produce the nonce for that subscription. You are unlikely to use this, it's mostly for kernel debugging.

Produces

A @.


%t: remote scry subpaths

A scry with a %t care, an agent in q.beak and a path of //1/some/path will give you the list of remote scry subpaths bound under the given path.

Note the version number 1 for scries to Gall's remote scry namespace.

See the remote scry guide for more details.

Produces

A (list path)

Examples


%u: check if installed

A scry with a %u care will check whether the given agent is installed and running.

Produces

A ?

Examples


%v: get agent state

A scry with a %v care will return the data of an agent whether it is running or not. The agent is supplied as the $dude (second) position of the $beak.

Produces

A $egg-any (versioned passthrough to $egg)

Examples


%w: latest revision of path

A scry with a %w care and an agent in q.beak will get the latest revision number of the bound remote scry path given in the $spur.

As with %gt and %gz scries, this requires a version number 1 after the //.

See the remote scry guide for more details.

Produces

A $cass:clay, specifically the %ud kind.


%x: remote scry file

A scry with a %x care and an agent in q.beak will get the value bound at the remote scry path given in the $spur. The revision of the file must be given in the $beak portion of the scry path. The general format is therefore:

See the remote scry guide for more details.

Produces

The type returned is the raw $noun from the $page. If the file has been tombstoned or does not exist, the scry will fail.


%y: live agents

A scry with a %y care will give you every running agent and its state. Agents that are not live are excluded from the map.

Produces

A (map term yoke).

Note this is the scry the +vats generator uses to gather per-desk agent status.

Example


%z: hash of value at path

A scry with a %z care and an agent in q.beak will get the hash identifier of the value bound at the remote scry path given in the $spur.

As with %gt and %gw scries, this requires a version number 1 after the //.

See the remote scry guide for more details.

Produces

A @uvI.


Last updated