You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make a guest object meant to mimic an outside party who woud like to make use of your pet-store's Clock.
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo mkguest alice
Object [Alleged: EndoGuest] {}
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo send alice @clock
Inspect alice's inbox and adopt the Clock remotable
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo inbox -a alice
0. "HOST" sent "@clock" at "2024-02-03T22:07:27.189Z"~/71ed5f69356eef848a9b0e0328cffb79 ==> endo adopt 0 clock -a alice
Confirm that alice has succesfully added the Clock to her pet-store.
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo list -a alice
clock
While acting as alice, attempt to use the clock in the same manner shown in step #2 and watch as execuation fails.
Question
Is it right to assume the an EndoGuest will never have the powers necessary to call endo eval despite having been explicitly given a reference (and despite this reference being present in their pet-store)?
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo eval"E(c).time()" c:clock -a alice
CapTP cli exception: (RemoteTypeError(error:captp:Endo#20001)#1)
RemoteTypeError(error:captp:Endo#20001)#1: target has no method "evaluate", has ["__getMethodNames__","adopt","dismiss","followEntries","followMessages","followNames","has","list","listEntries","listMessages","lookup","reject","remove","rename","request","resolve","reverseLookup","send"]
at decodeErrorCommon (packages/marshal/src/marshal.js:281:28)
at decodeErrorFromCapData (packages/marshal/src/marshal.js:297:14)
at decodeFromCapData (packages/marshal/src/encodeToCapData.js:384:27)
at fromCapData (packages/marshal/src/marshal.js:359:23)
at CTP_RETURN (packages/captp/src/captp.js:696:24)
at dispatch (packages/captp/src/captp.js:775:7)
at packages/daemon/src/connection.js:34:7
(RemoteTypeError(error:captp:Endo#20001)#1)
Carry out the following actions:
Create an EndoHost,
sending the Clock to the EndoHost.
adopt the Clock while acting as the EndoHost
evaluate the Clock's time method while acting as this host
inspect the EndoHost pet-store for master-clock before removing clock from host-alice's pet-store
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo list -a timemaster
master-clock
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo list -a host-alice
clock
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo remove -a host-alice clock
send host-alice a reference to Clock while acting as timemaster and watch as error ensues....
Question
Is this failing because the EndoHosttimemaster does not have host-alice in its pet-store?
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo send host-alice @clock -a timemaster
CapTP cli exception: (RemoteError(error:captp:Endo#20001)#1)
RemoteError(error:captp:Endo#20001)#1: Unknown pet name for party: host-alice
at decodeErrorCommon (packages/marshal/src/marshal.js:281:28)
at decodeErrorFromCapData (packages/marshal/src/marshal.js:297:14)
at decodeFromCapData (packages/marshal/src/encodeToCapData.js:384:27)
at fromCapData (packages/marshal/src/marshal.js:359:23)
at CTP_RETURN (packages/captp/src/captp.js:696:24)
at dispatch (packages/captp/src/captp.js:775:7)
at packages/daemon/src/connection.js:34:7
(RemoteError(error:captp:Endo#20001)#1)
Attempt to resolve this issue by:
creating a new host while acting as timemaster.
sending the new host a reference to timemaster's Clock reference.
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo mkhost -a timemaster timemaster-alice
Object [Alleged: EndoHost] {}
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo send -a timemaster timemaster-alice @master-clock
Check the inbox of timemaster-alice (which exists within the pet-store of timemaster
Question
Why does this error out?
Although this errors, running endo inbox -a timemaster
~/71ed5f69356eef848a9b0e0328cffb79 ==> endo inbox -a timemaster -a timemaster-alice
TypeError#1: Cannot destructure property 'number' of 'message' as it is undefined.
at packages/cli/src/commands/inbox.js:22:15
at async packages/cli/src/context.js:72:7
at async packages/cli/src/context.js:55:7
at async packages/cli/src/context.js:43:5
at async withInterrupt (packages/cli/src/context.js:14:5)
at async Promise.all (index 0)
at async main (packages/cli/src/endo.js:642:5)
at async packages/cli/bin/endo.cjs:4:3
Inspect the timemaster's inbox and see the request
Question
Is this the correct behavior? I expected for the nested endo inbox commands to show any messages that were sent to the last inbox referenced when executing the command.
endo inbox -a timemaster
0. "SELF" sent "@master-clock" at "2024-02-03T22:38:18.884Z"
Additional Notes
At this point, my daemon was turned upside down. For example, executing endo send host-alice @clock followed by endo inbox -a host-alice did not show any messages in the inbox. Oddly enough, endo adopt <message-number> -a host-alice resulted in clock appearing in host-alice's pet-store.
This was verified by calling endo inbox -a host-alice only to see a new clock reference. Note: the initial clock held by host-alice was removed prior to this, so it is not the same clock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters