Documentation
¶
Overview ¶
Package actionrunner executes a schema's Action against a live site. It is the runtime half of the registry: given a schema (loaded from the registry or a local file) and the name of an action the user wants to invoke, it resolves session state, runs the schema-supplied bootstrap and signer JS, fires the HTTP request through a Chrome-TLS fingerprinted client, and rotates Set-Cookie values back into the session store.
The runtime is deliberately site-agnostic — every piece of x.com / tiktok.com / etc. knowledge lives in the schema JSON. Adding a new Path-1 site is "push a schema to the registry", never "release a new CLI."
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// Schema is the loaded schema for the target site.
Schema *schema.Schema
// ActionName is the schema.Action.Name to invoke.
ActionName string
// Args are user-supplied key/value pairs for the action's template
// params (e.g. {text: "hello world"} for CreateDraftTweet).
Args map[string]string
// SessionsDir is the parent directory for session state
// (~/.hermai/sessions on a user machine). Each site gets its own
// subdirectory containing cookies.json and state.json.
SessionsDir string
// HTTPClient is used for the outgoing request. Callers should pass
// an httpclient.Doer wrapped in http.Client so tls-client's Chrome
// fingerprint is applied. Required — Run refuses to run without it.
HTTPClient httpclient.Doer
// BootstrapClient is used for bootstrap JS fetches. Separate from
// HTTPClient so the two can have different timeouts / redirect
// policies. If nil, falls back to HTTPClient wrapped in http.Client.
BootstrapClient *http.Client
// DryRun skips the actual network call and returns the fully-signed
// request for inspection.
DryRun bool
}
Request carries everything Run needs.