Skip to content
Docs / StateMirror
DOCUMENT / STATEMIRROR

StateMirror Developer Plugin

Use the plugin to reason about StateMirror integration points, evidence boundaries and verified Core behavior while working on application code.

The plugin assists the developer. StateMirror Core remains the self-hosted evidence ledger that accepts, preserves, retrieves and verifies application-submitted evidence.

TYPE
AI-assisted integration

01 / Plugin vs. Core

#

The Developer Plugin is an integration assistant. It helps a developer interpret StateMirror's verified interfaces and apply them to an application decision path.

DEVELOPER
Owns the application code, decision logic, evidence selection and capture-failure policy.
PLUGIN
Helps locate the decision boundary, review evidence content, identify unsupported assumptions and exercise an integration against Core.
APPLICATION
Queries state, computes the decision and executes or declines the resulting action.
CORE
Preserves the evidence the application submits and exposes retrieval and integrity-verification interfaces.
DEVELOPER
    |
    v
STATEMIRROR PLUGIN
    |
    v
APPLICATION INTEGRATION
    |
    v
STATEMIRROR CORE
State is queried. Decisions are made. Actions remain application-owned.

02 / Find the capture point

#

A useful StateMirror integration preserves the facts that mattered to an application decision after that decision is known and before the resulting application action executes.

For example, assume authentication middleware has already validated a JWT and the application uses the following authorization logic.

PLUGIN / EXAMPLE / TYPESCRIPTAUTHORIZATION_DECISION
const allowed = claims.role === "reviewer";

if (!allowed) {
  return reply.code(403).send({ error: "forbidden" });
}

return readReport();
Application-owned decision logic. The plugin does not authorize access or execute readReport().
CONSULTED FACT
claims.role may be useful evidence if it is a validated fact the application actually consulted.
DECISION
The application computes whether the request is allowed.
CAPTURE
Submit the relevant evidence after the application knows the decision and before it performs the resulting action.
EXCLUDE
Do not preserve the raw JWT, bearer token, password, API key or a direct credential derivative merely to reconstruct the decision later.
READ STATE
    |
    v
MAKE DECISION
    |
    v
CAPTURE EVIDENCE  <-- StateMirror
    |
    v
EXECUTE ACTION

The application still decides what happens if evidence capture fails or times out. StateMirror does not make the application action and evidence submission atomic.

03 / What the plugin helps with

#

The plugin is deliberately narrow. Its useful work happens where application code meets StateMirror Core.

BOUNDARY
Identify where the application has completed a consequential decision but has not yet executed its resulting action.
EVIDENCE
Narrow the payload to facts the application actually consulted, along with useful references, source times and rule versions.
SECRETS
Keep credentials, bearer tokens and unrelated sensitive request material out of preserved evidence.
CONTRACT
Work from verified Core HTTP, CLI, idempotency, retrieval and verification behavior rather than inventing interfaces or guarantees.
REVIEW
Inspect an integration for misplaced capture, unsupported guarantees and evidence that belongs to the application rather than Core.
TEST
Exercise isolated integration fixtures against an authorized local Core instance and report actual submission, retrieval and verification results.

04 / What it does not do

#

AI assistance does not expand StateMirror's authority or its integrity claims.

  • The plugin does not authorize access or determine whether a decision is correct.
  • It does not make application decisions or execute application actions.
  • It does not replace StateMirror Core or become the evidence system of record.
  • It does not prove that submitted upstream facts were true or fresh.
  • It does not turn integrity verification into proof of policy correctness, compliance or legal non-repudiation.
  • It should not preserve raw credentials, bearer tokens or direct credential derivatives as decision evidence.
  • It does not invent the application's capture-failure, retry, transaction or recovery policy.
Verification checks preservation and chain integrity within StateMirror's documented trust model. It does not establish upstream truth or decision correctness.

05 / Integration workflow

#
  1. Run StateMirror Core locally. Start PostgreSQL and Core using the published Quickstart.
  2. Choose one application decision. Show the plugin the state reads, decision logic and resulting application action.
  3. Identify the decision boundary. Determine where the application knows its decision but has not yet executed the action.
  4. Define the smallest useful evidence. Preserve decision-relevant facts and useful references without copying the entire request context.
  5. Review failure ownership. Decide what the application does if capture fails, times out or returns an uncertain result.
  6. Test against Core. Use synthetic nonsecret evidence, submit it to the authorized local instance, retrieve the snapshot and verify its integrity.

A passing integration test establishes that the tested application path can submit and retrieve evidence under that configuration. It does not prove every production decision will be captured or that the recorded facts were externally correct.

06 / Use it with Core

#

StateMirror Core remains the implementation and evidence contract. The Developer Plugin helps apply that contract to application code.

Start with a local Core instance, one decision path and synthetic evidence. Keep production credentials and customer evidence out of exploratory plugin conversations unless your organization has separately approved that handling.