Skip to content

feat(agentctl): governed web acquisition as first-class acquire command - #58

Merged
mdheller merged 1 commit into
mainfrom
feat/agentctl-acquire
Aug 4, 2026
Merged

feat(agentctl): governed web acquisition as first-class acquire command#58
mdheller merged 1 commit into
mainfrom
feat/agentctl-acquire

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Makes governed web acquisition a first-class TurtleTerm command:

turtle-agentctl acquire --url <URL> [--account ..] [--tier ..] [--seeds ..] [--enrich]

It routes through turtle-agentd to Agent Machine's POST /api/acquire, which records a governed run and dispatches to the acquire-worker — failing closed when Agent Machine is unreachable. The path mirrors the existing noetica-query transport end to end; no new transport was invented.

Changes

  • turtle-agentctl: new acquire subparser (--url required, --account, --tier, --seeds repeatable/comma-separated, --enrich) that builds {"action":"acquire","url":..,"account_class":..,"tier":..,"seeds"?,"enrich"?}. Top-of-file help updated to list acquire.
  • turtle-agentd: routes action acquirePOST {agent_machine_url}/api/acquire with body {url, accountClass, tier, seeds?, enrich?} (reuses agent_machine_url() / SOURCEOS_AGENT_MACHINE_URL and the shared _http_post helper). Writes a governed receipt and returns the acquisition result + provenance/decision. Fail-closed: unreachable Agent Machine yields decision=deny, status=error, status=blocked_offline, and no admission.
  • skill manifest (turtle-agent-machine-bridge.json): adds agent-machine.acquire command, web-acquisition intentTag, and acquisition-provenance-receipt artifact output.
  • tests: unit tests for the route (mock POST hits /api/acquire with the governed body; fail-closed on unreachable; --url required) plus an end-to-end agentctlagentd request-build/dispatch check.

Verification

  • python -m pytest assets/sourceos/tests/test_turtle_agentd.py -q8 passed
  • python -m py_compile on both scripts → OK
  • Skill manifest JSON validated
  • End-to-end offline run returns kind=acquisition_result status=error reachable=False status_label=blocked_offline decision=deny

No existing tests were weakened.

…mand

Add `turtle-agentctl acquire --url <URL> [--account ..] [--tier ..]
[--seeds ..] [--enrich]` that routes through turtle-agentd to Agent
Machine's POST /api/acquire, mirroring the existing noetica-query
transport end to end.

- turtle-agentctl: new `acquire` subparser (--url required, --account,
  --tier, --seeds repeatable/comma, --enrich) building
  {"action":"acquire","url":..,"account_class":..,"tier":..,seeds?,enrich?};
  top-of-file help updated.
- turtle-agentd: route action `acquire` -> POST {agent_machine_url}/api/acquire
  with body {url, accountClass, tier, seeds?, enrich?}; writes a governed
  receipt and fails closed (deny + status=error) when Agent Machine is
  unreachable.
- skill manifest: add agent-machine.acquire command, web-acquisition
  intentTag, and acquisition-provenance-receipt artifact output.
- tests: unit tests for the acquire route (mock POST to /api/acquire,
  fail-closed, url-required) plus an end-to-end agentctl->agentd request
  build/dispatch check.
@mdheller
mdheller merged commit 71d6aa9 into main Aug 4, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant