mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
Merge branch 'apps' of https://github.com/urbit/urbit into apps
This commit is contained in:
commit
c9e8498615
@ -1679,7 +1679,7 @@
|
||||
"[{(trip p.sep)}]: {(trip q.sep)}"
|
||||
::
|
||||
%tax
|
||||
" {<sep>}"
|
||||
" {<sen>}: {<sep>}"
|
||||
==
|
||||
--
|
||||
::
|
||||
|
175
ape/work.hoon
175
ape/work.hoon
@ -2,13 +2,17 @@
|
||||
:: it can't
|
||||
:: maybe look into storing a "following" set
|
||||
:: make most updates not rely on knowing about task (all but claim?)
|
||||
:: should let non-owners suggest that owner cross-post to another
|
||||
:: should let non-creator suggest that creator cross-post to another
|
||||
:: station
|
||||
::
|
||||
:: pretty-print in command-line interface
|
||||
:: serialize %lax to json
|
||||
:: bring up ~dozbud to test
|
||||
::
|
||||
:: save log!
|
||||
::
|
||||
:: audience stuff seems messed up from talk? get extraneous stations
|
||||
::
|
||||
::::
|
||||
::
|
||||
/? 314
|
||||
@ -31,7 +35,11 @@
|
||||
!:
|
||||
::::
|
||||
::
|
||||
|_ [bowl client connected=_|]
|
||||
|_ $: bowl
|
||||
client
|
||||
connected=_|
|
||||
unordered=(map ,[@uvH @u] (pair ship flesh:work-stuff:talk))
|
||||
==
|
||||
++ at
|
||||
|= client-task
|
||||
=| moves=(list move)
|
||||
@ -72,34 +80,34 @@
|
||||
|= action=duty:work-stuff:talk
|
||||
(send-audience audience action)
|
||||
::
|
||||
++ claim
|
||||
(send-audience(claiming &) [[owner.tax (main owner.tax)] ~ ~] %claim id.tax)
|
||||
::
|
||||
++ send-archive
|
||||
|= to=(set station:talk)
|
||||
(send-audience to %archive id.tax)
|
||||
::
|
||||
++ send-create (send %create tax)
|
||||
++ send-change |* *
|
||||
%+ send-audience
|
||||
[[creator.tax (main creator.tax)] ~ ~]
|
||||
[%change id.tax +<]
|
||||
++ send-update |*(* (send %update id.tax +<))
|
||||
++ release |=([vers=@u her=@p] (send-update vers %release her))
|
||||
++ accept |=(vers=@u (send-update vers %accept ~))
|
||||
++ process-update
|
||||
|= [vers=@u up=update]
|
||||
|= up=update
|
||||
^+ +>
|
||||
?- -.up
|
||||
%add ?>(?=(%comment +<.up) (send-update vers %add-comment +>.up))
|
||||
%own
|
||||
%add ?>(?=(%comment +<.up) (send-change %add-comment +>.up))
|
||||
%doer
|
||||
?- +<.up
|
||||
%announce (send-update vers %announce ~)
|
||||
%claim claim
|
||||
%release (send-change %set-doer ~)
|
||||
%claim (send-change %set-doer `our)
|
||||
==
|
||||
::
|
||||
%set
|
||||
?- +<.up
|
||||
%date-due (send-update vers %set-date-due +>.up)
|
||||
%title (send-update vers %set-title +>.up)
|
||||
%description (send-update vers %set-description +>.up)
|
||||
%tags (send-update vers %set-tags +>.up)
|
||||
%done (send-update vers %set-done +>.up)
|
||||
%date-due (send-change %set-date-due +>.up)
|
||||
%title (send-change %set-title +>.up)
|
||||
%description (send-change %set-description +>.up)
|
||||
%tags (send-change %set-tags +>.up)
|
||||
%done (send-change %set-done +>.up)
|
||||
==
|
||||
==
|
||||
++ process-audience
|
||||
@ -111,7 +119,14 @@
|
||||
--
|
||||
::
|
||||
++ prep
|
||||
|= [old=(unit (pair client ,_|))]
|
||||
|= $= old
|
||||
$_
|
||||
=< $
|
||||
%- unit
|
||||
$: client
|
||||
_|
|
||||
(map ,[@uvH @u] (pair ship flesh:work-stuff:talk))
|
||||
==
|
||||
^- [(list move) _+>.$]
|
||||
initialize(+<+ ?~(old +<+.+>.$ u.old))
|
||||
::
|
||||
@ -142,8 +157,8 @@
|
||||
existing-task=u.existing-task
|
||||
==
|
||||
[~ +>.$]
|
||||
?. |(=(her owner.tax.action) =(%released status.tax.action))
|
||||
~& :* %created-with-bad-owner
|
||||
?. =(her creator.tax.action)
|
||||
~& :* %created-with-bad-creator
|
||||
her=her
|
||||
from=from
|
||||
new-task=tax.action
|
||||
@ -152,22 +167,11 @@
|
||||
[~ +>.$]
|
||||
=. tasks
|
||||
%^ ~(put by tasks) id.tax.action |
|
||||
:- | :_ tax.action
|
||||
:_ tax.action
|
||||
?~ existing-task from
|
||||
(~(uni in audience.u.existing-task) from)
|
||||
=. sort ?^(existing-task sort [id.tax.action sort])
|
||||
[~ +>.$]
|
||||
::
|
||||
%claim
|
||||
=+ tax=(~(got by tasks) id.action)
|
||||
?. &(=(our owner.tax.tax) =(%announced status.tax.tax))
|
||||
~& :* %bad-claim
|
||||
her=her
|
||||
from=from
|
||||
task=tax
|
||||
==
|
||||
[~ +>.$]
|
||||
abet:(release:(at (~(got by tasks) id.action)) +(version.tax.tax) her)
|
||||
::
|
||||
%archive
|
||||
=+ tax=(~(get by tasks) id.action)
|
||||
@ -178,8 +182,8 @@
|
||||
action=action
|
||||
==
|
||||
[~ +>.$]
|
||||
?: !=(her owner.tax.u.tax)
|
||||
~& :* %archiver-not-owner
|
||||
?: !=(her creator.tax.u.tax)
|
||||
~& :* %archiver-not-creator
|
||||
her=her
|
||||
from=from
|
||||
action=action
|
||||
@ -188,12 +192,30 @@
|
||||
[~ +>.$]
|
||||
=. tasks
|
||||
%+ ~(put by tasks) id.action
|
||||
:* claiming.u.tax
|
||||
=(~ (~(dif in audience.u.tax) from))
|
||||
:* =(~ (~(dif in audience.u.tax) from))
|
||||
(~(dif in audience.u.tax) from)
|
||||
tax.u.tax
|
||||
==
|
||||
[~ +>.$]
|
||||
::
|
||||
%change
|
||||
=+ tax=(~(get by tasks) id.action)
|
||||
?~ tax
|
||||
~& :* %change-for-nonexistent-task
|
||||
her=her
|
||||
from=from
|
||||
action=action
|
||||
==
|
||||
[~ +>.$]
|
||||
?: !=(our creator.tax.u.tax)
|
||||
~& :* %me-not-creator
|
||||
her=her
|
||||
from=from
|
||||
action=action
|
||||
tax=tax
|
||||
==
|
||||
[~ +>.$]
|
||||
abet:(send-update:(at u.tax) +(version.tax.u.tax) her meat.action)
|
||||
::
|
||||
%update
|
||||
=+ tax=(~(get by tasks) id.action)
|
||||
@ -204,6 +226,14 @@
|
||||
action=action
|
||||
==
|
||||
[~ +>.$]
|
||||
?: !=(her creator.tax.u.tax)
|
||||
~& :* %her-not-creator
|
||||
her=her
|
||||
from=from
|
||||
action=action
|
||||
tax=tax
|
||||
==
|
||||
[~ +>.$]
|
||||
?. =(version.action +(version.tax.u.tax))
|
||||
~& :* %update-bad-version
|
||||
her
|
||||
@ -211,49 +241,40 @@
|
||||
action=action
|
||||
tax=tax
|
||||
==
|
||||
[~ +>.$]
|
||||
?: ?& ?=(?(%announce %release %accept) -.meat.action)
|
||||
!=(her owner.tax.u.tax)
|
||||
==
|
||||
~& :* %not-owner
|
||||
her=her
|
||||
from=from
|
||||
action=action
|
||||
tax=tax
|
||||
==
|
||||
[~ +>.$]
|
||||
:- ~
|
||||
%_ +>.$
|
||||
unordered
|
||||
%+ ~(put by unordered)
|
||||
[id.action version.action]
|
||||
[her.action meat.action]
|
||||
==
|
||||
|-
|
||||
=. tasks
|
||||
%+ ~(put by tasks) id.action
|
||||
:* ?: ?=(%release -.meat.action)
|
||||
|
|
||||
claiming.u.tax
|
||||
::
|
||||
archived.u.tax
|
||||
::
|
||||
(~(uni in audience.u.tax) from)
|
||||
::
|
||||
=. version.tax.u.tax version.action
|
||||
=. date-modified.tax.u.tax when
|
||||
?- -.meat.action
|
||||
%announce tax.u.tax(status %announced)
|
||||
%release tax.u.tax(owner her.meat.action, status %released)
|
||||
%accept tax.u.tax(status %accepted)
|
||||
%set-date-due tax.u.tax(date-due wen.meat.action)
|
||||
%set-tags tax.u.tax(tags tag.meat.action)
|
||||
%set-title tax.u.tax(title til.meat.action)
|
||||
%set-description tax.u.tax(description des.meat.action)
|
||||
%set-done tax.u.tax(done ?.(don.meat.action ~ `when))
|
||||
%add-comment
|
||||
%= tax.u.tax
|
||||
discussion [[when her com.meat.action] discussion.tax.u.tax]
|
||||
==
|
||||
:+ archived.u.tax
|
||||
(~(uni in audience.u.tax) from)
|
||||
=. version.tax.u.tax version.action
|
||||
=. date-modified.tax.u.tax when
|
||||
?- -.meat.action
|
||||
%set-doer tax.u.tax(doer her.meat.action)
|
||||
%set-date-due tax.u.tax(date-due wen.meat.action)
|
||||
%set-tags tax.u.tax(tags tag.meat.action)
|
||||
%set-title tax.u.tax(title til.meat.action)
|
||||
%set-description tax.u.tax(description des.meat.action)
|
||||
%set-done tax.u.tax(done ?.(don.meat.action ~ `when))
|
||||
%add-comment
|
||||
%= tax.u.tax
|
||||
discussion [[when her com.meat.action] discussion.tax.u.tax]
|
||||
==
|
||||
==
|
||||
?: ?& =([%release our] meat.action)
|
||||
claiming.u.tax
|
||||
==
|
||||
abet:(accept:(at (~(got by tasks) id.action)) +(+(version.tax.u.tax)))
|
||||
[~ +>.$]
|
||||
=+ ooo=(~(get by unordered) id.action +(version.action))
|
||||
?~ ooo
|
||||
[~ +>.^$]
|
||||
%= $
|
||||
version.action +(version.action)
|
||||
her.action p.u.ooo
|
||||
meat.action q.u.ooo
|
||||
==
|
||||
==
|
||||
::
|
||||
++ mirror-to-web
|
||||
@ -292,10 +313,10 @@
|
||||
[(welp mov mow) +>.$]
|
||||
%old
|
||||
=+ (at (~(got by tasks) id.cod))
|
||||
abet:(process-update:- version.cod dif.cod)
|
||||
abet:(process-update:- dif.cod)
|
||||
%new
|
||||
=. +>.cod +>.cod(date-created now, version 0, date-modified now)
|
||||
abut:send-create:(at | | +.cod)
|
||||
abut:send-create:(at | +.cod)
|
||||
==
|
||||
::
|
||||
:: XX maybe need to check that we haven't received this message before
|
||||
|
@ -51,7 +51,7 @@
|
||||
++ ship (su fed:ag)
|
||||
++ coma
|
||||
%- of :~
|
||||
new/task old/(ot id/id version/ni dif/uppd ~)
|
||||
new/task old/(ot id/id dif/uppd ~)
|
||||
sort/(ar id) audience/(ot id/id to/audi ~)
|
||||
==
|
||||
++ task
|
||||
@ -60,7 +60,7 @@
|
||||
audience/audi
|
||||
id/id 'date_created'^di
|
||||
version/ni 'date_modified'^di
|
||||
owner/ship status/(ci (soft status) so)
|
||||
creator/ship doer/(mu ship)
|
||||
tags/(as so) 'date_due'^(mu di)
|
||||
done/(mu di) title/so
|
||||
description/so discussion/(ar (ot date/di ship/ship body/so ~))
|
||||
@ -69,7 +69,7 @@
|
||||
++ stan (su ;~((glue fas) ;~(pfix sig fed:ag) urs:ab))
|
||||
++ uppd
|
||||
%- of :~
|
||||
own/(of announce/ul claim/ul ~)
|
||||
doer/(of release/ul claim/ul ~)
|
||||
add/(of comment/so ~)
|
||||
:- %set
|
||||
%- of :~
|
||||
@ -92,8 +92,7 @@
|
||||
:: date-created:1440011611215,
|
||||
:: version:1,
|
||||
:: date-modified:1440011611215,
|
||||
:: owner:'fyr',
|
||||
:: status:'gave',
|
||||
:: creator:'fyr',
|
||||
:: tags:['tag'],
|
||||
:: date-due:null,
|
||||
:: done:false,
|
||||
|
@ -52,12 +52,11 @@
|
||||
=+ [-.b `date-due=(unit ,@da)`+.b]
|
||||
=^ tags a (undent a ~(gas in *(set cord)))
|
||||
=^ title a ?~(a !! a)
|
||||
=^ b a (advance a (parse owner=%p "." status=%tas ~))
|
||||
?> ?=(status.task status.b)
|
||||
=^ b a (advance a (parse creator=%p "." ~)) :: XX doer
|
||||
=+ b
|
||||
=^ description a (undent a role)
|
||||
:* id date-created version date-modified owner
|
||||
status tags date-due ~ title description :: XX done
|
||||
:* id date-created version date-modified creator
|
||||
~ tags date-due ~ title description :: XX done
|
||||
|- ^- (list comment)
|
||||
?: =(~ a) ~
|
||||
=^ b a (advance a (parse ship=%p " " date=%da ~))
|
||||
@ -76,7 +75,7 @@
|
||||
:- (rend uv/id '_' da/date-created ' ' ud/version da/date-modified due)
|
||||
%+ welp (indent (sort (~(tap in tags)) aor))
|
||||
:- title
|
||||
:- (rend p/owner '.' tas/status ~)
|
||||
:- (rend p/creator ~)
|
||||
%- zing ^- (list wain)
|
||||
:- (indent (lore description))
|
||||
%+ turn discussion
|
||||
@ -90,7 +89,7 @@
|
||||
:: {tag2}
|
||||
:: ...
|
||||
:: {title}
|
||||
:: {owner}.{status}
|
||||
:: {creator}
|
||||
:: {description}
|
||||
:: {more description}
|
||||
:: {ship1} {date}
|
||||
|
@ -82,31 +82,26 @@
|
||||
|% ::
|
||||
++ duty ::
|
||||
$% [%create tax=task] :: create new task
|
||||
[%claim id=@uvH] :: claim task
|
||||
[%archive id=@uvH] :: archive task
|
||||
$: %update :: operate on task
|
||||
id=@uvH :: which task
|
||||
version=@u :: version
|
||||
$= meat ::
|
||||
$% [%announce ~] :: make available
|
||||
[%release her=ship] :: pass to new owner
|
||||
[%accept ~] :: accept pass
|
||||
[%set-date-due wen=(unit ,@da)] :: set due date
|
||||
[%set-tags tag=(set ,@t)] :: set tags
|
||||
[%set-title til=@t] :: set title
|
||||
[%set-description des=@t] :: set description
|
||||
[%set-done don=?] :: set done
|
||||
[%add-comment com=@t] :: add comment
|
||||
== ::
|
||||
== ::
|
||||
[%change id=@uvH meat=flesh] :: request change
|
||||
[%update id=@uvH version=@u her=ship meat=flesh]:: broadcast change
|
||||
== ::
|
||||
++ flesh ::
|
||||
$% [%set-doer her=(unit ,@p)] :: set doer
|
||||
[%set-date-due wen=(unit ,@da)] :: set due date
|
||||
[%set-tags tag=(set ,@t)] :: set tags
|
||||
[%set-title til=@t] :: set title
|
||||
[%set-description des=@t] :: set description
|
||||
[%set-done don=?] :: set done
|
||||
[%add-comment com=@t] :: add comment
|
||||
== ::
|
||||
++ task ::
|
||||
$: id=@uvH ::
|
||||
date-created=@da ::
|
||||
version=@u ::
|
||||
date-modified=@da ::
|
||||
owner=@p ::
|
||||
status=status ::
|
||||
creator=@p ::
|
||||
doer=(unit ,@p) ::
|
||||
tags=(set ,@t) ::
|
||||
date-due=(unit ,@da) ::
|
||||
done=(unit ,@da) ::
|
||||
@ -119,9 +114,5 @@
|
||||
ship=@p ::
|
||||
body=@t ::
|
||||
== ::
|
||||
++ status ?(%announced %released %accepted) ::
|
||||
--
|
||||
:: markdown
|
||||
:: image
|
||||
:: mime object
|
||||
--
|
||||
|
@ -5,8 +5,7 @@
|
||||
sort=(list ,@uvH)
|
||||
==
|
||||
++ client-task
|
||||
$: claiming=_|
|
||||
archived=_|
|
||||
$: archived=_|
|
||||
audience=(set station:talk)
|
||||
tax=task
|
||||
==
|
||||
@ -15,8 +14,8 @@
|
||||
date-created=@da
|
||||
version=@u
|
||||
date-modified=@da
|
||||
owner=@p
|
||||
status=status
|
||||
creator=@p
|
||||
doer=(unit ,@p)
|
||||
tags=(set ,@t)
|
||||
date-due=(unit ,@da)
|
||||
done=(unit ,@da)
|
||||
@ -29,10 +28,9 @@
|
||||
ship=@p
|
||||
body=@t
|
||||
==
|
||||
++ status ?(%announced %released %accepted)
|
||||
++ command
|
||||
++ command
|
||||
$% [%new audience=(set station:talk) task]
|
||||
[%old id=@uvH version=@u dif=update]
|
||||
[%old id=@uvH dif=update]
|
||||
[%sort p=(list ,@uvH)]
|
||||
[%audience id=@uvH to=(set station:talk)]
|
||||
==
|
||||
@ -47,8 +45,8 @@
|
||||
$: %add
|
||||
$% [%comment @t]
|
||||
== ==
|
||||
$: %own
|
||||
$% [%announce ~]
|
||||
$: %doer
|
||||
$% [%release ~]
|
||||
[%claim ~]
|
||||
== ==
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user