glob: update to 0v6.cmrce.5ass7.5gfqi.7c8cg.mdo7n

This commit is contained in:
Philip Monk 2020-12-04 17:59:15 -08:00
commit 0de3e76055
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
67 changed files with 753 additions and 770 deletions

View File

@ -30,11 +30,9 @@
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build, test, and upload urbit release tarball
name: build
on:
push: null
pull_request: null
on: [push, pull_request]
jobs:
urbit:
@ -81,40 +79,3 @@ jobs:
- run: nix-build -A hs.urbit-king.components.exes.urbit-king --arg enableStatic true
- run: nix-build -A hs-checks
- run: nix-build shell.nix
upload:
needs: [urbit, haskell]
strategy:
matrix:
include:
- { os: ubuntu-latest, system: x86_64-linux }
- { os: macos-latest, system: x86_64-darwin }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
- uses: cachix/cachix-action@v8
with:
name: mars
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: google-github-actions/setup-gcloud@v0.2.0
with:
version: '290.0.1'
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCS_PROJECT }}
export_default_credentials: true
- run: nix-build -A tarball
- name: Run upload to bootstrap.urbit.org
run: |
version="$(cat ./pkg/urbit/version)"
system="$(nix eval --raw '(builtins.currentSystem)')"
target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz"
gsutil cp -n ./result "$target"
echo "upload to $target complete."

43
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: release
on:
release: null
push:
tags: ['*']
jobs:
upload:
strategy:
matrix:
include:
- { os: ubuntu-latest, system: x86_64-linux }
- { os: macos-latest, system: x86_64-darwin }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
- uses: cachix/cachix-action@v8
with:
name: mars
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: google-github-actions/setup-gcloud@v0.2.0
with:
version: '290.0.1'
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCS_PROJECT }}
export_default_credentials: true
- run: nix-build -A tarball --arg enableStatic true
- name: Run upload to bootstrap.urbit.org
run: |
version="$(cat ./pkg/urbit/version)"
system="$(nix eval --raw '(builtins.currentSystem)')"
target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz"
gsutil cp -n ./result "$target"
echo "upload to $target complete."

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ef4474711c8d3ee3707032c2e857323e5abf3dd8e1659ef0263755809fa0f0c
size 9548777
oid sha256:e90c91a4b50d55a52b8ef51bd33f85ef106b37e285ec037e661e943e6183640d
size 7542846

View File

@ -728,6 +728,16 @@
::
++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage
++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase
::
++ dy-some
|= src=(list dojo-source)
^- vase
?~ src !>(~)
%+ slop !>(~)
|-
?~ t.src (dy-vase p.i.src)
(slop (dy-vase p.i.src) $(src t.src))
::
++ dy-sore
|= src=(list dojo-source)
^- vase
@ -850,7 +860,7 @@
[%pass /wool %agent [our.hid %spider] %watch /thread-result/[tid]]
%- he-card
=/ =cage :: also sub
[%spider-start !>([~ `tid fil (dy-sore src)])]
[%spider-start !>([~ `tid fil (dy-some src)])]
[%pass /wool %agent [our.hid %spider] %poke cage]
::
++ dy-make :: build step

View File

