Spectre.Server.GAM (Spectre v0.4.0)

Copy Markdown View Source

Internal protocol adapter between AgentServer and the GAM kernel.

Spectre.Server.GAM.Managed constructs the authenticated Scope, operation bindings, ingress and journal automatically. Applications configure allowed operations through Spectre.Server.start_link/1; this adapter is not a replacement bridge option. External actors use Spectre.GAM.submit/4 to enter the same runtime path.

Candidate construction, presentations and confirmation remain distinct from admission. Show and effect both cross the kernel. The adapter never turns a classifier label into user approval. Required Evidence must come from the fixed authenticated ingress.

Consent expiry defaults to five minutes; :infinity explicitly disables expiry. A fresh presentation has its own absolute deadline. Recovery preserves recorded facts and restores a wait suspended until a fresh presentation. The adapter rechecks expiry after interpretation and before submission; Evidence validity also fences admission across queued Domain commands.

Summary

Functions

Whether the host explicitly connected Server lifecycle observations to its fixed ingress.

Pins the host integration to one Domain before starting its agent and Skill runtimes.

Records a host lifecycle fact as scoped ingress Evidence, without proposing an Act.

Recovers only an exact previously journaled command through normal kernel admission.

Releases an exact command journal only after durable receiver acquisition.

Resolves an exact journaled command's result without submitting its Candidate.

Resolves references through the host's authenticated Scope without executing an effect.

Canonical inbox identity for one exact governed result revision.

Returns the durable reference used by both live and delivered results.

Functions

confirm(pending, input, context, opts)

explain(pending, input, context, opts)

lifecycle_configured?(config)

Whether the host explicitly connected Server lifecycle observations to its fixed ingress.

pin_domain(bridge, context)

@spec pin_domain(term(), map()) :: {:ok, term()} | {:error, term()}

Pins the host integration to one Domain before starting its agent and Skill runtimes.

propose(operation, args, context, opts)

record_lifecycle(event, context, opts)

Records a host lifecycle fact as scoped ingress Evidence, without proposing an Act.

recover_command(command_id, context, opts)

Recovers only an exact previously journaled command through normal kernel admission.

reject(pending, input, context, opts)

release_command(command_id, context, opts)

Releases an exact command journal only after durable receiver acquisition.

resolve_command_result(command_id, reference, context, opts)

Resolves an exact journaled command's result without submitting its Candidate.

resolve_result(reference, context, opts)

Resolves references through the host's authenticated Scope without executing an effect.

result_key(result)

Canonical inbox identity for one exact governed result revision.

result_reference(arg1)

Returns the durable reference used by both live and delivered results.

resume(pending, input, context, opts)