phux docs

Resource kinds

Resource kinds, their methods and events, and the authorization verb each wire method needs.

Everything below is compiled into the binary from phux_protocol::kinds. The same rows drive phux --capabilities --json and the workload-auth classifier, so the verbs listed for a method are the verbs dispatch requires. A method is invoked through its typed frame or command. The catalog describes methods and is never an invocation handle, and reading it grants nothing.

Verbs are a closed set. A method whose rows need only INVENTORY or OBSERVE is read-only; any other verb can change server state; a method no row admits by verb (the COMMAND envelope, a denied method) counts as mutating. A gate is the HELLO_OK feature bit a client must see before relying on the method, named as phux status --json names it; a gate in the trailing features_ext word is marked (features_ext), and any other lives in features. In phux --capabilities --json every gate is feature_gate: { "word": "features" | "features_ext", "feature": name, "mask": value }, where mask is the bit’s value in that word of HELLO_OK.server_caps, not a bit index. The older gate: { "feature", "mask" } field covers only the features word and is null for a features_ext gate.

Server methods

Addressed to the server or the connection rather than to one resource.

MethodCarrierRequiresMutatingGateStatus
HELLOframe 0x01exempt: handshakenononeshipped
PINGframe 0x7fexempt: livenessnononeshipped
ATTACHframe 0x02OBSERVE, CREATE, BINDyesnoneshipped
DETACHframe 0x03exempt: cleanupnononeshipped
VIEWPORT_RESIZEframe 0x20BINDyesnoneshipped
COMMANDframe 0x31nestedyesnoneshipped
LIST_DIRECTORYframe 0x55INVENTORYnolist_directoryshipped
PATH_QUERYframe 0x56INVENTORYnopath_query (features_ext)shipped
GET_FILEcommand 0x3bINPUTyesfile_download (features_ext)shipped
SERVICE_HTTP_OPENcommand 0x3dINPUTyeshost_service_http (features_ext)shipped
SERVICE_HTTP_READcommand 0x3eINPUTyeshost_service_http (features_ext)shipped
SERVICE_HTTP_CLOSEcommand 0x3fINPUTyeshost_service_http (features_ext)shipped
UPGRADEcommand 0x0eSIGNALyesnoneshipped
SHUTDOWNcommand 0x16SIGNAL (owner socket only)yesshutdownshipped
OPEN_LISTENERcommand 0x1cSIGNAL (owner socket only)yesopen_listenershipped
DETACH_CLIENTScommand 0x13SIGNALyesnoneshipped
GET_PERFcommand 0x18OBSERVE, BINDyesget_perfshipped
PERF_CONTROLcommand 0x39OBSERVE, BIND (owner socket only)yesperf_control (features_ext)shipped
phux.session.create/v1metadata keyCREATE, BINDyesnoneshipped
phux.session.name/v1metadata keyBINDyesnoneshipped
phux.session.keep_empty/v1metadata keyCREATE, BIND, SIGNALyeskeep_empty_sessionsshipped
phux.config.reload/v1metadata keySIGNALyesnoneshipped
phux.approval.decide/v1/metadata keySIGNALyesapprovalsshipped
phux.whoami/v1metadata keyexempt: selfnowhoamishipped
GET_ORGANIZATIONcommand 0x1eINVENTORYnoorganization (features_ext)shipped
SESSION_CREATEcommand 0x1fCREATEyesorganization (features_ext)shipped
SESSION_RENAMEcommand 0x20ORGANIZEyesorganization (features_ext)shipped
SESSION_SET_LIFETIMEcommand 0x21ORGANIZEyesorganization (features_ext)shipped
SESSION_DELETEcommand 0x22TERMINATEyesorganization (features_ext)shipped
RESOURCE_CREATEcommand 0x23CREATEyesorganization (features_ext)shipped
RESOURCE_MOVEcommand 0x24ORGANIZEyesorganization (features_ext)shipped
RESOURCE_MOVE_MANYcommand 0x25ORGANIZEyesorganization (features_ext)shipped
RESOURCE_RENAMEcommand 0x26ORGANIZEyesorganization (features_ext)shipped
RESOURCE_TERMINATEcommand 0x27TERMINATEyesorganization (features_ext)shipped
RESOURCE_REMOVEcommand 0x28TERMINATEyesorganization (features_ext)shipped
RESOURCE_RELAUNCHcommand 0x29CREATEyesorganization (features_ext)shipped
INBOX_RESOLVEcommand 0x2bORGANIZEyesorganization (features_ext)shipped
ORGANIZATION_UNDOcommand 0x2cORGANIZEyesorganization (features_ext)shipped
ARRANGEMENT_GETcommand 0x2dINVENTORYnoorganization (features_ext)shipped
ARRANGEMENT_REPLACEcommand 0x2eORGANIZEyesorganization (features_ext)shipped
DELEGATE_AGENTcommand 0x35TERMINATE (owner socket only)yesnoneshipped
REVOKE_DELEGATIONcommand 0x36TERMINATE (owner socket only)yesnoneshipped
SESSION_KILLcommand 0x37TERMINATEyessession_kill (features_ext)shipped
SESSION_SET_PROJECTcommand 0x3aORGANIZEyessession_project (features_ext)shipped

