2021-10-20 19:40:57 +03:00
|
|
|
:: |nuke: wipe agent state & subscriptions after confirmation
|
|
|
|
::
|
|
|
|
/+ *generators
|
|
|
|
:- %ask
|
2021-07-21 12:00:11 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
|
|
[=term ~]
|
|
|
|
desk=_|
|
|
|
|
==
|
2021-10-20 19:40:57 +03:00
|
|
|
=/ m1
|
|
|
|
'nuking agents will permanently delete all their state and subscriptions.'
|
|
|
|
=/ m2
|
|
|
|
'if other agents depend on the one(s) you nuke, \
|
|
|
|
/their behavior could be negatively impacted.'
|
|
|
|
=/ m3
|
|
|
|
%+ rap 3
|
|
|
|
:~ 'are you sure you want to continue and nuke '
|
|
|
|
::
|
|
|
|
?. desk (cat 3 '%' term)
|
|
|
|
(cat 3 'all agents in ' term)
|
|
|
|
::
|
|
|
|
'?'
|
|
|
|
==
|
|
|
|
::NOTE yes, printing order is weird
|
|
|
|
%+ print m3
|
|
|
|
%+ print m2
|
|
|
|
%+ print m1
|
|
|
|
%+ prompt [%& %prompt "nuke? (y/N) "]
|
|
|
|
|= in=tape
|
|
|
|
?. |(=("y" in) =("Y" in) =("yes" in))
|
|
|
|
no-product
|
|
|
|
(produce %kiln-nuke term desk)
|