@ -5,7 +5,7 @@
/- glob
/+ default-agent, verb, dbug
|%
++ hash 0v5.u5b0i.2ks0m.6ipcp.djea4.16n1h
++ hash 0v6.cmrce.5ass7.5gfqi.7c8cg.mdo7n
+$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))]
+$ all-states
$% state-0
@ -183,7 +183,7 @@
^- (quip card _this)
?: ?=([%start ~] wire)
=/ new-tid=@ta (cat 3 'glob--' (scot %uv eny.bowl))
=/ args [~ `new-tid %glob !>([hash.state ~])]
=/ args [~ `new-tid %glob !>([~ hash.state])]
=/ action !>([%unserve-dir serve-path])
:_ this(glob.state `[%| new-tid])
:~ (poke-file-server our.bowl %file-server-action action)

View File

@ -24,6 +24,6 @@
<div id="portal-root"></div>
<script src="/~landscape/js/channel.js"></script>
<script src="/~landscape/js/session.js"></script>
<script src="/~landscape/js/bundle/index.f38557ac3b720e41e65b.js"></script>
<script src="/~landscape/js/bundle/index.649a8f56804ea2cb643c.js"></script>
</body>
</html>

View File

@ -15,6 +15,7 @@ class Channel {
}
init() {
this.debounceInterval = 500;
// unique identifier: current time and random number
//
this.uid =
@ -55,6 +56,20 @@ class Channel {
// disconnect function may be called exactly once.
//
this.outstandingSubscriptions = new Map();
this.outstandingJSON = [];
this.debounceTimer = null;
}
resetDebounceTimer() {
if(this.debounceTimer) {
clearTimeout(this.debounceTimer);
this.debounceTimer = null;
}
this.debounceTimer = setTimeout(() => {
this.sendJSONToChannel();
}, this.debounceInterval)
}
setOnChannelError(onError = (err) => {}) {
@ -71,6 +86,12 @@ class Channel {
});
}
clearQueue() {
clearTimeout(this.debounceTimer);
this.debounceTimer = null;
this.sendJSONToChannel();
}
// sends a poke to an app on an urbit ship
//
poke(ship, app, mark, json, successFunc, failureFunc) {
@ -83,14 +104,16 @@ class Channel {
}
);
this.sendJSONToChannel({
id,
action: "poke",
ship,
app,
mark,
json
});
const j = {
id,
action: "poke",
ship,
app,
mark,
json
};
this.sendJSONToChannel(j);
}
// subscribes to a path on an specific app and ship.
@ -104,7 +127,8 @@ class Channel {
connectionErrFunc = () => {},
eventFunc = () => {},
quitFunc = () => {},
subAckFunc = () => {}) {
subAckFunc = () => {},
) {
let id = this.nextId();
this.outstandingSubscriptions.set(
id,
@ -116,14 +140,17 @@ class Channel {
}
);
this.sendJSONToChannel({
const json = {
id,
action: "subscribe",
ship,
app,
path
});
}
this.resetDebounceTimer();
this.outstandingJSON.push(json);
return id;
}
@ -131,6 +158,7 @@ class Channel {
//
delete() {
let id = this.nextId();
clearInterval(this.ackTimer);
navigator.sendBeacon(this.channelURL(), JSON.stringify([{
id,
action: "delete"
@ -154,12 +182,18 @@ class Channel {
// sends a JSON command command to the server.
//
sendJSONToChannel(j) {
if(!j && this.outstandingJSON.length === 0) {
return;
}
let req = new XMLHttpRequest();
req.open("PUT", this.channelURL());
req.setRequestHeader("Content-Type", "application/json");
if (this.lastEventId == this.lastAcknowledgedEventId) {
let x = JSON.stringify([j]);
if(j) {
this.outstandingJSON.push(j);
}
let x = JSON.stringify(this.outstandingJSON);
req.send(x);
} else {
// we add an acknowledgment to clear the server side queue
@ -167,7 +201,10 @@ class Channel {
// The server side puts messages it sends us in a queue until we
// acknowledge that we received it.
//
let payload = [{action: "ack", "event-id": parseInt(this.lastEventId)}];
let payload = [
...this.outstandingJSON,
{action: "ack", "event-id": parseInt(this.lastEventId)}
];
if(j) {
payload.push(j)
}
@ -176,6 +213,7 @@ class Channel {
this.lastEventId = this.lastAcknowledgedEventId;
}
this.outstandingJSON = [];
this.connectIfDisconnected();
}
@ -217,8 +255,11 @@ class Channel {
funcs["subAck"](obj);
}
} else if (obj.response == "diff") {
// ack subscription
this.sendJSONToChannel();
// ensure we ack before channel clogs
if((this.lastEventId - this.lastAcknowledgedEventId) > 30) {
this.clearQueue();
}
let funcs = subFuncs;
funcs["event"](obj.json);
} else if (obj.response == "quit") {

View File

@ -9,14 +9,12 @@
|%
+$ card card:agent:gall
+$ versioned-state
$% state-0
state-1
$% [%0 observers=(map serial observer:sur)]
[%1 observers=(map serial observer:sur)]
[%2 observers=(map serial observer:sur)]
==
::
+$ serial @uv
+$ state-0 [%0 observers=(map serial observer:sur)]
+$ state-1 [%1 observers=(map serial observer:sur)]
::
++ got-by-val
|= [a=(map serial observer:sur) b=observer:sur]
^- serial
@ -27,7 +25,7 @@
--
::
%- agent:dbug
=| state-1
=| [%2 observers=(map serial observer:sur)]
=* state -
::
^- agent:gall
@ -38,20 +36,16 @@
++ on-init
|^ ^- (quip card _this)
:_ this
:~ %+ act
/inv-gra
[%watch %invite-store /invitatory/graph %invite-accepted-graph]
::
%+ act
/grp-gra
[%watch %group-store /groups %group-on-leave]
:~ (act [%watch %invite-store /invitatory/graph %invite-accepted-graph])
(act [%watch %group-store /groups %group-on-leave])
(act [%watch %group-store /groups %group-on-remove-member])
==
::
++ act
|= [=wire =action:sur]
|= =action:sur
^- card
:* %pass
wire
/poke
%agent
[our.bowl %observe-hook]
%poke
@ -65,17 +59,35 @@
++ on-load
|= old-vase=vase
^- (quip card _this)
|^
=/ old-state !<(versioned-state old-vase)
?- -.old-state
%1 `this(state old-state)
=| cards=(list card)
|-
?: ?=(%2 -.old-state)
[cards this(state old-state)]
?: ?=(%1 -.old-state)
=. cards
:_ cards
(act [%watch %group-store /groups %group-on-leave])
$(-.old-state %2)
=. cards
:_ cards
(act [%watch %group-store /groups %group-on-remove-member])
$(-.old-state %1)
::
%0
=. state [%1 observers.old-state]
%+ on-poke
%observe-action
!> ^- action:sur
[%watch %group-store /groups %group-on-leave]
==
++ act
|= =action:sur
^- card
:* %pass
/poke
%agent
[our.bowl %observe-hook]
%poke
%observe-action
!> ^- action:sur
action
==
--
::
++ on-poke
|= [=mark =vase]
@ -167,7 +179,7 @@
[our.bowl %spider]
%poke
%spider-start
!>([~ `tid thread.observer (slop q.cage.sign !>(~))])
!>([~ `tid thread.observer (slop !>(~) q.cage.sign)])
== ==
==
::

View File

@ -290,7 +290,7 @@
=/ body=json
(need (de-json:html q.u.body.request.inbound-request))
=/ input=vase
(slop (tube !>(body)) !>(~))
(slop !>(~) (tube !>(body)))
=/ =start-args
[~ `tid thread input]
=^ cards state

View File

@ -1,13 +0,0 @@
:: Helm: Reload %zuse and all vanes
::
:::: /hoon/reboot/hood/gen
::
/? 310
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=~ ~]
==
[%helm-reload ~[%z %a %b %c %d %e %g %i %j]]

View File

@ -1,14 +0,0 @@
:: Helm: Reload vane/s from desk
::
:::: /hoon/reload-desk/hood/gen
::
/? 310
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=[desk (list term)] ~]
==
:- %helm-reload-desk
arg

View File

@ -1,14 +0,0 @@
:: Helm: Reload vane/s
::
:::: /hoon/reload/hood/gen
::
/? 310
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=(list term) ~]
==
:- %helm-reload
arg

View File

@ -1,13 +0,0 @@
:: Helm: Reload hoon/hoon and all vanes
::
:::: /hoon/reset/hood/gen
::
/? 310
::
::::
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=~ ~]
==
[%helm-reset ~]

View File

@ -56,6 +56,7 @@
%what
[/sys/hoon hoon/compiler-source]
[/sys/arvo hoon/arvo-source]
[/sys/lull hoon/.^(@ %cx (weld sys /lull/hoon))]
[/sys/zuse hoon/.^(@ %cx (weld sys /zuse/hoon))]
==
:: installed: Arvo gate (formal instance) with %zuse installed

View File

@ -1,26 +0,0 @@
:: Produce a raw event to reload a vane
::
:: Try: .event/ovo +reload-event %c, then restart urbit with
:: -I pier/.urb/put/event.ovo
::
:- %say
|= $: [now=@da eny=@uvJ bek=beak]
[[tam=term ~] ~]
==
:- %ovo
=/ top `path`/(scot %p p.bek)/[q.bek]/(scot r.bek)
=/ nam
=/ van=(list [term ~])
:- zus=[%zuse ~]
~(tap by dir:.^(arch %cy (welp top /sys/vane)))
?. =(1 (met 3 tam))
tam
=/ zaz=(list [p=knot ~])
(skim van |=([a=term ~] =(tam (end 3 a))))
?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz
=/ tip (end 3 nam)
=/ bip ?:(=('z' tip) %$ tip)
=/ way ?:(=('z' tip) (welp top /sys/[nam]) (welp top /sys/vane/[nam]))
=/ fil .^(@ %cx (welp way /hoon))
[//arvo %veer bip way fil]

View File

@ -154,47 +154,6 @@
?> ?=([@t ~] pax)
(flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful")
::
++ poke-reload |=(all=(list term) (poke-reload-desk %home all))
++ poke-reload-desk :: reload vanes
|: $:,[syd=desk all=(list term)] =< abet
%- emil
%+ turn all
=+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl)
=/ van=(list [term ~])
:- zus=[%zuse ~]
~(tap by dir:.^(arch %cy (welp top /sys/vane)))
|= nam=@tas
=. nam
?. =(1 (met 3 nam))
nam
=/ zaz=(list [p=knot ~])
(skim van |=([a=term ~] =(nam (end 3 a))))
?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz
=+ tip=(end 3 nam)
=+ zus==('z' tip)
=+ way=?:(zus (welp top /sys/[nam]) (welp top /sys/vane/[nam]))
=+ fil=.^(@ %cx (welp way /hoon))
[%pass /reload %arvo %d %flog %veer ?:(=('z' tip) %$ tip) way fil]
:: +poke-reset: send %lyra to initiate kernel upgrade
::
:: And reinstall %zuse and the vanes with %veer.
:: Trigger with |reset.
::
++ poke-reset
|= hood-reset=~
=< abet
%- emil
^- (list card:agent:gall)
=/ top=path /(scot %p our.bowl)/home/(scot %da now.bowl)/sys
=/ hun .^(@t %cx (welp top /hoon/hoon))
=/ arv .^(@t %cx (welp top /arvo/hoon))
~! *task:able:dill
:- [%pass /reset %arvo %d %flog %lyra `hun arv]
%+ turn
(module-ova:pill top)
|=([=wire =flog:dill] [%pass wire %arvo %d %flog flog])
::
++ poke-trim
|= pri=@ud =< abet
(emit %pass /pack %arvo %d %flog %crop pri)
@ -253,9 +212,6 @@
%helm-pack =;(f (f !<(_+<.f vase)) poke-pack)
%helm-pass =;(f (f !<(_+<.f vase)) poke-pass)
%helm-rekey =;(f (f !<(_+<.f vase)) poke-rekey)
%helm-reload =;(f (f !<(_+<.f vase)) poke-reload)
%helm-reload-desk =;(f (f !<(_+<.f vase)) poke-reload-desk)
%helm-reset =;(f (f !<(_+<.f vase)) poke-reset)
%helm-send-hi =;(f (f !<(_+<.f vase)) poke-send-hi)
%helm-serve =;(f (f !<(_+<.f vase)) poke-serve)
%helm-trim =;(f (f !<(_+<.f vase)) poke-trim)

View File

@ -17,29 +17,6 @@
[%boot ? $%($>(%fake task:able:jael) $>(%dawn task:able:jael))]
unix-task
==
:: +module-ova: vane load operations
::
:: sys: full path to /sys directory
::
++ module-ova
|= sys=path
^- (list [wire [%veer term path cord]])
%+ turn
^- (list (pair term path))
:~ [%$ /zuse] :: standard library
[%a /vane/ames] :: network
[%b /vane/behn] :: timer
[%c /vane/clay] :: revision control
[%d /vane/dill] :: console
[%e /vane/eyre] :: http server
[%g /vane/gall] :: applications
[%i /vane/iris] :: http client
[%j /vane/jael] :: identity and security
==
|= [=term =path]
=/ pax (weld sys path)
=/ txt .^(@ %cx (weld pax /hoon))
[[%vane path] [%veer term pax txt]]
:: +file-ovum: userspace filesystem load
::
:: bas: full path to / directory

View File

@ -49,13 +49,21 @@
inner-state=vase
==
::
+$ base-state-1
$: base-state-0
failed-kicks=(map resource ship)
==
::
+$ state-0 [%0 base-state-0]
::
+$ state-1 [%1 base-state-0]
::
+$ state-2 [%2 base-state-1]
::
+$ versioned-state
$% state-0
state-1
state-2
==
::
++ default
@ -141,7 +149,7 @@
++ agent
|* =config
|= =(pull-hook config)
=| state-1
=| state-2
=* state -
^- agent:gall
=<
@ -150,11 +158,13 @@
og ~(. pull-hook bowl)
hc ~(. +> bowl)
def ~(. (default-agent this %|) bowl)
::
++ on-init
^- [(list card:agent:gall) agent:gall]
=^ cards pull-hook
on-init:og
[cards this]
::
++ on-load
|= =old=vase
=/ old
@ -162,10 +172,16 @@
=| cards=(list card:agent:gall)
|^
?- -.old
%1
%2
=^ og-cards pull-hook
(on-load:og inner-state.old)
[(weld cards og-cards) this(state old)]
=. state old
=^ retry-cards state
retry-failed-kicks
:_ this
:(weld cards og-cards retry-cards)
::
%1 $(old [%2 +.old ~])
::
%0
%_ $
@ -175,6 +191,22 @@
(weld cards (missing-subscriptions tracking.old))
==
==
::
++ retry-failed-kicks
=| acc-cards=(list card)
=/ failures=(list [rid=resource =ship])
~(tap by failed-kicks)
=. tracking
(~(uni by tracking) failed-kicks)
=. failed-kicks ~
|- ^- (quip card _state)
?~ failures
[acc-cards state]
=, failures
=^ crds state
(handle-kick:hc i)
$(failures t, acc-cards (weld acc-cards crds))
::
++ missing-subscriptions
|= tracking=(map resource ship)
^- (list card:agent:gall)
@ -233,15 +265,9 @@
(de-path:resource t.t.t.t.wire)
?+ -.sign (on-agent:def wire sign)
%kick
=/ pax=(unit path)
(on-pull-kick:og rid)
?^ pax
:_ this
~[(watch-resource:hc rid u.pax)]
=. tracking
(~(del by tracking) rid)
:_ this
~[give-update]
=^ cards state
(handle-kick:hc rid src.bowl)
[cards this]
::
%watch-ack
?~ p.sign
@ -288,6 +314,59 @@
|_ =bowl:gall
+* og ~(. pull-hook bowl)
::
++ mule-scry
|= [ref=* raw=*]
=/ pax=(unit path)
((soft path) raw)
?~ pax ~
?. ?=([@ @ @ @ *] u.pax) ~
=/ ship
(slaw %p i.t.u.pax)
=/ ved
(slay i.t.t.t.u.pax)
=/ dat
?~ ved now.bowl
=/ cas=(unit case)
((soft case) p.u.ved)
?~ cas now.bowl
?: ?=(%da -.u.cas)
p.u.cas
now.bowl
:: catch bad gall scries early
?: ?& =((end 3 1 i.u.pax) %g)
?| !=(`our.bowl ship)
!=(dat now.bowl)
==
==
~
``.^(* u.pax)
++ handle-kick
|= [rid=resource =ship]
^- (quip card _state)
=/ res=toon
(mock [|.((on-pull-kick:og rid)) %9 2 %0 1] mule-scry)
=/ pax=(unit path)
!< (unit path)
:- -:!>(*(unit path))
?:(?=(%0 -.res) p.res ~)
=? failed-kicks !?=(%0 -.res)
=/ tang
:+ leaf+"failed kick handler, please report"
leaf+"{<rid>} in {(trip dap.bowl)}"
?: ?=(%2 -.res)
p.res
?> ?=(%1 -.res)
(turn `(list *)`p.res (cork path smyt))
%- (slog tang)
(~(put by failed-kicks) rid ship)
?^ pax
:_ state
(watch-resource rid u.pax)
=. tracking
(~(del by tracking) rid)
:_ state
~[give-update]
::
++ poke-hook-action
|= =action
^- [(list card:agent:gall) _state]
@ -305,33 +384,35 @@
=. tracking
(~(put by tracking) resource ship)
:_ state
~[(watch-resource resource /)]
(watch-resource resource /)
::
++ remove
|= =resource
:- ~[(leave-resource resource)]
:- (leave-resource resource)
state(tracking (~(del by tracking) resource))
--
::
++ leave-resource
|= rid=resource
^- card
=/ =ship
(~(got by tracking) rid)
^- (list card)
=/ ship=(unit ship)
(~(get by tracking) rid)
?~ ship ~
=/ =wire
(make-wire pull+resource+(en-path:resource rid))
[%pass wire %agent [ship push-hook-name.config] %leave ~]
[%pass wire %agent [u.ship push-hook-name.config] %leave ~]~
++ watch-resource
|= [rid=resource pax=path]
^- card
=/ =ship
(~(got by tracking) rid)
^- (list card)
=/ ship=(unit ship)
(~(get by tracking) rid)
?~ ship ~
=/ =path
(welp resource+(en-path:resource rid) pax)
=/ =wire
(make-wire pull+path)
[%pass wire %agent [ship push-hook-name.config] %watch path]
[%pass wire %agent [u.ship push-hook-name.config] %watch path]~
::
++ make-wire
|= =wire

View File

@ -18,6 +18,7 @@
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::: :::::: volume 3, Arvo models and skeleton ::::::
:::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::
=> ..ride
=>
|%
+| %global
@ -88,7 +89,7 @@
+| %interface
::
:: $ball: dynamic kernel action
:: $curd: tagged, untyped event
:: $card: tagged, untyped event
:: $duct: causal history
:: +hobo: %soft task builder
:: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss
@ -108,7 +109,7 @@
:: +wite: kernel action/error builder
::
+$ ball (wite [vane=term task=maze] maze)
+$ curd (cask)
+$ card (cask)
+$ duct (list wire)
++ hobo
|$ [a]
@ -121,7 +122,7 @@
(pair cord (each * (list mass)))
+$ monk (each ship (pair @tas @ta))
+$ move [=duct =ball]
+$ ovum (pair wire curd)
+$ ovum [=wire =card]
::
+$ roof (room vase) :: namespace
+$ rook (room meta) :: meta-namespace
@ -212,14 +213,20 @@
+$ grub
$: :: who: identity once we know it
:: eny: entropy once we learn it
:: bod: %zuse once we receive it
:: lac: laconicity as we want it
:: ver: the Outside as we see it
:: fat: source when we attain it
:: lul: %lull when we acquire it
:: zus: %zuse once we receive it
:: van: vanes while we desire it
::
who=(unit ship)
eny=(unit @)
lac=?
ver=(unit vere)
fat=(unit (axal (cask)))
bod=(unit (trap vase))
lul=(unit (trap vase))
zus=(unit (trap vase))
van=(map term (trap vase))
==
+$ heir
@ -248,10 +255,12 @@
==
$= mod
$: :: fat: filesystem
:: lul: %lull
:: zus: %zuse
:: van: vanes
::
fat=(axal (cask))
lul=vase
zus=vase
van=(map term vane)
==
@ -271,21 +280,17 @@
==
::
+$ waif
:: %lyra: upgrade kernel
:: %trim: trim state, spam to all
:: %vega: notify vanes post upgrade
:: %what: update from files
:: %whey: produce $mass :: XX remove, scry
:: %verb: toggle laconicity
:: %veer: upgrade module
::
$% [%lyra hun=(unit @t) van=@t]
[%trim p=@ud]
$% [%trim p=@ud]
[%vega ~]
[%what p=(list (pair path (cask)))]
[%whey ~]
[%verb p=(unit ?)]
[%veer lal=@tas pax=path txt=@t]
==
+$ wasp
:: %crud: reroute $ovum with $goof
@ -297,7 +302,7 @@
[%wyrd p=vere]
==
+$ wisp
$% $>(?(%verb %veer %what) waif)
$% $>(?(%verb %what) waif)
$>(?(%wack %wyrd) wasp)
[%whom p=ship]
==
@ -494,11 +499,8 @@
:: $hoof: hoon source
:: $news: collated updates
:: $oped: module updates
:: $seed: next kernel source
::
:: XX replace top-level structures
::
+$ card (cask)
+$ ovum [=wire =card]
+$ hoof @t
+$ news
$: :: sys: installs + replacements
@ -508,7 +510,8 @@
use=(map path (cask))
==
+$ oped
$: zus=(unit hoof)
$: lul=(unit hoof)
zus=(unit hoof)
van=(list (cask hoof))
==
+$ seed [hun=(unit hoof) arv=hoof]
@ -595,8 +598,20 @@
++ adorn
|= [del=news all=?]
^- (pair oped _fat)
:: lull: shared structures
::
=^ lul fat
?^ hav=(~(get by sys.del) /sys/lull)
:- `(sole u.hav)
(~(put de fat) /sys/lull u.hav)
:_ fat
~| %adorn-no-lull
?.(all ~ `(sole (need fil:(~(get de fat) /sys/lull))))
:: zuse: shared library
::
:: %lull is the subject of %zuse; force all if we have a new %lull
::
=. all |(all ?=(^ lul))
=^ zus fat
?^ hav=(~(get by sys.del) /sys/zuse)
:- `(sole u.hav)
@ -608,8 +623,9 @@
::
:: %zuse is the subject of the vanes; force all if we have a new %zuse
::
=. all |(all ?=(^ zus))
=| nav=(map term hoof)
=? nav |(all ?=(^ zus))
=? nav all
%- ~(gas by nav)
%+ turn
~(tap by dir:(~(get de fat) /sys/vane))
@ -628,7 +644,7 @@
[[`@tas`nam (sole q)] (~(put de taf) p q)]
::
=; van
[[zus van] fat]
[[lul zus van] fat]
%+ sort ~(tap by (~(gas by nav) new))
|=([[a=@tas *] [b=@tas *]] (aor a b))
-- :: adapt
@ -1218,9 +1234,14 @@
|= [del=news all=?]
^+ ..pith
=^ job=oped fat.mod.sol (~(adorn adapt fat.mod.sol) del all)
=? lul.mod.sol ?=(^ lul.job)
$:(smit:va "lull" pit /sys/lull/hoon u.lul.job)
=? zus.mod.sol ?=(^ zus.job)
$:(smit:va "zuse" pit /sys/zuse/hoon u.zus.job)
%- (wyrd kel.ver.zen [zuse/;;(@ud q:(slap zus.mod.sol limb/%zuse)) ~])
$:(smit:va "zuse" lul.mod.sol /sys/zuse/hoon u.zus.job)
%- %+ wyrd kel.ver.zen
:~ lull/;;(@ud q:(slap lul.mod.sol limb/%lull))
zuse/;;(@ud q:(slap zus.mod.sol limb/%zuse))
==
%= ..pith
van.mod
%+ roll van.job
@ -1239,10 +1260,6 @@
^+ ..pith
?^ dud ~>(%mean.'pith: goof' !!)
?- -.waif
%lyra =; wat $(waif wat)
:+ %what [/sys/arvo hoon/van.waif]
?~ hun.waif ~
[[/sys/hoon hoon/u.hun.waif] ~]
::
:: %trim: clear state
::
@ -1255,10 +1272,6 @@
::
%vega (emit $/~ (spam /arvo !>(waif))) :: XX also out
%verb ..pith(lac.fad ?~(p.waif !lac.fad u.p.waif))
::
%veer =/ pax
sys/?:(?=(%$ lal.waif) /zuse /vane/[(grow lal.waif)])
$(waif what/[[pax hoon/txt.waif] ~])
::
%what ~(kel what p.waif)
%whey ..pith(out [[//arvo mass/whey] out])
@ -1274,9 +1287,11 @@
==
~
?+ s.bem ~
[%whey ~] ``mass/!>(whey)
[%zen %lag ~] ``noun/!>(lag.zen)
[%zen %vere ~] ``noun/!>(ver.zen)
[%whey ~] ``mass/!>(whey)
[%fad %lac ~] ``noun/!>(lac.fad)
[%zen %lag ~] ``noun/!>(lag.zen)
[%zen %ver ~] ``noun/!>(ver.zen)
[%mod %fat *] ``noun/!>((~(get de fat.mod) t.t.s.bem))
==
::
++ poke
@ -1285,7 +1300,7 @@
?~ wire.ovum
~>(%mean.'pith: bad wire' !!)
::
?. ?=(?(%crud %wack %wyrd) -.card.ovum)
?. ?=(?(%crud %wack %wyrd) p.card.ovum)
(emit $/~ [*duct (gest ovum)] ~)
::
=/ buz ~> %mean.'pith: bad wasp'
@ -1312,7 +1327,8 @@
^- (list (pair term @))
:~ hoon/hoon-version
arvo/arvo
zuse/;;(@ q:(slap zus.mod limb/%zuse))
lull/;;(@ud q:(slap lul.mod limb/%lull))
zuse/;;(@ud q:(slap zus.mod limb/%zuse))
==
=? lag.zen !=(rev.ver.zen rev.p.buz) ~&(%unlagging |)
..pith(ver.zen p.buz)
@ -1329,16 +1345,6 @@
++ xeno
|= =ovum
^+ this
:: XX update clients to %pass to arvo, remove
::
?: ?=(?(%lyra %veer %verb %whey) -.card.ovum)
%- call
~> %mean.'xeno: bad waif'
;;(waif:pith card.ovum)
::
:: XX uncomment to restore previous routing
::
:: =. wire.ovum $/wire.ovum
this(out [ovum out])
--
--
@ -1510,7 +1516,8 @@
^- (list (pair term @))
:~ hoon/hoon-version
arvo/arvo
zuse/;;(@ q:(slap zus.mod limb/%zuse))
lull/;;(@ud q:(slap lul.mod limb/%lull))
zuse/;;(@ud q:(slap zus.mod limb/%zuse))
==
:: restore working state and resume
::
@ -1559,7 +1566,7 @@
now.sol now
==
::
~| poke+-.q.ovo
~| poke/p.card.ovo
=/ zef=(each (pair (list ovum) soul) (trap ^))
loop:(~(poke le:part [pit vil] sol) ovo)
?- -.zef
@ -1587,28 +1594,59 @@
:: with +wish and vane installation with the %veer event.
::
=> |%
++ mint
|= [vax=vase lal=term pax=path txt=@t]
^- (trap vase)
=/ cap ?:(?=(%$ lal) "zuse" "vane {<lal>}")
(smit:va:part cap vax pax txt)
::
++ molt
|= [now=@da grub]
^- (unit heir)
?. &(?=(^ who) ?=(^ eny) ?=(^ ver) ?=(^ fat) ?=(^ bod))
?. &(?=(^ who) ?=(^ eny) ?=(^ ver) ?=(^ fat) ?=(^ lul) ?=(^ zus))
~
=/ zus $:u.bod
=/ lul $:u.lul
=/ zus $:u.zus
%- %+ wyrd kel.u.ver
^- (list (pair term @))
:~ hoon/hoon-version
arvo/arvo
lull/;;(@ud q:(slap lul limb/%lull))
zuse/;;(@ud q:(slap zus limb/%zuse))
==
=/ nav %- ~(run by van)
|=(a=(trap vase) (settle:va:part (slym $:a zus)))
:^ ~ arvo *debt
[[u.who now u.eny] [lac] [u.ver |] u.fat zus nav]
[[u.who now u.eny] [lac] [u.ver |] u.fat lul zus nav]
::
++ what
|= [grub fil=(list (pair path (cask)))]
^- grub
=* gub +<-
=/ taf (fall fat *(axal (cask)))
=/ del (~(group adapt:part taf) fil)
=/ tub (~(usurp adapt:part taf) del)
?: &(?=(^ dir.taf) ?=(^ tub))
~>(%mean.'arvo: larval reboot' !!) :: XX support
::
:: require, and unconditionally adopt, initial kernel source
::
=? taf =(~ dir.taf) :: XX TMI
~| %larval-need-kernel
?> &(?=(^ tub) ?=(^ hun.p.u.tub))
(~(gas de taf) q.u.tub)
::
=^ job=oped:part taf (~(adorn adapt:part taf) del |)
=? lul ?=(^ lul.job)
`(smit:va:part "lull" pit /sys/lull/hoon u.lul.job)
=? zus ?=(^ zus.job)
?. ?=(^ lul)
~|(%larval-need-lull !!)
`(smit:va:part "zuse" $:u.lul /sys/zuse/hoon u.zus.job)
=? van !=(~ van.job) :: XX TMI
?. ?=(^ zus)
~|(%larval-need-zuse !!)
%+ roll van.job
|= [[(cask hoof:part)] =_van]
^+ van
=/ way (wilt p)
%+ ~(put by van) way
(smit:va:part "vane {<way>}" $:u.zus /sys/vane/[p]/hoon q)
gub(fat `taf)
--
::
:: larval state, as a discriminable sample
@ -1630,70 +1668,38 @@
++ poke :: +47
|= [now=@da ovo=ovum]
^- ^
~| poke/p.card.ovo
=/ wip
~| [p.ovo p.q.ovo]
~> %mean.'arvo: bad wisp'
;;(wisp q.ovo)
;;(wisp card.ovo)
::
=. ..poke
|- ^+ ..poke
?- -.wip
%verb ..poke(lac ?~(p.wip !lac u.p.wip))
::
%veer =/ pax
sys/?:(?=(%$ lal.wip) /zuse /vane/[(grow lal.wip)])
$(q.ovo what/[[pax hoon/txt.wip] ~])
::
%wack ..poke(eny `p.wip)
::
%what =/ taf (fall fat *(axal (cask)))
=/ del (~(group adapt:part taf) p.wip)
=/ tub (~(usurp adapt:part taf) del)
?: &(?=(^ dir.taf) ?=(^ tub))
~>(%mean.'arvo: larval reboot' !!) :: XX support
::
:: require, and unconditionally adopt, initial kernel source
::
=? taf =(~ dir.taf) :: XX TMI
~| %larval-need-kernel
?> &(?=(^ tub) ?=(^ hun.p.u.tub))
(~(gas de taf) q.u.tub)
::
=^ job taf [p q]:(~(adorn adapt:part taf) del |)
=? bod ?=(^ zus.job)
`(mint pit %$ /sys/zuse/hoon u.zus.job)
%= ..poke
fat `taf
van
%+ roll van.job
|= [[(cask hoof:part)] =_van]
^+ van
?> ?=(^ bod)
=/ way (wilt p)
(~(put by van) way (mint $:u.bod way /sys/vane/[p]/hoon q))
==
::
%what ..poke(gub (what gub p.wip))
%whom ..poke(who ~|(%whom-once ?>(?=(~ who) `p.wip)))
::
%wyrd %- %+ wyrd kel.p.wip
^- (list (pair term @))
:* hoon/hoon-version
arvo/arvo
?~ bod ~
[zuse/;;(@ud q:(slap $:u.bod limb/%zuse)) ~]
?~ lul ~
:- lull/;;(@ud q:(slap $:u.lul limb/%lull))
?~ zus ~
[zuse/;;(@ud q:(slap $:u.zus limb/%zuse)) ~]
==
..poke(ver `p.wip)
==
::
?~ hir=(molt now gub)
[~ ..poke]
::
:: upgrade once we've accumulated necessary state
::
?~ hir=(molt now gub)
[~ ..poke]
~> %slog.[0 leaf+"arvo: metamorphosis"]
(load u.hir)
::
++ wish :: +22
|= txt=*
q:(slap ?~(bod pit $:u.bod) (ream ;;(@t txt)))
q:(slap ?~(zus pit $:u.zus) (ream ;;(@t txt)))
--

4
pkg/arvo/sys/lull.hoon Normal file
View File

@ -0,0 +1,4 @@
=> ..is
|%
++ lull %lull-kelvin
--

View File

@ -127,6 +127,7 @@
+$ reef-cache
$: hoon=vase
arvo=vase
lull=vase
zuse=vase
==
::
@ -284,7 +285,10 @@
+$ move [p=duct q=(wind note gift:able)] :: local move
+$ note :: out request $->
$~ [%b %wait *@da] ::
$% $: %a :: to %ames
$% $: %$ :: to arvo
$>(%what waif) ::
== ::
$: %a :: to %ames
$>(%plea task:able:ames) ::
== ::
$: %b :: to %behn
@ -1394,15 +1398,11 @@
:: promote and fill in ankh
:: promote and fill in mime cache
::
=/ sys-changes (need-sys-update changes)
?: ?& =(%home syd)
!updated
|(!=(~ sys-changes) !=(~ (need-vane-update changes)))
==
(sys-update yoki new-data changes)
?: &(=(%home syd) !updated)
(sys-update yoki new-data)
:: clear caches if zuse reloaded
::
=/ is-zuse-new=? !=(~ sys-changes)
=/ is-zuse-new=? (need-reef-update changes)
=. fod.dom
?: is-zuse-new
*ford-cache
@ -1547,89 +1547,67 @@
(~(put by $(builds t.builds)) i.builds)
::
++ build-reef
=> |%
+$ reef-step
:: vary: source or dependencies changed
:: deep: source and dependencies match kernel
::
[vary=? deep=?]
--
::
|= $: fer=(unit reef-cache)
invalid=(set path)
data=(map path (each page lobe))
==
^- reef-cache
?: =(%home syd)
[!>(..ride) !>(..is) !>(..zuse)]
|^
?: |(?=(~ fer) (~(has in invalid) /sys/hoon/hoon))
=/ [home=? hoon=vase]
?: (same-as-home /sys/hoon/hoon)
&+!>(..ride)
|+build-hoon
:- hoon
=/ [home=? arvo=vase]
?: &(home (same-as-home /sys/arvo/hoon))
&+!>(..is)
|+(build-arvo hoon)
:- arvo
?: &(home (same-as-home /sys/zuse/hoon))
!>(..zuse)
(build-zuse arvo)
:- hoon.u.fer
?: (~(has in invalid) /sys/arvo/hoon)
=/ [home=? arvo=vase]
?: &((same-as-home /sys/hoon/hoon) (same-as-home /sys/arvo/hoon))
&+!>(..is)
|+(build-arvo hoon.u.fer)
:- arvo
?: &(home (same-as-home /sys/zuse/hoon))
!>(..zuse)
(build-zuse arvo)
:- arvo.u.fer
?: (~(has in invalid) /sys/zuse/hoon)
?: ?& (same-as-home /sys/hoon/hoon)
(same-as-home /sys/arvo/hoon)
(same-as-home /sys/zuse/hoon)
|^ ^- reef-cache
=/ [tep=reef-step ref=reef-cache]
?^ fer
[[vary=| deep=&] u.fer]
[[vary=& deep=&] *reef-cache]
::
=^ hon tep (build tep /sys/hoon hoon.ref !>(**) !,(*hoon ..ride))
=^ rav tep (build tep /sys/arvo arvo.ref hon !,(*hoon ..part))
=^ lul tep (build tep /sys/lull lull.ref rav !,(*hoon .))
=^ zus tep (build tep /sys/zuse zuse.ref rav !,(*hoon .))
[hon rav lul zus]
::
++ build
|= [tep=reef-step pax=path pre=vase sub=vase pro=hoon]
^- (pair vase reef-step)
=/ ful (weld pax /hoon)
?. ?| vary.tep
(~(has in invalid) ful)
==
!>(..zuse)
(build-zuse arvo.u.fer)
zuse.u.fer
::
++ build-hoon
%- road |.
~> %slog.0^leaf+"clay: building hoon on {<syd>}"
[pre tep]
=. vary.tep &
=/ src (path-to-cord data ful)
::
?: &(deep.tep (deep pax src))
[(slap !>(..zuse) pro) tep]
::
=/ nam=term ?.(?=([@ta @ta *] pax) %$ i.t.pax)
~> %slog.0^leaf+"clay: building %{(trip nam)} on %{(trip syd)}"
=/ gen
~> %mean.%hoon-parse-fail
(path-to-hoon data /sys/hoon/hoon)
~> %mean.%hoon-compile-fail
(slot 7 (slap !>(0) gen))
~_ leaf+"%{(trip nam)}-parse-fail"
(rain ful src)
~_ leaf+"%{(trip nam)}-compile-fail"
[(slap (slap sub gen) pro) tep(deep |)]
::
++ build-arvo
|= hoon=vase
%- road |.
~> %slog.0^leaf+"clay: building arvo on {<syd>}"
=/ gen
~> %mean.%arvo-parse-fail
(path-to-hoon data /sys/arvo/hoon)
~> %mean.%arvo-compile-fail
(slap (slap hoon gen) !,(*^hoon ..is))
::
++ build-zuse
|= arvo=vase
%- road |.
~> %slog.0^leaf+"clay: building zuse on {<syd>}"
=/ gen
~> %mean.%zuse-parse-fail
(path-to-hoon data /sys/zuse/hoon)
~> %mean.%zuse-compile-fail
(slap arvo gen)
::
++ same-as-home
|= =path
++ deep
|= [pax=path src=cord]
^- ?
=/ our-lobe=lobe
=/ datum (~(got by data) path)
?- -.datum
%& (page-to-lobe %hoon (page-to-cord p.datum))
%| p.datum
==
=/ =dome dom:(~(got by dos.rom) %home)
=/ =yaki (~(got by hut.ran) (~(got by hit.dome) let.dome))
=(`our-lobe (~(get by q.yaki) path))
:: XX use roof
::
:: =/ dat (rof `[our ~ ~] $/[[our $/da/now] mod/fat/pax])
:: ?: |(?=(~ dat) ?=(~ u.dat)) |
:: =/ nod !<((axal (cask)) q.u.u.dat)
::
=/ dat
;; (unit (unit (axal (cask))))
((sloy-light ski) [hoon-version %noun] %$ our %$ da/now mod/fat/pax)
?: |(?=(~ dat) ?=(~ u.dat)) |
=* nod u.u.dat
&(?=(^ fil.nod) ?=(%hoon p.u.fil.nod) =(src q.u.fil.nod))
--
::
++ page-to-cord
@ -1883,104 +1861,50 @@
test-ankh (~(got by dir.test-ankh) ta)
==
::
:: Find /sys changes; does not reload on first commit
:: Find reef dependency changes
::
++ need-sys-update
++ need-reef-update
|= changes=(map path (each page lobe))
^- (map path (each page lobe))
~+
?: =(0 let.dom)
~
%- malt
%+ skim ~(tap by changes)
^- ?
%+ lien ~(tap by changes)
|= [=path *]
?| =(/sys/hoon/hoon path)
=(/sys/arvo/hoon path)
=(/sys/lull/hoon path)
=(/sys/zuse/hoon path)
==
::
++ need-vane-update
|= changes=(map path (each page lobe))
^- (map path (each page lobe))
~+
?: =(0 let.dom)
~
%- malt
%+ skim ~(tap by changes)
|= [=path *]
=(/sys/vane (scag 2 path))
::
:: Delay current update until sys update is complete
::
++ sys-update
|= $: =yoki
data=(map path (each page lobe))
changes=(map path (each page lobe))
==
^+ ..park
=/ updates
%- ~(uni by (need-sys-update changes))
(need-vane-update changes)
?> =(~ pud)
=. pud `[syd yoki]
|^ %. [hen %slip %c %pork ~]
=< emit
?: (~(has by updates) /sys/hoon/hoon)
(reset &)
?: (~(has by updates) /sys/arvo/hoon)
(reset |)
?: (~(has by updates) /sys/zuse/hoon)
reboot
=/ vanes=(list [=path *]) ~(tap by updates)
|- ^+ ..park
?~ vanes
..park
?. ?=([%sys %vane * %hoon ~] path.i.vanes)
~& [%strange-sys-update path.i.vanes]
$(vanes t.vanes)
=. ..park (reload i.t.t.path.i.vanes)
$(vanes t.vanes)
emit:(pass-what files)
::
++ reset
|= new-hoon=?
++ files
^- (list (pair path (cask)))
%+ murn
~(tap by data)
|= [pax=path dat=(each page lobe)]
^- (unit (pair path (cask)))
=/ xap (flop pax)
?> ?=(^ xap)
?. ?=(%hoon i.xap) ~
:^ ~ (flop t.xap) %hoon
?- -.dat
%& (page-to-cord p.dat)
%| (lobe-to-cord p.dat)
==
::
++ pass-what
|= fil=(list (pair path (cask)))
^+ ..park
?. new-hoon
=/ arvo=@t (path-to-cord data /sys/arvo/hoon)
=. ..park (pass-lyra hoon=~ arvo)
reboot
=/ hoon=@t (path-to-cord data /sys/hoon/hoon)
=/ arvo=@t (path-to-cord data /sys/arvo/hoon)
=. ..park (pass-lyra `hoon arvo)
reboot
::
++ pass-lyra
|= [hoon=(unit @t) arvo=@t]
^+ ..park
(emit hen %pass /reset %d %flog %lyra hoon arvo)
::
++ reboot
=/ zuse=@t (path-to-cord data /sys/zuse/hoon)
=. ..park
%- emit
[hen %pass /reboot %d %flog %veer %$ /sys/zuse/hoon zuse]
reload-all
::
++ reload-all
=/ vanes=(list term)
~[%ames %behn %clay %dill %eyre %gall %iris %jael]
|- ^+ ..park
?~ vanes
..park
=. ..park (reload i.vanes)
$(vanes t.vanes)
::
++ reload
|= =term
=/ vane=@t (path-to-cord data /sys/vane/[term]/hoon)
%- emit
=/ tip (end 3 term)
=/ =path /sys/vane/[term]/hoon
[hen %pass /reload %d %flog %veer tip path vane]
(emit hen %pass /what %$ what/fil)
--
--
::

View File

@ -33,7 +33,10 @@
+$ move [p=duct q=(wind note gift:able)] :: local move
+$ note :: out request $->
$~ [%d %verb ~] ::
$% $: %c ::
$% $: %$ ::
$>(?(%verb %whey) waif) ::
== ::
$: %c ::
$> $? %merg :: merge desks
%perm :: change permissions
%warp :: wait for clay hack
@ -44,9 +47,7 @@
$> $? %crud ::
%heft ::
%init :: XX obsolete?
%lyra ::
%text ::
%veer ::
%verb ::
== ::
task:able:dill ::
@ -117,13 +118,11 @@
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
(crud p.kyz q.kyz)
%blew (send %rez p.p.kyz q.p.kyz)
%heft (dump %whey ~)
%lyra (dump kyz)
%heft (pass /whey %$ whey/~)
%meld (dump kyz)
%pack (dump kyz)
%crop (dump trim+p.kyz)
%veer (dump kyz)
%verb (dump kyz)
%verb (pass /verb %$ kyz)
==
::
++ crud

View File

@ -236,16 +236,20 @@
:: +login-page: internal page to login to an Urbit
::
++ login-page
|= [redirect-url=(unit @t) our=@p]
|= [redirect-url=(unit @t) our=@p failed=?]
^- octs
=+ redirect-str=?~(redirect-url "" (trip u.redirect-url))
%- as-octs:mimes:html
%- crip
%- en-xml:html
=/ favicon %+
weld "<svg width='10' height='10' viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'>"
"<circle r='3.09' cx='5' cy='5' /></svg>"
;html
;head
;meta(charset "utf-8");
;meta(name "viewport", content "width=device-width, initial-scale=1, shrink-to-fit=no");
;link(rel "icon", type "image/svg+xml", href (weld "data:image/svg+xml;utf8," favicon));
;title:"OS1"
;style:'''
@import url("https://rsms.me/inter/inter.css");
@ -254,167 +258,152 @@
src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff");
font-weight: 400;
}
html, body {
:root {
--red05: rgba(255,65,54,0.05);
--red100: rgba(255,65,54,1);
--blue05: rgba(33,157,255,0.05);
--blue30: rgba(33,157,255,0.3);
--blue100: rgba(33,157,255,1);
--black05: rgba(0,0,0,0.05);
--black20: rgba(0,0,0,0.2);
--black60: rgba(0,0,0,0.6);
--white: rgba(255,255,255,1);
}
html {
font-family: Inter, sans-serif;
height: 100%;
margin: 0 !important;
margin: 0;
width: 100%;
background: #fff;
color: #000;
background: var(--white);
color: var(--black100);
-webkit-font-smoothing: antialiased;
line-height: 1.5;
font-size: 12pt;
font-size: 12px;
display: flex;
flex-flow: row nowrap;
justify-content: center;
}
a, a:visited {
color: #000;
text-decoration: none;
font-size: 0.875rem;
body {
display: flex;
flex-flow: column nowrap;
justify-content: center;
max-width: 300px;
padding: 1rem;
width: 100%;
}
p {
margin-block-start: 0;
margin-block-end: 0;
font-size: 0.875rem;
body > *,
form > input {
width: 100%;
}
form {
display: flex;
flex-flow: column;
align-items: flex-start;
}
input {
width: 100%;
padding: 0.75rem;
border: 1px solid #e6e6e6;
margin-top: 0.25rem;
margin-bottom: 1rem;
font-size: 0.875rem;
background: transparent;
border: 1px solid var(--black20);
padding: 8px;
border-radius: 4px;
font-size: inherit;
color: var(--black);
box-shadow: none;
}
input:disabled {
background: var(--black05);
color: var(--black60);
}
input:focus {
outline: 0;
border: 1px solid #000;
outline: none;
border-color: var(--blue30);
}
button {
-webkit-appearance: none;
padding: 0.75rem;
background-color: #eee;
border: 1px solid #d1d2d3;
color: #666;
font-size: 0.875rem;
border-radius: 0;
input:invalid:not(:focus) {
background: var(--red05);
border-color: var(--red100);
outline: none;
color: var(--red100);
}
footer {
position: absolute;
bottom: 0;
button[type=submit] {
margin-top: 16px;
padding: 8px 16px;
border-radius: 4px;
background: var(--blue100);
color: var(--white);
border: 1px solid var(--blue100);
}
input:invalid ~ button[type=submit] {
border-color: currentColor;
background: var(--blue05);
color: var(--blue30);
pointer-events: none;
}
span.failed {
display: flex;
flex-flow: row nowrap;
height: 16px;
align-items: center;
margin-top: 6px;
color: var(--red100);
}
span.failed svg {
height: 12px;
margin-right: 6px;
}
span.failed circle,
span.failed line {
fill: transparent;
stroke: currentColor
}
.mono {
font-family: "Source Code Pro", monospace;
}
.gray2 {
color: #7f7f7f;
}
.f9 {
font-size: 0.75rem;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.w-100 {
width: 100%;
}
.tr {
text-align: right;
}
.pb2 {
padding-bottom: 0.5rem;
}
.pr1 {
padding-right: 0.25rem;
}
.pr2 {
padding-right: .5rem;
}
.dn {
display: none;
}
#main {
width: 100%;
height: 100%;
}
#inner {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: 'Source Code Pro', monospace;
}
@media all and (prefers-color-scheme: dark) {
html, body {
background-color: #333;
color: #fff;
}
a, a:visited {
color: #fff;
}
input {
background: #333;
color: #fff;
border: 1px solid #7f7f7f;
}
input:focus {
border: 1px solid #fff;
}
}
@media all and (min-width: 34.375rem) {
.tc-ns {
text-align: center;
}
.pr0-ns {
padding-right: 0;
}
.dib-ns {
display: inline-block;
:root {
--white: rgb(51, 51, 51);
--black100: rgba(255,255,255,1);
--black05: rgba(255,255,255,0.05);
--black20: rgba(255,255,255,0.2);
}
}
'''
==
;body
;div#main
;div#inner
;p:"Urbit ID"
;input(value "{(scow %p our)}", disabled "true", class "mono");
;p:"Access Key"
;p.f9.gray2
; Get key from Bridge, or
;span.mono.pr1:"+code"
; in dojo
==
;form(action "/~/login", method "post", enctype "application/x-www-form-urlencoded")
;input
=type "password"
=name "password"
=placeholder "sampel-ticlyt-migfun-falmel"
=class "mono"
=autofocus "true";
;input(type "hidden", name "redirect", value redirect-str);
;button(type "submit"):"Continue"
==
==
;footer.absolute.w-100
;div.relative.w-100.tr.tc-ns
;p.pr2.pr0-ns.pb2
;a(href "https://bridge.urbit.org", target "_blank")
;span.dn.dib-ns.pr1:"Open"
; Bridge ↗
==
;a
=href "https://urbit.org/using/install/#id"
=style "margin-left: 8px; color: #2aa779;"
=target "_blank"
; Purchase
;span.dn.dib-ns.pr1:"an Urbit ID"
; ↗
==
;p:"Urbit ID"
;input(value "{(scow %p our)}", disabled "true", class "mono");
;p:"Access Key"
;form(action "/~/login", method "post", enctype "application/x-www-form-urlencoded")
;input
=type "password"
=name "password"
=placeholder "sampel-ticlyt-migfun-falmel"
=class "mono"
=required "true"
=minlength "27"
=maxlength "27"
=pattern "((?:[a-z]\{6}-)\{3}(?:[a-z]\{6}))"
=autofocus "true";
;input(type "hidden", name "redirect", value redirect-str);
;+ ?. failed ;span;
;span.failed
;svg(xmlns "http://www.w3.org/2000/svg", viewBox "0 0 12 12")
;circle(cx "6", cy "6", r "5.5");
;line(x1 "3.27", y1 "3.27", x2 "8.73", y2 "8.73");
;line(x1 "8.73", y1 "3.27", x2 "3.27", y2 "8.73");
==
Key is incorrect
==
==
;button(type "submit"):"Continue"
==
==
;script:'''
var failSpan = document.querySelector('.failed');
if (failSpan) {
document.querySelector("input[type=password]")
.addEventListener('keyup', function (event) {
failSpan.style.display = 'none';
});
}
'''
==
:: +render-tang-to-marl: renders a tang and adds <br/> tags between each line
::
@ -862,28 +851,28 @@
::
=+ request-line=(parse-request-line url.request)
%^ return-static-data-on-duct 200 'text/html'
(login-page (get-header:http 'redirect' args.request-line) our)
(login-page (get-header:http 'redirect' args.request-line) our %.n)
:: if we are not a post, return an error
::
?. =('POST' method.request)
(return-static-data-on-duct 400 'text/html' (login-page ~ our))
(return-static-data-on-duct 400 'text/html' (login-page ~ our %.n))
:: we are a post, and must process the body type as form data
::
?~ body.request
(return-static-data-on-duct 400 'text/html' (login-page ~ our))
(return-static-data-on-duct 400 'text/html' (login-page ~ our %.n))
::
=/ parsed=(unit (list [key=@t value=@t]))
(rush q.u.body.request yquy:de-purl:html)
?~ parsed
(return-static-data-on-duct 400 'text/html' (login-page ~ our))
(return-static-data-on-duct 400 'text/html' (login-page ~ our %.n))
::
=/ redirect=(unit @t) (get-header:http 'redirect' u.parsed)
?~ password=(get-header:http 'password' u.parsed)
(return-static-data-on-duct 400 'text/html' (login-page redirect our))
(return-static-data-on-duct 400 'text/html' (login-page redirect our %.n))
:: check that the password is correct
::
?. =(u.password code)
(return-static-data-on-duct 400 'text/html' (login-page redirect our))
(return-static-data-on-duct 400 'text/html' (login-page redirect our %.y))
:: mint a unique session cookie
::
=/ session=@uv

View File

@ -29,7 +29,7 @@
:: it's important to keep %zuse minimal. models and
:: engines not used outside a vane should stay inside
:: that vane.
~% %zuse +> ~
~% %zuse ..is ~
=>
:: :: ::
:::: :: :: (1) models
@ -1098,13 +1098,9 @@
[%burl p=@t] :: activate url
[%init p=@p] :: set owner
[%logo ~] :: logout
[%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel
[%meld ~] :: unify memory
[%pack ~] :: compact memory
[%trim p=@ud] :: trim kernel state
[%veer p=@ta q=path r=@t] :: install vane
[%verb ~] :: verbose mode
[%whey ~] :: memory report
== ::
+$ task :: in request ->$
$~ [%vega ~] ::
@ -1121,13 +1117,11 @@
[%hook ~] :: this term hung up
[%harm ~] :: all terms hung up
$>(%init vane-task) :: after gall ready
[%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel
[%meld ~] :: unify memory
[%noop ~] :: no operation
[%pack ~] :: compact memory
[%talk p=tank] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
[%view session=~] :: watch session blits
$>(%trim vane-task) :: trim state
$>(%vega vane-task) :: report upgrade
@ -1190,11 +1184,9 @@
$% [%crop p=@ud] :: trim kernel state
[%crud p=@tas q=(list tank)] ::
[%heft ~] ::
[%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel
[%meld ~] :: unify memory
[%pack ~] :: compact memory
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
[%verb ~] :: verbose mode
== ::
-- ::dill

View File

@ -26,7 +26,6 @@
%sag ~& [%save-jamfile-to p.b] line
%sav ~& [%save-file-to p.b] line
%url ~& [%activate-url p.b] line
%klr ~& %unhandled-case-klr ""
==
~? !=(~ last-line) last-line
~

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([pax=path ~] arg)
=+ !<([~ pax=path] arg)
?~ bem=(de-beam:format pax)
(strand-fail:strand %path-not-beam >pax< ~)
=/ =mars:clay [i i.t]:?>(?=([@ @ ~] s.u.bem) s.u.bem)

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([pax=path ~] arg)
=+ !<([~ pax=path] arg)
?^ bem=(de-beam:format pax)
(build-file:strandio u.bem)
(strand-fail:strand %path-not-beam >pax< ~)

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([pax=path ~] arg)
=+ !<([~ pax=path] arg)
?~ bem=(de-beam:format pax)
(strand-fail:strand %path-not-beam >pax< ~)
=/ =mark (rear s.u.bem)

View File

@ -6,7 +6,7 @@
=/ m (strand ,vase)
^- form:m
|^
=+ !<([=a=path =b=path ~] arg)
=+ !<([~ =a=path =b=path] arg)
=/ a-mark=mark -:(flop a-path)
=/ b-mark=mark -:(flop b-path)
?. =(a-mark b-mark)

View File

@ -6,7 +6,7 @@
|^
=/ m (strand ,vase)
^- form:m
=+ !< [adr=address:dns ~] arg
=+ !< [~ adr=address:dns] arg
::
;< our=ship bind:m get-our:strandio
=/ rac (clan:title our)

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([hash=@uv ~] arg)
=+ !<([~ hash=@uv] arg)
=/ url "https://bootstrap.urbit.org/glob-{(scow %uv hash)}.glob"
;< =cord bind:m (fetch-cord:strandio url)
=+ ;;(=glob:glob (cue cord))

View File

@ -29,7 +29,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=action:graph-view ~] arg)
=+ !<([~ =action:graph-view] arg)
?> ?=(%create -.action)
;< =bowl:spider bind:m get-bowl:strandio
::

View File

@ -57,7 +57,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=action:graph-view ~] arg)
=+ !<([~ =action:graph-view] arg)
?> ?=(%delete -.action)
;< =bowl:spider bind:m get-bowl:strandio
?. =(our.bowl entity.rid.action)

View File

@ -43,7 +43,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=action:graph-view ~] arg)
=+ !<([~ =action:graph-view] arg)
?> ?=(%groupify -.action)
;< =group bind:m (scry-group rid.action)
?. hidden.group

View File

@ -28,7 +28,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=action:graph-view ~] arg)
=+ !<([~ =action:graph-view] arg)
?> ?=(%join -.action)
;< =bowl:spider bind:m get-bowl:strandio
?: =(our.bowl entity.rid.action)

View File

@ -49,7 +49,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=action:graph-view ~] arg)
=+ !<([~ =action:graph-view] arg)
?> ?=(%leave -.action)
;< =bowl:spider bind:m get-bowl:strandio
?: =(our.bowl entity.rid.action)