Server events

EventTag
journal_gap0x0b
approval_requested0x0d
approval_decided0x0e
session_created0x10
session_renamed0x11
session_deleted0x12
session_lifetime_changed0x13
membership_changed0x14
resource_created0x15
resource_removed0x16
activation_changed0x17
arrangement_changed0x18
lease_changed0x19
intake_changed0x1a
resource_renamed0x1b
session_project_set0x1d

Substrate methods

Answered by every resource kind.

MethodCarrierRequiresMutatingGateStatus
SPAWN_RESOURCEframe 0x22CREATE, BINDyesnoneshipped
ATTACH_RESOURCEcommand 0x01OBSERVE, BINDyesnoneshipped
DETACH_RESOURCEcommand 0x02exempt: cleanupnononeshipped
KILL_RESOURCEcommand 0x03SIGNALyesnoneshipped
KILL_RESOURCE_IFcommand 0x1bSIGNALyesconditional_killshipped
KILL_RESOURCEScommand 0x09SIGNALyesnoneshipped
CLOSE_TAB_RESOURCEScommand 0x1dSIGNALyesclose_tab_resourcesshipped
SUBSCRIBE_RESOURCE_EVENTScommand 0x0dOBSERVEnononeshipped
SUBSCRIBE_EVENTSframe 0x41OBSERVEnononeshipped
GET_STATEcommand 0x05INVENTORYnononeshipped
GET_METADATAframe 0x50OBSERVEnononeshipped
SET_METADATAframe 0x51CREATE, BIND, SIGNALyesnoneshipped
DELETE_METADATAframe 0x52BINDyesnoneshipped
LIST_METADATAframe 0x53INVENTORYnononeshipped
SUBSCRIBE_METADATAframe 0x54OBSERVEnononeshipped

Substrate events

EventTag
pane_spawned0x04
pane_closed0x05
source_gap0x0c

Kind TERMINAL

Wire tag 0; gate: none.

Methods

The kind’s facet.

MethodCarrierRequiresMutatingGateStatus
INPUT_KEYframe 0x10INPUTyesnoneshipped
INPUT_PASTEframe 0x11INPUTyesnoneshipped
INPUT_MOUSEframe 0x12INPUTyesnoneshipped
INPUT_FOCUSframe 0x14INPUTyesnoneshipped
INPUT_RAWframe 0x13INPUTyesnonespec-only
INPUT_TERMINAL_REPLYframe 0x17INPUTyesterminal_replyshipped
RESIZE_TERMINALframe 0x23BINDyesnoneshipped
HISTORY_REQUESTframe 0x16OBSERVEnononeshipped
FRAME_ACKframe 0x21OBSERVEnononeshipped
MOVE_RESOURCEframe 0x2aBINDyesmove_resourceshipped
GET_SCREENcommand 0x07OBSERVEnononeshipped
ROUTE_INPUTcommand 0x08INPUTyesnoneshipped
APPLY_INPUTcommand 0x14INPUTyesacknowledged_inputshipped
PUT_FILEcommand 0x15INPUTyesfile_uploadshipped
CHECKOUTcommand 0x3cINPUTyescheckout (features_ext)shipped
TRANSCRIBEcommand 0x19INPUTyestranscribeshipped
GET_TERMINAL_STATEcommand 0x0cINVENTORYnononeshipped
ACQUIRE_INPUTcommand 0x0fBINDyesnoneshipped
RELEASE_INPUTcommand 0x10BINDyesnoneshipped
SIGNAL_TERMINALcommand 0x11SIGNALyesnoneshipped
REPORT_ASKEDcommand 0x12BINDyesnoneshipped
REPORT_AGENT_STATEcommand 0x17BINDyesreport_agent_stateshipped

