Repository navigation
feat: builder and browser operator agents on scheduled actions - #75
Merged
Merged
Conversation
Update the vendored openhuman submodule to the latest commit. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Wire the spine binary up to the agent-desktop and agent-browser crates so it can drive native UI and browser sessions, pulling in the platform accessibility, clipboard, and audio backends those crates require. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the patch entries for tinystoragedrivers-testkit, tinyagents-live and tinychannels, which the dependency graph never uses. Cargo records unused patches in Cargo.lock in an order that differs between macOS and Linux, so leaving them in breaks the image's `--locked` build when the lock is written on a Mac. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The spine now enables the upstream `legacy-import` feature, which the core requires at this pin to compile since `modules::tinyflows` references its flow-scope import. The comment explaining the two linked modules was also rewritten to clarify that each is the exact vendored gitlink the core was built against, avoiding contract mismatches and boot-time downloads. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The spine stores all secrets in the encrypted file keyring, but at this pin the file backend is gated behind its own feature and fails closed on the first secret without it. Enable the secret-file feature alongside the existing product set so the keyring works. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Requests can now be recorded as failed when Teeny attempts a build and cannot complete it, with the build module reporting the reason. This distinguishes genuine build failures from requests that were skipped or never picked up. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a teeny_hands.mcp package with a server module and a teeny_hands.tasks package with a cli module, along with hands/mcp and hands/tasks entry point scripts. These provide the scaffolding for exposing hands over MCP and running tasks from the command line. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The debug traceback path referenced `hand.os.environ`, which is not a valid attribute, so the check would fail instead of honouring `TEENY_HANDS_DEBUG`. Importing `os` at module level and reading the variable from it makes the debug output work as intended. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Cron jobs may now specify an agent and prompt instead of a command, restricted to a fixed allowlist of agents whose definitions set scheduled_actions and name their tools explicitly, with a daily cap on agent runs. Command validation was also tightened to require scripts under bin/ and to check that bin/act playbooks exist. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Pin three new scheduled jobs in the cron eval fixture: the builder agent that claims and works build requests, the build-ship command that pushes finished work to GitHub, and the browser operator agent that handles queued tasks. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a new automation core section module to provide the foundational automation logic used by the core sections pipeline. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The boot sequence now runs bin/lib/core_config.py alongside the inbound sources, so the cron shell timeout, autonomy policy, browser allowlist, linked modules and hands MCP server are written into the core's config before it starts. These settings are only read at boot, so they are rewritten on every boot. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The seeder now understands agent jobs alongside shell jobs, adding them with an isolated session and no delivery, and comparing kind, agent and prompt when deciding whether a job is up to date. A job whose kind changes is removed and re-added, since the core cannot change a job's type in place. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extend the seed_cron test harness to exercise agent jobs, including prompt storage, isolated sessions, in-place prompt updates, kind changes, and the refusals for undefined, non-scheduled, wildcard-tool, or promptless agents. The fake cron_add now carries prompt, agent_id, and session_target so these fields can be asserted. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The refusal case for an undefined agent now uses an agent that is allowed to run cron jobs but is absent from the brain, temporarily moving its definition aside so the check exercises the intended path. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…place lines Agent validation now delegates to a new agent_check.py helper that also enforces the no-tools rule for the drafting agents and restricts scheduled agents to named tools, and the cron drift check recognises seed-cron's replace action so it no longer reports a false mismatch. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The doctor now parses deploy/browser-allow.txt through the websites loader so a malformed or wildcard entry is reported as a failure. Tests were extended to cover the scheduled agent rules and the browser allow list, and the teeny-mentions tool-less check now looks in the agent check library. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The doctor test cases that inject extra tool entries into agent configs now use perl -pi -e instead of sed -i.bak, since the multi-line replacements are not portable across sed implementations. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests for the MCP server and the task queue to cover their behaviour and guard against regressions. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Cover the core configuration loading paths so regressions in defaults and overrides are caught early. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
modules and collect now accept an optional sections path instead of always reading the built-in SECTIONS directory, so other concerns can supply their own section modules. The duplicate-table test was rewritten to use a temporary directory rather than writing into the real one, and a new test covers collecting from a separate sections directory. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The spine image now links TinyComputer and tinywallet into teeny-spine and installs Chromium, fonts, git, and bubblewrap so the browser operator and hands/gh work inside the container, with TEENY_CHROME_PATH pointing at the browser. The compose service raises shm_size to 1gb for Chromium, the live test copies the browser allowlist, and shellcheck now covers bin/build-ship. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add live checks that the seeded builder and operator jobs are agent jobs while build-ship stays a shell job, and that the core keeps its cron shell timeout, autonomy and MCP settings. A builder run is then triggered against the stub model to confirm the agent is loaded from brain/agents/, opts into scheduled actions, and is offered the shell and file tools but no browser. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The builder tool checks now parse the offered tool names into one per line and match them exactly, so a tool whose name merely contains "shell" or "browser" can no longer satisfy or break the assertions. The diagnostic print was updated to use the same parsed list. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The stub model now records each full request body so tests can inspect what an agent was offered, and new checks confirm the core starts hands/mcp and lists its build_next and build_done tools to the builder while withholding the tasks tools. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Guard the jq filter against entries that have no command field so the playbook check no longer aborts on a null value. The spine manifest also enables the security-module feature, which the pinned build now requires for path gating and keyring encryption. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…octor The hands documentation now lists the build, tasks and mcp hands, explains the new B verb marker for work-queue verbs, and describes the builder and browser operator queues. The doctor test gains a case ensuring the playbook scan steps over an agent job and still checks a scheduled playbook listed after it. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Playbook drafts could previously be handed to the builder's queue and the MCP server, which belong to the scheduled agents and bin/build-ship rather than to a playbook. Both hands are now added to the not-outputs guard so a draft can no longer reach them, while queuing a browser task via hand:tasks add remains allowed. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a doctor test case asserting that a playbook whose output targets the builder's queue is rejected, so the validation rule stays covered. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nfig Adds a section on the two scheduled agents that act from cron, the builder and the browser operator, and explains the per-agent exception that lets them use named tools without approval. Also updates the spine tables to reflect the new autonomy level, browser profile location and linked modules, and replaces the 120-second shell-job wall with the configurable shell_timeout_secs that closes gap G1. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…n note Mark G1 as solved by the configurable shell timeout and add a "Landed upstream" section covering scheduled actions and the wallet policy. The deliberately-not-asked-for entry now scopes the objection to a blanket allowlist, since the per-agent opt-in covers the two agents built to act. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Describe the MCP hand as a fixed catalog limited to the builder's and browser operator's claim and finish verbs, callable only from a CronActions run of those agents. Also note that tinywallet is linked in via spine/Cargo.toml while the wallet policy belongs to the wallet hand. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The README now covers the two agents allowed to act on a schedule, the builder and the browser operator, including their cron jobs, the hands they reach and the commands to drive them. It also explains agent jobs in the cron config, the browser allowlist and the tables bin/spine writes into the core's config at boot. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…olicy TinySecurity rejects the entire policy when any forbidden path is relative, so the brain entries and `~` are now expanded and joined against the workspace root (honouring OPENHUMAN_WORKSPACE) before being written. Tests assert every emitted path is absolute. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The stdio MCP server that exposed the build and task hand verbs, along with its tests and launcher, has been deleted. The catalog and JSON-RPC loop are no longer needed now that the hands are driven another way. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The builder and operator agents no longer call hands/mcp to claim and report work; they read their job from state/workbench/desk and leave a report beside it. A new desk verb settles that report and lays out the next job, so agents hold no token and reach no hand. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The agent check no longer loads the hands MCP catalog and instead verifies that each scheduled agent names the tools its desk needs, with a shared list of tools no scheduled agent may have. The doctor invocation drops the now-unused hands library argument. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
bin/build-ship now runs `hands/build desk` before shipping, collecting the builder's report and writing its next job to state/workbench/desk/build.json, and a desk failure no longer blocks shipping finished work. The builder and operator agent configs, doctor and live spine tests, and the pinned cron eval were updated to match the new desk and tool rules. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add tests for laying out a job or task as a desk file, collecting the report through done, and setting aside reports that are refused or name an unknown task, including the bin/build-ship dry run. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The desk's output is now redirected to stderr, keeping stdout reserved for the ship itself. A comment was added to explain the split, since a desk that fails must still not stop finished work from shipping. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The live spine test now waits for the builder's model request to appear before asserting on its offered tools, and the helper that reads that request is defined earlier so the wait loop can use it. This avoids racing the tool check against the request being recorded. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the README and architecture docs to show the builder and operator agents reading their jobs from and writing their reports to desk files, with bin/build-ship and the new bin/tasks-desk collecting those reports, replacing the hands/mcp claim and finish verbs. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The boot comments in bin/spine now describe the core settings as covering the workbench the scheduled agents' file tools reach rather than the hands' MCP server, and docs/hands.md gains a row for the mcp hand, a stdio MCP server exposing only the read-only verbs. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Expands the deployment README with operator notes on where the browser may go, where the builder and operator queues live, and how to find work left for a human. Also clarifies in the env example that builder output only ships via `hands/build ship` and only with `DRY_RUN=0`. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored openhuman submodule to the latest commit so the project tracks the upstream changes. Auto-committed-on: macbook
Updated the socketioxide stack to 0.18.9, which pulls in the new engineioxide-core crate and moves matchit, sha1, and thiserror to newer major versions. Bumped the tinywallet crates to 0.29.0 and removed a stale build log that recorded a failed --locked build. Auto-committed-on: macbook
Append the latest build output, covering the openhuman crates and teeny-spine compilation along with the openhuman lib warnings. Auto-committed-on: macbook
Gap G11, which dropped every configured MCP server's tools when TinySecurity was on, has been fixed upstream in openhuman#8654, so the docs no longer describe MCP as blocked. The architecture and hands notes now say the MCP hand is unblocked but not yet built. Auto-committed-on: macbook
Appended the release build completion line and exit status to the build log, capturing that the optimized build finished successfully. Auto-committed-on: macbook
Delete the captured cargo build output that was accidentally committed; it is a generated artifact and does not belong in version control. Auto-committed-on: macbook
# Conflicts: # README.md # docs/hands.md # hands/lib/teeny_hands/requests.py
Keeps both sides: the builder, build-ship, operator and tasks-desk jobs beside bounty-pay (24 jobs, the policy's ceiling), the build output ban beside the money-hand rules in bin/lib/playbook.py, and both sets of hands in the docs. Co-authored-by: Medulla <medulla@tinyhumans.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teeny gets two agents that act on a schedule: a builder that writes and tests small programs, and a browser operator that works through websites. Both use OpenHuman's new per-agent
scheduled_actionsopt-in (tinyhumansai/openhuman#8648). This PR also bumpsvendor/openhumanto1864c68c52, which brings in #8648 and #8649.What changes
OpenHuman bump and spine features
vendor/openhumanis now at1864c68c52. The root[patch]tables are re-copied, minus the entries the spine's graph doesn't use.spine/Cargo.tomladdsweb3and dropstinymemes(that feature is gone upstream). It also addslegacy-import, because the core doesn't compile without it at this pin, andsecret-fileplussecurity-module. Without those last two, the file keyring and every TinySecurity path or command check fail closed with "not built into this host"; the live test showed the model key was never stored.browsertool) and tinywallet are linked intoteeny-spinethroughopenhuman-modules-linked.main.rscallsinstall(), and the config sets[modules] overrideswithsource = "linked"for just those two.TEENY_CHROME_PATH. Compose getsshm_size: 1gb. The persistent browser profile and downloads live understate/browser/.Core config, written at every boot (
bin/lib/core_config.py)bin/lib/core_sections/owns some tables, and each table is replaced whole on every boot.automation.pyowns:[cron] shell_timeout_secs = 1800[autonomy]: enabled,fulltier,workspace_only. Forbidden paths are absolute: Teeny's brain files andsecrets/.state/workbench/is the one read-write trusted root.[browser]: headless, persistent profile, andunattended_actionsset to click, fill, type, press, select, check and task_step.[http_request] allowed_domains, read from the revieweddeploy/browser-allow.txt.[modules][wallet_policy]goes in its own module beside this one, so the two changes don't touch the same file.Agent jobs in cron
bin/lib/cron_policy.pyandbin/seed-cronacceptagent = "..."plusprompt = "..."in place ofcommand.{builder, operator},brain/agents/,scheduled_actions = true,The builder (
brain/agents/builder.toml,hands/build)shell(sandboxed), the file tools andtool_search. It has no browser, wallet, connectors or token, and caps itself at 40 iterations.hands/buildhas five verbs:nextclaims, in order: the builder's own open claim, then the oldest picked build request, then onedailyjob per UTC day. It createsstate/workbench/<slug>/.donerecords the result.jobslists jobs.desk(see below).shipcreates the repo if it's missing and pushes through hands/gh's owncreate_repoandpush. So the guard, the owner rule, the workbench rule, the secret scan andDRY_RUNall apply. A failed ship is retried 3 times, then the job is marked failed.build_requests. It writes backshippedorfailedwith a note, and only to a request that is still picked.failedis added torequests.STATUSESto match the agreed contract.The browser operator (
brain/agents/operator.toml,hands/tasks)browser,file_read,file_writeandtool_search. No shell, no wallet.hands/tasks addrefuses a start URL that isn't on the allow list.doneacceptsok,failedorneeds_human. A payment checkpoint ends a task asneeds_human.state/media/tasks/<id>/, wherehands/x uploadcan take them.Pinned jobs
builder10 */2 * * *build-ship*/30 * * * *bin/build-ship:hands/build desk, thenhands/build shipoperator40 * * * *tasks-desk*/15 * * * *bin/tasks-deskHow the agents reach the hands under
workspace_onlyThe core's workspace is
brain/and its action directory is the checkout, soworkspace_onlyon its own lets file tools reachbrain/and nothing instate/.bin/spinegrantsstate/workbench/as the only trusted root and forbids Teeny's brain files andsecrets/.The agents call no hand directly. Instead they use a desk:
hands/<x> desk. It collects the agent's report fromstate/workbench/desk/<name>-done.jsonand passes it to the hand's owndone, so every rule applies.state/workbench/desk/<name>.json.Why this design:
hands/buildcould also runhands/gh push.I built
hands/mcpfirst and removed it after the live test. At this pin a serve host drops every configured MCP server's tools when TinySecurity is on.tools_safe_for_agentscans withCoreContext::current_embedder_config(), which isNoneunderopenhuman-core serve, so every tool comes backscan.unavailable. The core spawned the server and listed its 4 tools, then dropped them all. This is now gap G11 indocs/oh-gaps.md, along with the fix I'd propose upstream: fall back to the loaded config.Checks
bin/doctorfails if:scheduled_actionsor its named tools,act,judge,teeny-mentions,teeny-mail) gets a tool or opts in,hands/build.jq startswithcrashed on thenullcommand of an agent job, with a regression test (it fails on the old line).Tests
python3 -m unittest discover -s hands/tests -t hands/tests: 526 tests, passing on Python 3.11. New coverage:bin/test/seed_cron_test.sh: agent jobs added, kept, updated and replaced; refused for an unknown agent, a disallowed agent, an agent without scheduled_actions, a wildcard tool scope, a missing or empty prompt, command plus agent, and the daily budget.bin/test/doctor_test.sh: the posture checks above.bin/test/spine_live_test.sh, run locally against a release build of this branch, all passing. It checks:bin/build-shiplaying out the desk,brain/agents/, that ran asCronActionsand was offered shell and file tools but no browser,bin/build-shipandbin/tasks-desk, plusbin/doctor.Not verified
sandbox_mode = "sandboxed"in the container: whether TinyBox's bwrap jail works under Docker's default seccomp. If it doesn't, the shell refuses rather than running unconfined, and the builder reports the job failed.OpenHuman pin
vendor/openhumanis bumped tof329a1476c(tinyhumansai/openhuman main). It picks up:scheduled_actions(CronActions) counts as trusted automation for[wallet_policy]and x402; plain Cron is refused.docs/oh-gaps.mdis marked resolved, and the docs that saidhands/mcpwaits on it are updated.wallet.token_balancesRPC andwallet_balanceswith USDC; tinywallet 0.29.0 (Cargo.lockrefreshed).Checked at the new pin:
cargo build --release -p teeny-spinebuilds,bin/test/spine_live_test.shpasses, the hands unit tests (526), thebin/testscripts and shellcheck pass. The config keys the core config writer sets ([cron] shell_timeout_secs,[browser] unattended_actions, agentscheduled_actions) still exist in the vendored schema.