amoorion.methods¶
Operations over the platforms; the CLI, API, MCP and daemon expose them.
- class amoorion.methods.AccountStatus(*, platform, ready, missing=[], error=None)[source]¶
Bases:
ModelWhether a platform is ready: its missing secrets by name, never by value.
- Parameters:
platform (str)
ready (bool)
missing (list[str])
error (str | None)
- model_config = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class amoorion.methods.Accounts(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodTells which platforms can work right now. Asks the vault, not the platforms.
- run(params)[source]¶
Try every secret of every plugin; what can’t be read counts as missing.
- Parameters:
params (Model)
- Return type:
list[AccountStatus]
- class amoorion.methods.Compose(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodLets a language model write a text. Posts nothing: pair it with
publishin a workflow.- Params¶
alias of
ComposeParams
- run(params)[source]¶
One completion by the server in the vault.
- Parameters:
params (ComposeParams)
- Return type:
- class amoorion.methods.Delete(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodRemoves a message from its platform, and marks its copy in the dataset as deleted.
- Params¶
alias of
DeleteParams
- run(params)[source]¶
A failure comes back as a
Resultwith the reason, not as an exception.- Parameters:
params (DeleteParams)
- Return type:
- class amoorion.methods.InboxMethod(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodLists what is already kept; asks no platform, so it works offline.
- Params¶
alias of
InboxParams
- run(params)[source]¶
The newest messages kept.
- Parameters:
params (InboxParams)
- Return type:
list[Message]
- class amoorion.methods.Method(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
ControllerOne operation of amoorion, the same for every front-end.
A subclass names itself, declares
Paramsand implementsrun; registered inMETHODS, it appears in the CLI, the API, the MCP server andAmoorion.
- class amoorion.methods.Notify(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodA post to wherever the user wants to hear from amoorion, set in AMOORION_NOTIFY.
- Params¶
alias of
NotifyParams
- run(params)[source]¶
Publish to those platforms; none set means nothing is sent and no error.
- Parameters:
params (NotifyParams)
- Return type:
list[Result]
- class amoorion.methods.PluginInfo(*, name, description, capabilities, error=None)[source]¶
Bases:
ModelOne platform and what it can do;
errorwhen its package failed to load.- Parameters:
name (str)
description (str)
capabilities (list[Capability])
error (str | None)
- model_config = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class amoorion.methods.Plugins(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodWhat is installed. Loads every plugin, and also reports those that failed.
- run(params)[source]¶
Working plugins by name, then the failed ones.
- Parameters:
params (Model)
- Return type:
list[PluginInfo]
- class amoorion.methods.Publish(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodOne post to several platforms. One failing doesn’t stop the others.
- Params¶
alias of
PublishParams
- run(params)[source]¶
One
Resultper platform, whatever happens on each of them.- Parameters:
params (PublishParams)
- Return type:
list[Result]
- class amoorion.methods.Read(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodFetches the latest messages, and keeps them in the inbox and the dataset.
- Params¶
alias of
ReadParams
- run(params)[source]¶
Read, then keep;
keepalso tells which messages are known already.- Parameters:
params (ReadParams)
- Return type:
list[Message]
- class amoorion.methods.Reply(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodAnswers one message on its platform.
- Params¶
alias of
ReplyParams
- run(params)[source]¶
A reply needs only the id, so the message is rebuilt from it instead of fetched.
- Parameters:
params (ReplyParams)
- Return type:
- class amoorion.methods.Search(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodFinds messages already in the inbox; asks no platform.
- Params¶
alias of
SearchParams
- run(params)[source]¶
The newest messages containing the text.
- Parameters:
params (SearchParams)
- Return type:
list[Message]
- class amoorion.methods.Simulate(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodPersonas talking about a topic, for trying out rules and workflows on a crowd.
- Params¶
alias of
SimulateParams
- run(params)[source]¶
The feed goes into the inbox under
society:<run>; no platform is touched.- Parameters:
params (SimulateParams)
- Return type:
list[Message]
- class amoorion.methods.Skill(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodHands out the SKILL.md installed with the package, so its version always fits.
- class amoorion.methods.SkillText(*, path, text)[source]¶
Bases:
ModelThe skill’s file:
pathto copy it into an agent’s skills,textto read it.- Parameters:
path (str)
text (str)
- model_config = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class amoorion.methods.Snapshot(*, platform, profile, path, read, complete, present, gone, deleted)[source]¶
Bases:
ModelWhat a snapshot found: read now, present, gone from the platform, and deleted by amoorion.
- Parameters:
platform (str)
profile (str)
path (str)
read (int)
complete (bool)
present (int)
gone (int)
deleted (int)
- model_config = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class amoorion.methods.SnapshotMethod(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodA copy of a profile’s posts, as files. Read-only for the platform.
- Params¶
alias of
SnapshotParams
- run(params)[source]¶
Only a complete read (fewer posts than asked for) can tell that a post is gone.
- Parameters:
params (SnapshotParams)
- Return type:
- class amoorion.methods.Wiki(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodA Wikipedia summary as a message, ready for a workflow to post on.
- Params¶
alias of
WikiParams
- run(params)[source]¶
Ask Wikipedia’s public REST API; it wants a User-Agent saying who is asking.
- Parameters:
params (WikiParams)
- Return type:
- class amoorion.methods.Workflow(vault=None, view=None, inbox=None, dataset=None)[source]¶
Bases:
MethodMethods one after another; each can use the previous answer as
$last. Or rules over the inbox.Each message goes through a rule once; a rule that failed gets it again next time.
- Params¶
alias of
WorkflowParams
- run(params)[source]¶
Each step run, stopping at the first failure; or each rule run on each new message.
- Parameters:
params (WorkflowParams)
- Return type:
list[StepResult] | list[Handled]
- amoorion.methods.plugsFlagsToList(flags)[source]¶
The names of the flags that are on, e.g. of
Plugins["x"].infoflags.- Parameters:
flags (dict[str, bool])
- Return type:
list[str]
Modules
Accounts: which platforms have their secrets. |
|
The params of every method in one place; each is defined next to its method. |
|
Methods: what amoorion can do, independent of who asks. |
|
Compose: ask a language model to write something. |
|
Delete: remove one message from its platform, a copy kept first. |
|
Inbox: the messages received so far. |
|
Notify: tell the platforms of AMOORION_NOTIFY. |
|
Plugins: what is installed and what each can do. |
|
Publish: one post on several platforms. |
|
Read: the latest messages of one platform. |
|
Reply: answer one message on its platform. |
|
Search: find messages of the inbox by their text. |
|
Simulate: personas reacting to a topic, in memory only. |
|
Skill: amoorion's agent skill, what an agent reads to learn to use it. |
|
Snapshot: read a profile's posts into the dataset. |
|
Wiki: the summary of a Wikipedia article. |
|
Workflow: methods run one after another, or rules running them on what arrived. |