@matthewlam/pi-worker

Headless worker utilities for pi print-mode agents

Packages

Package details

extension

Install @matthewlam/pi-worker from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@matthewlam/pi-worker
Package
@matthewlam/pi-worker
Version
0.1.0
Published
Jul 5, 2026
Downloads
103/mo · 10/wk
Author
matthewlam
License
MIT
Types
extension
Size
14.5 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extension/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-worker

Headless worker helpers for pi -p.

Flags

  • --last-message-file <path> writes the final assistant text on agent_end.
  • --result-schema <path> enables the report_result tool and validates tool args against the JSON Schema file. Gotcha: a -t allowlist applies to extension tools too — include report_result in it (e.g. -t read,write,bash,report_result) or the model cannot call the tool and no result file is written.
  • --result-file <path> overrides the structured result output path. Without it, result.json is written next to --last-message-file.
  • --worker-heartbeat-file <path> writes a JSON liveness record on agent_start, tool_execution_end, and agent_end.
  • --worker-trust answers project trust with { "trusted": "yes" } for this process.