@lmmslab/harness 0.85.1 → 0.86.0
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.
- package/package.json +1 -1
- package/python/harness/__init__.py +2 -2
- package/python/harness/bench.py +2 -2
- package/python/harness/builtin/benches/README.md +1 -2
- package/python/harness/builtin/configs/default.toml +4 -19
- package/python/harness/builtin/configs/deploy/example-api.toml +1 -1
- package/python/harness/builtin/configs/models/deepseek-flash.toml +1 -1
- package/python/harness/builtin/configs/models/grok-low.toml +1 -1
- package/python/harness/builtin/configs/models/grok-medium.toml +3 -6
- package/python/harness/builtin/environment/README.md +8 -25
- package/python/harness/builtin/prompts/conversation/core.md +6 -5
- package/python/harness/builtin/prompts/core/core.md +147 -203
- package/python/harness/builtin/prompts/core/pack.toml +0 -1
- package/python/harness/builtin/prompts/reflect/core.md +8 -32
- package/python/harness/builtin/prompts/reflect/pack.toml +2 -4
- package/python/harness/builtin/prompts/shared/agent-skills.md +5 -3
- package/python/harness/builtin/prompts/shared/agents.md +20 -10
- package/python/harness/builtin/prompts/shared/checklist.md +13 -17
- package/python/harness/builtin/prompts/shared/environments.md +20 -15
- package/python/harness/builtin/prompts/shared/learning-goal.md +2 -3
- package/python/harness/builtin/prompts/shared/learning.md +73 -23
- package/python/harness/builtin/prompts/shared/mcp.md +11 -6
- package/python/harness/builtin/prompts/shared/reflex-method.md +243 -0
- package/python/harness/builtin/prompts/shared/units.md +138 -0
- package/python/harness/builtin/prompts/shared/web.md +5 -6
- package/python/harness/builtin/skills/agents/__init__.py +18 -3
- package/python/harness/builtin/skills/agents/skill.toml +3 -3
- package/python/harness/builtin/skills/checklist/__init__.py +34 -32
- package/python/harness/builtin/skills/checklist/skill.toml +9 -9
- package/python/harness/builtin/skills/environments/__init__.py +9 -5
- package/python/harness/builtin/skills/environments/skill.toml +1 -1
- package/python/harness/builtin/skills/experience/skill.toml +1 -1
- package/python/harness/builtin/skills/learning/__init__.py +19 -5
- package/python/harness/builtin/skills/mcp/skill.toml +1 -1
- package/python/harness/builtin/skills/memory/__init__.py +4 -1
- package/python/harness/builtin/skills/memory/skill.toml +0 -5
- package/python/harness/builtin/skills/verify/skill.toml +1 -0
- package/python/harness/builtin/skills/web/__init__.py +4 -1
- package/python/harness/builtin/third_party/sources.toml +2 -40
- package/python/harness/cli.py +16 -25
- package/python/harness/config/__init__.py +2 -2
- package/python/harness/config/agent.py +59 -47
- package/python/harness/core/__init__.py +1 -1
- package/python/harness/core/codec.py +4 -4
- package/python/harness/core/contracts.py +1 -1
- package/python/harness/core/media.py +1 -1
- package/python/harness/core/ports.py +2 -2
- package/python/harness/core/procs.py +1 -1
- package/python/harness/core/remote.py +1 -1
- package/python/harness/core/worker.py +19 -13
- package/python/harness/embodiments.py +53 -44
- package/python/harness/extensions.py +22 -0
- package/python/harness/host/__init__.py +1 -1
- package/python/harness/host/http.py +6 -12
- package/python/harness/host/sessions.py +1 -1
- package/python/harness/host/tasks.py +15 -11
- package/python/harness/host/workspaces.py +36 -8
- package/python/harness/packages/__init__.py +5 -5
- package/python/harness/packages/environments.py +30 -18
- package/python/harness/packages/manager.py +1 -1
- package/python/harness/packages/manifest.py +6 -6
- package/python/harness/packages/provision.py +1 -1
- package/python/harness/packages/sources.py +1 -1
- package/python/harness/paths.py +1 -1
- package/python/harness/runtime/decision/loop.py +95 -5
- package/python/harness/runtime/decision/messages.py +128 -2
- package/python/harness/runtime/decision/model.py +4 -5
- package/python/harness/runtime/decision/prompts.py +20 -32
- package/python/harness/runtime/events.py +7 -5
- package/python/harness/runtime/execution/attached.py +3 -3
- package/python/harness/runtime/execution/entries.py +189 -8
- package/python/harness/runtime/execution/kernel.py +26 -1
- package/python/harness/runtime/execution/results.py +2 -3
- package/python/harness/runtime/execution/session.py +417 -32
- package/python/harness/runtime/execution/skills.py +63 -16
- package/python/harness/runtime/learning/active.py +7 -7
- package/python/harness/runtime/learning/learner.py +3 -2
- package/python/harness/runtime/learning/library.py +9 -4
- package/python/harness/runtime/learning/reflect.py +10 -9
- package/python/harness/runtime/reactive/rules.py +4 -4
- package/python/harness/runtime/reactive/tree.py +506 -25
- package/python/harness/runtime/safety/input.py +1 -1
- package/python/harness/runtime/safety/isolation.py +3 -3
- package/python/harness/runtime/safety/shield.py +4 -50
- package/python/harness/runtime/task/delegation.py +5 -5
- package/python/harness/runtime/task/environments.py +10 -0
- package/python/harness/runtime/task/run.py +222 -27
- package/python/harness/runtime/tick.py +24 -1
- package/python/harness/sdk/__init__.py +2 -5
- package/python/harness/services/registry.py +23 -19
- package/python/harness/settings.py +9 -9
- package/python/harness/builtin/environment/constraints.txt +0 -31
- package/python/harness/builtin/prompts/shared/world.md +0 -1
|
@@ -4,8 +4,8 @@ A service is one deployable model server, described by services/<name>.toml:
|
|
|
4
4
|
|
|
5
5
|
kind = "segmenter" segmenter | vision | pointer | vlm | llm | policy | world_model | kinematics
|
|
6
6
|
summary = "..."
|
|
7
|
-
protocol = "http" http | openai_chat |
|
|
8
|
-
command = ["{python}", "services/servers/
|
|
7
|
+
protocol = "http" http | openai_chat | mcp, or one a package handles
|
|
8
|
+
command = ["{python}", "services/servers/serve.py", "--checkpoint", "{weights}/NAME/model.pt",
|
|
9
9
|
"--port", "{port}"]
|
|
10
10
|
port = 8810 default port
|
|
11
11
|
vram_gb = 7.2 GPU memory it holds once loaded (measured)
|
|
@@ -15,11 +15,12 @@ A service is one deployable model server, described by services/<name>.toml:
|
|
|
15
15
|
python = "3.11" (harness/packages/environments.py); {python} is its interpreter
|
|
16
16
|
requirements = ["torch==2.7.0", ...]
|
|
17
17
|
[[weights]] where its weights come from, downloaded with it
|
|
18
|
-
dir = "
|
|
19
|
-
modelscope_model = "
|
|
18
|
+
dir = "NAME"
|
|
19
|
+
modelscope_model = "OWNER/NAME"
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
A service of a protocol that is not the core's names it and gives that protocol's own
|
|
22
|
+
table ([<protocol>]): the package that starts such services reads the table (ServiceSpec
|
|
23
|
+
.options), and the service needs no command of its own.
|
|
23
24
|
Where a service runs (GPU, port, resident or on demand, or not at all) is the deploy
|
|
24
25
|
file's business (deploy.py), not the manifest's.
|
|
25
26
|
"""
|
|
@@ -34,20 +35,19 @@ from ..paths import ROOT
|
|
|
34
35
|
SERVICES_ROOT = ROOT / "services"
|
|
35
36
|
KINDS = ("segmenter", "vision", "pointer", "vlm", "llm", "policy", "world_model", "kinematics", "mcp")
|
|
36
37
|
# mcp: the Model Context Protocol over streamable HTTP (services/mcp.py).
|
|
37
|
-
PROTOCOLS = ("http", "openai_chat", "
|
|
38
|
+
PROTOCOLS = ("http", "openai_chat", "mcp")
|
|
38
39
|
WEIGHT_SOURCES = ("modelscope_model", "modelscope_dataset", "hf_model", "hf_dataset", "local")
|
|
39
40
|
# The keys of services/<name>.toml.
|
|
40
41
|
MANIFEST_KEYS = {
|
|
41
42
|
"kind": f"what the service is for: one of {', '.join(KINDS)}",
|
|
42
43
|
"summary": "one line: the model and where it comes from",
|
|
43
|
-
"protocol": f"how clients talk to it: one of {', '.join(PROTOCOLS)} (default http)"
|
|
44
|
+
"protocol": f"how clients talk to it: one of {', '.join(PROTOCOLS)} (default http), or a protocol a package "
|
|
45
|
+
"handles, with that protocol's own table under its name",
|
|
44
46
|
"port": "its default port (a deploy may give another)",
|
|
45
47
|
"vram_gb": "GPU memory it takes, measured; placement and swapping use it",
|
|
46
48
|
"load_seconds": "how long it takes to answer after a start (waits allow three times this)",
|
|
47
|
-
"command": "argv that starts it, with {python} {port} {weights} {repo}
|
|
48
|
-
"(protocol
|
|
49
|
-
"xpolicylab": "for protocol xpolicylab: policy folder, ckpt_name, action_type (joint, or ee: link6 poses "
|
|
50
|
-
"that run_policy solves by IK), action_dim, cwd, pythonpath, overrides",
|
|
49
|
+
"command": "argv that starts it, with {python} {port} {weights} {repo} and the names a deploy gives "
|
|
50
|
+
"(optional for a protocol a package handles: that package starts it)",
|
|
51
51
|
"env": "environment variables of the process",
|
|
52
52
|
"python": "interpreter (default {python}: its environment's)",
|
|
53
53
|
"environment": "the environment it runs in, installed the first time a run needs it: [environment] with "
|
|
@@ -77,7 +77,8 @@ class ServiceSpec:
|
|
|
77
77
|
vram_gb: float
|
|
78
78
|
load_seconds: float = 120.0
|
|
79
79
|
command: tuple = ()
|
|
80
|
-
|
|
80
|
+
# The table of its protocol, for a protocol that is not the core's ([<protocol>]).
|
|
81
|
+
options: dict = field(default_factory=dict)
|
|
81
82
|
env: dict = field(default_factory=dict)
|
|
82
83
|
python: str = "{python}"
|
|
83
84
|
cwd: str = "{package}"
|
|
@@ -94,17 +95,20 @@ class ServiceSpec:
|
|
|
94
95
|
def _spec(path: Path) -> ServiceSpec:
|
|
95
96
|
with path.open("rb") as handle:
|
|
96
97
|
data = tomllib.load(handle)
|
|
97
|
-
|
|
98
|
+
# (The table of a protocol that is not the core's has the protocol's name.)
|
|
99
|
+
unknown = set(data) - set(MANIFEST_KEYS) - {data.get("protocol")}
|
|
98
100
|
if unknown:
|
|
99
101
|
raise ValueError(f"{path}: unknown keys {sorted(unknown)}")
|
|
100
102
|
if data.get("kind") not in KINDS:
|
|
101
103
|
raise ValueError(f"{path}: kind must be one of {KINDS}")
|
|
102
104
|
protocol = data.get("protocol", "http")
|
|
105
|
+
if not isinstance(protocol, str) or not protocol.isidentifier():
|
|
106
|
+
raise ValueError(f"{path}: protocol is a name: one of {PROTOCOLS}, or a protocol a package handles")
|
|
103
107
|
if protocol not in PROTOCOLS:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
# Another package's protocol: its own table says what that package needs.
|
|
109
|
+
if not isinstance(data.get(protocol), dict) or not data[protocol]:
|
|
110
|
+
raise ValueError(f"{path}: protocol {protocol!r} is not one of {PROTOCOLS}: a protocol a package "
|
|
111
|
+
f"handles comes with its table [{protocol}]")
|
|
108
112
|
elif not data.get("command"):
|
|
109
113
|
raise ValueError(f"{path}: needs a command")
|
|
110
114
|
if "environment" in data:
|
|
@@ -119,7 +123,7 @@ def _spec(path: Path) -> ServiceSpec:
|
|
|
119
123
|
name=path.stem, kind=data["kind"], summary=data.get("summary", ""), protocol=protocol,
|
|
120
124
|
port=int(data["port"]), vram_gb=float(data.get("vram_gb", 0.0)),
|
|
121
125
|
load_seconds=float(data.get("load_seconds", 120.0)), command=tuple(data.get("command", ())),
|
|
122
|
-
|
|
126
|
+
options=dict(data.get(protocol, {})) if protocol not in PROTOCOLS else {}, env=dict(data.get("env", {})),
|
|
123
127
|
python=data.get("python", "{python}"), cwd=data.get("cwd", "{package}"), client=dict(data.get("client", {})),
|
|
124
128
|
weights=tuple(dict(entry) for entry in data.get("weights", [])), environment=data.get("environment"),
|
|
125
129
|
needs_files=tuple(data.get("needs_files", ())), notes=data.get("notes", ""), path=path)
|
|
@@ -15,10 +15,10 @@ into config.toml the first time it is read, and no longer read after that.
|
|
|
15
15
|
Each value has a default, a kind and its bounds (SCHEMA); update() takes a section's
|
|
16
16
|
changes, checks them and keeps the file. The settings reach a conversation when it
|
|
17
17
|
starts (App.config): its budget, its skills (sub-agents while limits.agent_depth allows
|
|
18
|
-
them), the model's advanced settings, the user's instructions;
|
|
18
|
+
them), the model's advanced settings, the user's instructions; a package's settings reach a workspace's worker when it starts, and
|
|
19
19
|
its limits (workspaces, chromes, displays) the workspace pool at once; the physical-input
|
|
20
20
|
policy and what the model learns of the user's windows are read by the workers each time
|
|
21
|
-
they change (
|
|
21
|
+
they change (a package's sections: its settings.toml).
|
|
22
22
|
Settings are changed from the app's page and the terminal chat's /settings.
|
|
23
23
|
"""
|
|
24
24
|
|
|
@@ -65,8 +65,8 @@ _CORE_SCHEMA = {section: {key: Setting(*row) for key, row in rows.items()} for s
|
|
|
65
65
|
"session": {
|
|
66
66
|
"environment": ("ask", "text", (0, 40),
|
|
67
67
|
"where a new conversation works when none is named: ask (ask every new conversation, the last "
|
|
68
|
-
"choice highlighted), last (the last choice again, without asking), or one kind (none,
|
|
69
|
-
"
|
|
68
|
+
"choice highlighted), last (the last choice again, without asking), or one kind (none, or one "
|
|
69
|
+
"the installed packages give)", "next_conversation"),
|
|
70
70
|
"agents": ("off", "choice", ("off", "on"),
|
|
71
71
|
"sub-agents in new conversations: off (their calls and prompt are not loaded; you can switch "
|
|
72
72
|
"them on in a conversation, and the agent may ask you to), on (loaded from the start, as deep "
|
|
@@ -74,14 +74,14 @@ _CORE_SCHEMA = {section: {key: Setting(*row) for key, row in rows.items()} for s
|
|
|
74
74
|
},
|
|
75
75
|
"environments": {
|
|
76
76
|
"attach": ("ask_once_session", "choice", ("never", "ask_each", "ask_once_session", "allow"),
|
|
77
|
-
"when an agent may take another environment into its conversation (a
|
|
78
|
-
"
|
|
77
|
+
"when an agent may take another environment into its conversation (a task that needs "
|
|
78
|
+
"something only another kind has), where no rule says otherwise: never, ask "
|
|
79
79
|
"each time, ask once per conversation and kind, allow. Each attachment and its reason is shown "
|
|
80
80
|
"and recorded whether or not it asked. When you skip confirmations (physical.level allow) it "
|
|
81
81
|
"does not ask; never still refuses", "now"),
|
|
82
82
|
"rules": ([], "rules", (0, 50),
|
|
83
|
-
"a level for one environment kind
|
|
84
|
-
"environments.attach", "now", {"kind": "text"}, {"level": "never", "kind": "
|
|
83
|
+
"a level for one environment kind; it wins over "
|
|
84
|
+
"environments.attach", "now", {"kind": "text"}, {"level": "never", "kind": "KIND"}),
|
|
85
85
|
},
|
|
86
86
|
"approvals": {
|
|
87
87
|
"ask": ("sensitive", "choice", ("sensitive", "programs"),
|
|
@@ -297,7 +297,7 @@ def _environment(value):
|
|
|
297
297
|
|
|
298
298
|
text = str(value if value is not None else "").strip()
|
|
299
299
|
if not re.fullmatch(r"[a-z][a-z0-9_-]{0,39}", text):
|
|
300
|
-
raise ValueError("ask, last, or a workspace kind (none,
|
|
300
|
+
raise ValueError("ask, last, or a workspace kind (none, or one the installed packages give)")
|
|
301
301
|
return text
|
|
302
302
|
|
|
303
303
|
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Pinned core: the browser benchmark's environment and install.sh of an exported
|
|
2
|
-
# XPolicyLab policy install under these constraints. Change a line here only
|
|
3
|
-
# together with a run that uses it (environment/README.md).
|
|
4
|
-
|
|
5
|
-
# PyTorch CUDA 12.8 stack used by Isaac Sim 5.1 and cuRobo.
|
|
6
|
-
torch==2.7.0
|
|
7
|
-
torchvision==0.22.0
|
|
8
|
-
torchaudio==2.7.0
|
|
9
|
-
isaacsim==5.1.0
|
|
10
|
-
|
|
11
|
-
# Isaac Sim / Isaac Lab runtime pins, as in RoboDojo scripts/install.sh.
|
|
12
|
-
numpy==1.26.0
|
|
13
|
-
packaging==23.0
|
|
14
|
-
typing_extensions==4.12.2
|
|
15
|
-
filelock==3.13.1
|
|
16
|
-
# isaacsim-kernel declares websockets==12.0 for Kit asset-search extensions that
|
|
17
|
-
# headless simulation does not load. XPolicyLab policy servers need the
|
|
18
|
-
# websockets>=13 asyncio API, so the environment uses 17.1 (see README).
|
|
19
|
-
websockets==17.1
|
|
20
|
-
scipy==1.15.3
|
|
21
|
-
warp-lang==1.11.0
|
|
22
|
-
click==8.1.7
|
|
23
|
-
psutil==5.9.8
|
|
24
|
-
wheel==0.45.1
|
|
25
|
-
starlette==0.45.3
|
|
26
|
-
onnx>=1.18,<1.22
|
|
27
|
-
ipython<9
|
|
28
|
-
virtualenv==20.30.0
|
|
29
|
-
|
|
30
|
-
# Model code shared by learned skills and perception.
|
|
31
|
-
transformers==4.57.6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Query the positioned observations in working memory with things(kind=None, near=None, radius=None, limit=50). Use thing(id) to inspect one observation and forget_thing(id) when it no longer holds.
|