Events

EventTag
command_started0x00
command_finished0x01
title_changed0x02
bell0x03
dirty0x06
idle0x07
terminal_control0x08
asked0x09
cwd_changed0x0a
input_activity0x0f

Resource metadata keys

  • phux.agent/v1
  • phux.agent-session/v1
  • phux.pane-occupant/v1
  • phux.tags/v1
  • phux.link/v1

Kind AGENT_SESSION

Wire tag 1; gate: resource_kinds.

Methods

The kind’s facet.

MethodCarrierRequiresMutatingGateStatus
APPEND_RESOURCE_OUTPUTcommand 0x1aBIND, INPUTyesresource_kindsshipped
NATIVE_AGENTcommand 0x38INVENTORY, CREATE, BIND, INPUTyesnoneshipped

Events

EventTag
native_agent_result0x1c

Resource metadata keys

None.

Client frame classification

Every client-originated frame lands on exactly one row.

CaseRequiresSubject
HELLOexempt: handshakeNone
PINGexempt: livenessNone
DETACHexempt: cleanupCallingConnection
ATTACH existing/last targetOBSERVE+BINDResolvedGroup
ATTACH create-if-missingOBSERVE+CREATE+BINDSelectedLocalGroup
HISTORY_REQUESTOBSERVENamedTerminal
FRAME_ACKOBSERVENamedTerminal
COMMANDnestedNone
SUBSCRIBE (unallocated)denyNone
INPUT_KEY, INPUT_PASTE, INPUT_MOUSE, INPUT_RAW, INPUT_FOCUS, INPUT_TERMINAL_REPLYINPUTNamedTerminal
VIEWPORT_RESIZEBINDAttachedTerminals
SPAWN_RESOURCE { satellite: Some, owner_terminal: None }CREATESatelliteHost
SPAWN_RESOURCE { satellite: None, owner_terminal: None }CREATEPayloadGroup
SPAWN_RESOURCE { satellite: None, owner_terminal: Some }CREATE+BINDOwnerTerminalGroup
SPAWN_RESOURCE { satellite: Some, owner_terminal: Some }denyNone
SPAWN_RESOURCE { kind: AGENT_SESSION, satellite: None, parent: Some }CREATE+BINDParentTerminalGroup
SPAWN_RESOURCE { kind: AGENT_SESSION, satellite: Some(H), parent: Some(Satellite { H, .. }) }CREATE+BINDSatelliteHostAndParent
SPAWN_RESOURCE { kind: not TERMINAL, parent: None } or { kind: TERMINAL, parent: Some }denyNone
RESIZE_TERMINALBINDNamedTerminal
MOVE_RESOURCEBINDMovedAndOwnerTerminals
SUBSCRIBE_EVENTS { terminal: Some }OBSERVENamedTerminal
SUBSCRIBE_EVENTS { terminal: None }OBSERVEObservableTerminals
GET_METADATA { Global, "phux.whoami/v1" }exempt: selfCallingConnection
Other GET_METADATAOBSERVEMetadataScope
SET_METADATA { Global, "phux.session.create/v1" }CREATE+BINDGlobal { owner_uds_only: false }
SET_METADATA { Global, "phux.session.keep_empty/v1" } with value name\0trueCREATE+BINDGlobal { owner_uds_only: false }
SET_METADATA { Global, "phux.session.keep_empty/v1" } with value name\0falseSIGNALNamedSession
SET_METADATA { Global, "phux.session.keep_empty/v1" } with any other valuedenyNone
SET_METADATA { Global, "phux.config.reload/v1" }SIGNALGlobal { owner_uds_only: false }
SET_METADATA { Global, "phux.approval.decide/v1/<id>" } with value approve or denySIGNALHeldAction
SET_METADATA { Global, "phux.approval.decide/v1/<id>" } with a malformed id or any other valuedenyNone
SET_METADATA or DELETE_METADATA targeting phux.session.created/v1 or its slash-prefixed resultsdenyNone
SUBSCRIBE_METADATA targeting that result namespacedenyNone
SET_METADATA or DELETE_METADATA targeting phux.pane-occupant/v1, phux.whoami/v1, or a phux.approval/v1/<id> record, or DELETE_METADATA targeting phux.config.reload/v1, phux.session.keep_empty/v1, or a phux.approval.decide/v1/<id> keydenyNone
Other SET_METADATA, DELETE_METADATABINDMetadataScope
LIST_METADATAINVENTORYMetadataScope
LIST_DIRECTORYINVENTORYGlobal { owner_uds_only: false }
PATH_QUERYINVENTORYGlobal { owner_uds_only: false }
Other SUBSCRIBE_METADATAOBSERVEMetadataScope
Unknown, wrong-direction, retired, or otherwise unclassified framedenyNone

