* IAppAuthBasicManagement: complete the management surface
Expand IAppAuthBasicManagement so it declares everything dstack's own
operator tooling and test suite read or write against an app contract.
Previously the interface declared only four mutators; the reference
implementation DstackApp.sol exposed an additional 6 reads + 2
mutators that operator tooling and the test suite already use, but
the interface didn't declare them — so any third-party IAppAuth
implementer could conform to the interface in name without satisfying
the de facto contract dstack tooling expects.
Within dstack alone the gap surfaces:
* kms/auth-eth/hardhat.config.ts:476 app:set-allow-any-device
operator task calls appContract.setAllowAnyDevice(bool) — a
mutator that wasn't in the interface.
* kms/auth-eth/test/DstackApp.test.ts + DstackApp.upgrade.test.ts
read appContract.owner(), version(), allowedComposeHashes(hash),
allowedDeviceIds(id), allowAnyDevice(), requireTcbUpToDate() —
none of which were in the interface, forcing tests + tooling to
import the concrete DstackApp type rather than the abstract
interface.
External tooling (e.g. third-party CLIs that target the CVM's
`app_id` directly during in-place updates) hits the same gap. With
this change such tooling can rely on supportsInterface(IAppAuth-
BasicManagement.interfaceId) -> true to know it can call any of these
methods safely.
Interface contents now (additions marked NEW):
Events:
ComposeHashAdded, ComposeHashRemoved, DeviceAdded, DeviceRemoved
NEW: AllowAnyDeviceSet, RequireTcbUpToDateSet
Mutators:
addComposeHash, removeComposeHash, addDevice, removeDevice
NEW: setAllowAnyDevice, setRequireTcbUpToDate
Reads (all NEW; symmetric with the mutators above):
allowedComposeHashes, allowedDeviceIds,
allowAnyDevice, requireTcbUpToDate,
owner, version
DstackApp.sol changes:
* Mark the four existing mutators as override against the
extended interface.
* Mark the two pre-existing setters (setAllowAnyDevice,
setRequireTcbUpToDate) as override.
* Mark version() as override (was just public pure; now also
overrides the interface's view declaration; pure satisfies view).
* Override owner() against (OwnableUpgradeable, IAppAuth-
BasicManagement); Solidity multi-parent override; the body just
delegates to OwnableUpgradeable.owner() so behavior is unchanged.
* Mark the four public state vars as override so the auto-
generated getters satisfy the interface declarations.
* Drop the local AllowAnyDeviceSet + RequireTcbUpToDateSet event
declarations; inheriting them from the interface avoids 'event
declared more than once' errors.
* Switch supportsInterface() from hardcoded selectors
(0x1e079198, 0x8fd37527) to type(...).interfaceId so the literal
can't drift from the interface as it evolves.
Breaking change: the IAppAuthBasicManagement interface ID changes
from 0x8fd37527 to 0xea8447a1. Implementers that hardcoded the old
literal in their own supportsInterface() should switch to
`type(IAppAuthBasicManagement).interfaceId` so refactors stay in
sync. New unit test pins both the new ID (must be true) and the old
ID (must be false) so any future change to the interface set fails
loudly.
Tests: 30/30 hardhat + 41/41 jest pass.
* DstackApp.supportsInterface: comment the type(...).interfaceId style choice
Address review feedback: every other change in this PR is forced by
the interface expansion (Solidity-required override markers, mandatory
event-declaration removal to avoid duplicates, OwnableUpgradeable +
IAppAuthBasicManagement multi-parent owner() override). The
supportsInterface body is the one place where the change goes
slightly beyond the strict minimum — switching from hardcoded
selectors (0x1e079198, 0x8fd37527) to type(...).interfaceId is a
stylistic refactor that auto-tracks future interface evolution rather
than the literal-update equivalent (interfaceId == 0xea8447a1).
Add a NatSpec note explaining the choice and how to revert to the
literal form if maintainer house style prefers it. Either way is
covered by the new test in test/DstackApp.test.ts which pins both
the current ID (true) and the old one (false).
* DstackApp.supportsInterface: drop editorial from comment