View File

@ -12,7 +12,7 @@
=/ m (strand ,vase)
^- form:m
=+ !<
[[rid=resource title=@t description=@t group=resource module=@t ~] ~]
[~ rid=resource title=@t description=@t group=resource module=@t ~]
arg
;< =bowl:spider bind:m get-bowl:strandio
:: unarchive graph and share it

View File

@ -9,7 +9,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=update:grp ~] arg)
=+ !<([~ =update:grp] arg)
?. ?=(%remove-group -.update)
(pure:m !>(~))
;< =bowl:spider bind:m get-bowl:strandio

View File

@ -0,0 +1,23 @@
/- spider, grp=group-store
/+ strandio, res=resource
::
=* strand strand:spider
=* raw-poke raw-poke:strandio
::
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([~ =update:grp] arg)
?. ?=(%remove-members -.update)
(pure:m !>(~))
;< =bowl:spider bind:m get-bowl:strandio
?. (~(has in ships.update) our.bowl)
(pure:m !>(~))
;< ~ bind:m
%+ raw-poke
[our.bowl %group-store]
:- %group-action
!> ^- action:grp
[%remove-group resource.update ~]
(pure:m !>(~))

View File

@ -5,7 +5,8 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([who=ship mez=$@(~ [=tape ~])] arg)
=/ message ?~(mez '' (crip tape.mez))
=+ !<([~ arg=$@(who=ship [who=ship mez=tape])] arg)
=/ [who=ship message=@t]
?@(arg [who.arg ''] [who.arg (crip mez.arg)])
;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message))
(pure:m !>("hi {<who>} successful"))

View File

@ -10,7 +10,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([=update:inv ~] arg)
=+ !<([~ =update:inv] arg)
?. ?=(%accepted -.update)
(pure:m !>(~))
;< =bowl:spider bind:m get-bowl:strandio
@ -21,8 +21,7 @@
;< ~ bind:m
%+ poke-our %spider
=- spider-start+!>([`tid.bowl ~ %graph-join -])
%+ slop
!> ^- action:graph-view
[%join resource.invite ship.invite]
!>(~)
%+ slop !>(~)
!> ^- action:graph-view
[%join resource.invite ship.invite]
(pure:m !>(~))

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=/ [og-path=path ng-path=path ~] !<([path path ~] arg)
=/ [~ og-path=path ng-path=path] !<([~ path path] arg)
;< bol=bowl:spider bind:m get-bowl:strandio
|^
::

View File

@ -7,7 +7,7 @@
^- form:m
:: Parse arguments as ship, desk, and path
::
=+ !<([=care:clay =ship =desk =case =target=path ~] arg)
=+ !<([~ =care:clay =ship =desk =case =target=path] arg)
:: Read the file, possibly asyncrhonously
::
;< =bowl:spider bind:m get-bowl:strandio

View File

@ -104,8 +104,10 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=/ paz=(list path)
(tail !<([~ (list path)] arg))
=/ bez=(list beam)
(turn !<((list path) arg) |=(p=path (need (de-beam:format p))))
(turn paz |=(p=path (need (de-beam:format p))))
;< fiz=(set [=beam test=(unit term)]) bind:m (find-test-files bez)
=> .(fiz (sort ~(tap in fiz) aor))
=| test-arms=(map path (list test-arm))

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([arg=@dr ~] arg)
=+ !<([~ arg=@dr] arg)
;< now-1=@da bind:m get-time:strandio
;< ~ bind:m (sleep:strandio arg)
;< now-2=@da bind:m get-time:strandio

View File

@ -5,7 +5,7 @@
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<([pax=path ~] arg)
=+ !<([~ pax=path] arg)
;< bek=beak bind:m get-beak:strandio
;< paz=(list path) bind:m (list-tree:strandio bek (flop pax))
(pure:m !>(paz))

View File

@ -2229,7 +2229,7 @@
%+ complete-http-start-event
:- 200
['content-type' 'text/html']~
[~ (login-page:eyre-gate `'/~landscape/inner-path' ~nul)]
[~ (login-page:eyre-gate `'/~landscape/inner-path' ~nul %.n)]
== ==
==
:: a response post redirects back to the application, setting cookie

View File

@ -1693,9 +1693,9 @@
"integrity": "sha512-3OPSdf9cejP/TSzWXuBaYbzLtAfBzQnc75SlPLkoPfwpxnv1Bvy9hiWngLY0WnKRR6lMOldnkYQCCuNWeDibYQ=="
},
"@tlon/indigo-react": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.13.tgz",
"integrity": "sha512-6qYLjVcGZtDjI+BqS2PRrfAh9mUCDtYwDOHuYuPyV87mdVRAhduBlQ/3tDVlTNWICF9DeAhozeClxalACs5Ipw==",
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.5.tgz",
"integrity": "sha512-NOQTwH74l/XXMIfQ4ZzymvZuk1WK1nmO552TmXrQxBUSb7HmdlA8anG5oRrvnLJTkajLCY59McLkDca+lCcvwg==",
"requires": {
"@reach/menu-button": "^0.10.5",
"react": "^16.13.1",

View File

@ -9,7 +9,7 @@
"@reach/menu-button": "^0.10.5",
"@reach/tabs": "^0.10.5",
"@tlon/indigo-light": "^1.0.3",
"@tlon/indigo-react": "1.2.13",
"@tlon/indigo-react": "1.2.15",
"@tlon/sigil-js": "^1.4.2",
"aws-sdk": "^2.726.0",
"big-integer": "^1.6.48",

View File

@ -11,7 +11,7 @@ export default class BaseApi<S extends object = {}> {
this.channel.unsubscribe(id);
}
subscribe(path: Path, method, ship = this.ship, app: string, success, fail, quit) {
subscribe(path: Path, method, ship = this.ship, app: string, success, fail, quit, queue = false) {
this.bindPaths = _.uniq([...this.bindPaths, path]);
return this.channel.subscribe(
@ -32,7 +32,9 @@ export default class BaseApi<S extends object = {}> {
},
(qui) => {
quit(qui);
}
},
() => {},
queue
);
}

View File

@ -9,6 +9,10 @@ export default class BaseSubscription<S extends object> {
this.channel.setOnChannelOpen(this.onChannelOpen.bind(this));
}
clearQueue() {
this.channel.clearQueue();
}
delete() {
this.channel.delete();
}

View File

@ -43,13 +43,16 @@ export default class GlobalSubscription extends BaseSubscription<StoreState> {
};
start() {
this.subscribe('/all', 'invite-store');
this.subscribe('/groups', 'group-store');
this.subscribe('/primary', 'contact-view');
this.subscribe('/all', 'metadata-store');
this.subscribe('/all', 's3-store');
this.subscribe('/all', 'invite-store');
this.subscribe('/all', 'launch');
this.subscribe('/all', 'weather');
this.subscribe('/groups', 'group-store');
this.clearQueue();
this.subscribe('/primary', 'contact-view');
this.subscribe('/all', 's3-store');
this.subscribe('/keys', 'graph-store');
this.subscribe('/updates', 'hark-store');
this.subscribe('/updates', 'hark-graph-hook');

View File

@ -142,21 +142,6 @@ class App extends React.Component {
: null}
</Helmet>
<Root background={background}>
<Row
ref={e => banner = e}
display={showBanner}
justifyContent="space-between"
width='100%'
p='2'
backgroundColor='yellow'>
<Text color='#000000'>
A network-wide breach is scheduled for early December 2020. Please visit <Anchor target="_blank" href="https://urbit.org/breach" color='inherit'>urbit.org/breach</Anchor> for more information.
</Text>
<Text cursor='pointer' fontWeight='500' onClick={() => {
banner.style.display = "none";
localStorage.setItem("2020BreachBanner", "none");
}}>Dismiss</Text>
</Row>
<Router>
<ErrorBoundary>
<StatusBarWithRouter

View File

@ -23,9 +23,9 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => (
));
export const DayBreak = ({ when }) => (
<div className="pv3 gray2 b--gray2 flex items-center justify-center f9 w-100">
<p>{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}</p>
</div>
<Row pb='3' alignItems="center" justifyContent="center" width='100%'>
<Text gray>{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}</Text>
</Row>
);
interface ChatMessageProps {
@ -240,7 +240,7 @@ export class MessageWithSigil extends PureComponent<MessageProps> {
className={`mw5 db truncate pointer`}
ref={e => nameSpan = e}
onClick={() => {
writeText(msg.author);
writeText(`~${msg.author}`);
copyNotice(name);
}}
title={`~${msg.author}`}

View File

@ -3,7 +3,7 @@ import { UnControlled as CodeEditor } from 'react-codemirror2';
import { MOBILE_BROWSER_REGEX } from "~/logic/lib/util";
import CodeMirror from 'codemirror';
import { Row, BaseInput } from '@tlon/indigo-react';
import { Row, BaseTextArea } from '@tlon/indigo-react';
import 'codemirror/mode/markdown/markdown';
import 'codemirror/addon/display/placeholder';
@ -167,9 +167,10 @@ export default class ChatEditor extends Component {
color="black"
>
{MOBILE_BROWSER_REGEX.test(navigator.userAgent)
? <BaseInput
? <BaseTextArea
fontFamily={inCodeMode ? 'Source Code Pro' : 'Inter'}
fontSize="14px"
lineHeight="tall"
style={{ width: '100%', background: 'transparent', color: 'currentColor' }}
placeholder={inCodeMode ? "Code..." : "Message..."}
onKeyUp={event => {

View File

@ -18,6 +18,7 @@ const SquareBox = styled(Box)`
position: absolute;
top: 0;
}
position: relative;
`;
const routeList = defaultApps.map(a => `/~${a}`);

View File

@ -2,7 +2,7 @@ import React from "react";
import { Route, Link, Switch } from "react-router-dom";
import Helmet from 'react-helmet';
import { Box, Text, Row, Col, Icon } from "@tlon/indigo-react";
import { Box, Text, Row, Col, Icon, BaseImage } from "@tlon/indigo-react";
import { Sigil } from "~/logic/lib/sigil";
import { uxToHex, MOBILE_BROWSER_REGEX } from "~/logic/lib/util";
@ -12,7 +12,16 @@ import { ContactCard } from "~/views/landscape/components/ContactCard";
const SidebarItem = ({ children, view, current }) => {
const selected = current === view;
const color = selected ? "blue" : "black";
const icon = (view) => {
switch(view) {
case 'identity':
return 'Smiley';
case 'settings':
return 'Adjust';
default:
return 'Circle'
}
}
return (
<Link to={`/~profile/${view}`}>
<Row
@ -20,10 +29,10 @@ const SidebarItem = ({ children, view, current }) => {
verticalAlign="middle"
py={1}
px={3}
backgroundColor={selected ? "washedBlue" : "white"}
backgroundColor={selected ? "washedGray" : "white"}
>
<Icon mr={2} display="inline-block" icon="Circle" color={color} />
<Text color={color} fontSize={0}>
<Icon mr={2} display="inline-block" icon={icon(view)} color='black' />
<Text color='black' fontSize={0}>
{children}
</Text>
</Row>
@ -56,6 +65,9 @@ export default function ProfileScreen(props: any) {
history.replace("/~profile/identity");
}
const image = (!props?.hideAvatars && contact?.avatar)
? <BaseImage src={contact.avatar} width='100%' height='100%' style={{ objectFit: 'cover' }} />
: <Sigil ship={`~${ship}`} size={80} color={sigilColor} />;
return (
<Box height="100%" px={[0, 3]} pb={[0, 3]} borderRadius={1}>
<Box
@ -87,7 +99,7 @@ export default function ProfileScreen(props: any) {
justifyContent="center"
alignItems="center"
>
<Sigil ship={`~${ship}`} size={80} color={sigilColor} />
{image}
</Box>
</Box>
<Box width="100%" py={3} zIndex='2'>
@ -104,6 +116,7 @@ export default function ProfileScreen(props: any) {
alignItems="center"
px={3}
borderBottom={1}
fontSize='0'
borderBottomColor="washedGray"
>
<Link to="/~profile">{"<- Back"}</Link>
@ -119,6 +132,8 @@ export default function ProfileScreen(props: any) {
path="/~/default"
api={props.api}
s3={props.s3}
hideAvatars={props.hideAvatars}
hideNicknames={props.hideNicknames}
/>
</>
)}

View File

@ -50,6 +50,8 @@ export function EditPost(props: EditPostProps & RouteComponentProps) {
return (
<PostForm
initial={initial}
cancel
history={history}
onSubmit={onSubmit}
submitLabel="Update"
loadingText="Updating..."

View File

@ -1,17 +1,19 @@
import React from "react";
import * as Yup from "yup";
import React from 'react';
import * as Yup from 'yup';
import {
Box,
ManagedTextInputField as Input,
Row,
Col,
} from "@tlon/indigo-react";
import { AsyncButton } from "../../../components/AsyncButton";
import { Formik, Form, FormikHelpers } from "formik";
import { MarkdownField } from "./MarkdownField";
Button
} from '@tlon/indigo-react';
import { AsyncButton } from '../../../components/AsyncButton';
import { Formik, Form, FormikHelpers } from 'formik';
import { MarkdownField } from './MarkdownField';
interface PostFormProps {
initial: PostFormSchema;
cancel?: boolean;
history?: any;
onSubmit: (
values: PostFormSchema,
actions: FormikHelpers<PostFormSchema>
@ -21,8 +23,8 @@ interface PostFormProps {
}
const formSchema = Yup.object({
title: Yup.string().required("Title cannot be blank"),
body: Yup.string().required("Post cannot be blank"),
title: Yup.string().required('Title cannot be blank'),
body: Yup.string().required('Post cannot be blank')
});
export interface PostFormSchema {
@ -31,7 +33,7 @@ export interface PostFormSchema {
}
export function PostForm(props: PostFormProps) {
const { initial, onSubmit, submitLabel, loadingText } = props;
const { initial, onSubmit, cancel, submitLabel, loadingText, history } = props;
return (
<Col width="100%" height="100%" p={[2, 4]}>
@ -41,18 +43,26 @@ export function PostForm(props: PostFormProps) {
onSubmit={onSubmit}
validateOnBlur
>
<Form style={{ display: "contents"}}>
<Row flexShrink='0' flexDirection={["column-reverse", "row"]} mb={4} gapX={4} justifyContent='space-between'>
<Form style={{ display: 'contents' }}>
<Row flexShrink='0' flexDirection={['column-reverse', 'row']} mb={4} gapX={4} justifyContent='space-between'>
<Input maxWidth='40rem' width='100%' flexShrink={[0, 1]} placeholder="Post Title" id="title" />
<AsyncButton
<Row flexDirection={['column', 'row']} mb={[4,0]}>
<AsyncButton
ml={[0,2]}
flexShrink={0}
primary
loadingText={loadingText}
>
{submitLabel}
</AsyncButton>
{cancel && <Button
ml={[0,2]}
mb={[4,0]}
flexShrink={0}
primary
loadingText={loadingText}
>
{submitLabel}
</AsyncButton>
mt={[2,0]}
onClick={() => {
history.goBack();
}}
type="button">Cancel</Button>}
</Row>
</Row>
<MarkdownField flexGrow={1} id="body" />
</Form>

View File

@ -59,11 +59,10 @@ export default React.memo(({line}) => {
// render line
//
return (
<Text color='black' mono display='flex' fontSize='0'
<Text mono display='flex' fontSize='0'
style={{ overflowWrap: 'break-word', whiteSpace: 'pre-wrap' }}
>
{text}
</Text>
);
});

View File

@ -10,6 +10,7 @@ import {
Box,
Text,
Row,
BaseImage
} from "@tlon/indigo-react";
import { Formik, FormikHelpers } from "formik";
import { Contact } from "~/types/contact-update";
@ -25,6 +26,8 @@ interface ContactCardProps {
api: GlobalApi;
s3: S3State;
rootIdentity: Contact;
hideAvatars: boolean;
hideNicknames: boolean;
}
const formSchema = Yup.object({
@ -71,12 +74,15 @@ const emptyContact = {
export function ContactCard(props: ContactCardProps) {
const us = `~${window.ship}`;
const { contact, rootIdentity } = props;
const onSubmit = async (values: Contact, actions: FormikHelpers<Contact>) => {
const onSubmit = async (values: any, actions: FormikHelpers<Contact>) => {
try {
if(!contact) {
const [,,ship] = props.path.split('/');
values.color = uxToHex(values.color);
await props.api.contacts.share(ship, props.path, us, values)
const sharedValues = Object.assign({}, values);
sharedValues.avatar = (values.avatar === "") ? null : { url: values.avatar };
console.log(values);
await props.api.contacts.share(ship, props.path, us, sharedValues);
actions.setStatus({ success: null });
return;
}
@ -108,6 +114,11 @@ export function ContactCard(props: ContactCardProps) {
};
const hexColor = contact?.color ? `#${uxToHex(contact.color)}` : "#000000";
const image = (!props?.hideAvatars && contact?.avatar)
? <BaseImage src={contact.avatar} width='100%' height='100%' style={{ objectFit: 'cover' }} />
: <Sigil ship={us} size={32} color={hexColor} />;
const nickname = (!props.hideNicknames && contact?.nickname) ? contact.nickname : "";
return (
<Box p={4} height="100%" overflowY="auto">
@ -129,9 +140,11 @@ export function ContactCard(props: ContactCardProps) {
pb={3}
alignItems="center"
>
<Sigil size={32} classes="" color={hexColor} ship={us} />
<Box height='32px' width='32px'>
{image}
</Box>
<Box ml={2}>
<Text fontFamily="mono">{us}</Text>
<Text mono={!Boolean(nickname)}>{nickname}</Text>
</Box>
</Row>
<ImageInput id="avatar" label="Avatar" s3={props.s3} />

View File

@ -90,7 +90,9 @@ export function InvitePopover(props: InvitePopoverProps) {
borderColor="washedGray"
borderRadius={1}
maxHeight="472px"
width="380px"
width="100%"
maxWidth="380px"
mx={[4,0]}
bg="white"
>
<Formik

View File

@ -347,20 +347,20 @@ function Participant(props: {
</Action>
{props.role === 'admin' && (
<>
{!isInvite && (
{(!isInvite && contact.patp !== window.ship) && (
<StatelessAsyncAction onClick={onBan} bg="transparent">
<Text color="red">Ban from {title}</Text>
</StatelessAsyncAction>
)}
{role === 'admin' ? (
<StatelessAsyncAction onClick={onDemote} bg="transparent">
group?.tags?.role?.admin?.size > 1 && (<StatelessAsyncAction onClick={onDemote} bg="transparent">
Demote from Admin
</StatelessAsyncAction>
</StatelessAsyncAction>)
) : (
<>
<StatelessAsyncAction onClick={onKick} bg="transparent">
{(contact.patp !== window.ship) && (<StatelessAsyncAction onClick={onKick} bg="transparent">
<Text color="red">Kick from {title}</Text>
</StatelessAsyncAction>
</StatelessAsyncAction>)}
<StatelessAsyncAction onClick={onPromote} bg="transparent">
Promote to Admin
</StatelessAsyncAction>

View File

@ -144,6 +144,8 @@ export function PopoverRoutes(
contact={props.contacts[window.ship]}
rootIdentity={props.rootIdentity}
api={props.api}
hideAvatars={props.hideAvatars}
hideNicknames={props.hideNicknames}
path={props.association["group-path"]}
s3={props.s3}
/>

View File

@ -696,6 +696,7 @@
# define c3__low c3_s3('l','o','w')
# define c3__lsh c3_s3('l','s','h')
# define c3__lt c3_s2('l','t')
# define c3__lull c3_s4('l','u','l','l')
# define c3__lunt c3_s4('l','u','n','t')
# define c3__mack c3_s4('m','a','c','k')
# define c3__mach c3_s4('m','a','c','h')

View File

@ -944,9 +944,12 @@ static u3j_core _141_qua_d[] =
{ "mole", 7, _141_qua_mole_a, 0, _141_qua_mole_ha },
{ "mule", 7, _141_qua_mule_a, 0, _141_qua_mule_ha },
// XX disabled, implicated in memory corruption
// write tests and re-enable
//
// { "scot", 7, _141_qua_scot_a, 0, _141_qua_scot_ha },
// { "scow", 7, _141_qua_scow_a, 0, _141_qua_scow_ha },
// { "slaw", 7, _141_qua_slaw_a, 0, _141_qua_slaw_ha },
{ "slaw", 7, _141_qua_slaw_a, 0, _141_qua_slaw_ha },
{}
};
static c3_c* _141_qua_ha[] = {

View File

@ -793,7 +793,7 @@ _pier_wyrd_card(u3_pier* pir_u)
//
u3_noun ver = u3nq(u3i_string(VERE_NAME), VERE_MAJOR, VERE_MINOR, VERE_PATCH);
u3_noun kel = u3nl(u3nc(c3__zuse, VERE_ZUSE), // XX god_u->zus_w
// u3nc(c3__lull, PIER_LULL), // XX define
u3nc(c3__lull, u3i_string("lull-kelvin")), // XX define
u3nc(c3__arvo, u3i_string("arvo-kelvin")), // XX from both king and serf?
u3nc(c3__hoon, 141), // god_u->hon_y
u3nc(c3__nock, 4), // god_u->noc_y