Command classification

Every command nested in COMMAND lands on exactly one row; the envelope alone grants nothing.

CaseRequiresSubject
SPAWN (unallocated)denyNone
ATTACH_RESOURCEOBSERVE+BINDNamedTerminal
DETACH_RESOURCEexempt: cleanupCallingConnection
KILL_RESOURCESIGNALNamedTerminal
KILL_RESOURCE_IFSIGNALNamedTerminal
GET_SCREENOBSERVENamedTerminal
ROUTE_INPUT, APPLY_INPUTINPUTNamedTerminal
KILL_RESOURCESSIGNALEveryNamedTerminal
CLOSE_TAB_RESOURCESSIGNALEveryNamedTerminal
RESIZE_TERMINAL (unallocated)denyNone
GET_STATE { SERVER }INVENTORYInventoryMatches
RUN_HOOK (unallocated)denyNone
GET_TERMINAL_STATEINVENTORYNamedTerminal
SUBSCRIBE_RESOURCE_EVENTSOBSERVENamedTerminal
UPGRADESIGNALGlobal { owner_uds_only: false }
ACQUIRE_INPUT, RELEASE_INPUTBINDNamedTerminal
SIGNAL_TERMINALSIGNALNamedTerminal
REPORT_ASKED, REPORT_AGENT_STATEBINDNamedTerminal
PUT_FILEINPUTNamedTerminal
GET_FILEINPUTGlobal { owner_uds_only: false }
CHECKOUTINPUTNamedTerminal
SERVICE_HTTP_OPEN, SERVICE_HTTP_READ, SERVICE_HTTP_CLOSEINPUTGlobal { owner_uds_only: false }
TRANSCRIBEINPUTNamedTerminal
DETACH_CLIENTS { session: Some }SIGNALResolvedGroup
DETACH_CLIENTS { session: None }SIGNALGlobal { owner_uds_only: false }
SHUTDOWNSIGNAL + owner-UDS transportGlobal { owner_uds_only: true }
OPEN_LISTENERSIGNAL + owner-UDS transportGlobal { owner_uds_only: true }
GET_PERF { reset: false }OBSERVEGlobal { owner_uds_only: false }
GET_PERF { reset: true }OBSERVE+BINDGlobal { owner_uds_only: false }
PERF_CONTROLOBSERVE+BIND + owner-UDS transportGlobal { owner_uds_only: true }
APPEND_RESOURCE_OUTPUTBIND+INPUTParentOfNamed
NATIVE_AGENT { type: spawn }CREATE+BINDKeyedSession
NATIVE_AGENT { type: list_integrations }INVENTORYOrganizationView
NATIVE_AGENT { type: launch_integration }CREATE+BIND+INPUTKeyedSession
NATIVE_AGENT { type: command }INPUTNamedTerminal
NATIVE_AGENT { type: register/receive/complete/publish/close }BINDParentOfNamed
GET_ORGANIZATIONINVENTORYOrganizationView
SESSION_CREATECREATEGlobal { owner_uds_only: false }
SESSION_RENAME, SESSION_SET_PROJECT, SESSION_SET_LIFETIME, INBOX_RESOLVEORGANIZEKeyedSession
SESSION_DELETE, SESSION_KILLTERMINATEKeyedSession
RESOURCE_CREATECREATEKeyedSession
RESOURCE_MOVE, RESOURCE_MOVE_MANYORGANIZEMoveSessions
RESOURCE_RENAMEORGANIZEKeyedResource
RESOURCE_TERMINATETERMINATENamedTerminal
RESOURCE_REMOVETERMINATEKeyedResource
RESOURCE_RELAUNCHCREATEKeyedResource
ORGANIZATION_UNDOORGANIZEUndoneOperation
ARRANGEMENT_GETINVENTORYArrangementOwner
ARRANGEMENT_REPLACEORGANIZEArrangementOwner
DELEGATE_AGENT, REVOKE_DELEGATIONTERMINATE + owner-UDS transportGlobal { owner_uds_only: true }
Unknown, retired, or otherwise unclassified command tagdenyNone