Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FareedKhan-dev/long-running-agent
/ functions
Functions
438 in github.com/FareedKhan-dev/long-running-agent
⨍
Functions
438
◇
Types & classes
148
↓ 72 callers
Method
get
(self, skill_id: str)
src/lra/memory/skills.py:75
↓ 39 callers
Method
append
(self, event: EventRecord)
src/lra/memory/episodic.py:16
↓ 16 callers
Function
default_local_tools
The non-egress tool set (file IO + shell) every mission gets by default.
src/lra/execution/tools/__init__.py:9
↓ 16 callers
Method
failure
(cls, error: str)
src/lra/contracts/tools.py:45
↓ 13 callers
Function
get_settings
Return the process-wide settings (cached).
src/lra/config.py:62
↓ 12 callers
Method
complete
( self, messages: list[ModelMessage], *, tools: list[dict[str, object]] | None
src/lra/model/stub.py:28
↓ 12 callers
Method
open
Open (or restore from ``snapshot_id``) a session rooted at ``workdir``.
src/lra/contracts/sandbox.py:73
↓ 12 callers
Method
run
Execute the tool with validated ``arguments`` and return a compact result.
src/lra/contracts/tools.py:63
↓ 11 callers
Method
_path
(self, name: str)
src/lra/state/mission_anchor.py:44
↓ 11 callers
Method
initialize
(self, *, title: str, description: str, items: Checklist)
src/lra/state/mission_anchor.py:48
↓ 8 callers
Function
build_provider
Construct the configured model backend (the only place a concrete LLM is chosen).
src/lra/model/__init__.py:23
↓ 8 callers
Function
is_shared
True if ``path`` is a shared/ambiguous file that must stay on the serial lead thread.
src/lra/coordination/ownership.py:35
↓ 8 callers
Method
permits
Whether ``writer`` may write ``path`` under the single-writer-per-file invariant.
src/lra/coordination/ownership.py:78
↓ 8 callers
Function
run_git
Run ``git <args>`` in ``cwd`` and return stdout (stripped).
src/lra/state/git_ops.py:18
↓ 7 callers
Function
_checklist
()
tests/unit/test_mission_anchor.py:25
↓ 7 callers
Method
dispatch
(self, call: ToolCall, ctx: ToolContext)
src/lra/execution/dispatcher.py:40
↓ 6 callers
Function
_msgs
()
tests/unit/test_stub_model.py:12
↓ 6 callers
Method
embed
(self, texts: list[str])
src/lra/memory/embeddings.py:28
↓ 6 callers
Method
observe
Record a (state, action) signature; return True if it has now looped past threshold.
src/lra/governor/governor.py:66
↓ 6 callers
Function
parse_action
Interpret a model turn as an Action (native tool-calls take precedence over JSON text).
src/lra/agent/loop.py:62
↓ 6 callers
Method
post
Append to the durable main board.
src/lra/coordination/blackboard.py:24
↓ 6 callers
Method
read_checklist
Return the full current checklist (all items, not just the open ones).
src/lra/state/mission_anchor.py:54
↓ 6 callers
Method
record
(self, *, cycle_id: str, usage: Usage, usd: float)
src/lra/governor/cost.py:30
↓ 6 callers
Method
record
( self, kind: str, *, mission_id: str, cycle_id: str = "", **data: object )
src/lra/obs/events.py:53
↓ 6 callers
Method
run
( self, *, objective: str, ctx: ToolContext, extra_context: str = "" )
src/lra/agents/subagent.py:46
↓ 6 callers
Method
success
(cls, content: str = "", *, artifact_ref: str | None = None)
src/lra/contracts/tools.py:41
↓ 5 callers
Function
_normalize
(path: str)
src/lra/coordination/ownership.py:31
↓ 5 callers
Function
_run
()
src/lra/cli/main.py:107
↓ 5 callers
Method
add
(self, name: str, undo: Callable[[], Awaitable[None]])
src/lra/durable/saga.py:28
↓ 5 callers
Method
append
(self, record: DecisionRecord)
src/lra/coordination/decision_log.py:20
↓ 5 callers
Method
authorize_next
( self, ledger: CostLedger, *, cycles_done: int, projected_usd: float | None = None )
src/lra/governor/governor.py:29
↓ 5 callers
Method
close
Release the session (no-op for local; tears down container/VM for others).
src/lra/contracts/sandbox.py:62
↓ 5 callers
Function
connect_client
Connect to Temporal with the ClaimCheck data converter installed.
src/lra/durable/worker.py:24
↓ 5 callers
Method
encode
(self, payloads: Sequence[Payload])
src/lra/durable/codec.py:35
↓ 5 callers
Method
find
(self, query: str, *, k: int = 3, namespace: str | None = None)
src/lra/memory/skills.py:61
↓ 5 callers
Method
plan
(self, *, title: str, description: str, acceptance: str = "")
src/lra/agents/planner.py:59
↓ 5 callers
Method
run
(self, arguments: dict[str, object], ctx: ToolContext)
src/lra/execution/tools/fs.py:108
↓ 5 callers
Method
run_cycle
( self, *, ctx: ToolContext, mission_id: str, cycle_id: str, a
src/lra/agent/loop.py:102
↓ 4 callers
Function
_ctx
(tmp_path: Path)
tests/unit/test_tools_dispatcher.py:21
↓ 4 callers
Method
_emit
(self, kind: str, mission_id: str, cycle_id: str, **data: object)
src/lra/agent/loop.py:231
↓ 4 callers
Function
_records
()
tests/unit/test_hybrid_memory.py:17
↓ 4 callers
Function
cosine
Cosine similarity of two equal-length vectors (0.0 if either is degenerate).
src/lra/memory/semantic_memory.py:16
↓ 4 callers
Method
decode
(self, payloads: Sequence[Payload])
src/lra/durable/codec.py:54
↓ 4 callers
Function
new_id
Mint a fresh random id like ``mission_3f9a1c0b2d4e``. Activity-only (non-deterministic).
src/lra/ids.py:17
↓ 4 callers
Function
parse_checklist
Extract a checklist from model output; assign 2-digit ids; tolerate messy output.
src/lra/agents/planner.py:24
↓ 4 callers
Method
permits
(self, url: str)
src/lra/safety/egress.py:20
↓ 4 callers
Method
query
(self, text: str, *, k: int = 10)
src/lra/memory/hybrid.py:37
↓ 4 callers
Method
read_situational_awareness
(self)
src/lra/state/mission_anchor.py:51
↓ 4 callers
Function
run_proc
Run ``argv`` in ``cwd`` and return a real ``ExecResult`` (never raises on non-zero exit).
src/lra/execution/proc.py:17
↓ 3 callers
Function
_client
(handler: Callable[[httpx.Request], httpx.Response])
tests/unit/test_model_backends.py:20
↓ 3 callers
Function
_clip
(text: str)
src/lra/execution/tools/fs.py:19
↓ 3 callers
Function
_complete_commits
(workdir: Path)
tests/durability/test_durable_spine.py:47
↓ 3 callers
Function
_ctx
(tmp_path: Path)
tests/unit/test_subagent.py:20
↓ 3 callers
Function
_init_mission
(tmp_path: Path, n: int, *, cycles_before_can: int = 200)
tests/durability/test_durable_spine.py:36
↓ 3 callers
Method
add
(self, records: list[MemoryRecord])
src/lra/memory/semantic_memory.py:36
↓ 3 callers
Method
add
(self, records: list[MemoryRecord])
src/lra/memory/hybrid.py:32
↓ 3 callers
Method
assign
Assign ``path`` to ``writer``. Shared files can only ever belong to the lead.
src/lra/coordination/ownership.py:68
↓ 3 callers
Function
has_commits
True if the repo has at least one commit.
src/lra/state/git_ops.py:58
↓ 3 callers
Method
judge
(self, *, candidate: str, rubric: str)
src/lra/agents/judge.py:42
↓ 3 callers
Function
model_for_role
Return a model tuned to ``role_name``'s tier (Claude backend) or the default model.
src/lra/agents/router.py:16
↓ 3 callers
Function
parse_coverage_pct
Parse the total coverage fraction (0..1) from `pytest --cov` / `coverage` output.
src/lra/verify/trust_bootstrap.py:19
↓ 3 callers
Function
permits
True if the capability set is safe (holds at most two of the three).
src/lra/safety/rule_of_two.py:27
↓ 3 callers
Method
query
(self, text: str, *, k: int = 5)
src/lra/memory/semantic_memory.py:50
↓ 3 callers
Method
read
(self)
src/lra/coordination/blackboard.py:32
↓ 3 callers
Method
record
(self, *, made_progress: bool)
src/lra/durable/ledgers.py:41
↓ 3 callers
Function
run_eval_suite
Judge each case and aggregate into a report (pass rate + mean score).
src/lra/evals/harness.py:44
↓ 2 callers
Function
_as_int
Coerce a JSON-ish value to a positive int, falling back to ``default``.
src/lra/state/migrations.py:28
↓ 2 callers
Method
_deny
(self, reason: str, projected: float, spent: float)
src/lra/governor/governor.py:49
↓ 2 callers
Method
_ensure_pool
(self)
src/lra/memory/semantic_pg.py:28
↓ 2 callers
Function
_execute_cycle
Advance the mission by one verified item via the real agent loop; idempotent.
src/lra/durable/activities.py:26
↓ 2 callers
Function
_ignored
(path: Path)
src/lra/execution/tools/fs.py:15
↓ 2 callers
Method
_permitted
(self, name: str)
src/lra/execution/dispatcher.py:34
↓ 2 callers
Function
_setup
(tmp_path: Path, items: Checklist)
tests/unit/test_agent_loop.py:32
↓ 2 callers
Function
_tokenize
(text: str)
src/lra/memory/hybrid.py:19
↓ 2 callers
Method
_write_checklist
(self, checklist: Checklist)
src/lra/state/mission_anchor.py:119
↓ 2 callers
Method
add
(self, skill: Skill)
src/lra/memory/skills.py:44
↓ 2 callers
Method
append_event
(self, event: EventRecord)
src/lra/state/mission_anchor.py:58
↓ 2 callers
Function
check_rule_of_two
Raise ``RuleOfTwoViolation`` if a session would hold the full lethal trifecta.
src/lra/safety/rule_of_two.py:32
↓ 2 callers
Method
commit_checkpoint
(self, checkpoint: Checkpoint)
src/lra/state/mission_anchor.py:61
↓ 2 callers
Function
compact_messages
Return a compacted message list (system + summary-of-older + last ``keep_last`` turns).
src/lra/agent/compaction.py:19
↓ 2 callers
Method
compensate
Run compensations newest-first; return the names that ran. Records any undo failures.
src/lra/durable/saga.py:31
↓ 2 callers
Method
complete
( self, messages: list[ModelMessage], *, tools: list[dict[str, object]] | None
src/lra/model/failover.py:22
↓ 2 callers
Method
complete
( self, messages: list[ModelMessage], *, tools: list[dict[str, object]] | None
src/lra/model/openai_compat.py:39
↓ 2 callers
Method
complete
( self, messages: list[ModelMessage], *, tools: list[dict[str, object]] | None
tests/unit/test_more_modules.py:19
↓ 2 callers
Function
configure_logging
Configure process-wide structlog output (console for dev, JSON for prod/ingest).
src/lra/obs/events.py:17
↓ 2 callers
Function
consolidate
Distill ``episodes`` into semantic ``MemoryRecord`` facts (model-driven, safe fallback).
src/lra/memory/consolidation.py:37
↓ 2 callers
Function
decide_safe_park
Park iff a CRITICAL dependency is DOWN; otherwise continue (noting degraded optionals).
src/lra/ops/degradation.py:39
↓ 2 callers
Method
dispatch
Validate + execute a tool call (never raises; failures come back as ``ToolResult``).
src/lra/contracts/tools.py:76
↓ 2 callers
Method
estimate_cost_usd
(self, usage: Usage)
src/lra/model/stub.py:55
↓ 2 callers
Method
exec
Run ``argv`` (no shell) and capture its real output + exit code.
src/lra/contracts/sandbox.py:43
↓ 2 callers
Method
mean_usd_per_cycle
(self)
src/lra/governor/cost.py:53
↓ 2 callers
Method
open
(self, *, workdir: str, snapshot_id: str | None = None)
src/lra/execution/sandbox_local.py:59
↓ 2 callers
Method
put
(self, data: bytes)
src/lra/persistence/object_store.py:33
↓ 2 callers
Method
query
(self, text: str, *, k: int = 5)
src/lra/contracts/memory.py:58
↓ 2 callers
Method
read_responses
(self)
src/lra/coordination/blackboard.py:35
↓ 2 callers
Method
read_situational_awareness
Reconstruct full mission awareness from git + the anchor files (seconds, any restart).
src/lra/contracts/state.py:113
↓ 2 callers
Function
reciprocal_rank_fusion
Fuse ranked id-lists via RRF: score = sum 1/(k + rank).
src/lra/memory/hybrid.py:66
↓ 2 callers
Function
reflect_on_failure
Produce a short post-mortem for a failed attempt (no code, just lessons).
src/lra/agents/reflection.py:15
↓ 2 callers
Function
render_tools
(specs: list[ToolSpec])
src/lra/agent/prompt.py:23
↓ 2 callers
Method
request
(self, req: GateRequest)
src/lra/hitl/gate.py:24
next →
1–100 of 438, ranked by callers