Workflow APIs

Review, template, intake, run-import, and evidence-scan modules implement the CLI workflows. They preserve candidate-by-default intake and review reasons.

.. py:module:: memoryledger.review

.. py:function:: transition(store, memory_id, status, reason)

module:

memoryledger.review

Apply a reasoned lifecycle transition and return the updated memory.

type store:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.storage.Store``

param store:
type memory_id:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param memory_id:
type status:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param status:
type reason:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param reason:
rtype:
sphinx_autodoc_typehints_type:

.. py:module:: memoryledger.templates

.. py:function:: global_config_path()

module:

memoryledger.templates

Return the user-level template configuration path.

rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~pathlib.Path``

.. py:function:: canonical_hash(content)

module:

memoryledger.templates

Return the stable content hash used for template synchronization.

type content:
sphinx_autodoc_typehints_type:

\:py\:class\:\str``

param content:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\str``

.. py:function:: load_global_config(path=None)

module:

memoryledger.templates

Load global templates from TOML without changing project state.

type path:
sphinx_autodoc_typehints_type:

\:py\:class\:\~pathlib.Path` | :py:obj:`None``

param path:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.GlobalConfig``

.. py:function:: template_content(template)

module:

memoryledger.templates

Resolve inline or file-backed template content.

type template:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.Template``

param template:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\str``

.. py:function:: find_template(config, template_id)

module:

memoryledger.templates

Find a configured template or raise a domain not-found error.

type config:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.GlobalConfig``

param config:
type template_id:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param template_id:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.Template``

.. py:function:: apply_template(store, template)

module:

memoryledger.templates

Create or update a candidate from a template.

type store:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.storage.Store``

param store:
type template:

:sphinx_autodoc_typehints_type:\:py\:class\:\~memoryledger.models.Template``

param template:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\tuple`\ \[:py:class:`str`, :py:class:`~memoryledger.models.Memory`]`

.. py:function:: remove_template(store, template_id, reason)

module:

memoryledger.templates

Archive the memory associated with a template after a reasoned change.

type store:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.storage.Store``

param store:
type template_id:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param template_id:
type reason:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param reason:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.models.Memory``

.. py:module:: memoryledger.evidence_scan

.. py:class:: ScanProposal(scanner, path, fact_key, title, kind, observed, suggested, line, source_hash, render_target=’root_agents’)

module:

memoryledger.evidence_scan

Bases: :py:class:object

Proposal derived from repository evidence; not accepted automatically.

type scanner:
sphinx_autodoc_typehints_type:

\:py\:class\:\str``

param scanner:
type path:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param path:
type fact_key:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param fact_key:
type title:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param title:
type kind:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param kind:

.. py:module:: memoryledger.intake

.. py:function:: import_text(store, text, source=’import’)

module:

memoryledger.intake

Import safe text as candidate memories with source provenance.

type store:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.storage.Store``

param store:
type text:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param text:
type source:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param source:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\list`\ \[:py:class:`str`]`

.. py:function:: import_run_html(store, path)

module:

memoryledger.intake

Import safe excerpts from a run HTML file as candidates.

type store:
sphinx_autodoc_typehints_type:

\:py\:class\:\~memoryledger.storage.Store``

param store:
type path:

:sphinx_autodoc_typehints_type:\:py\:class\:\~pathlib.Path``

param path:
rtype:
sphinx_autodoc_typehints_type:

\:py\:class\:\list`\ \[:py:class:`str`]`

.. py:module:: memoryledger.run_import

.. py:class:: RunProposal(entry_id, entry_type, text, kind, title, render_target=’linked_doc’, timestamp=’’, session_id=’’)

module:

memoryledger.run_import

Bases: :py:class:object

A candidate proposal extracted from an agent run.

type entry_id:
sphinx_autodoc_typehints_type:

\:py\:class\:\str``

param entry_id:
type entry_type:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param entry_type:
type text:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param text:
type kind:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param kind:
type title:

:sphinx_autodoc_typehints_type:\:py\:class\:\str``

param title:

These functions may write records or read external input. Review and guardrail checks are not optional integration steps.