Skip to main content

Module method

Module method 

Source
Expand description

Method-name string constants for the KLP v1 namespace (SPEC §2.12.5).

Centralised so the agent dispatcher and client call sites refer to the same string literal — a typo on either side becomes a compile error instead of a silent MethodNotFound at runtime.

The constants intentionally mirror the SPEC table 1:1; future v2 method additions add a new entry here, never edit an existing one (the protocol-version handshake in §2.12.6 is the deprecation path).

Constants§

JOBS_EXECUTE
Execute one of the listed jobs. Returns the synthesised run_id.
JOBS_KILL
Kill a run started via jobs.execute on THIS connection (SPEC §2.12.4 — cross-connection kill is Unauthorized).
JOBS_LIST
List manifests with user_invokable: true (filter: category).
JOBS_PROGRESS
Push (Agent → Client) with stdout/stderr chunks + status changes.
JOBS_SUBSCRIBE
Start streaming jobs.progress pushes for this connection.
JOBS_UNSUBSCRIBE
Stop streaming jobs.progress pushes.
MAINTENANCE_DEFER
User-initiated reboot-deferral (15m / 30m / 1h per SPEC §2.1).
MAINTENANCE_LIST
List the next N days’ scheduled jobs targeted at this PC.
NOTIFICATIONS_ACK
Mark a notification read for this user — agent publishes events.notifications.acked.> on NATS with the OS-derived SID.
NOTIFICATIONS_LIST
Paginated past-notifications listing (filter: unread/all).
NOTIFICATIONS_NEW
Push (Agent → Client) carrying a new notification.
NOTIFICATIONS_SUBSCRIBE
Start streaming notifications.new pushes for this connection.
NOTIFICATIONS_UNSUBSCRIBE
Stop streaming notifications.new pushes.
STATE_CHANGED
Push (Agent → Client) when health / vpn / version etc. flips.
STATE_SNAPSHOT
One-shot bundle of health + inventory + compliance checks.
STATE_SUBSCRIBE
Start streaming state.changed pushes for this connection.
STATE_UNSUBSCRIBE
Stop streaming state.changed pushes (the matching unsubscribe).
SUPPORT_UPLOAD_DIAGNOSTICS
Bundle recent inventory + log tail + agent state, upload to the JetStream Object Store, return the resulting ticket / object id.
SYSTEM_HANDSHAKE
Handshake — every connection’s first request. SPEC §2.12.6.
SYSTEM_LOG_TAIL
Last N lines of agent.log for support handoff (SPEC §2.12.5).
SYSTEM_PING
Liveness check. No params, no return value beyond ack.
SYSTEM_VERSION
Returns the agent’s binary version + git rev.