Repository navigation
feat: record app-call interventions and serve them to apps (sdk 0.6.1) - #99
Draft
multi-agency wants to merge 2 commits into
Draft
multi-agency wants to merge 2 commits into
multi-agency wants to merge 2 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On hold with the Treasury experiment: no release candidate, consumer acceptance or deploy until it is rescheduled.
Review first:
src/gateway/app-routes.ts, where an app call is recorded before forwarding, refused with 503 if the record fails, and the new GET sits beside/rpc/.Why
pnpm run-reportjudges an unattended autopilot run, including "no operator interventions". On a headless platform host it couldn't: it used the retired dashboard session and/gw/interventions(404 there), and the gateway didn't record app calls as interventions.What changes
isInterventionrule as the owner and machine routes) before forwarding them. Reads aren't recorded.GET /apps/v1/o/<organization>/a/<agent>/interventions?since=<ISO time with zone>, with areadconsent and the same checks as an agent call. It returns only that agent's calls (time, caller, agent, procedure) and counts unreadable lines. Hosts advertise it asinterventions-v1; the SDK addsapp.agent(org, agent).interventions(since).pnpm run-reportreads a run as an app deployment (PLATFORM_URL,APP_CREDENTIAL_FILE,ORGANIZATION,AGENT).since,SINCEandUNTILmust be ISO 8601 with a zone and are compared in UTC (a non-ISO time hid calls); a record line without its fields counts as unreadable; the intervention record is written before the access log.Not covered
The record still leaves out calls made on the host directly, owner signatures submitted on the confirm page and DAO vote relays. For a configured agent several deployments reach, the read shows each one's calls.
Tested