autoforge-agent 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autoforge/__init__.py +87 -0
- autoforge/__main__.py +16 -0
- autoforge/agent.py +2971 -0
- autoforge/autonomy/__init__.py +14 -0
- autoforge/autonomy/confirm.py +130 -0
- autoforge/autonomy/policy.py +245 -0
- autoforge/autonomy/roles.py +191 -0
- autoforge/autonomy/selfmod.py +146 -0
- autoforge/autonomy/spawn.py +227 -0
- autoforge/autonomy/topology.py +235 -0
- autoforge/browser.py +924 -0
- autoforge/cli.py +1119 -0
- autoforge/configfile.py +86 -0
- autoforge/core/__init__.py +29 -0
- autoforge/core/agent.py +271 -0
- autoforge/core/compaction.py +765 -0
- autoforge/core/lineedit.py +678 -0
- autoforge/core/llm.py +324 -0
- autoforge/core/message.py +89 -0
- autoforge/core/steering.py +280 -0
- autoforge/cpu/__init__.py +99 -0
- autoforge/cpu/kernel.py +442 -0
- autoforge/cpu/ops.py +652 -0
- autoforge/cpu/probe.py +569 -0
- autoforge/cpu/safety.py +463 -0
- autoforge/cpu/tune.py +564 -0
- autoforge/ecosystem.py +485 -0
- autoforge/forge/__init__.py +21 -0
- autoforge/forge/adversary.py +206 -0
- autoforge/forge/evolution.py +476 -0
- autoforge/forge/fuzzer.py +328 -0
- autoforge/forge/generator.py +591 -0
- autoforge/forge/invariance.py +369 -0
- autoforge/forge/metacog.py +177 -0
- autoforge/forge/pipeline.py +304 -0
- autoforge/forge/sandbox.py +301 -0
- autoforge/forge/validity.py +608 -0
- autoforge/forge/verifier.py +365 -0
- autoforge/gpu/__init__.py +116 -0
- autoforge/gpu/backend_triton.py +421 -0
- autoforge/gpu/bench.py +30 -0
- autoforge/gpu/kernel.py +430 -0
- autoforge/gpu/ops.py +349 -0
- autoforge/gpu/probe.py +267 -0
- autoforge/gpu/safety.py +248 -0
- autoforge/gpu/units.py +39 -0
- autoforge/mcp.py +1050 -0
- autoforge/measure.py +368 -0
- autoforge/modes.py +299 -0
- autoforge/notify.py +339 -0
- autoforge/route/__init__.py +3 -0
- autoforge/route/router.py +217 -0
- autoforge/schedule.py +427 -0
- autoforge/setup_wizard.py +232 -0
- autoforge/skills.py +496 -0
- autoforge/store.py +611 -0
- autoforge/timing.py +375 -0
- autoforge/tools/__init__.py +4 -0
- autoforge/tools/composition.py +143 -0
- autoforge/tools/registry.py +392 -0
- autoforge/tools/spec.py +230 -0
- autoforge/vision.py +279 -0
- autoforge/web/__init__.py +5 -0
- autoforge/web/server.py +689 -0
- autoforge/webtools.py +1382 -0
- autoforge_agent-0.4.0.dist-info/METADATA +477 -0
- autoforge_agent-0.4.0.dist-info/RECORD +70 -0
- autoforge_agent-0.4.0.dist-info/WHEEL +5 -0
- autoforge_agent-0.4.0.dist-info/entry_points.txt +3 -0
- autoforge_agent-0.4.0.dist-info/top_level.txt +1 -0
autoforge/__init__.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""autoforge — an agent framework whose tools are data, whose self-made tools
|
|
2
|
+
must earn the right to be called, and whose autonomy has no hidden cages.
|
|
3
|
+
|
|
4
|
+
Design pillars
|
|
5
|
+
--------------
|
|
6
|
+
1. Tools are data, not code locks (hot-loadable, no restart).
|
|
7
|
+
2. A tool is born with a *contract*: schema + trigger probes + effect signature.
|
|
8
|
+
3. Verification runs five checks: execution, robustness (fuzz), adversarial
|
|
9
|
+
(an LLM attacker), trigger, and negative.
|
|
10
|
+
4. The living half: reliability ledger, auto-quarantine, rehabilitation.
|
|
11
|
+
5. Evolution: a failing tool spawns a population of mutants; the best survives.
|
|
12
|
+
6. Meta-cognition: the agent proactively discovers and fills its own gaps.
|
|
13
|
+
7. Autonomy is explicit, default-on, and every self-change leaves a paper trail.
|
|
14
|
+
|
|
15
|
+
Freedom is the default; verification lets you *trust* what the freedom produced.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
# One source of truth: pyproject.toml. Hardcoding the version here meant the
|
|
19
|
+
# package reported 0.2.0 while pyproject said 0.4.0 -- a number nobody would
|
|
20
|
+
# notice was wrong until they quoted it. Read it from the installed metadata
|
|
21
|
+
# instead, and fall back only when running from a source tree with no install.
|
|
22
|
+
try:
|
|
23
|
+
from importlib.metadata import version as _pkg_version
|
|
24
|
+
|
|
25
|
+
# The distribution is `autoforge-agent`; the import stays `autoforge`. The
|
|
26
|
+
# bare name on the index is a different project, so asking for it here would
|
|
27
|
+
# not fail loudly -- it would report "0.0.0+unknown" on an installed build.
|
|
28
|
+
__version__ = _pkg_version("autoforge-agent")
|
|
29
|
+
except Exception: # pragma: no cover - source tree without an install
|
|
30
|
+
__version__ = "0.0.0+unknown"
|
|
31
|
+
|
|
32
|
+
from autoforge.agent import AUTONOMOUS_SYSTEM, ForgeAgent
|
|
33
|
+
from autoforge.autonomy.policy import FULL_FREEDOM, SUPERVISED, AutonomyPolicy
|
|
34
|
+
from autoforge.autonomy.selfmod import Amendment, SelfModifier
|
|
35
|
+
from autoforge.autonomy.spawn import ShareMode, Spawner, SpawnRecord
|
|
36
|
+
from autoforge.core.agent import Agent, AgentResult
|
|
37
|
+
from autoforge.core.llm import LLMClient, LLMResponse, MockLLMClient, OpenAICompatClient
|
|
38
|
+
from autoforge.core.message import Message, ToolCall
|
|
39
|
+
from autoforge.forge.adversary import AdversarialGate, AdversarialReport
|
|
40
|
+
from autoforge.forge.evolution import EvolutionEngine, EvolutionResult, Mutant
|
|
41
|
+
from autoforge.forge.fuzzer import RobustnessResult, run_robustness_checks
|
|
42
|
+
from autoforge.forge.generator import (
|
|
43
|
+
GeneratedTool,
|
|
44
|
+
LLMToolGenerator,
|
|
45
|
+
TemplateGenerator,
|
|
46
|
+
extract_json,
|
|
47
|
+
)
|
|
48
|
+
from autoforge.forge.metacog import GapProposal, MetaCognition, MetaCogReport
|
|
49
|
+
from autoforge.forge.pipeline import ForgeAttempt, ForgeConfig, ForgePipeline, ForgeResult
|
|
50
|
+
from autoforge.forge.sandbox import Sandbox, SandboxResult
|
|
51
|
+
from autoforge.forge.verifier import CheckResult, ToolVerifier, VerificationReport
|
|
52
|
+
from autoforge.route.router import BehaviourRouter, RoutingWeights
|
|
53
|
+
from autoforge.store import ToolRecord, ToolStore
|
|
54
|
+
from autoforge.tools.composition import DepGraph, compose_code, parse_deps
|
|
55
|
+
from autoforge.tools.registry import ToolRegistry, ToolResult
|
|
56
|
+
from autoforge.tools.spec import ToolSpec, ToolState, ToolStats, TriggerProbe
|
|
57
|
+
|
|
58
|
+
__all__ = [
|
|
59
|
+
"__version__",
|
|
60
|
+
# composed agent
|
|
61
|
+
"ForgeAgent", "AUTONOMOUS_SYSTEM",
|
|
62
|
+
# core
|
|
63
|
+
"Agent", "AgentResult",
|
|
64
|
+
"LLMClient", "LLMResponse", "OpenAICompatClient", "MockLLMClient",
|
|
65
|
+
"Message", "ToolCall",
|
|
66
|
+
# tools
|
|
67
|
+
"ToolRegistry", "ToolResult",
|
|
68
|
+
"ToolSpec", "ToolState", "ToolStats", "TriggerProbe",
|
|
69
|
+
"DepGraph", "compose_code", "parse_deps",
|
|
70
|
+
# forge
|
|
71
|
+
"ForgePipeline", "ForgeConfig", "ForgeResult", "ForgeAttempt",
|
|
72
|
+
"Sandbox", "SandboxResult",
|
|
73
|
+
"ToolVerifier", "VerificationReport", "CheckResult",
|
|
74
|
+
"GeneratedTool", "LLMToolGenerator", "TemplateGenerator", "extract_json",
|
|
75
|
+
"EvolutionEngine", "EvolutionResult", "Mutant",
|
|
76
|
+
"AdversarialGate", "AdversarialReport",
|
|
77
|
+
"MetaCognition", "MetaCogReport", "GapProposal",
|
|
78
|
+
"RobustnessResult", "run_robustness_checks",
|
|
79
|
+
# routing
|
|
80
|
+
"BehaviourRouter", "RoutingWeights",
|
|
81
|
+
# autonomy
|
|
82
|
+
"AutonomyPolicy", "FULL_FREEDOM", "SUPERVISED",
|
|
83
|
+
"SelfModifier", "Amendment",
|
|
84
|
+
"Spawner", "SpawnRecord", "ShareMode",
|
|
85
|
+
# persistence
|
|
86
|
+
"ToolStore", "ToolRecord",
|
|
87
|
+
]
|
autoforge/__main__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""`python -m autoforge ...` — the invocation the OS scheduler is given.
|
|
2
|
+
|
|
3
|
+
`schedule.wake_command` emits `python -m autoforge tick --quiet`, and the
|
|
4
|
+
README's unattended story tells an operator to register exactly that. Without
|
|
5
|
+
this file the command is not a slow path or a wrong path, it is no path:
|
|
6
|
+
`No module named autoforge.__main__`. `install_system_task` would register a
|
|
7
|
+
task that fails every thirty minutes, silently, forever.
|
|
8
|
+
|
|
9
|
+
Kept to two lines on purpose. Its whole job is to make the module runnable;
|
|
10
|
+
anything that lives here is a subcommand that cannot be tested through `main`.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from .cli import main
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
raise SystemExit(main())
|