Docs/CLI reference

CLI reference

tama adaptive apply

Applies one previously validated adaptive repair proposal to the live hook and, when mapped, its archived source.

Applies one previously validated adaptive repair proposal to the live hook and, when mapped, its archived source.

#Invocation

DEVICE_HOOK_EDIT_APPROVED=1 tama adaptive apply <proposal-dir>

<proposal-dir> is required and must contain the proposal's report.json and candidate file. Owner consent must set DEVICE_HOOK_EDIT_APPROVED=1 outside the agent session.

#Output and state

Tama backs up the current live script, copies the proposed file over the live script and mapped archive source, records a telemetry warning, then prints applied <hook-id>; backup at <path>. Success exits 0.

#Refusals and failures

  • Missing proposal directory prints adaptive usage and exits 2.
  • Missing owner consent: refusing to modify live hooks: DEVICE_HOOK_EDIT_APPROVED is not set., then the consent-flow URL, exit 1.
  • Missing report: no report.json in <proposal-dir>.
  • Invalid report JSON: unreadable report.json: SyntaxError: Unexpected token in JSON.
  • Unresolvable live or candidate path: missing live path or proposed file for <hook-id>.

Filesystem failures are prefixed doctor: and exit 1.

Return to the adaptive command group or the complete CLI tree.