On this page
function-sequence
Prev: hidden-moves | Up: projects | Next: apiconn
Rel: wispsy, Composition, hidden-moves, hypnosis
Ref: wispsy on GitHub
Tags: #public #wispsy #project #composition #tier/core
Role
Explicit computational composition, passive schema-2 JSON/TOML workflows, and durable sequential execution (0.2.0, Python 3.11+, zero base runtime deps)—consolidating the former func-seq, moveset, and scriptty repositories into one unified lifecycle (Pipeline, Script, NativeResolver, cooperative pause, async arun(), and atomic JSON checkpoints).
Install
python -m pip install function-sequence==0.2.0
# Optional workflow CLI (expose-interface) or Carets terminal host (Python 3.14+):
python -m pip install "function-sequence[cli]==0.2.0"
python -m pip install "function-sequence[terminal]==0.2.0"
Quickstart
Compose Ordinary Functions
from function_sequence import Input, NativeResolver, Pipeline, Ref, Step
def normalize(text: str) -> str:
return " ".join(text.lower().split())
resolver = NativeResolver({"text.normalize": normalize}, version="text-v1")
definition = Pipeline("text.process", version="1", steps=(
Step("clean", "text.normalize", {"text": Input("text")}),
), outputs={"text": Ref("clean")})
bound = definition.bind(resolver, resolver_version="text-v1")
assert bound.run({"text": " Hello WORLD "}).outputs == {"text": "hello world"}
Pause, Checkpoint & Passive Workflows
from function_sequence import Script
script = Script("greeting", version="1")
collected = script.add_function(lambda: {"text": "hello"})
script.add_function(lambda text: {"displayed": text}, collected["text"])
first = script.run(checkpoint="greeting.progress.json", pace="function")
assert first.status == "paused"
complete = script.run(checkpoint="greeting.progress.json")
function-sequence workflow inspect examples/text.json
When to Reach for It
- Composing ordinary Python functions into validated linear pipelines, durable checkpointed scripts, or inspectable passive JSON/TOML workflow documents without coupling to capability discovery.
Gotchas & Pitfalls
- Consolidation (
0.2.0): Replaces the retiredfunc-seq,moveset, andscripttypackages—migrate legacy imports tofunction_sequence(Pipeline,Script,NativeResolver). - Passive JSON/TOML workflows: Schema-2 workflow documents are declarative data, not arbitrary
evalscripts; every step target must resolve explicitly throughNativeResolver. - Checkpoint serializability: Durable atomic JSON checkpoints require step inputs and outputs to be JSON-serializable—keep unserializable handles (open files, sockets) outside checkpointed state.
Pairs With
- hidden-moves — Optional
[composition]resolver bridging selectedCapabilityCatalogs intofunction-sequence. - hypnosis — First adopter of the
0.2.0consolidation line for durable training and harness workflows. - carets & expose-interface — Optional
[terminal]and[cli]host extras.
Metadata
type: project-card
slug: function-sequence
previous_slugs:
- func-seq
- moveset
- scriptty
org: wispsy
repo: wispsy/function-sequence
package: function-sequence
import_name: function_sequence
version: 0.2.0
requires_python: ">=3.11"
layer: composition
topic: wispsy-composition
status: active
language: python
source_docs: README.md, docs/, specification/
Linked from
Related notes
- wiki/projects/apiconn Linked here; links to this page; shared tags: #composition, #project, #tier, #wispsy
- wiki/projects/hidden-moves Linked here; links to this page; shared tags: #composition, #project, #tier, #wispsy
- wiki/projects/hypnosis Linked here; links to this page; shared tags: #project, #tier, #wispsy
- wiki/stack/composition Linked here; links to this page; shared tags: #composition, #tier, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/projects/carets Linked here; shared tags: #project, #tier, #wispsy
- wiki/projects/expose-interface Linked here; shared tags: #project, #tier, #wispsy
- wiki/projects/kindof links to this page; shared tags: #project, #tier, #wispsy
- wiki/projects/parse-toml links to this page; shared tags: #project, #tier, #wispsy
- wiki/projects/peaches links to this page; shared tags: #project, #tier, #wispsy